Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
distribute the result of datadesc_usage for different arches
[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.1],[martin.quinson@ens-lyon.fr])
7 AC_CONFIG_SRCDIR([src/include/gras.h])
8 AC_REVISION($Revision$)
9 dnl A C_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 AM_CONDITIONAL(HAVE_SG,test x$HAVE_SimGrid = xyes)
56
57 dnl A C_CHECK_LIB(pthread, pthread_mutex_lock)
58         
59 dnl ####[ maint mode ]#######################################################
60 AM_MAINTAINER_MODE
61 if test x$USE_MAINTAINER_MODE = xyes 
62 then
63    GNOME_COMPILE_WARNINGS(yes)
64 fi
65
66 AC_SUBST(CFLAGS)
67 AC_SUBST(CPPFLAGS)
68 AC_SUBST(LDFLAGS)
69
70 dnl ####[ check for some programms ]###########################################
71 AC_CHECK_PROG(BASH, bash, `which bash`, /bin/sh)
72 WARNING="This file is generated, do not edit"
73 AC_SUBST(WARNING)
74
75 dnl ####[ Makes the output ]###################################################
76 AC_CONFIG_FILES([
77   Makefile
78   src/Makefile
79     src/include/Makefile
80       src/include/modules/Makefile
81     src/base/Makefile
82       src/base/Tests/Makefile
83       src/base/Tests/run_tests
84         src/base/Tests/trp_tcp_usage
85         src/base/Tests/trp_file_usage
86     src/examples/Makefile 
87       src/examples/ping/Makefile 
88   doc/Makefile
89 ],[( cd src/include ; test -e gras || ln -s . gras )
90      test -e src/base/Tests/trp_tcp_usage && chmod +x src/base/Tests/trp_tcp_usage;
91      test -e src/base/Tests/trp_file_usage && chmod +x src/base/Tests/trp_file_usage;
92      test -e src/base/Tests/run_tests     && chmod +x src/base/Tests/run_tests;
93      chmod +x src/examples/ping/test_rl; chmod +x src/examples/ping/test_sg])
94
95 #    src/modules/Makefile
96 #      src/examples/bandwidth/Makefile src/examples/saturate/Makefile
97 #      src/examples/alnem/Makefile 
98
99 AC_OUTPUT
100
101 echo "
102
103 Configuration of package \`${PACKAGE}':
104
105         Compiler:       ${CC}
106
107         CFlags:         ${CFLAGS}
108         LDFlags:        ${LDFLAGS}
109 "
110
111 exit 0;