source: configure.ac @ f89b991

mei_rt2
Last change on this file since f89b991 was 2e9455f, checked in by Mei <mei@…>, 11 years ago

1) added namespace
2) tweak ?This,
3) allowing linking role/oset as constraining conditions
4) adding access_tests regression testing that uses GENI's access policy
5) added couple multi contexts regression tests
6) add compression/uncompression calls to abac_encode_string/abac_decode_string
(libstrongwan only allows 512 char for attribute rule storage)
7) add attribute_now option to creddy that takes a whole char string for attribute
rule

  • Property mode set to 100644
File size: 4.2 KB
Line 
1AC_INIT([ABAC], [0.2.4], [mei@ISI.EDU])
2AC_CONFIG_SRCDIR([libabac/abac_aspect.c])
3AM_INIT_AUTOMAKE([foreign subdir-objects])
4LT_INIT
5
6AC_CONFIG_MACRO_DIR([m4])
7
8# Checks for programs.
9AC_PROG_CXX
10AC_PROG_CC
11AC_PROG_LIBTOOL
12AM_PROG_LEX
13AC_PROG_YACC
14##MEI
15AC_PROG_YAP(6.2.2)
16AC_PROG_SWIG
17
18# Explicitly hunt up perl
19AC_CHECK_PROGS(PERL, perl)
20
21# for python
22AM_PATH_PYTHON
23SWIG_ENABLE_CXX
24SWIG_PYTHON
25
26# optionally check for java
27AC_ARG_ENABLE([java-feature],
28              [AC_HELP_STRING([--disable-java-feature],
29                              [disable Java feature])])
30
31AS_IF([test X$enable_java_feature != Xno],
32[
33AC_CHECK_CLASSPATH
34AX_PROG_JAVAC
35AX_PROG_JAVA
36AX_CHECK_JNI
37])
38
39AM_CONDITIONAL(HAVE_JNI, test x$have_jni = xyes)
40
41AC_ARG_ENABLE(debug,
42    [AC_HELP_STRING([--enable-debug], [build with debug symbols])],
43    [CFLAGS+="-g "],[])
44
45# Checks for libraries.
46AC_ARG_WITH([strongswan],
47    [AS_HELP_STRING([--with-strongswan=PATH], [location of strongswan-4.6.4 source tree])],
48    [LIBSTRONGSWAN_source=$withval],
49    [AC_ERROR([path to strongswan source tree required])])
50test -d $LIBSTRONGSWAN_source || AC_ERROR([strongswan-4.6.4 source dir not found. Don't use ~, use \$HOME.])
51AC_SUBST([LIBSTRONGSWAN_source])
52
53AC_ARG_WITH([strongswan-ld-path],
54    [AS_HELP_STRING([--with-strongswan-ld-path=PATH],
55    [directory where libstrongswan is installed if not /usr/local/lib])],
56    [strongswan_ld=$withval], [strongswan_ld="/usr/local/lib"])
57LDFLAGS="$LDFLAGS -L$strongswan_ld"
58
59AC_ARG_WITH(
60    [site-perl],
61    [AS_HELP_STRING([--with-site-perl=DIR],
62                   [directory in which to install perl modules])],
63    [SITE_PERL="$withval"], [SITE_PERL=""])
64   
65# this is so wrong
66libstrongswan_plugins=$(grep scripts_plugins $LIBSTRONGSWAN_source/Makefile | awk -F= '{ print $2 }')
67test -z "$libstrongswan_plugins" && AC_ERROR([Can't find libstrongswan plugins. Make sure you've run ./configure --enable-monolithic in the strongswan source tree])
68AC_SUBST(libstrongswan_plugins)
69
70# Make sure perl is threaded
71AC_MSG_CHECKING(for thread-capable perl)
72perl_threaded=`echo "use threads;" | $PERL`
73if test -n "$perl_threaded"; then
74    AC_ERROR([Can't run ABAC with non-threaded Perl, please check with (perl -V) or (ldd /usr/bin/perl)])
75fi
76AC_MSG_RESULT(ok)
77AC_SUBST(perl_threaded)
78
79# Ask perl for a likely site_perl directory.  If the user has already specified
80# it using --with-site-perl, use that value.  NB, this does not respect prefix,
81# so users wishing to do a local install must use --with-site-perl
82AC_MSG_CHECKING(for site_perl directory)
83if test -z "$SITE_PERL"; then
84        SITE_PERL=`$PERL -e 'print((grep(/site_perl/ && !m#/mach#, @INC))[0], "\n");'`
85fi
86
87AC_ARG_WITH([extra-includes],
88    [AC_HELP_STRING([--with-extra-includes=PATH],
89        [Directory to search for additional includes, e.g, Yap includes])],
90    [CFLAGS="$CFLAGS -I$withval"
91     CXXFLAGS="$CXXFLAGS -I$withval"
92     CPPFLAGS="$CPPFLAGS -I$withval"
93     ])
94
95AC_ARG_WITH([flex],
96    [AC_HELP_STRING([--with-flex=PATH],
97        [Suggestion for the flex binary])],
98    [LEX=$withval])
99
100AC_MSG_RESULT($SITE_PERL)
101AC_SUBST(SITE_PERL)
102
103# Checks for header files.
104AC_CHECK_HEADERS([inttypes.h stddef.h stdlib.h string.h])
105
106# Checks for typedefs, structures, and compiler characteristics.
107AC_HEADER_STDBOOL
108AC_TYPE_SIZE_T
109AC_TYPE_UINT16_T
110AC_TYPE_UINT32_T
111AC_TYPE_UINT8_T
112AC_CHECK_TYPES([ptrdiff_t])
113AC_CHECK_HEADER([Yap/YapInterface.h],,[AC_MSG_ERROR(Cannot find Yap headers)])
114
115# Checks for library functions.
116AC_FUNC_MALLOC
117AC_CHECK_FUNCS([atexit memset strchr strdup])
118
119# Confirm that the link path includes strongswan
120AC_CHECK_LIB(strongswan, library_init,,
121             [AC_MSG_ERROR('set --with-strongswan-ld-path')])
122
123# snagged from strongswan, required
124AC_CHECK_FUNC(
125        [register_printf_specifier],
126        [AC_DEFINE(HAVE_PRINTF_SPECIFIER)],
127        [AC_CHECK_FUNC(
128                [register_printf_function],
129                [AC_DEFINE(HAVE_PRINTF_FUNCTION)],
130                [
131                        AC_MSG_NOTICE([printf does not support custom format specifiers!])
132                        vstr=true
133                ]
134        )]
135)
136
137if test x$vstr = xtrue; then
138        AC_HAVE_LIBRARY([vstr],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])])
139        AC_DEFINE(USE_VSTR)
140fi
141
142AC_CONFIG_FILES([Makefile])
143AC_OUTPUT
144
Note: See TracBrowser for help on using the repository browser.