Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
callbacks' persistant state. Almost no change from GS/vars.c: function renaming;...
[simgrid.git] / configure.ac
1 AC_PREREQ(2.57)
2
3 #We need a recent ACI
4 ACI_PREREQ(2003.01.16)
5
6 AC_INIT([GRAS],[0.0.040205],[martin.quinson@ens-lyon.fr])
7 AC_CONFIG_SRCDIR([src/include/gras.h])
8 AC_REVISION($Revision$)
9 AC_CONFIG_SUBDIRS(src/nws_portability)
10
11 AC_CANONICAL_TARGET
12 AC_LANG([C])
13
14 AM_CONFIG_HEADER(src/gras_config.h)
15 AM_INIT_AUTOMAKE
16
17 AM_PROG_LIBTOOL
18
19 # declare the modules (no optional module)
20
21 dnl
22 dnl Load anything under acmacro/*.m4
23 dnl
24 test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
25 ACLOCAL="$ACLOCAL -I acmacro"
26
27
28 AC_PROG_CC
29 AM_SANITY_CHECK
30 AC_PROG_MAKE_SET
31
32 # Check architecture signature
33 GRAS_ARCH
34
35 # Checks for header files.
36 AC_HEADER_STDC
37 AC_CHECK_HEADERS([stddef.h stdlib.h string.h unistd.h])
38
39 # Checks for typedefs, structures, and compiler characteristics.
40 AC_C_CONST
41 AC_C_INLINE
42 AC_TYPE_SIZE_T
43
44 # Checks for library functions.
45 AC_FUNC_MALLOC
46 AC_FUNC_MEMCMP
47 AC_CHECK_FUNCS([memset strchr strerror usleep])
48
49 # Can we rebuild the documentation?
50 GNOME_GTKDOC_CHECK
51
52 dnl ####[ Search libs ]#######################################################
53 ACI_PACKAGE_SAVED(XML,[XML library (version XML2)],xml2-config,,,:)
54 ACI_PACKAGE([SimGrid],[the SimGrid simulator],[SG_init],[-lsimgrid],[simgrid.h])
55
56 dnl A C_CHECK_LIB(pthread, pthread_mutex_lock)
57         
58 dnl ####[ maint mode ]#######################################################
59 AM_MAINTAINER_MODE
60 if test x$USE_MAINTAINER_MODE = xyes 
61 then
62    GNOME_COMPILE_WARNINGS(yes)
63 fi
64
65 AC_SUBST(CFLAGS)
66 AC_SUBST(CPPFLAGS)
67 AC_SUBST(LDFLAGS)
68
69 dnl ####[ check for some programms ]###########################################
70 AC_CHECK_PROG(BASH, bash, `which bash`, /bin/sh)
71 WARNING="This file is generated, do not edit"
72 AC_SUBST(WARNING)
73
74 dnl ####[ Makes the output ]###################################################
75 AC_CONFIG_FILES([
76   Makefile
77   src/Makefile
78     src/include/Makefile
79       src/include/modules/Makefile
80     src/base/Makefile
81       src/base/Tests/Makefile
82       src/base/Tests/gs_example
83       src/base/Tests/run_tests
84     src/modules/Makefile
85     src/examples/Makefile 
86       src/examples/ping/Makefile 
87       src/examples/bandwidth/Makefile src/examples/saturate/Makefile
88       src/examples/alnem/Makefile 
89   doc/Makefile
90 ],[( cd src/include ; test -e gras || ln -s . gras )
91      test -e src/base/Tests/gs_example && chmod +x src/base/Tests/gs_example;
92      test -e src/base/Tests/run_tests && chmod +x src/base/Tests/run_tests])
93
94 AC_OUTPUT
95
96 echo "
97
98 Configuration of package \`${PACKAGE}':
99
100         Compiler:       ${CC}
101
102         CFlags:         ${CFLAGS}
103         LDFlags:        ${LDFLAGS}
104 "
105
106 exit 0;