diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-08-17 12:39:45 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-08-19 11:15:09 -0400 |
commit | 551aa6c36797ed720487f5974dcadabf19e6ff9f (patch) | |
tree | 6f27967514430f4d3975de13ddadd9ab8b536dbd /configure.ac | |
parent | ad42d90b7e23978b62e36d6885d5fea0a105d6d0 (diff) | |
download | sssd-551aa6c36797ed720487f5974dcadabf19e6ff9f.tar.gz sssd-551aa6c36797ed720487f5974dcadabf19e6ff9f.tar.xz sssd-551aa6c36797ed720487f5974dcadabf19e6ff9f.zip |
Rewrite toplevel Makefile
There is no longer a need to have nested Makefiles and configure
scripts. This patch combines the src/ Makefile and configure.ac
into the root.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 164 |
1 files changed, 159 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 4fabcc729..58a7b2c8f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,19 +1,173 @@ +AC_PREREQ(2.59) +AC_DEFUN([AC_CHECK_LIB_EXT], [ + AC_CHECK_LIB([$1],[$3],[$4],[$5],[$7]) + ac_cv_lib_ext_$1_$3=$ac_cv_lib_$1_$3 +]) +AC_DEFUN([AC_CHECK_FUNC_EXT], [ + AC_CHECK_FUNC([$1],[$3],[$4]) + ac_cv_func_ext_$1=$ac_cv_func_$1 +]) +AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""]) +AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""]) +AC_DEFUN([SMB_EXT_LIB], [echo -n ""]) +AC_DEFUN([SMB_ENABLE], [echo -n ""]) + m4_include([version.m4]) AC_INIT([sssd], VERSION_NUMBER, [sssd-devel@lists.fedorahosted.org]) + +CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" + AC_CONFIG_SRCDIR([BUILD.txt]) AC_CONFIG_AUX_DIR([build]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign]) -AC_CONFIG_MACRO_DIR([m4]) -AC_PROG_INSTALL -AC_CONFIG_SUBDIRS([src]) +AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) +AM_PROG_CC_C_O +AC_DISABLE_STATIC +AC_PROG_INSTALL +AC_PROG_LIBTOOL +AC_CONFIG_MACRO_DIR([m4]) +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.14]) AC_SUBST([PRERELEASE_VERSION], PRERELEASE_VERSION_NUMBER) AM_CONDITIONAL([GIT_CHECKOUT], [git log -1 &>/dev/null]) -AC_CONFIG_FILES([Makefile contrib/sssd.spec]) +m4_pattern_allow([AM_SILENT_RULES]) +AM_SILENT_RULES + +AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes]) + +AC_CHECK_HEADERS(stdint.h dlfcn.h) +AC_CONFIG_HEADER(config.h) + +AC_CHECK_TYPES([errno_t], [], [], [[#include <errno.h>]]) + +m4_include([src/build_macros.m4]) +BUILD_WITH_SHARED_BUILD_DIR + +#Check for PAM headers +AC_CHECK_HEADERS([security/pam_appl.h security/pam_misc.h security/pam_modules.h], + [AC_CHECK_LIB(pam, pam_get_item, [ PAM_LIBS="-lpam" ], [AC_MSG_ERROR([PAM must support pam_get_item])])], + [AC_MSG_ERROR([PAM development libraries not installed])] +) + +#Set the NSS library install path +AC_ARG_ENABLE([nsslibdir], [AS_HELP_STRING([--enable-nsslibdir], + [Where to install nss libraries ($libdir)])], + [nsslibdir=$enableval], + [nsslibdir=$libdir]) +AC_SUBST(nsslibdir) + +m4_include(src/conf_macros.m4) +WITH_DB_PATH +WITH_PLUGIN_PATH +WITH_PID_PATH +WITH_LOG_PATH +WITH_PUBCONF_PATH +WITH_PIPE_PATH +WITH_INIT_DIR +WITH_TEST_DIR +WITH_MANPAGES +WITH_XML_CATALOG +WITH_KRB5_PLUGIN_PATH +WITH_PYTHON_BINDINGS +WITH_SELINUX +WITH_NSCD +WITH_SEMANAGE +WITH_LIBNL + +m4_include([src/external/platform.m4]) +m4_include([src/external/pkg.m4]) +m4_include([src/external/libpopt.m4]) +m4_include([src/external/libtalloc.m4]) +m4_include([src/external/libtdb.m4]) +m4_include([src/external/libtevent.m4]) +m4_include([src/external/libldb.m4]) +m4_include([src/external/libdhash.m4]) +m4_include([src/external/libcollection.m4]) +m4_include([src/external/libini_config.m4]) +m4_include([src/external/pam.m4]) +m4_include([src/external/ldap.m4]) +m4_include([src/external/libpcre.m4]) +m4_include([src/external/krb5.m4]) +m4_include([src/external/libcares.m4]) +m4_include([src/external/docbook.m4]) +m4_include([src/external/sizes.m4]) +m4_include([src/external/python.m4]) +m4_include([src/external/selinux.m4]) +m4_include([src/external/crypto.m4]) +m4_include([src/external/nscd.m4]) +m4_include([src/external/nsupdate.m4]) +m4_include([src/external/libkeyutils.m4]) +m4_include([src/external/libnl.m4]) +m4_include([src/util/signal.m4]) + +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]) +fi + +if test x$has_dbus != xno; then + SAFE_LIBS="$LIBS" + LIBS="$DBUS_LIBS" + 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])) + LIBS="$SAFE_LIBS" +fi + +if test x$HAVE_MANPAGES != x; then + CHECK_XML_TOOLS + CHECK_STYLESHEET([$SGML_CATALOG_FILES], + [http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], + [Docbook XSL templates]) +fi + +if test x$HAVE_PYTHON_BINDINGS != x; then + AM_PATH_PYTHON([2.4]) + AM_CHECK_PYTHON_HEADERS([], + AC_MSG_ERROR([Could not find python headers])) + AM_PYTHON_CONFIG +fi + +if test x$HAVE_SELINUX != x; then + AM_CHECK_SELINUX +fi + +if test x$HAVE_SEMANAGE != x -a x$HAVE_SELINUX != x; then + AM_CHECK_SEMANAGE +fi + +if test x$HAVE_LIBNL != x; then + AM_CHECK_LIBNL +fi + +AC_CHECK_HEADERS([sys/inotify.h]) + +AC_CHECK_HEADERS([sasl/sasl.h],,AC_MSG_ERROR([Could not find SASL headers])) + +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]) +else + AC_CHECK_HEADERS([check.h],,AC_MSG_ERROR([Could not find CHECK headers])) +fi + +AC_PATH_PROG([DOXYGEN], [doxygen], [false]) +AM_CONDITIONAL([HAVE_DOXYGEN], [test x$DOXYGEN != xfalse ]) + +AM_CONDITIONAL([HAVE_CHECK], [test x$have_check != x]) + +abs_build_dir=`pwd` +AC_DEFINE_UNQUOTED([ABS_BUILD_DIR], ["$abs_build_dir"], [Absolute path to the build directory]) +AC_SUBST([abs_builddir], $abs_build_dir) + +AC_CONFIG_FILES([Makefile contrib/sssd.spec src/examples/rwtab src/doxy.config po/Makefile.in]) AC_OUTPUT + |