summaryrefslogtreecommitdiff
path: root/source/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source/configure.in')
-rw-r--r--source/configure.in79
1 files changed, 36 insertions, 43 deletions
diff --git a/source/configure.in b/source/configure.in
index dabdca87565..f8eba2349f9 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -412,6 +412,25 @@ then
LIBS="$LIBS -ldmalloc"
fi
+#################################################
+# check for a shared memory profiling support
+AC_MSG_CHECKING(whether to use profiling)
+AC_ARG_WITH(profiling-data,
+[ --with-profiling-data Include gathering source code profile information (default=no)],
+[ case "$withval" in
+ yes)
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(WITH_PROFILE,1,[Whether to use profiling])
+ samba_cv_WITH_PROFILE=yes
+ ;;
+ *)
+ AC_MSG_RESULT(no)
+ samba_cv_WITH_PROFILE=no
+ ;;
+ esac ],
+ AC_MSG_RESULT(no)
+)
+
dnl Checks for programs.
##
@@ -830,7 +849,6 @@ 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)
AC_CHECK_HEADERS(langinfo.h locale.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
@@ -2024,7 +2042,22 @@ if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is available])
fi
-AC_LIBTESTFUNC(rt, clock_gettime)
+if test x"$samba_cv_WITH_PROFILE" = x"yes"; then
+
+ # On some systems (eg. Linux) librt can pull in libpthread. We
+ # don't want this to happen because libpthreads changes signal delivery
+ # semantics in ways we are not prepared for. This breaks Linux oplocks
+ # which rely on signals.
+
+ AC_LIBTESTFUNC(rt, clock_gettime,
+ [
+ SMB_IS_LIBPTHREAD_LINKED(
+ [ SMB_REMOVELIB(rt) ],
+ [ AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
+ [Whether clock_gettime is available]) ])
+ ])
+
+fi
AC_CACHE_CHECK([for va_copy],samba_cv_HAVE_VA_COPY,[
AC_TRY_LINK([#include <stdarg.h>
@@ -2439,29 +2472,7 @@ fi
#################################################
# 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 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
+SMB_CHECK_DMAPI([], AC_MSG_NOTICE(DMAPI support not present) )
AC_CACHE_CHECK([for kernel share modes],samba_cv_HAVE_KERNEL_SHARE_MODES,[
AC_TRY_RUN([
@@ -3976,24 +3987,6 @@ AC_ARG_WITH(syslog,
)
#################################################
-# check for a shared memory profiling support
-AC_MSG_CHECKING(whether to use profiling)
-AC_ARG_WITH(profiling-data,
-[ --with-profiling-data Include gathering source code profile information (default=no)],
-[ case "$withval" in
- yes)
- AC_MSG_RESULT(yes)
- AC_DEFINE(WITH_PROFILE,1,[Whether to use profiling])
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
- esac ],
- AC_MSG_RESULT(no)
-)
-
-
-#################################################
# check for experimental disk-quotas support
samba_cv_WITH_QUOTAS=auto