summaryrefslogtreecommitdiffstats
path: root/src/external/sasl.m4
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-10-15 10:27:36 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-11-11 11:45:57 +0100
commitc3889e5a101a075defe533d81f5296d5e680f639 (patch)
treef7edc8151237b4b72b52f1d6eb86e0bce3535c45 /src/external/sasl.m4
parent16c351625346b3193e1762027e5215ab76042127 (diff)
downloadsssd-c3889e5a101a075defe533d81f5296d5e680f639.tar.gz
sssd-c3889e5a101a075defe533d81f5296d5e680f639.tar.xz
sssd-c3889e5a101a075defe533d81f5296d5e680f639.zip
BUILD: Explicitly link libsss_ad.so with sasl libs
If openldap is not built with sasl support libsss_ad.so will not be linked with libsasl2 although sasl_client_init is called by function ad_sasl_initialize.
Diffstat (limited to 'src/external/sasl.m4')
-rw-r--r--src/external/sasl.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/src/external/sasl.m4 b/src/external/sasl.m4
new file mode 100644
index 000000000..5980624af
--- /dev/null
+++ b/src/external/sasl.m4
@@ -0,0 +1,17 @@
+SASL_OBJ=""
+AC_SUBST(SASL_OBJ)
+AC_SUBST(SASL_LIBS)
+AC_SUBST(SASL_CFLAGS)
+
+PKG_CHECK_MODULES([SASL], [libsasl2], [found_sasl=yes], [found_sasl=no])
+
+SSS_AC_EXPAND_LIB_DIR()
+AS_IF([test x"$found_sasl" != xyes],
+ [AC_CHECK_HEADERS([sasl/sasl.h],
+ [AC_CHECK_LIB([sasl2],
+ [sasl_client_init],
+ [SASL_LIBS="-L$sss_extra_libdir -lsasl2"],
+ [AC_MSG_ERROR([SASL library must support sasl_client_init])],
+ [-L$sss_extra_libdir])],
+ [AC_MSG_ERROR([SASL header files are not installed])])]
+)