configure.ac revision e0ade8d1e00d577686f893e0059def5866dcb9f6
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 Sirainenm4_pattern_allow([AM_PROG_AR])
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 HAVE_PTHREAD=1
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen [AC_MSG_WARN([Pthread library not found! Clients will not be thread safe...])])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAM_CONDITIONAL([HAVE_PTHREAD], [test x"$HAVE_PTHREAD" != "x"])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenSAVE_LIBS=$LIBS
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenLIBS="$LIBS -lpthread"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_CHECK_FUNCS([ pthread_mutexattr_setrobust \
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen pthread_mutex_consistent \
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen pthread_mutexattr_setrobust_np \
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen pthread_mutex_consistent_np ])
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenLIBS=$SAVE_LIBS
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen# Check for presence of modern functions for setting file timestamps
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenAC_CHECK_FUNCS([ utimensat \
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_MCACHE_PATH
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_DEFAULT_CCACHE_DIR
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_DEFAULT_CCNAME_TEMPLATE
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_XML_CATALOG
e20e638805c4bd54e039891a3e92760b1dfa189aTimo SirainenWITH_KRB5_PLUGIN_PATH
e20e638805c4bd54e039891a3e92760b1dfa189aTimo SirainenWITH_KRB5_RCACHE_DIR
e20e638805c4bd54e039891a3e92760b1dfa189aTimo SirainenWITH_KRB5AUTHDATA_PLUGIN_PATH
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_KRB5_CONF
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_PYTHON_BINDINGS
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_NOLOGIN_SHELL
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWITH_SUDO_LIB_PATH
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 Sirainenif test x$HAVE_NSCD; then
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen WITH_NSCD_CONF
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
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]))
AM_CONDITIONAL([HAVE_DEVSHM], [test -d /dev/shm])