6 AC_INIT([GRAS],[0.7],[martin.quinson@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)
26 # declare the modules (no optional module)
29 dnl Load anything under acmacro/*.m4
31 dnl test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
32 ACLOCAL="$ACLOCAL -I acmacro"
39 # Check architecture signature begin
41 # Check architecture signature end
42 GRAS_CHECK_STRUCT_COMPACTION
44 # Checks for header files.
47 AC_CHECK_HEADERS([sys/socket.h winsock.h winsock2.h \
50 AC_CHECK_FUNCS([gettimeofday \
55 AC_MSG_CHECKING(how to link against winsock)
58 *mingw* ) GRAS_WINSOCK_DEP=-lws2_32;;
59 * ) GRAS_WINSOCK_DEP="";;
62 if test x$GRAS_WINSOCK_DEP = x; then
63 AC_MSG_RESULT(not needed)
65 AC_MSG_RESULT($winsock_ver)
67 AC_SUBST([GRAS_WINSOCK_DEP])
69 # Checks for typedefs, structures, and compiler characteristics.
74 # Checks for library functions.
76 dnl A C_CHECK_FUNCS([memset strchr strerror usleep])
78 # Can we rebuild the parsers?
79 # We really want flex and refuse other lex. So, the parser is portable and
80 # does not induce extra lib dependency
82 if test "$LEX" != flex; then
83 LEX="$SHELL $missing_dir/missing flex"
86 # Can we rebuild the documentation?
88 AC_SUBST([htmldir], ['${datadir}/doc/gras/html'])dnl
90 dnl ####[ Search libs ]#######################################################
91 ACI_PACKAGE([SimGrid],[the SimGrid simulator],[SG_init],[-lsimgrid],[simgrid.h],,:)
92 AM_CONDITIONAL(HAVE_SG,test x$HAVE_SimGrid = xyes)
94 dnl A C_CHECK_LIB(pthread, pthread_mutex_lock, LIBS="$LIBS -lpthread")
95 AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])
96 AC_CHECK_LIB(socket, connect, [LIBS="$LIBS -lsocket"])
98 AC_CHECK_LIB(c,swapcontext,
99 [AC_DEFINE([USE_CONTEXT],1,[Define if GNU contexts available and you wish to use them])],
100 [AC_MSG_ERROR([[Cannot find context in your libc, go away !]])])
103 dnl ####[ maint mode ]#######################################################
105 if test x$USE_MAINTAINER_MODE = xyes
107 # enable_iso_c=yes # Let's go funky
108 GNOME_COMPILE_WARNINGS(yes)
115 dnl ####[ check for some programms ]###########################################
116 AC_CHECK_PROG(BASH, bash, `which bash`, /bin/sh)
117 WARNING="This file is generated, do not edit"
120 dnl ####[ Makes the output ]###################################################
121 # examples/bandwidth/Makefile examples/bandwidth/test_sg
122 # examples/pastry/Makefile examples/pastry/test_sg
130 examples/ping/Makefile examples/ping/test_sg examples/ping/test_rl
132 tools/compile-remote-worker
135 testsuite/gras/trp_tcp_usage
136 testsuite/gras/trp_file_usage
138 test -e testsuite/run_tests && chmod +x testsuite/run_tests;
139 test -e testsuite/gras/trp_tcp_usage && chmod +x testsuite/gras/trp_tcp_usage;
140 test -e testsuite/gras/trp_file_usage&& chmod +x testsuite/gras/trp_file_usage;
141 test -e tools/compile-remote-worker && chmod +x tools/compile-remote-worker;
142 test -e examples/ping/test_sg && chmod +x examples/ping/test_sg;
143 test -e examples/ping/test_rl && chmod +x examples/ping/test_rl;
144 # test -e examples/bandwidth/test_sg && chmod +x examples/bandwidth/test_sg;
145 test -e examples/pastry/test_sg && chmod +x examples/pastry/test_sg;
146 chmod +x $srcdir/tools/gras-check-arch;
151 # examples/saturate/Makefile examples/saturate/test_sg
152 # examples/alnem/Makefile examples/alnem/test_sg
160 Configuration of package \`${PACKAGE}' on $gras_arch_name (=$gras_arch):