summaryrefslogtreecommitdiff
path: root/aclocal
diff options
context:
space:
mode:
Diffstat (limited to 'aclocal')
-rw-r--r--aclocal/idmap.m445
1 files changed, 45 insertions, 0 deletions
diff --git a/aclocal/idmap.m4 b/aclocal/idmap.m4
new file mode 100644
index 0000000..211d372
--- /dev/null
+++ b/aclocal/idmap.m4
@@ -0,0 +1,45 @@
+dnl Headers needed by wbclient.h
+dnl
+AC_DEFUN([AC_WBCH_COMPL],[
+[
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+]
+[#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+]
+[#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif
+]
+[#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+]
+[#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+]])
+
+dnl Check for wbclient.h header and libwbclietn.so
+dnl
+AC_DEFUN([AC_TEST_WBCHL],[
+if test $enable_cifsidmap != "no"; then
+ AC_CHECK_HEADERS([wbclient.h], , [
+ if test "$enable_cifsidmap" = "yes"; then
+ AC_MSG_ERROR([wbclient.h not found, consider installing libwbclient-devel.])
+ else
+ AC_MSG_WARN([wbclient.h not found, consider installing libwbclient-devel. Disabling cifs.idmap.])
+ enable_cifsidmap="no"
+ fi
+ ], [ AC_WBCH_COMPL ])
+fi
+
+if test $enable_cifsidmap != "no"; then
+ AC_CHECK_LIB([wbclient], [wbcStringToSid],
+ [ WINB_LDADD='-lwbclient' ] [ AC_DEFINE(HAVE_LIBWBCLIENT, 1, ["Define var have_libwbclient"]) ], [AC_MSG_ERROR([No functioning wbclient library found!])])
+ AC_SUBST(WINB_LDADD)
+fi
+])