/[pdpsoft]/trunk/grid-mw-security/ees/configure.ac
ViewVC logotype

Contents of /trunk/grid-mw-security/ees/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 796 - (show annotations) (download)
Tue Sep 15 15:10:00 2009 UTC (12 years, 10 months ago) by aramv
File size: 3785 byte(s)
Tweaked configure script
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([1.92])
5 AC_INIT([ees], [0.1], aramv@nikhef.nl)
6 AM_INIT_AUTOMAKE
7 #AC_CONFIG_SRCDIR([config.h.in])
8 AC_CONFIG_MACRO_DIR([m4])
9 AC_CONFIG_HEADERS([ees_config.h])
10
11 # Checks for programs.
12 # needs to be called before AC_PROG_LIBTOOL
13 AC_LIBTOOL_DLOPEN
14 #AC_PROG_CXX
15 #AC_PROG_AWK
16 AC_PROG_CC
17 AM_PROG_CC_C_O
18 #AC_PROG_CC_C99
19 AC_PROG_CC_C89
20 AC_PROG_CPP
21 AC_PROG_INSTALL
22 AC_PROG_LN_S
23 AC_PROG_MAKE_SET
24 AC_PROG_LEX
25 if "$LEX" == ":"; then
26 AC_MSG_ERROR([No lex program found])
27 fi
28 #AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, :)
29
30 AC_PROG_YACC
31 if test "$YACC" != 'bison -y'; then
32 AC_MSG_ERROR([No yacc program found])
33 fi
34
35 AC_PROG_LIBTOOL
36 #LT_INIT
37
38 # Checks for libraries.
39
40 # Checks for header files.
41 AC_HEADER_DIRENT
42 AC_HEADER_STDC
43 AC_CHECK_HEADERS([dlfcn.h malloc.h stddef.h stdlib.h string.h syslog.h wchar.h stdio.h linux/limits.h])
44
45 # Checks for typedefs, structures, and compiler characteristics.
46 AC_C_CONST
47 AC_TYPE_SIZE_T
48
49 # Checks for library functions.
50 AC_FUNC_MALLOC
51 AC_FUNC_REALLOC
52 AC_CHECK_FUNCS([memset])
53 AC_CHECK_LIB([dl], [dlopen])
54
55 # SVN revision
56 SVN_REVISION=`svn info . | sed -ne "s/^Revision: \(.*\:\)\{0,1\}\(.*\)$/\2/p"`
57 AC_SUBST(SVN_REVISION)
58
59 # Checks Lex version
60 lex_version=`$LEX --version | sed -e "s/\(f\)lex\s\?//g"`
61 preferred_lex_version="2.5.9"
62
63 AC_MSG_CHECKING([for lex/flex version])
64 AC_MSG_RESULT($lex_version)
65
66 AX_COMPARE_VERSION([$preferred_lex_version], [le], [$lex_version], AC_DEFINE(HAVE_YYLEX_DESTROY, [1], [We can use yylex_destroy() to clean up the lexer.]))
67
68 # Release version
69 AC_SUBST(MAJOR_VERSION,["0"])
70
71 # Doxygen options
72 DX_PDF_FEATURE(ON)
73 DX_HTML_FEATURE(ON)
74 DX_INIT_DOXYGEN(FULL-PACKAGE-NAME, doxygen.cfg, doc)
75
76 # Debug mode
77 #debug_default=yes
78 debug_default=no
79 AC_MSG_CHECKING([whether to enable debugging])
80 AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug],[turn on debugging])],
81 [
82 AC_MSG_RESULT(yes)
83 enable_debug="yes"
84 ],[
85 AC_MSG_RESULT($debug_default)
86 enable_debug=$debug_default
87 ]
88 )
89
90 AS_IF([test x"$enable_debug" = "xyes"], [
91 #AC_MSG_NOTICE("debugging enabled!")
92 CC_CHECK_CFLAGS([-g], [CFLAGS="$CFLAGS -g"])
93 #CC_CHECK_CFLAGS([-ggdb], [CFLAGS="$CFLAGS -ggdb"])
94 CC_CHECK_CFLAGS([-ggdb], [CFLAGS="$CFLAGS -ggdb3"])
95 CC_CHECK_CFLAGS([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
96 CC_CHECK_CFLAGS([-Wuninitialized], [CFLAGS="$CFLAGS -Wuninitialized"])
97 CC_CHECK_CFLAGS([-Wbad-function-cast], [CFLAGS="$CFLAGS -Wbad-function-cast"])
98 CC_CHECK_CFLAGS([-Wcast-align], [CFLAGS="$CFLAGS -Wcast-align"])
99 CC_CHECK_CFLAGS([-Wcast-qual], [CFLAGS="$CFLAGS -Wcast-qual"])
100 CC_CHECK_CFLAGS([-Wchar-subscripts], [CFLAGS="$CFLAGS -Wchar-subscripts"])
101 CC_CHECK_CFLAGS([-Winline], [CFLAGS="$CFLAGS -Winline"])
102 CC_CHECK_CFLAGS([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"])
103 CC_CHECK_CFLAGS([-Wnested-externs], [CFLAGS="$CFLAGS -Wnested-externs"])
104 CC_CHECK_CFLAGS([-Wpointer-arith], [CFLAGS="$CFLAGS -Wpointer-arith"])
105 CC_CHECK_CFLAGS([-Wredundant-decls], [CFLAGS="$CFLAGS -Wredundant-decls"])
106 CC_CHECK_CFLAGS([-Wshadow], [CFLAGS="$CFLAGS -Wshadow"])
107 CC_CHECK_CFLAGS([-Wstrict-prototypes], [CFLAGS="$CFLAGS -Wstrict-prototypes"])
108 CC_CHECK_CFLAGS([-Wno-long-long], [CFLAGS="$CFLAGS -Wno-long-long"])
109 CC_CHECK_CFLAGS([-Wall], [CFLAGS="$CFLAGS -Wall"])
110 AC_DEFINE(ENABLE_DEBUG, 1,[Debug enabled])
111 ], [
112 CC_CHECK_CFLAGS([-O2], [CFLAGS="$CFLAGS -O2"])
113 CC_CHECK_CFLAGS([-Wall], [CFLAGS="$CFLAGS -Wall"])
114 AC_DEFINE(ENABLE_DEBUG, 0,[Debug disabled])
115 ])
116
117 # Module directory
118
119 AC_DEFINE_DIR(MODULE_DIR, libdir/modules/, ["Module directory: $module_dir."])
120 AC_SUBST(MODULE_DIR)
121
122 # Dependant Makefiles
123 AC_CONFIG_FILES([ Makefile
124 src/Makefile
125 plugin_examples/Makefile
126 ])
127 AC_OUTPUT

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28