s3: add explicit configure option whether or not to enable dmapi support
authorBjörn Jacke <bj@sernet.de>
Tue, 23 Feb 2010 14:23:27 +0000 (15:23 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 25 Mar 2011 19:51:46 +0000 (20:51 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(similar to commit ce7727c1cc2fe4caa9b2d6e33530c3483dd5f980)

Fix bug #8033 - Backport dmapi configure checks.

source3/configure.in

index 5201302f2787c9852ebed7d879c77fd567bb212e..4528cbf341ff3b3612b2620d748eb8d50d4b1458 100644 (file)
@@ -2688,7 +2688,28 @@ AC_SUBST(SMB_FAM_LIBS)
 #################################################
 # Check for DMAPI interfaces in libdm/libjfsdm/libxsdm
 
-SMB_CHECK_DMAPI([], AC_MSG_NOTICE(DMAPI support not present) )
+
+with_dmapi_support=auto
+AC_MSG_CHECKING(whether to use DMAPI support)
+AC_ARG_WITH(dmapi,
+[AS_HELP_STRING([--with-dmapi], [Include DMAPI/XDSM support (default=auto)])],
+[ case "$withval" in
+  yes|no)
+    with_dmapi_support=$withval
+    ;;
+  esac ]
+)
+AC_MSG_RESULT([$with_dmapi_support])
+
+if test x"$with_dmapi_support" != xno ; then
+       SMB_CHECK_DMAPI([], [
+               AC_MSG_NOTICE(DMAPI support not present)
+               if test x"$with_dmapi_support" = xyes ; then
+                       AC_MSG_ERROR(no DMAPI support found but requested!)
+               fi
+               ]
+       )
+fi
 
 # Add TSM SM VFS module only if there are both GPFS and DMAPI support
 # Theoretically it should work with AIX JFS2 too but this needs testing