From 3fc158e59eebbc2f538fe0076a03928d0d4eab9f Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Mon, 21 Apr 2014 12:17:53 +0200 Subject: sss_config: build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Lukáš Slebodník --- src/external/configlib.m4 | 12 ++++++++++++ src/external/libaugeas.m4 | 11 +++++++++++ src/tests/dlopen-tests.c | 3 +++ 3 files changed, 26 insertions(+) create mode 100644 src/external/configlib.m4 create mode 100644 src/external/libaugeas.m4 (limited to 'src') diff --git a/src/external/configlib.m4 b/src/external/configlib.m4 new file mode 100644 index 000000000..ad6c1a943 --- /dev/null +++ b/src/external/configlib.m4 @@ -0,0 +1,12 @@ +AC_ARG_ENABLE([config-lib], + [AS_HELP_STRING([--disable-config-lib], + [do not build internal config library])], + [build_config_lib=$enableval], + [build_config_lib=yes]) + +AM_CONDITIONAL([BUILD_CONFIG_LIB], + [test x$build_config_lib = xyes]) + +AM_COND_IF([BUILD_CONFIG_LIB], + [AC_DEFINE_UNQUOTED(HAVE_CONFIG_LIB, 1, + [Build with internal config library])]) \ No newline at end of file diff --git a/src/external/libaugeas.m4 b/src/external/libaugeas.m4 new file mode 100644 index 000000000..13f694c5c --- /dev/null +++ b/src/external/libaugeas.m4 @@ -0,0 +1,11 @@ +AC_SUBST(AUGEAS_OBJ) +AC_SUBST(AUGEAS_CFLAGS) +AC_SUBST(AUGEAS_LIBS) + +PKG_CHECK_MODULES(AUGEAS, + augeas >= 1.0.0, + , + AC_MSG_ERROR([ +Please install augeas-devel or disable this dependency +by specifying --disable-config-lib when running configure.]) + ) diff --git a/src/tests/dlopen-tests.c b/src/tests/dlopen-tests.c index 7a218c70a..2396aee8a 100644 --- a/src/tests/dlopen-tests.c +++ b/src/tests/dlopen-tests.c @@ -95,6 +95,9 @@ struct so { { "pysss.so", { LIBPFX"pysss.so", NULL } }, { "pysss_murmur.so", { LIBPFX"pysss_murmur.so", NULL } }, { "pysss_nss_idmap.so", { LIBPFX"pysss_nss_idmap.so", NULL } }, +#endif +#ifdef HAVE_CONFIG_LIB + { "libsss_config.so", { LIBPFX"libsss_config.so", NULL } }, #endif { NULL } }; -- cgit