Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bug fix : we could get stuck into an infinite loop for floating point precision reason.
[simgrid.git] / configure.ac
1 AC_PREREQ(2.59)
2
3 #We need a recent ACI
4 ACI_PREREQ(2003.01.16)
5
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])
9
10 AC_REVISION($Revision$)
11 AC_CANONICAL_TARGET
12 AC_LANG([C])
13
14 AM_INIT_AUTOMAKE(gnu)
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)
20
21
22
23
24 AC_PROG_LIBTOOL
25
26 # declare the modules (no optional module)
27
28 dnl
29 dnl Load anything under acmacro/*.m4
30 dnl
31 dnl test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
32 ACLOCAL="$ACLOCAL -I acmacro"
33
34
35 AC_PROG_CC
36 AM_SANITY_CHECK
37 AC_PROG_MAKE_SET
38
39 # Check architecture signature begin
40 GRAS_ARCH
41 # Check architecture signature end
42 GRAS_CHECK_STRUCT_COMPACTION
43
44 # Checks for header files.
45 AC_HEADER_STDC
46 AC_HEADER_TIME
47 AC_CHECK_HEADERS([sys/socket.h winsock.h winsock2.h \
48                   sys/stat.h \
49                   ucontext.h \
50                   sys/time.h \
51                   errno.h unistd.h ])
52 AC_CHECK_FUNCS([gettimeofday \
53                 getdtablesize \
54                 sysconf])
55
56 # Checks for typedefs, structures, and compiler characteristics.
57 AC_C_CONST
58 AC_C_INLINE
59 AC_TYPE_SIZE_T
60
61 # Checks for library functions.
62 dnl A C_FUNC_MEMCMP
63 dnl A C_CHECK_FUNCS([memset strchr strerror usleep])
64
65 # Can we rebuild the parsers?
66 # We really want flex and refuse other lex. So, the parser is portable and
67 # does not induce extra lib dependency
68 AC_PROG_LEX
69 if test "$LEX" != flex; then
70   LEX="$SHELL $missing_dir/missing flex"
71 fi
72                                                                   
73 # Can we rebuild the documentation?
74 GTK_DOC_CHECK()
75 AC_SUBST([htmldir],         ['${datadir}/doc/gras/html'])dnl
76
77 dnl ####[ Search libs ]#######################################################
78 dnl A CI_PACKAGE([S imGrid],[the SimGrid simulator],[SG_init],[-lsimgrid],[simgrid.h],,:)
79 dnl A M_CONDITIONAL(HAVE_SG,test x$HAVE_SimGrid = xyes)
80 dnl if test x$HAVE_SimGrid = xyes; then
81 dnl   SIMGRID_DEP="-lsimgrid"
82 dnl else
83   SIMGRID_DEP=""
84 dnl fi
85 AC_SUBST([SIMGRID_DEP])
86
87
88 dnl A C_CHECK_LIB(pthread, pthread_mutex_lock, LIBS="$LIBS -lpthread")
89 GRAS_DEP=""
90 AC_CHECK_LIB(nsl, gethostbyname, [GRAS_DEP="$GRAS_DEP -lnsl"])
91 AC_CHECK_LIB(socket, connect,    [GRAS_DEP="$GRAS_DEP -lsocket"])
92
93 AC_MSG_CHECKING(for extra dependencies of libgras)
94 case $host_os in
95   *mingw* ) GRAS_DEP=-lws2_32;;
96 esac
97            
98 if test "x$GRAS_DEP" = x; then 
99    AC_MSG_RESULT(none)
100 else
101    AC_MSG_RESULT($GRAS_DEP)
102 fi
103 AC_SUBST([GRAS_DEP])
104
105 dnl ####[ maint mode ]#######################################################
106 AM_MAINTAINER_MODE
107 if test x$USE_MAINTAINER_MODE = xyes 
108 then
109 #   enable_iso_c=yes             # Let's go funky
110    GNOME_COMPILE_WARNINGS(yes)
111 fi
112
113 AC_SUBST(CFLAGS)
114 AC_SUBST(CPPFLAGS)
115 AC_SUBST(LDFLAGS)
116
117 dnl ####[ check for some programms ]###########################################
118 AC_CHECK_PROG(BASH, bash, `which bash`, /bin/sh)
119 WARNING="This file is generated, do not edit"
120 AC_SUBST(WARNING)
121
122 dnl ####[ Makes the output ]###################################################
123 #    examples/bandwidth/Makefile examples/bandwidth/test_sg
124 #    examples/pastry/Makefile    examples/pastry/test_sg
125
126 AC_CONFIG_FILES([
127   Makefile
128   include/Makefile
129   src/Makefile
130   src/amok/Makefile
131   examples/Makefile 
132     examples/ping/Makefile      examples/ping/test_sg     examples/ping/test_rl
133   doc/Makefile
134   tools/compile-remote-worker
135   testsuite/Makefile
136     testsuite/run_tests    
137     testsuite/gras/trp_tcp_usage
138     testsuite/gras/trp_file_usage
139 ],[
140      test -e testsuite/run_tests          && chmod +x testsuite/run_tests;
141      test -e testsuite/gras/trp_tcp_usage && chmod +x testsuite/gras/trp_tcp_usage;
142      test -e testsuite/gras/trp_file_usage&& chmod +x testsuite/gras/trp_file_usage;
143      test -e tools/compile-remote-worker  && chmod +x tools/compile-remote-worker;
144      test -e examples/ping/test_sg        && chmod +x examples/ping/test_sg;
145      test -e examples/ping/test_rl        && chmod +x examples/ping/test_rl;
146 #     test -e examples/bandwidth/test_sg   && chmod +x examples/bandwidth/test_sg;
147      test -e examples/pastry/test_sg      && chmod +x examples/pastry/test_sg;
148      chmod +x $srcdir/tools/gras-check-arch;
149 ])
150
151
152
153 #    examples/saturate/Makefile  examples/saturate/test_sg
154 #    examples/alnem/Makefile     examples/alnem/test_sg
155
156
157
158 AC_OUTPUT
159
160 echo "
161
162 Configuration of package \`${PACKAGE}' on $gras_arch_name (=$gras_arch):
163
164         Compiler:       ${CC}
165
166         CFlags:         ${CFLAGS}
167         LDFlags:        ${LDFLAGS}
168 "
169
170 exit 0;