Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a little script to check the gras signature of the current arch
[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.1b],[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 begin
33 GRAS_ARCH
34 # Check architecture signature end
35
36 # Checks for header files.
37 AC_HEADER_STDC
38 AC_CHECK_HEADERS([stddef.h stdlib.h string.h unistd.h])
39
40 # Checks for typedefs, structures, and compiler characteristics.
41 AC_C_CONST
42 AC_C_INLINE
43 AC_TYPE_SIZE_T
44
45 # Checks for library functions.
46 AC_FUNC_MALLOC
47 AC_FUNC_MEMCMP
48 AC_CHECK_FUNCS([memset strchr strerror usleep])
49
50 # Can we rebuild the documentation?
51 GNOME_GTKDOC_CHECK
52
53 dnl ####[ Search libs ]#######################################################
54 dnl A CI_PACKAGE_SAVED(XML,[XML library (version XML2)],xml2-config,,,:)
55 ACI_PACKAGE([SimGrid],[the SimGrid simulator],[SG_init],[-lsimgrid],[simgrid.h],,:)
56 AM_CONDITIONAL(HAVE_SG,test x$HAVE_SimGrid = xyes)
57
58 dnl A C_CHECK_LIB(pthread, pthread_mutex_lock, LIBS="$LIBS -lpthread")
59 AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])
60 AC_CHECK_LIB(socket, connect,    [LIBS="$LIBS -lsocket"])
61         
62 dnl ####[ maint mode ]#######################################################
63 AM_MAINTAINER_MODE
64 if test x$USE_MAINTAINER_MODE = xyes 
65 then
66    GNOME_COMPILE_WARNINGS(yes)
67 fi
68
69 AC_SUBST(CFLAGS)
70 AC_SUBST(CPPFLAGS)
71 AC_SUBST(LDFLAGS)
72
73 dnl ####[ check for some programms ]###########################################
74 AC_CHECK_PROG(BASH, bash, `which bash`, /bin/sh)
75 WARNING="This file is generated, do not edit"
76 AC_SUBST(WARNING)
77
78 dnl ####[ Makes the output ]###################################################
79 AC_CONFIG_FILES([
80   Makefile
81   src/Makefile
82     src/include/Makefile
83       src/include/modules/Makefile
84     src/base/Makefile
85       src/base/Tests/Makefile
86       src/base/Tests/run_tests
87         src/base/Tests/trp_tcp_usage
88         src/base/Tests/trp_file_usage
89     src/examples/Makefile 
90       src/examples/ping/Makefile 
91   doc/Makefile
92 ],[( cd src/include ; test -e gras || ln -s . gras )
93      test -e src/base/Tests/trp_tcp_usage && chmod +x src/base/Tests/trp_tcp_usage;
94      test -e src/base/Tests/trp_file_usage && chmod +x src/base/Tests/trp_file_usage;
95      test -e src/base/Tests/run_tests     && chmod +x src/base/Tests/run_tests;
96      chmod +x src/examples/ping/test_rl; chmod +x src/examples/ping/test_sg])
97
98 #    src/modules/Makefile
99 #      src/examples/bandwidth/Makefile src/examples/saturate/Makefile
100 #      src/examples/alnem/Makefile 
101
102 AC_OUTPUT
103
104 echo "
105
106 Configuration of package \`${PACKAGE}':
107
108         Compiler:       ${CC}
109
110         CFlags:         ${CFLAGS}
111         LDFlags:        ${LDFLAGS}
112 "
113
114 exit 0;