summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-10-24 03:23:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:37 -0500
commit75018ad0cc532ff5971219e82b87d1bfdafa101a (patch)
tree499443f4d1416582371e0beb01d43952eb3f2b94
parent37ffa791393adb6b92ac98d0ad03676db11fa6e9 (diff)
downloadsamba-75018ad0cc532ff5971219e82b87d1bfdafa101a.tar.gz
samba-75018ad0cc532ff5971219e82b87d1bfdafa101a.tar.bz2
samba-75018ad0cc532ff5971219e82b87d1bfdafa101a.zip
r19477: Patch from Huang Dejin Eugene <hdejin@yahoo.com>.
Add configure option --enable-fam so that FAM support can explicitly be controlled at build time. Default behaviour is to autodetect. (This used to be commit 066951bc48723b1a26aab9ebb21ff2c897189043)
-rw-r--r--source3/configure.in54
1 files changed, 31 insertions, 23 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 652bd390ee..91d304f0f2 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -2501,32 +2501,40 @@ fi
# Check if FAM notifications are available. For FAM info, see
# http://oss.sgi.com/projects/fam/
# http://savannah.nongnu.org/projects/fam/
+AC_ARG_ENABLE(fam,
+[ --enable-fam Turn on FAM support (default=auto)])
+
+if test x$enable_fam != xno; then
+ AC_CHECK_HEADERS(fam.h, [samba_cv_HAVE_FAM_H=yes], [samba_cv_HAVE_FAM_H=no])
+ if test x"$samba_cv_HAVE_FAM_H" = x"yes"; then
+ # On IRIX, libfam requires libC, but other FAM implementations
+ # might not need it.
+ AC_CHECK_LIB(fam, FAMOpen2,
+ [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam"],
+ [samba_cv_HAVE_LIBFAM=no])
+
+ if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then
+ samba_fam_xtra=-lC
+ AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2,
+ [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam -lC"],
+ [samba_cv_HAVE_LIBFAM=no])
+ unset samba_fam_xtra
+ fi
+ fi
-AC_CHECK_HEADERS(fam.h, [samba_cv_HAVE_FAM_H=yes], [samba_cv_HAVE_FAM_H=no])
-if test x"$samba_cv_HAVE_FAM_H" = x"yes"; then
- # On IRIX, libfam requires libC, but other FAM implementations might not
- # need it.
- AC_CHECK_LIB(fam, FAMOpen2,
- [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam"],
- [samba_cv_HAVE_LIBFAM=no])
-
- if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then
- samba_fam_xtra=-lC
- AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2,
- [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam -lC"],
- [samba_cv_HAVE_LIBFAM=no])
- unset samba_fam_xtra
+ if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then
+ AC_DEFINE(HAVE_FAM_CHANGE_NOTIFY, 1,
+ [Whether FAM file notifications are available])
+ AC_TRY_COMPILE([#include <fam.h>],
+ [FAMCodes code = FAMChanged;],
+ AC_DEFINE(HAVE_FAM_H_FAMCODES_TYPEDEF, 1,
+ [Whether fam.h contains a typedef for enum FAMCodes]),
+ [])
fi
-fi
-if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then
- AC_DEFINE(HAVE_FAM_CHANGE_NOTIFY, 1,
- [Whether FAM is file notifications are available])
- AC_TRY_COMPILE([#include <fam.h>],
- [FAMCodes code = FAMChanged;],
- AC_DEFINE(HAVE_FAM_H_FAMCODES_TYPEDEF, 1,
- [Whether fam.h contains a typedef for enum FAMCodes]),
- [])
+ if test x$enable_fam = xyes && test x"$samba_cv_HAVE_LIBFAM" != xyes ; then
+ AC_MSG_ERROR(FAM support requested but FAM library not available )
+ fi
fi
#################################################