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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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