configure.ac revision e65df5b966b27e13283c65f59f99ac44781e0333
5f5870385cff47efd2f58e7892f251cf13761528Timo SirainenAC_PREREQ(2.59)
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_INIT([sssd],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen VERSION_NUMBER,
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [sssd-devel@lists.fedorahosted.org])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenm4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [AC_USE_SYSTEM_EXTENSIONS],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [AC_GNU_SOURCE])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenCFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_CONFIG_SRCDIR([BUILD.txt])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_CONFIG_AUX_DIR([build])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_INIT_AUTOMAKE([-Wall foreign subdir-objects tar-pax])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_PROG_CC_C_O
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_DISABLE_STATIC
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_PROG_INSTALL
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_PROG_LIBTOOL
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_CONFIG_MACRO_DIR([m4])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_GNU_GETTEXT([external])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_GNU_GETTEXT_VERSION([0.14])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_SUBST([PRERELEASE_VERSION],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen PRERELEASE_VERSION_NUMBER)
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_DEFINE([PRERELEASE_VERSION], "PRERELEASE_VERSION_NUMBER",
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [Prerelease version number of package])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_CONDITIONAL([GIT_CHECKOUT], [git log -1 &>/dev/null])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenm4_pattern_allow([AM_SILENT_RULES])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_SILENT_RULES
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_CONFIG_HEADER(config.h)
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_CHECK_TYPES([errno_t], [], [], [[#include <errno.h>]])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenBUILD_WITH_SHARED_BUILD_DIR
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_COMPILE_IFELSE(
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [AC_LANG_PROGRAM([[#include <pthread.h>]],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [[pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;]])],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [AC_DEFINE([HAVE_PTHREAD], [1], [Pthread mutexes available.])],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [AC_MSG_WARN([Pthread library not found! Clients will not be thread safe...])])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen#Check for PAM headers
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_CHECK_HEADERS([security/pam_appl.h security/pam_misc.h security/pam_modules.h],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [AC_CHECK_LIB(pam, pam_get_item, [ PAM_LIBS="-lpam" ], [AC_MSG_ERROR([PAM must support pam_get_item])])],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [AC_MSG_ERROR([PAM development libraries not installed])]
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen#Set the NSS library install path
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_ARG_ENABLE([nsslibdir], [AS_HELP_STRING([--enable-nsslibdir],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [Where to install nss libraries ($libdir)])],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [nsslibdir=$enableval],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [nsslibdir=$libdir])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_SUBST(nsslibdir)
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen#Set the PAM module install path
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_ARG_ENABLE([pammoddir], [AS_HELP_STRING([--enable-pammoddir],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [Where to install pam modules ($libdir/security)])],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [pammoddir=$enableval],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_SUBST(pammoddir)
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen#Include here cause WITH_INIT_DIR requires $osname set in platform.m4
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_DISTRO_VERSION
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_PLUGIN_PATH
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_PUBCONF_PATH
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_PIPE_PATH
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_XML_CATALOG
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_KRB5_PLUGIN_PATH
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_KRB5_RCACHE_DIR
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_PYTHON_BINDINGS
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_NOLOGIN_SHELL
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_UNICODE_LIB
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenif test x$unicode_lib = xlibunistring; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AC_DEFINE_UNQUOTED(HAVE_LIBUNISTRING, 1, [Using libunistring for unicode])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen UNICODE_LIBS=-lunistring
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AC_SUBST(UNICODE_LIBS)
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AC_DEFINE_UNQUOTED(HAVE_GLIB2, 1, [Using libunistring for unicode])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen UNICODE_LIBS=$GLIB2_LIBS
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AC_SUBST(UNICODE_LIBS)
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_INITSCRIPT
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenif test x$initscript = xsystemd; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen WITH_SYSTEMD_UNIT_DIR
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenPKG_CHECK_MODULES([DBUS],[dbus-1])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainendnl if test -n "`$PKG_CONFIG --modversion dbus-1 | grep '^0\.'`" ; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenif ! $PKG_CONFIG --atleast-version 1.0.0 dbus-1; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AC_MSG_RESULT([setting -DDBUS_API_SUBJECT_TO_CHANGE])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenif test x$has_dbus != xno; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen SAFE_LIBS="$LIBS"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen LIBS="$DBUS_LIBS"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AC_CHECK_FUNC([dbus_watch_get_unix_fd],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AC_DEFINE([HAVE_DBUS_WATCH_GET_UNIX_FD], [1],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [Define if dbus_watch_get_unix_fd exists]))
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen LIBS="$SAFE_LIBS"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenif test x$HAVE_MANPAGES != x; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen CHECK_XML_TOOLS
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen CHECK_STYLESHEET([$SGML_CATALOG_FILES],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [Docbook XSL templates])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AC_CHECK_PROG([PO4A],[po4a],[po4a],[no])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_CONDITIONAL([HAVE_MANPAGES], [test "x$HAVE_MANPAGES" != "x"])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenif test x$HAVE_PYTHON_BINDINGS != x; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AM_PATH_PYTHON([2.4])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AM_CHECK_PYTHON_HEADERS([],
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AC_MSG_ERROR([Could not find python headers]))
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AM_PYTHON_CONFIG
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AM_CHECK_PYTHON_COMPAT
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenif test x$HAVE_SELINUX != x; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AM_CHECK_SELINUX
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenif test x$HAVE_SEMANAGE != x -a x$HAVE_SELINUX != x; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen AM_CHECK_SEMANAGE
AC_CHECK_HEADERS([sys/inotify.h])
AC_CHECK_HEADERS([sasl/sasl.h],,AC_MSG_ERROR([Could not find SASL headers]))
AC_MSG_WARN([Without the 'CHECK' libraries, you will be unable to run all tests in the 'make check' suite])
AC_CHECK_HEADERS([check.h],,AC_MSG_ERROR([Could not find CHECK headers]))