configure.ac revision 172c07013d1ea99447a780fd36f49d5c3a76981b
3802a3d3d7af51ddff31943d5514382f01265770Lennart PoetteringAC_PREREQ(2.59)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_DEFUN([AC_CHECK_LIB_EXT], [
12b42c76672a66c2d4ea7212c14f8f1b5a62b78dTom Gundersen AC_CHECK_LIB([$1],[$3],[$4],[$5],[$7])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek ac_cv_lib_ext_$1_$3=$ac_cv_lib_$1_$3
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-SzmekAC_DEFUN([AC_CHECK_FUNC_EXT], [
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_CHECK_FUNC([$1],[$3],[$4])
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek ac_cv_func_ext_$1=$ac_cv_func_$1
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-SzmekAC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""])
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-SzmekAC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""])
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-SzmekAC_DEFUN([SMB_EXT_LIB], [echo -n ""])
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-SzmekAC_DEFUN([SMB_ENABLE], [echo -n ""])
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek [sssd-devel@lists.fedorahosted.org])
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-SzmekCFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_CONFIG_SRCDIR([BUILD.txt])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_CONFIG_AUX_DIR([build])
0e8415f2e5c42e87ca3b7a96138675f64696cb7aZbigniew Jędrzejewski-SzmekAM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_DISABLE_STATIC
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_CONFIG_MACRO_DIR([m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAM_GNU_GETTEXT([external])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAM_GNU_GETTEXT_VERSION([0.14])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_SUBST([PRERELEASE_VERSION],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek PRERELEASE_VERSION_NUMBER)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAM_CONDITIONAL([GIT_CHECKOUT], [git log -1 &>/dev/null])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_pattern_allow([AM_SILENT_RULES])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_CHECK_HEADERS(stdint.h dlfcn.h)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_CHECK_TYPES([errno_t], [], [], [[#include <errno.h>]])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/build_macros.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekBUILD_WITH_SHARED_BUILD_DIR
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_COMPILE_IFELSE(
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek [AC_LANG_PROGRAM([[#include <pthread.h>]],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek [[pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;]])],
330427e271c37400f091bf4570b5d8fa96574d36Zbigniew Jędrzejewski-Szmek [AC_DEFINE([HAVE_PTHREAD], [1], [Pthread mutexes available.])],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek [AC_MSG_WARN([Pthread library not found! Clients will not be thread safe...])])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek#Check for PAM headers
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_CHECK_HEADERS([security/pam_appl.h security/pam_misc.h security/pam_modules.h],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek [AC_CHECK_LIB(pam, pam_get_item, [ PAM_LIBS="-lpam" ], [AC_MSG_ERROR([PAM must support pam_get_item])])],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek [AC_MSG_ERROR([PAM development libraries not installed])]
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek#Set the NSS library install path
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_ARG_ENABLE([nsslibdir], [AS_HELP_STRING([--enable-nsslibdir],
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-Szmek [Where to install nss libraries ($libdir)])],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek [nsslibdir=$enableval],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek [nsslibdir=$libdir])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_SUBST(nsslibdir)
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-Szmek#Set the PAM module install path
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-SzmekAC_ARG_ENABLE([pammoddir], [AS_HELP_STRING([--enable-pammoddir],
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-Szmek [Where to install pam modules ($libdir/security)])],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek [pammoddir=$enableval],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_SUBST(pammoddir)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek#Include here cause WITH_INIT_DIR requires $osname set in platform.m4
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/platform.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekWITH_PUBCONF_PATH
b8bde11658366290521e3d03316378b482600323Jan EngelhardtWITH_KRB5_PLUGIN_PATH
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekWITH_PYTHON_BINDINGS
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/pkg.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libpopt.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libtalloc.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libtdb.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libtevent.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libldb.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libdhash.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libcollection.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libini_config.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/pam.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/ldap.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libpcre.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/krb5.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libcares.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/docbook.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/sizes.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/python.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/selinux.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/crypto.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/nscd.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/nsupdate.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libkeyutils.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/libnl.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekm4_include([src/external/systemd.m4])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekif test x$initscript = xsystemd; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek WITH_SYSTEMD_UNIT_DIR
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekPKG_CHECK_MODULES([DBUS],[dbus-1])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekdnl if test -n "`$PKG_CONFIG --modversion dbus-1 | grep '^0\.'`" ; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekif ! $PKG_CONFIG --atleast-version 1.0.0 dbus-1; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_MSG_RESULT([setting -DDBUS_API_SUBJECT_TO_CHANGE])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekif test x$has_dbus != xno; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek SAFE_LIBS="$LIBS"
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek LIBS="$DBUS_LIBS"
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_CHECK_FUNC([dbus_watch_get_unix_fd],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_DEFINE([HAVE_DBUS_WATCH_GET_UNIX_FD], [1],
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek [Define if dbus_watch_get_unix_fd exists]))
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek LIBS="$SAFE_LIBS"
cc64d0175a3c2c974709e9962c00fbe04d74c43fZbigniew Jędrzejewski-Szmekif test x$HAVE_MANPAGES != x; then
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmek CHECK_STYLESHEET([$SGML_CATALOG_FILES],
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmek [http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmek [Docbook XSL templates])
cc64d0175a3c2c974709e9962c00fbe04d74c43fZbigniew Jędrzejewski-Szmek AC_CHECK_PROG([PO4A],[po4a],[po4a],[no])
cc64d0175a3c2c974709e9962c00fbe04d74c43fZbigniew Jędrzejewski-Szmek AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmekif test x$HAVE_PYTHON_BINDINGS != x; then
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmek AM_PATH_PYTHON([2.4])
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmek AM_CHECK_PYTHON_HEADERS([],
ff9b60f38bf68eba4a47cabff14547d92e083214Torstein Husebø AC_MSG_ERROR([Could not find python headers]))
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmek AM_PYTHON_CONFIG
cc64d0175a3c2c974709e9962c00fbe04d74c43fZbigniew Jędrzejewski-Szmekif test x$HAVE_SELINUX != x; then
cc64d0175a3c2c974709e9962c00fbe04d74c43fZbigniew Jędrzejewski-Szmek AM_CHECK_SELINUX
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekif test x$HAVE_SEMANAGE != x -a x$HAVE_SELINUX != x; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AM_CHECK_SEMANAGE
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmekif test x$BUILD_LIBNL != x; then
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmekif test x$HAVE_SYSTEMD_UNIT != x; then
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmek AM_CHECK_SYSTEMD
8a8d55f2c104cf99efe5f244fc4857a15e9f60deZbigniew Jędrzejewski-Szmekif test x$cryptolib = xnss; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekif test x$cryptolib = xlibcrypto; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AM_CHECK_LIBCRYPTO
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_CHECK_HEADERS([sys/inotify.h])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_CHECK_HEADERS([sasl/sasl.h],,AC_MSG_ERROR([Could not find SASL headers]))
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-SzmekPKG_CHECK_MODULES([CHECK], [check >= 0.9.5], [have_check=1], [have_check=])
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-Szmekif test x$have_check = x; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_MSG_WARN([Without the 'CHECK' libraries, you will be unable to run all tests in the 'make check' suite])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_CHECK_HEADERS([check.h],,AC_MSG_ERROR([Could not find CHECK headers]))
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_PATH_PROG([DOXYGEN], [doxygen], [false])
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-SzmekAM_CONDITIONAL([HAVE_DOXYGEN], [test x$DOXYGEN != xfalse ])
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-SzmekAM_CONDITIONAL([HAVE_CHECK], [test x$have_check != x])
dca348bcbb462305864526c587495a14a76bfcdeJan Engelhardtabs_build_dir=`pwd`
dca348bcbb462305864526c587495a14a76bfcdeJan EngelhardtAC_DEFINE_UNQUOTED([ABS_BUILD_DIR], ["$abs_build_dir"], [Absolute path to the build directory])
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_SUBST([abs_builddir], $abs_build_dir)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAC_CONFIG_FILES([Makefile contrib/sssd.spec src/examples/rwtab src/doxy.config