6 AC_INIT([simgrid],[2.90],[arnaud.legrand@imag.fr])
7 #AC_INIT([GRAS],[0.7],[martin.quinson@ens-lyon.fr])
8 AC_CONFIG_SRCDIR([include/gras.h])
9 AC_CONFIG_HEADERS([src/gras_config.h])
11 AC_REVISION($Revision$)
16 # MACRO_DIR should tell aclocal to search for my macro. That's the autoconf
17 # maintainer plan, but automake does not implement this yet (as in 1.8)
18 AC_CONFIG_MACRO_DIR(acmacro)
19 # It seems to be called ACLOCAL_INCLUDE...
20 # A M_ACLOCAL_INCLUDE(acmacro)
27 # declare the modules (no optional module)
30 dnl Load anything under acmacro/*.m4
32 dnl test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
33 ACLOCAL="$ACLOCAL -I acmacro"
40 # Check architecture signature begin
42 # Check architecture signature end
43 GRAS_CHECK_STRUCT_COMPACTION
45 # Checks for header files.
48 AC_CHECK_HEADERS([sys/socket.h winsock.h winsock2.h \
53 AC_CHECK_FUNCS([gettimeofday \
57 # Checks for typedefs, structures, and compiler characteristics.
62 # Checks for library functions.
64 dnl A C_CHECK_FUNCS([memset strchr strerror usleep])
66 # Can we rebuild the parsers?
67 # We really want flex and refuse other lex. So, the parser is portable and
68 # does not induce extra lib dependency
70 if test "$LEX" != flex; then
71 LEX="$SHELL $missing_dir/missing flex"
74 # Can we rebuild the documentation?
76 AC_SUBST([htmldir], ['${datadir}/doc/gras/html'])dnl
78 dnl ####[ Search libs ]#######################################################
79 dnl A CI_PACKAGE([S imGrid],[the SimGrid simulator],[SG_init],[-lsimgrid],[simgrid.h],,:)
80 dnl A M_CONDITIONAL(HAVE_SG,test x$HAVE_SimGrid = xyes)
81 dnl if test x$HAVE_SimGrid = xyes; then
82 dnl SIMGRID_DEP="-lsimgrid"
86 AC_SUBST([SIMGRID_DEP])
89 dnl A C_CHECK_LIB(pthread, pthread_mutex_lock, LIBS="$LIBS -lpthread")
91 AC_CHECK_LIB(nsl, gethostbyname, [GRAS_DEP="$GRAS_DEP -lnsl"])
92 AC_CHECK_LIB(socket, connect, [GRAS_DEP="$GRAS_DEP -lsocket"])
94 AC_MSG_CHECKING(for extra dependencies of libgras)
96 *mingw* ) GRAS_DEP=-lws2_32;;
99 if test "x$GRAS_DEP" = x; then
102 AC_MSG_RESULT($GRAS_DEP)
106 dnl ####[ maint mode ]#######################################################
108 if test x$USE_MAINTAINER_MODE = xyes
110 # enable_iso_c=yes # Let's go funky
111 GNOME_COMPILE_WARNINGS(yes)
118 dnl ####[ check for some programms ]###########################################
119 AC_CHECK_PROG(BASH, bash, `which bash`, /bin/sh)
120 WARNING="This file is generated, do not edit"
123 dnl ####[ Makes the output ]###################################################
124 # examples/bandwidth/Makefile examples/bandwidth/test_sg
125 # examples/pastry/Makefile examples/pastry/test_sg
133 examples/ping/Makefile examples/ping/test_sg examples/ping/test_rl
135 tools/compile-remote-worker
138 testsuite/gras/trp_tcp_usage
139 testsuite/gras/trp_file_usage
141 test -e testsuite/run_tests && chmod +x testsuite/run_tests;
142 test -e testsuite/gras/trp_tcp_usage && chmod +x testsuite/gras/trp_tcp_usage;
143 test -e testsuite/gras/trp_file_usage&& chmod +x testsuite/gras/trp_file_usage;
144 test -e tools/compile-remote-worker && chmod +x tools/compile-remote-worker;
145 test -e examples/ping/test_sg && chmod +x examples/ping/test_sg;
146 test -e examples/ping/test_rl && chmod +x examples/ping/test_rl;
147 # test -e examples/bandwidth/test_sg && chmod +x examples/bandwidth/test_sg;
148 test -e examples/pastry/test_sg && chmod +x examples/pastry/test_sg;
149 chmod +x $srcdir/tools/gras-check-arch;
154 # examples/saturate/Makefile examples/saturate/test_sg
155 # examples/alnem/Makefile examples/alnem/test_sg
163 Configuration of package \`${PACKAGE}' on $gras_arch_name (=$gras_arch):