source: configure.ac @ d469e63

Last change on this file since d469e63 was d469e63, checked in by Ted Faber <faber@…>, 9 years ago

Use autoconf to set no-error=header-guard

  • Property mode set to 100644
File size: 2.7 KB
Line 
1AC_INIT([ABAC], [0.1.7], [faber@ISI.EDU])
2AC_CONFIG_SRCDIR([libabac/abac_role.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
12
13# Explicitly hunt up perl
14AC_CHECK_PROGS(PERL, perl)
15
16# for python
17AX_PYTHON_DEVEL([], [AC_MSG_ERROR([python-devel is required])] )
18AM_PATH_PYTHON
19
20# for openssl
21AX_CHECK_OPENSSL([], [AC_MSG_ERROR([openssl is required to build pacakge])] )
22
23# for xmlsec1
24AX_CHECK_XMLSEC1([], [AC_MSG_ERROR([xmlsec1 is required to build pacakge])] )
25# for xml2
26AX_CHECK_XML2([], [AC_MSG_ERROR([xml2 is required to build pacakge])] )
27
28# for swig
29AX_PKG_SWIG(1.3.17, [], [AC_MSG_ERROR([SWIG is required to build package])] )
30AX_SWIG_ENABLE_CXX
31AX_SWIG_PYTHON
32
33AC_ARG_ENABLE(debug,
34    [AC_HELP_STRING([--enable-debug], [build with debug symbols])],
35    [CFLAGS+="-g "],[])
36
37# Checks for libraries.
38AC_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
48AC_MSG_CHECKING(for site_perl directory)
49if test -z "$SITE_PERL"; then
50        SITE_PERL=`$PERL -e 'print((grep(/site_perl/ && !m#/mach#, @INC))[0], "\n");'`
51fi
52AC_MSG_RESULT($SITE_PERL)
53AC_SUBST(SITE_PERL)
54
55AC_LANG(C)
56# Checks for header files.
57AC_CHECK_HEADERS([inttypes.h stddef.h stdlib.h string.h readpassphrase.h paths.h])
58
59# Checks for typedefs, structures, and compiler characteristics.
60AC_HEADER_STDBOOL
61AC_TYPE_SIZE_T
62AC_TYPE_UINT16_T
63AC_TYPE_UINT32_T
64AC_TYPE_UINT8_T
65AC_CHECK_TYPES([ptrdiff_t])
66HOLD_CFLAGS=$CFLAGS
67CFLAGS="$CFLAGS -Wno-error=header-guard"
68AC_COMPILE_IFELSE([[]],,CFLAGS=$HOLD_CFLAGS)
69
70AC_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.
77AC_FUNC_MALLOC
78AC_CHECK_FUNCS([atexit memset strchr strdup readpassphrase])
79
80AC_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])
81AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.