summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-03-24 18:40:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:44 -0500
commite4878351816d7196efab22b68672430fb61e7b47 (patch)
tree64204b9d2742a9999d80496814fcb73238cf67e6
parent2036c47c63f68a03639b14f60c2f7031350cd7a7 (diff)
downloadsamba-e4878351816d7196efab22b68672430fb61e7b47.tar.gz
samba-e4878351816d7196efab22b68672430fb61e7b47.tar.bz2
samba-e4878351816d7196efab22b68672430fb61e7b47.zip
r14695: Patch from Björn Jacke:
- add DMAPI/XDSM support for AIX - find JFS DMAPI libs on Linux when only they are available Volker (This used to be commit b6b72f8c6a03001ae75457c9e7a78e189bea5a3f)
-rw-r--r--source3/configure.in22
-rw-r--r--source3/smbd/dmapi.c12
2 files changed, 26 insertions, 8 deletions
diff --git a/source3/configure.in b/source3/configure.in
index f3fa91e3b4..7fb2b827a0 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -829,7 +829,7 @@ AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h s
AC_CHECK_HEADERS(sys/sysmacros.h security/_pam_macros.h dlfcn.h)
AC_CHECK_HEADERS(sys/syslog.h syslog.h execinfo.h)
AC_CHECK_HEADERS(langinfo.h locale.h)
-AC_CHECK_HEADERS(sys/dmi.h xfs/dmapi.h)
+AC_CHECK_HEADERS(sys/dmi.h xfs/dmapi.h sys/jfsdmapi.h sys/dmapi.h)
AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[
#if HAVE_RPC_RPC_H
@@ -2339,14 +2339,30 @@ if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then
fi
#################################################
-# Check for DMAPI interfaces in libdm.
+# Check for DMAPI interfaces in libdm/libjfsdm/libxsdm
AC_CHECK_LIB(dm, dm_get_eventlist,
[samba_cv_HAVE_LIBDM=yes; samba_dmapi_libs="-ldm"],
[samba_cv_HAVE_LIBDM=no])
if test x"$samba_cv_HAVE_LIBDM" = x"yes" ; then
- AC_DEFINE(HAVE_LIBDM, 1, [Whether libdm is available])
+ AC_DEFINE(HAVE_LIBDM, 1, [Whether dmapi libdm is available])
+fi
+
+AC_CHECK_LIB(jfsdm, dm_get_eventlist,
+ [samba_cv_HAVE_LIBJFSDM=yes; samba_dmapi_libs="-ljfsdm"],
+ [samba_cv_HAVE_LIBJFSDM=no])
+
+if test x"$samba_cv_HAVE_LIBJFSDM" = x"yes" ; then
+ AC_DEFINE(HAVE_LIBJFSDM, 1, [Whether dmapi libjfsdm is available])
+fi
+
+AC_CHECK_LIB(xdsm, dm_get_eventlist,
+ [samba_cv_HAVE_LIBXDSM=yes; samba_dmapi_libs="-lxdsm"],
+ [samba_cv_HAVE_LIBXDSM=no])
+
+if test x"$samba_cv_HAVE_LIBXDSM" = x"yes" ; then
+ AC_DEFINE(HAVE_LIBXDSM, 1, [Whether dmapi libxdsm is available])
fi
AC_CACHE_CHECK([for kernel share modes],samba_cv_HAVE_KERNEL_SHARE_MODES,[
diff --git a/source3/smbd/dmapi.c b/source3/smbd/dmapi.c
index 2188924d4b..4a6cba293b 100644
--- a/source3/smbd/dmapi.c
+++ b/source3/smbd/dmapi.c
@@ -24,8 +24,8 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_DMAPI
-#if defined(HAVE_LIBDM)
-#if (defined(HAVE_XFS_DMAPI_H) || defined(HAVE_SYS_DMI_H))
+#if defined(HAVE_LIBDM) || defined(HAVE_LIBJFSDM) || defined(HAVE_LIBXDSM)
+#if defined(HAVE_XFS_DMAPI_H) || defined(HAVE_SYS_DMI_H) || defined(HAVE_SYS_JFSDMAPI_H) || defined(HAVE_SYS_DMAPI_H)
#define USE_DMAPI 1
#endif
#endif
@@ -40,10 +40,12 @@ BOOL dmapi_have_session(void) { return False; }
#ifdef HAVE_XFS_DMAPI_H
#include <xfs/dmapi.h>
-#endif
-
-#ifdef HAVE_SYS_DMI_H
+#elif defined(HAVE_SYS_DMI_H)
#include <sys/dmi.h>
+#elif defined(HAVE_SYS_JFSDMAPI_H)
+#include <sys/jfsdmapi.h>
+#elif defined(HAVE_SYS_DMAPI_H)
+#include <sys/dmapi.h>
#endif
#define DMAPI_SESSION_NAME "samba"