2010-10-07 15:37:30 -07:00
|
|
|
m4_define([__apparmor_version], m4_sinclude(common/Version))
|
|
|
|
m4_ifdef(__apparmor_version, , m4_define([__apparmor_version], m4_sinclude(../../common/Version)))
|
|
|
|
m4_define([__aalen], decr(len(__apparmor_version)))
|
|
|
|
m4_define([apparmor_version], m4_substr(__apparmor_version, 0, __aalen))
|
|
|
|
|
2007-07-28 15:41:04 +00:00
|
|
|
AC_INIT(configure.in)
|
|
|
|
|
2010-10-07 15:37:30 -07:00
|
|
|
AM_INIT_AUTOMAKE(libapparmor1, apparmor_version)
|
2007-07-28 15:41:04 +00:00
|
|
|
|
|
|
|
AM_PROG_LEX
|
|
|
|
AC_PROG_YACC
|
2008-02-26 12:30:48 +00:00
|
|
|
AC_PROG_SED
|
2012-11-14 11:00:06 -08:00
|
|
|
PKG_PROG_PKG_CONFIG
|
2007-07-28 15:41:04 +00:00
|
|
|
|
|
|
|
AC_PATH_PROG([SWIG], [swig])
|
|
|
|
|
2009-05-12 21:56:56 +00:00
|
|
|
sinclude(m4/ac_pod2man.m4)
|
2007-07-28 15:41:04 +00:00
|
|
|
PROG_POD2MAN
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(Checking for Python)
|
|
|
|
AC_ARG_WITH(python,
|
|
|
|
[ --with-python enable the python wrapper [[default=no]]],
|
|
|
|
[AC_MSG_RESULT($withval)], [AC_MSG_RESULT(no)])
|
|
|
|
if test "$with_python" = "yes"; then
|
2013-09-06 13:42:46 -07:00
|
|
|
test -z "$SWIG" && AC_MSG_ERROR([swig is required when enabling python bindings])
|
2013-09-06 13:43:52 -07:00
|
|
|
AC_PATH_PROG(PYTHON, python)
|
|
|
|
test -z "$PYTHON" && AC_MSG_ERROR([python is required when enabling python bindings])
|
|
|
|
sinclude(m4/ac_python_devel.m4)
|
|
|
|
AC_PYTHON_DEVEL
|
|
|
|
AM_PATH_PYTHON
|
2007-07-28 15:41:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(Checking for perl)
|
|
|
|
AC_ARG_WITH(perl,
|
|
|
|
[ --with-perl enable the perl wrapper [[default=no]]],
|
|
|
|
[AC_MSG_RESULT($withval)], [AC_MSG_RESULT(no)])
|
|
|
|
if test "$with_perl" = "yes"; then
|
2013-09-06 13:42:46 -07:00
|
|
|
test -z "$SWIG" && AC_MSG_ERROR([swig is required when enabling perl bindings])
|
2013-09-06 13:43:52 -07:00
|
|
|
AC_PATH_PROG(PERL, perl)
|
|
|
|
test -z "$PERL" && AC_MSG_ERROR([perl is required when enabling perl bindings])
|
|
|
|
perl_includedir="`$PERL -e 'use Config; print $Config{archlib}'`/CORE"
|
|
|
|
AC_CHECK_FILE($perl_includedir/perl.h, enable_perl=yes, enable_perl=no)
|
2007-07-28 15:41:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(Checking for ruby)
|
|
|
|
AC_ARG_WITH(ruby,
|
|
|
|
[ --with-ruby enable the ruby wrapper [[default=no]]],
|
|
|
|
[AC_MSG_RESULT($withval)], [AC_MSG_RESULT(no)])
|
|
|
|
if test "$with_ruby" = "yes"; then
|
2013-09-06 13:42:46 -07:00
|
|
|
test -z "$SWIG" && AC_MSG_ERROR([swig is required when enabling ruby bindings])
|
2007-07-28 15:41:04 +00:00
|
|
|
AC_PATH_PROG([RUBY], [ruby])
|
2013-09-06 13:43:52 -07:00
|
|
|
test -z "$RUBY" && AC_MSG_ERROR([ruby is required when enabling ruby bindings])
|
2007-07-28 15:41:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_PYTHON, test x$with_python = xyes)
|
|
|
|
AM_CONDITIONAL(HAVE_PERL, test x$with_perl = xyes)
|
|
|
|
AM_CONDITIONAL(HAVE_RUBY, test x$with_ruby = xyes)
|
|
|
|
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(unistd.h stdint.h)
|
|
|
|
|
2007-08-21 17:28:34 +00:00
|
|
|
AC_CHECK_FUNCS(asprintf)
|
|
|
|
|
2007-08-05 22:54:41 +00:00
|
|
|
AM_PROG_CC_C_O
|
2007-07-28 15:41:04 +00:00
|
|
|
AC_C_CONST
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
|
|
|
AC_OUTPUT(
|
|
|
|
Makefile
|
|
|
|
doc/Makefile
|
|
|
|
src/Makefile
|
|
|
|
swig/Makefile
|
|
|
|
swig/perl/Makefile
|
2009-05-12 21:56:56 +00:00
|
|
|
swig/perl/Makefile.PL
|
2007-07-28 15:41:04 +00:00
|
|
|
swig/python/Makefile
|
2009-05-12 21:56:56 +00:00
|
|
|
swig/python/setup.py
|
2007-07-28 15:41:04 +00:00
|
|
|
swig/ruby/Makefile
|
|
|
|
testsuite/Makefile
|
|
|
|
testsuite/config/Makefile
|
|
|
|
testsuite/libaalogparse.test/Makefile
|
|
|
|
testsuite/lib/Makefile
|
|
|
|
)
|