1 | AC_INIT([ABAC], [0.1.8], [faber@ISI.EDU]) |
---|
2 | AC_CONFIG_SRCDIR([libabac/abac_role.c]) |
---|
3 | AM_INIT_AUTOMAKE([foreign subdir-objects]) |
---|
4 | LT_INIT |
---|
5 | |
---|
6 | AC_CONFIG_MACRO_DIR([m4]) |
---|
7 | |
---|
8 | # Checks for programs. |
---|
9 | AC_PROG_CXX |
---|
10 | AC_PROG_CC |
---|
11 | AC_PROG_LIBTOOL |
---|
12 | |
---|
13 | # Explicitly hunt up perl |
---|
14 | AC_CHECK_PROGS(PERL, perl) |
---|
15 | |
---|
16 | # for python |
---|
17 | AX_PYTHON_DEVEL([], [AC_MSG_ERROR([python-devel is required])] ) |
---|
18 | AM_PATH_PYTHON |
---|
19 | |
---|
20 | # for openssl |
---|
21 | AX_CHECK_OPENSSL([], [AC_MSG_ERROR([openssl is required to build pacakge])] ) |
---|
22 | |
---|
23 | # for xmlsec1 |
---|
24 | AX_CHECK_XMLSEC1([], [AC_MSG_ERROR([xmlsec1 is required to build pacakge])] ) |
---|
25 | # for xml2 |
---|
26 | AX_CHECK_XML2([], [AC_MSG_ERROR([xml2 is required to build pacakge])] ) |
---|
27 | |
---|
28 | # for swig |
---|
29 | AX_PKG_SWIG(1.3.17, [], [AC_MSG_ERROR([SWIG is required to build package])] ) |
---|
30 | AX_SWIG_ENABLE_CXX |
---|
31 | AX_SWIG_PYTHON |
---|
32 | |
---|
33 | AC_ARG_ENABLE(debug, |
---|
34 | [AC_HELP_STRING([--enable-debug], [build with debug symbols])], |
---|
35 | [CFLAGS+="-g "],[]) |
---|
36 | |
---|
37 | # Checks for libraries. |
---|
38 | AC_ARG_WITH( |
---|
39 | [site-perl], |
---|
40 | [AS_HELP_STRING([--with-site-perl=DIR], |
---|
41 | [directory in which to install perl modules])], |
---|
42 | [SITE_PERL="$withval"], [SITE_PERL=""]) |
---|
43 | |
---|
44 | |
---|
45 | # Ask perl for a likely site_perl directory. If the user has already specified |
---|
46 | # it using --with-site-perl, use that value. NB, this does not respect prefix, |
---|
47 | # so users wishing to do a local install must use --with-site-perl |
---|
48 | AC_MSG_CHECKING(for site_perl directory) |
---|
49 | if test -z "$SITE_PERL"; then |
---|
50 | SITE_PERL=`$PERL -e 'print((grep(/site_perl/ && !m#/mach#, @INC))[0], "\n");'` |
---|
51 | fi |
---|
52 | AC_MSG_RESULT($SITE_PERL) |
---|
53 | AC_SUBST(SITE_PERL) |
---|
54 | |
---|
55 | AC_LANG(C) |
---|
56 | # Checks for header files. |
---|
57 | AC_CHECK_HEADERS([inttypes.h stddef.h stdlib.h string.h readpassphrase.h paths.h]) |
---|
58 | |
---|
59 | # Checks for typedefs, structures, and compiler characteristics. |
---|
60 | AC_HEADER_STDBOOL |
---|
61 | AC_TYPE_SIZE_T |
---|
62 | AC_TYPE_UINT16_T |
---|
63 | AC_TYPE_UINT32_T |
---|
64 | AC_TYPE_UINT8_T |
---|
65 | AC_CHECK_TYPES([ptrdiff_t]) |
---|
66 | HOLD_CFLAGS=$CFLAGS |
---|
67 | CFLAGS="$CFLAGS -Wno-error=header-guard" |
---|
68 | AC_COMPILE_IFELSE([[]],,CFLAGS=$HOLD_CFLAGS) |
---|
69 | |
---|
70 | AC_CHECK_DECL([_PATH_TTY],[],AC_DEFINE_UNQUOTED([_PATH_TTY],"/dev/tty",[Define to tty device node path]),[ |
---|
71 | #ifdef HAVE_PATHS_H |
---|
72 | # include <paths.h> |
---|
73 | #endif |
---|
74 | ]) |
---|
75 | |
---|
76 | # Checks for library functions. |
---|
77 | AC_FUNC_MALLOC |
---|
78 | AC_CHECK_FUNCS([atexit memset strchr strdup readpassphrase]) |
---|
79 | |
---|
80 | AC_CONFIG_FILES([Makefile tests/Makefile tests/creddy_tests/Makefile tests/creddy_prover_tests/Makefile tests/attr_tests/Makefile tests/python_tests/Makefile tests/scaling_tests/Makefile tests/scaling_tests/daisychain/Makefile tests/scaling_tests/daisychain/likes_python/Makefile tests/scaling_tests/haystack/Makefile tests/scaling_tests/haystack/ralphs_prover/Makefile tests/example_scripts/Makefile tests/example_scripts/wiki/Makefile tests/example_scripts/c/Makefile tests/example_scripts/python/Makefile tests/example_scripts/perl/Makefile]) |
---|
81 | AC_OUTPUT |
---|