4 # A CI_PREREQ(2003.01.16)
6 AC_INIT([simgrid],[2.92],[simgrid2-users@listes.ens-lyon.fr])
7 AC_CONFIG_SRCDIR([include/gras.h])
8 AC_CONFIG_HEADERS([src/gras_config.h])
10 AC_REVISION($Revision$)
15 # MACRO_DIR should tell aclocal to search for my macro. That's the autoconf
16 # maintainer plan, but automake does not implement this yet (as in 1.8)
17 AC_CONFIG_MACRO_DIR(acmacro)
18 # It seems to be called ACLOCAL_INCLUDE...
19 # A M_ACLOCAL_INCLUDE(acmacro)
23 # declare the modules (no optional module)
26 dnl Load anything under acmacro/*.m4
28 dnl test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
29 ACLOCAL="$ACLOCAL -I acmacro"
36 # Check architecture signature begin
38 # Check architecture signature end
39 GRAS_CHECK_STRUCT_COMPACTION
41 # Checks for header files.
44 AC_CHECK_HEADERS([sys/socket.h winsock.h winsock2.h \
49 AC_CHECK_FUNCS([gettimeofday \
53 # Checks for typedefs, structures, and compiler characteristics.
58 # Checks for library functions.
60 dnl A C_CHECK_FUNCS([memset strchr strerror usleep])
62 dnl ####[ Search libs ]#######################################################
63 dnl A CI_PACKAGE([S imGrid],[the SimGrid simulator],[SG_init],[-lsimgrid],[simgrid.h],,:)
64 dnl A M_CONDITIONAL(HAVE_SG,test x$HAVE_SimGrid = xyes)
65 dnl if test x$HAVE_SimGrid = xyes; then
66 dnl SIMGRID_DEP="-lsimgrid"
70 AC_SUBST([SIMGRID_DEP])
73 dnl A C_CHECK_LIB(pthread, pthread_mutex_lock, LIBS="$LIBS -lpthread")
75 AC_CHECK_LIB(nsl, gethostbyname, [GRAS_DEP="$GRAS_DEP -lnsl"])
76 AC_CHECK_LIB(socket, connect, [GRAS_DEP="$GRAS_DEP -lsocket"])
78 AC_MSG_CHECKING(for extra dependencies of libgras)
80 *mingw* ) GRAS_DEP=-lws2_32;;
83 if test "x$GRAS_DEP" = x; then
86 AC_MSG_RESULT($GRAS_DEP)
90 dnl ####[ maint mode ]#######################################################
92 if test x$USE_MAINTAINER_MODE = xyes
94 # enable_iso_c=yes # Let's go funky
95 GNOME_COMPILE_WARNINGS(yes)
102 dnl ####[ check for some programms ]###########################################
103 AC_CHECK_PROG(BASH, bash, `which bash`, /bin/sh)
104 WARNING="This file is generated, do not edit"
107 # Can we rebuild the parsers?
108 # We really want flex and refuse other lex. So, the parser is portable and
109 # does not induce extra lib dependency
112 # Can we rebuild the xml-lexers from the XML specification?
113 # if not, simply touch the flex source files (which are distributed in
114 # tarballs even if generated by flexml) and hope for the best.
115 AC_CHECK_PROG(FLEXML,flexml,,NOTFOUND)
116 AM_CONDITIONAL(HAVE_FLEXML,test x$FLEXML != NOTFOUND)
118 dnl ####[ Makes the output ]###################################################
119 # examples/bandwidth/Makefile examples/bandwidth/test_sg
120 # examples/pastry/Makefile examples/pastry/test_sg
128 examples/msg/Makefile examples/msg/run_msg_test
129 examples/gras/Makefile
130 examples/gras/ping/Makefile examples/gras/ping/test_sg examples/gras/ping/test_rl
131 examples/gras/timer/Makefile examples/gras/timer/test_sg examples/gras/timer/test_rl
132 examples/gras/chrono/Makefile examples/gras/chrono/test_sg examples/gras/chrono/test_rl
134 doc/Doxyfile.main doc/Doxyfile.API doc/Doxyfile.Examples
135 tools/compile-remote-worker tools/Makefile
139 testsuite/gras/trp_tcp_usage
140 testsuite/gras/trp_file_usage
143 testsuite/run_tests \
144 testsuite/gras/trp_tcp_usage testsuite/gras/trp_file_usage \
145 tools/compile-remote-worker \
146 examples/msg/run_msg_test \
147 examples/gras/ping/test_sg examples/gras/ping/test_rl \
148 examples/gras/timer/test_sg examples/gras/timer/test_rl \
149 examples/gras/chrono/test_sg examples/gras/chrono/test_rl \
151 test -e $file && chmod +x $file; \
153 chmod +x $srcdir/tools/gras-check-arch;
156 # examples/gras/pastry/test_sg
157 # examples/gras/bandwidth/test_sg
161 # examples/gras/saturate/Makefile examples/gras/saturate/test_sg
162 # examples/gras/alnem/Makefile examples/gras/alnem/test_sg
170 Configuration of package \`${PACKAGE}' on $gras_arch_name (=$gras_arch):