diff options
-rw-r--r-- | source3/aclocal.m4 | 10 | ||||
-rw-r--r-- | source3/smbd/dmapi.c | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4 index 00c57bacee..d36749a5f5 100644 --- a/source3/aclocal.m4 +++ b/source3/aclocal.m4 @@ -592,9 +592,15 @@ AC_DEFUN([SMB_CHECK_DMAPI], [samba_dmapi_libs="-lxdsm"], []) fi + if test x"$samba_dmapi_libs" = x"" ; then + AC_CHECK_LIB(dmapi, dm_get_eventlist, + [samba_dmapi_libs="-ldmapi"], []) + fi + + # Only bother to test ehaders if we have a candidate DMAPI library if test x"$samba_dmapi_libs" != x"" ; then - AC_CHECK_HEADERS(sys/dmi.h xfs/dmapi.h sys/jfsdmapi.h sys/dmapi.h) + AC_CHECK_HEADERS(sys/dmi.h xfs/dmapi.h sys/jfsdmapi.h sys/dmapi.h dmapi.h) fi if test x"$samba_dmapi_libs" != x"" ; then @@ -612,6 +618,8 @@ AC_DEFUN([SMB_CHECK_DMAPI], #include <sys/jfsdmapi.h> #elif defined(HAVE_SYS_DMAPI_H) #include <sys/dmapi.h> +#elif defined(HAVE_DMAPI_H) +#include <dmapi.h> #endif ], [ diff --git a/source3/smbd/dmapi.c b/source3/smbd/dmapi.c index b42b7d51f0..b8c23c2dce 100644 --- a/source3/smbd/dmapi.c +++ b/source3/smbd/dmapi.c @@ -40,6 +40,8 @@ BOOL dmapi_have_session(void) { return False; } #include <sys/jfsdmapi.h> #elif defined(HAVE_SYS_DMAPI_H) #include <sys/dmapi.h> +#elif defined(HAVE_DMAPI_H) +#include <dmapi.h> #endif #define DMAPI_SESSION_NAME "samba" |