/[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 1495 - (show annotations) (download)
Wed Feb 10 15:05:18 2010 UTC (12 years, 3 months ago) by aramv
File size: 5459 byte(s)
Added module for EICs, moved -L flag to CFLAGS - time to test with ETICS
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([1.92])
5 AC_INIT([ees], [0.0.1], aramv@nikhef.nl)
6 AM_INIT_AUTOMAKE
7 AC_CONFIG_MACRO_DIR([m4])
8 AC_CONFIG_HEADERS([include/private/eef_config.h])
9
10 # Checks for programs.
11 # needs to be called before AC_PROG_LIBTOOL
12 AC_LIBTOOL_DLOPEN
13 AC_PROG_CC
14 AM_PROG_CC_C_O
15 AC_PROG_CC_STDC
16 #AC_PROG_CC_C89
17 AC_PROG_CPP
18 AC_PROG_INSTALL
19 AC_PROG_LN_S
20 AC_PROG_MAKE_SET
21 AC_PROG_LEX
22 AC_PROG_YACC
23
24 if test "$LEX" == ":" ; then
25 AC_MSG_ERROR([No lex program found])
26 else
27 if test "$LEX" == "flex" ; then
28 AC_DEFINE(HAVE_FLEX, 1,[Flex installed])
29 fi
30 fi
31
32 if test "$YACC" != "bison -y"; then
33 AC_MSG_ERROR([No yacc program found])
34 fi
35
36 AC_PROG_LIBTOOL
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 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 pthread.h getopt.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 AC_CHECK_LIB([pthread], [pthread_create])
55 #AC_CHECK_LIB([xacml])
56 #AC_CHECK_LIB([crypto])
57 #AC_CHECK_LIB([ssl])
58
59 # SVN revision
60 SVN_REVISION=`svn info . | sed -ne "s/^Revision: \(.*\:\)\{0,1\}\(.*\)$/\2/p"`
61 AC_SUBST(SVN_REVISION)
62
63 # Checks Lex version
64 lex_version=`$LEX --version | sed -e 's/\(f*\)lex\s\?//g'`
65 preferred_lex_version="2.5.9"
66
67 AC_MSG_CHECKING([for lex/flex version])
68 AC_MSG_RESULT($lex_version)
69
70 AX_COMPARE_VERSION([$preferred_lex_version], [le], [$lex_version], [enable_yylex_destroy="yes"], [enable_yylex_destroy="no"], [whether yylex_destroy() is available to clean up the lexer.])
71
72 AM_CONDITIONAL([ENABLE_YYLEX_DESTROY], [test "x$enable_yylex_destroy" = "xyes"])
73 AS_IF([test "x$enable_yylex_destroy" = "xyes"], [
74 AC_DEFINE(HAVE_YYLEX_DESTROY, 1,[yylex_destroy is available to clean up the parser])
75 ], [
76 AC_DEFINE(HAVE_YYLEX_DESTROY, 0,[yylex_destroy is not available to clean up the parser])
77 ])
78
79 # Release version
80 AC_SUBST(MAJOR_VERSION,["0"])
81
82 # Doxygen options
83 DX_PDF_FEATURE(ON)
84 DX_HTML_FEATURE(ON)
85 DX_INIT_DOXYGEN(FULL-PACKAGE-NAME, doxygen.cfg, doc)
86
87 # Debug mode
88 debug_default=no
89 AC_MSG_CHECKING([whether to enable debugging])
90 AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug],[turn on debugging])],
91 [
92 AC_MSG_RESULT(yes)
93 enable_debug="yes"
94 ],[
95 AC_MSG_RESULT($debug_default)
96 enable_debug=$debug_default
97 ]
98 )
99
100 # SAML2XACML2 path
101 AC_ARG_WITH([saml2xacml2],
102 [AS_HELP_STRING([--with-saml2xacml2=<path>], [set path to SAML2-XACML2 library @<:@default=/usr@:>@])],
103 [],
104 [with_saml2xacml2=/usr]
105 )
106
107 SAML2XACML2_INCLUDES=
108 SAML2XACML2_LIBRARIES="-lxacml"
109 AS_IF([test "x$with_saml2xacml2" != xno],
110 #AC_DEFINE([HAVE_LIBXACML], [1], [Define if you have libxacml])
111 [AC_CHECK_LIB([xacml], [main],
112 [
113 ],
114 [
115 AC_MSG_RESULT(looking for libxacml in $with_saml2xacml2)
116 SAML2XACML2_INCLUDES="-I$with_saml2xacml2/include/"
117 if test "x$host_cpu" = "xx86_64"; then
118 CFLAGS="$CFLAGS -L$with_saml2xacml2/lib64/"
119 else
120 CFLAGS="$CFLAGS -L$with_saml2xacml2/lib/"
121 fi
122 ])
123 ]
124 )
125 AC_SUBST([SAML2XACML2_INCLUDES])
126 AC_SUBST([SAML2XACML2_LIBRARIES])
127
128
129 AM_MAINTAINER_MODE([enable])
130 # This is for the Makefile.am files
131 AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = "xyes"])
132 AS_IF([test "x$enable_debug" = "xyes"], [
133 #AC_MSG_NOTICE("debugging enabled!")
134 AX_CHECK_COMPILER_FLAGS([-g], [CFLAGS="$CFLAGS -g"])
135 AX_CHECK_COMPILER_FLAGS([-ggdb], [CFLAGS="$CFLAGS -ggdb3"])
136 AX_CHECK_COMPILER_FLAGS([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
137 AX_CHECK_COMPILER_FLAGS([-Wbad-function-cast], [CFLAGS="$CFLAGS -Wbad-function-cast"])
138 AX_CHECK_COMPILER_FLAGS([-Wchar-subscripts], [CFLAGS="$CFLAGS -Wchar-subscripts"])
139 AX_CHECK_COMPILER_FLAGS([-Wno-long-long], [CFLAGS="$CFLAGS -Wno-long-long"])
140 AX_CHECK_COMPILER_FLAGS([-pedantic], [CFLAGS="$CFLAGS -pedantic"])
141 # This is for the C files.
142 AC_DEFINE(ENABLE_DEBUG, 1,[Debug enabled])
143 ], [
144 AX_CHECK_COMPILER_FLAGS([-O2], [CFLAGS="$CFLAGS -O2"])
145 AC_DEFINE(ENABLE_DEBUG, 0,[Debug disabled])
146 ])
147
148 AX_CHECK_COMPILER_FLAGS([-Wuninitialized], [CFLAGS="$CFLAGS -Wuninitialized"])
149 AX_CHECK_COMPILER_FLAGS([-Wshadow], [CFLAGS="$CFLAGS -Wshadow"])
150 AX_CHECK_COMPILER_FLAGS([-Wcast-align], [CFLAGS="$CFLAGS -Wcast-align"])
151 AX_CHECK_COMPILER_FLAGS([-Wcast-qual], [CFLAGS="$CFLAGS -Wcast-qual"])
152 AX_CHECK_COMPILER_FLAGS([-Winline], [CFLAGS="$CFLAGS -Winline"])
153 AX_CHECK_COMPILER_FLAGS([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"])
154 AX_CHECK_COMPILER_FLAGS([-Wpointer-arith], [CFLAGS="$CFLAGS -Wpointer-arith"])
155 AX_CHECK_COMPILER_FLAGS([-Wnested-externs], [CFLAGS="$CFLAGS -Wnested-externs"])
156 AX_CHECK_COMPILER_FLAGS([-Wredundant-decls], [CFLAGS="$CFLAGS -Wredundant-decls"])
157 AX_CHECK_COMPILER_FLAGS([-Wstrict-prototypes], [CFLAGS="$CFLAGS -Wstrict-prototypes"])
158 AX_CHECK_COMPILER_FLAGS([-std], [CFLAGS="$CFLAGS -std=c99"])
159 AX_CHECK_COMPILER_FLAGS([-Wall], [CFLAGS="$CFLAGS -Wall"])
160
161 # Check for libdir
162 if [ test -d "${prefix}/lib64/"]; then
163 libdir ="${prefix}/lib64/"
164 fi
165
166 # Module directory
167 AX_DEFINE_DIR(MODULE_DIR, [libdir/modules/], ["Module directory: $module_dir."])
168 AC_SUBST(MODULE_DIR)
169
170 # Dependant Makefiles
171 AC_CONFIG_FILES([ Makefile
172 src/Makefile
173 plugin_examples/Makefile
174 ])
175 AC_OUTPUT

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