[a8617e0] | 1 | AC_INIT([ABAC], [0.1.9], [faber@ISI.EDU]) |
---|
[4918535] | 2 | AC_CONFIG_SRCDIR([libabac/abac_role.c]) |
---|
| 3 | AM_INIT_AUTOMAKE([foreign subdir-objects]) |
---|
[6ede88c] | 4 | LT_INIT |
---|
| 5 | |
---|
| 6 | AC_CONFIG_MACRO_DIR([m4]) |
---|
| 7 | |
---|
| 8 | # Checks for programs. |
---|
| 9 | AC_PROG_CXX |
---|
| 10 | AC_PROG_CC |
---|
[b73c2538] | 11 | AC_PROG_LIBTOOL |
---|
[6ede88c] | 12 | |
---|
[48fa0ee] | 13 | # Explicitly hunt up perl |
---|
| 14 | AC_CHECK_PROGS(PERL, perl) |
---|
| 15 | |
---|
[43a5429] | 16 | # for python |
---|
[831da18] | 17 | AX_PYTHON_DEVEL([], [AC_MSG_ERROR([python-devel is required])] ) |
---|
[43a5429] | 18 | AM_PATH_PYTHON |
---|
[46a2dc3] | 19 | |
---|
[461541a] | 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 |
---|
[46a2dc3] | 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 |
---|
[43a5429] | 32 | |
---|
[6ede88c] | 33 | AC_ARG_ENABLE(debug, |
---|
| 34 | [AC_HELP_STRING([--enable-debug], [build with debug symbols])], |
---|
| 35 | [CFLAGS+="-g "],[]) |
---|
| 36 | |
---|
| 37 | # Checks for libraries. |
---|
[48fa0ee] | 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 | |
---|
[d469e63] | 55 | AC_LANG(C) |
---|
[6ede88c] | 56 | # Checks for header files. |
---|
[2579c1a] | 57 | AC_CHECK_HEADERS([inttypes.h stddef.h stdlib.h string.h readpassphrase.h paths.h]) |
---|
[6ede88c] | 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]) |
---|
[560b453] | 66 | AC_MSG_CHECKING([checking for header-guard]) |
---|
[d469e63] | 67 | HOLD_CFLAGS=$CFLAGS |
---|
[560b453] | 68 | CFLAGS="$CFLAGS -Werror -Wno-error=header-guard" |
---|
| 69 | AC_COMPILE_IFELSE([[]],AC_MSG_RESULT([yes]),CFLAGS=$HOLD_CFLAGS;AC_MSG_RESULT([no])) |
---|
[6ede88c] | 70 | |
---|
[2579c1a] | 71 | AC_CHECK_DECL([_PATH_TTY],[],AC_DEFINE_UNQUOTED([_PATH_TTY],"/dev/tty",[Define to tty device node path]),[ |
---|
| 72 | #ifdef HAVE_PATHS_H |
---|
| 73 | # include <paths.h> |
---|
| 74 | #endif |
---|
| 75 | ]) |
---|
| 76 | |
---|
[6ede88c] | 77 | # Checks for library functions. |
---|
| 78 | AC_FUNC_MALLOC |
---|
[2579c1a] | 79 | AC_CHECK_FUNCS([atexit memset strchr strdup readpassphrase]) |
---|
[6ede88c] | 80 | |
---|
[4f79997] | 81 | 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]) |
---|
[6ede88c] | 82 | AC_OUTPUT |
---|