1715N/A [sssd-devel@lists.fedorahosted.org])
1715N/Am4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
1715N/A [AC_USE_SYSTEM_EXTENSIONS],
1715N/ACFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
1715N/AAM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects tar-pax
1715N/Am4_ifdef([AM_PROG_AR], [AM_PROG_AR])
1715N/A [AC_SUBST([MKDIR_P], "mkdir -p")])
1715N/AAM_GNU_GETTEXT_VERSION([0.14.4])
3049N/AAC_SUBST([PRERELEASE_VERSION],
1715N/AAC_DEFINE([PRERELEASE_VERSION], "PRERELEASE_VERSION_NUMBER",
1715N/A [Prerelease version number of package])
1715N/Am4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
1715N/AAM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
1715N/A [[pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
1715N/A [AC_DEFINE([HAVE_PTHREAD], [1], [Pthread mutexes available.])
1715N/A [AC_MSG_WARN([Pthread library not found! Clients will not be thread safe...])])
1715N/AAM_CONDITIONAL([HAVE_PTHREAD], [test x"$HAVE_PTHREAD" != "x"])
1715N/A# Check library for the timer_create function
3143N/AAC_SEARCH_LIBS([timer_create], [rt posix4],
1715N/A [AC_DEFINE([HAVE_LIBRT], [1],
1715N/A [Define if you have the librt library or equivalent.])
1715N/A [AC_MSG_ERROR([unable to find library fot the timer_create() function])])
1715N/A# Check for presence of modern functions for setting file timestamps
3049N/AAC_CHECK_FUNCS([ utimensat \
3158N/AAC_C_BIGENDIAN([AC_DEFINE(HAVE_BIG_ENDIAN, [1], [whether platform is big endian])],
1715N/A [AC_DEFINE(HAVE_LITTLE_ENDIAN, [1], [whether platform is little endian])])
3049N/A#Set the NSS library install path
1715N/AAC_ARG_ENABLE([nsslibdir], [AS_HELP_STRING([--enable-nsslibdir],
1715N/A [Where to install nss libraries ($libdir)])],
1715N/A#Set the PAM module install path
1715N/AAC_ARG_ENABLE([pammoddir], [AS_HELP_STRING([--enable-pammoddir],
1715N/A#Set the NFSv4 idmapd library install path
1715N/AAC_ARG_ENABLE([nfsidmaplibdir], [AS_HELP_STRING([--enable-nfsidmaplibdir],
1715N/A [nfsidmaplibdir=$enableval],
1715N/AWITH_DEFAULT_CCNAME_TEMPLATE
1715N/AWITH_KRB5AUTHDATA_PLUGIN_PATH
if test x$with_secrets = xyes; then
if test x$unicode_lib = xlibunistring; then
AC_DEFINE_UNQUOTED(HAVE_LIBUNISTRING, 1, [Using libunistring for unicode])
UNICODE_LIBS=$UNISTRING_LIBS
AC_DEFINE_UNQUOTED(HAVE_GLIB2, 1, [Using glib2 for unicode])
if test x$HAVE_NSCD; then
if test x$initscript = xsystemd; then
PKG_CHECK_MODULES([DBUS],[dbus-1])
dnl if test -n "`$PKG_CONFIG --modversion dbus-1 | grep '^0\.'`" ; then
if ! $PKG_CONFIG --atleast-version 1.0.0 dbus-1; then
DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
AC_MSG_RESULT([setting -DDBUS_API_SUBJECT_TO_CHANGE])
if test x$has_dbus != xno; then
CFLAGS="$CFLAGS $DBUS_CFLAGS"
AC_CHECK_FUNC([dbus_watch_get_unix_fd],
AC_DEFINE([HAVE_DBUS_WATCH_GET_UNIX_FD], [1],
[Define if dbus_watch_get_unix_fd exists]))
AC_CHECK_TYPES([DBusBasicValue],
# work around a bug in cov-build from Coverity
test -n "$XML_CATALOG_FILES" || unset XML_CATALOG_FILES
if test x$HAVE_MANPAGES != x; then
CHECK_STYLESHEET([$SGML_CATALOG_FILES],
[Docbook XSL profiling templates],
[HAVE_PROFILE_CATALOGS=1],
[AC_MSG_WARN([Man pages might contain documentation for experimental features])])
if test x$HAVE_PROFILE_CATALOGS = x; then
CHECK_STYLESHEET([$SGML_CATALOG_FILES],
[AC_MSG_ERROR([could not find the docbook xsl catalog])])
AC_CHECK_PROG([PO4A],[po4a],[po4a],[no])
AM_CONDITIONAL([HAVE_PROFILE_CATALOGS], [test "x$HAVE_PROFILE_CATALOGS" != "x"])
AM_CONDITIONAL([HAVE_MANPAGES], [test "x$HAVE_MANPAGES" != "x"])
AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
AC_CHECK_PROG(HAVE_PYTHON2, python2, yes, no)
AS_IF([test x$HAVE_PYTHON2 = xyes],
[AC_PATH_PROG(PYTHON2, python2)])
AC_CHECK_PROG(HAVE_PYTHON3, python3, yes, no)
AS_IF([test x$HAVE_PYTHON3 = xyes],
[AC_PATH_PROG(PYTHON3, python3)])
if test x$HAVE_PYTHON2_BINDINGS = x1; then
AS_IF([test x$HAVE_PYTHON2 != xyes],
The program python2 was not found in search path.
Please ensure that it is installed and its directory is included in the search
path. It is required for building python2 bindings. If you do not want to build
them please use argument --without-python2-bindings when running configure.])])
AM_PYTHON_CONFIG([python2])
AM_CHECK_PYTHON_HEADERS([],
AC_MSG_ERROR([Could not find python2 headers]))
AC_SUBST([py2execdir], [$pyexecdir])
AC_SUBST([python2dir], [$pythondir])
AC_SUBST([PYTHON2_CFLAGS], [$PYTHON_CFLAGS])
AC_SUBST([PYTHON2_LIBS], [$PYTHON_LIBS])
AC_SUBST([PYTHON2_INCLUDES], [$PYTHON_INCLUDES])
AC_SUBST([PYTHON2_VERSION], [$PYTHON_VERSION])
AC_SUBST([PYTHON2_PREFIX], [$PYTHON_PREFIX])
AC_SUBST([PYTHON2_EXEC_PREFIX], [$PYTHON_EXEC_PREFIX])
SSS_CLEAN_PYTHON_VARIABLES
if test x$HAVE_PYTHON3_BINDINGS = x1; then
AS_IF([test x$HAVE_PYTHON3 != xyes],
The program python3 was not found in search path.
Please ensure that it is installed and its directory is included in the search
path. It is required for building python3 bindings. If you do not want to build
them please use argument --without-python3-bindings when running configure.])])
AM_PYTHON_CONFIG([python3])
AM_CHECK_PYTHON_HEADERS([],
AC_MSG_ERROR([Could not find python3 headers]))
AC_SUBST([py3execdir], [$pyexecdir])
AC_SUBST([python3dir], [$pythondir])
AC_SUBST([PYTHON3_CFLAGS], [$PYTHON_CFLAGS])
AC_SUBST([PYTHON3_LIBS], [$PYTHON_LIBS])
AC_SUBST([PYTHON3_INCLUDES], [$PYTHON_INCLUDES])
AC_SUBST([PYTHON3_VERSION], [$PYTHON_VERSION])
AC_SUBST([PYTHON3_PREFIX], [$PYTHON_PREFIX])
AC_SUBST([PYTHON3_EXEC_PREFIX], [$PYTHON_EXEC_PREFIX])
SSS_CLEAN_PYTHON_VARIABLES
AM_CONDITIONAL([BUILD_PYTHON_BINDINGS],
[test x"$with_python2_bindings" = xyes \
-o x"$with_python3_bindings" = xyes])
AM_PYTHON2_MODULE([ldap])
if test x$HAVE_SELINUX != x; then
AM_CHECK_SELINUX_LOGIN_DIR
if test x$HAVE_SEMANAGE != x -a x$HAVE_SELINUX != x; then
dnl If journald was selected for logging, configure journald
if test x$syslog = xjournald; then
if test x$cryptolib = xnss; then
if test x$cryptolib = xlibcrypto; then
AC_CACHE_CHECK([whether compiler supports __attribute__((destructor))],
sss_client_cv_attribute_destructor,
[AC_LANG_SOURCE([__attribute__((destructor)) static void cleanup(void) { }])],
sss_client_cv_attribute_destructor=yes)
if test x"$sss_client_cv_attribute_destructor" = xyes ; then
AC_DEFINE(HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR, 1,
[whether compiler supports __attribute__((destructor))])
AC_CACHE_CHECK([whether compiler supports __attribute__((format))],
[void debug_fn(const char *format, ...) __attribute__ ((format (printf, 1, 2)));]
[sss_cv_attribute_format=yes],
AC_MSG_WARN([compiler does NOT support __attribute__((format))])
if test x"$sss_cv_attribute_format" = xyes ; then
AC_DEFINE(HAVE_FUNCTION_ATTRIBUTE_FORMAT, 1,
[whether compiler supports __attribute__((format))])
AC_CACHE_CHECK([whether compiler supports __attribute__((warn_unused_result))],
sss_cv_attribute_warn_unused_result,
[ char _check_leaks(int bytes) __attribute__ ((warn_unused_result)); ]
[sss_cv_attribute_warn_unused_result=yes],
AC_MSG_WARN([compiler does NOT support __attribute__((warn_unused_result))])
if test x"$sss_cv_attribute_warn_unused_result" = xyes ; then
AC_DEFINE(HAVE_FUNCTION_ATTRIBUTE_WARN_UNUSED_RESULT, 1,
[whether compiler supports __attribute__((warn_unused_result))])
PKG_CHECK_MODULES([CHECK], [check >= 0.9.5], [have_check=1], [have_check=])
if test x$have_check = x; then
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]))
AC_PATH_PROG([DOXYGEN], [doxygen], [false])
AM_CONDITIONAL([HAVE_DOXYGEN], [test x$DOXYGEN != xfalse ])
AM_CONDITIONAL([HAVE_CHECK], [test x$have_check != x])
# Check if the user wants SSSD to be compiled with systemtap probes
SSS_ENABLE_INTGCHECK_REQS
AM_CONDITIONAL([HAVE_DEVSHM], [test -d
/dev/shm])
# Check if we should install polkit rules
AM_CONDITIONAL([HAVE_POLKIT_RULES_D], [test x$HAVE_POLKIT_RULES_D != x])
AC_DEFINE_UNQUOTED([ABS_BUILD_DIR], ["$abs_build_dir"], [Absolute path to the build directory])
AC_SUBST([abs_builddir], $abs_build_dir)
my_srcdir=`readlink -f $srcdir`
AC_DEFINE_UNQUOTED([ABS_SRC_DIR], ["$my_srcdir"], [Absolute path to the source directory])