/[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 572 - (hide annotations) (download)
Mon Jul 20 13:31:12 2009 UTC (12 years, 10 months ago) by aramv
File size: 3590 byte(s)
Added check for flex to determine of yylex_destroy() can be used
1 aramv 425 # -*- Autoconf -*-
2     # Process this file with autoconf to produce a configure script.
3    
4     AC_PREREQ([2.63])
5 aramv 441 #FULL-PACKAGE-NAME = ees
6     #VERSION = 0.1
7     #BUG-REPORT-ADDRESS = aramv@nikhef.nl
8     AC_INIT([ees], [0.1], aramv@nikhef.nl)
9 aramv 425 AM_INIT_AUTOMAKE
10     #AC_CONFIG_SRCDIR([config.h.in])
11     AC_CONFIG_MACRO_DIR([m4])
12 aramv 445 AC_CONFIG_HEADERS([ees_config.h])
13 aramv 425
14 aramv 429 # needs to be called before AC_PROG_LIBTOOL
15     AC_LIBTOOL_DLOPEN
16    
17 aramv 425 # Checks for programs.
18     #AC_PROG_CXX
19     #AC_PROG_AWK
20     AC_PROG_CC
21     AM_PROG_CC_C_O
22 aramv 429 #AC_PROG_CC_C99
23     AC_PROG_CC_C89
24 aramv 425 AC_PROG_CPP
25     AC_PROG_INSTALL
26     AC_PROG_LN_S
27     AC_PROG_MAKE_SET
28 aramv 525 AC_PROG_LEX
29     AC_PROG_YACC
30 aramv 425 AC_PROG_LIBTOOL
31     #LT_INIT
32    
33     # Checks for libraries.
34    
35     # Checks for header files.
36     AC_HEADER_DIRENT
37     AC_HEADER_STDC
38 aramv 445 AC_CHECK_HEADERS([dlfcn.h malloc.h stddef.h stdlib.h string.h syslog.h wchar.h])
39 aramv 425
40     # Checks for typedefs, structures, and compiler characteristics.
41 aramv 445 AC_C_CONST
42 aramv 425 AC_TYPE_SIZE_T
43    
44     # Checks for library functions.
45     AC_FUNC_MALLOC
46     AC_FUNC_REALLOC
47     AC_CHECK_FUNCS([memset])
48     AC_CHECK_LIB([dl], [dlopen])
49    
50 aramv 438 # Sets SVN revision
51     SVN_REVISION=`svn info . | sed -ne "s/^Revision: \(.*\:\)\{0,1\}\(.*\)$/\2/p"`
52 aramv 572 lex_version=`$LEX --version | sed -e "s/\(f\)lex\s\?//g"`
53     preferred_lex_version="2.5.9"
54    
55     AC_MSG_CHECKING([for lex/flex version])
56     AC_MSG_RESULT($lex_version)
57    
58     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.]))
59 aramv 438 AC_SUBST(SVN_REVISION,[$SVN_REVISION])
60 aramv 441 AC_SUBST(VERSION,[$SVN_REVISION])
61 aramv 438
62 aramv 480
63     DX_PDF_FEATURE(ON)
64     DX_HTML_FEATURE(ON)
65     DX_INIT_DOXYGEN(FULL-PACKAGE-NAME, doxygen.cfg, doc)
66    
67 aramv 525 #debug_default=yes
68     debug_default=no
69 aramv 480 AC_MSG_CHECKING([whether to enable debugging])
70     AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug],[turn on debugging])],
71     [
72     AC_MSG_RESULT(yes)
73     enable_debug="yes"
74     ],[
75     AC_MSG_RESULT($debug_default)
76     enable_debug=$debug_default
77     ]
78     )
79    
80 aramv 427 AS_IF([test x"$enable_debug" = "xyes"], [
81 aramv 480 #AC_MSG_NOTICE("debugging enabled!")
82 aramv 427 CC_CHECK_CFLAGS([-g], [CFLAGS="$CFLAGS -g"])
83 aramv 429 #CC_CHECK_CFLAGS([-ggdb], [CFLAGS="$CFLAGS -ggdb"])
84     CC_CHECK_CFLAGS([-ggdb], [CFLAGS="$CFLAGS -ggdb3"])
85     CC_CHECK_CFLAGS([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
86 aramv 427 CC_CHECK_CFLAGS([-Wuninitialized], [CFLAGS="$CFLAGS -Wuninitialized"])
87     CC_CHECK_CFLAGS([-Wbad-function-cast], [CFLAGS="$CFLAGS -Wbad-function-cast"])
88     CC_CHECK_CFLAGS([-Wcast-align], [CFLAGS="$CFLAGS -Wcast-align"])
89     CC_CHECK_CFLAGS([-Wcast-qual], [CFLAGS="$CFLAGS -Wcast-qual"])
90     CC_CHECK_CFLAGS([-Wchar-subscripts], [CFLAGS="$CFLAGS -Wchar-subscripts"])
91     CC_CHECK_CFLAGS([-Winline], [CFLAGS="$CFLAGS -Winline"])
92     CC_CHECK_CFLAGS([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"])
93     CC_CHECK_CFLAGS([-Wnested-externs], [CFLAGS="$CFLAGS -Wnested-externs"])
94     CC_CHECK_CFLAGS([-Wpointer-arith], [CFLAGS="$CFLAGS -Wpointer-arith"])
95     CC_CHECK_CFLAGS([-Wredundant-decls], [CFLAGS="$CFLAGS -Wredundant-decls"])
96     CC_CHECK_CFLAGS([-Wshadow], [CFLAGS="$CFLAGS -Wshadow"])
97     CC_CHECK_CFLAGS([-Wstrict-prototypes], [CFLAGS="$CFLAGS -Wstrict-prototypes"])
98     CC_CHECK_CFLAGS([-Wno-long-long], [CFLAGS="$CFLAGS -Wno-long-long"])
99     CC_CHECK_CFLAGS([-Wall], [CFLAGS="$CFLAGS -Wall"])
100     AC_DEFINE(ENABLE_DEBUG, 1,[Debug enabled])
101     ], [
102     CC_CHECK_CFLAGS([-O2], [CFLAGS="$CFLAGS -O2"])
103     CC_CHECK_CFLAGS([-Wall], [CFLAGS="$CFLAGS -Wall"])
104 aramv 480 AC_DEFINE(ENABLE_DEBUG, 0,[Debug disabled])
105 aramv 427 ])
106 aramv 425
107 aramv 481 AC_DEFINE_DIR(MODULE_DIR, libdir/modules/, ["Module directory: $module_dir."])
108 aramv 484 AC_SUBST(MODULE_DIR,[$MODULE_DIR])
109 aramv 427
110 aramv 425 AC_CONFIG_FILES([ Makefile
111     src/Makefile
112     plugin_examples/Makefile
113     ])
114     AC_OUTPUT

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