summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/replace/libreplace_cc.m4
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2013-05-29 14:44:03 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-05-29 17:47:16 +1000
commit4c1dc871b9ebdb9a83ab7b4714d89e451ea0783a (patch)
tree340462070c256ce4f33bf0ccf344725c16270e17 /ctdb/lib/replace/libreplace_cc.m4
parentfe1fc55c616f175a3ebdd8edb64dca0430c149d7 (diff)
replace: Sync to latest replace from upstream
The latest commits affecting lib/replace remove autoconf build from Samba tree. So using following commit as a sync point. commit 9ddfd7d8784e6f546628f48990b69ee2850be52d Author: Andrew Bartlett <abartlet@samba.org> Date: Wed May 22 17:23:30 2013 +1000 Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 506b27c944b4031e8a325816bd12abddd442a0bb)
Diffstat (limited to 'ctdb/lib/replace/libreplace_cc.m4')
-rw-r--r--ctdb/lib/replace/libreplace_cc.m422
1 files changed, 20 insertions, 2 deletions
diff --git a/ctdb/lib/replace/libreplace_cc.m4 b/ctdb/lib/replace/libreplace_cc.m4
index 48d9e84a32..50cb73583b 100644
--- a/ctdb/lib/replace/libreplace_cc.m4
+++ b/ctdb/lib/replace/libreplace_cc.m4
@@ -50,11 +50,21 @@ AC_PROG_INSTALL
AC_ISC_POSIX
AC_N_DEFINE(_XOPEN_SOURCE_EXTENDED)
+AC_MSG_CHECKING(checking getconf LFS_CFLAGS for large file support flags)
+LFS_CFLAGS=`(getconf LFS_CFLAGS) 2>/dev/null` || LFS_CFLAGS=""
+
+AC_MSG_RESULT(${LFS_CFLAGS})
+if test "x$LFS_CFLAGS" != 'x-1' || test "x$LFS_CFLAGS" != "xundefined"; then
+ CFLAGS="$CFLAGS $LFS_CFLAGS"
+fi
+
AC_SYS_LARGEFILE
dnl Add #include for broken IRIX header files
case "$host_os" in
*irix6*) AC_ADD_INCLUDE(<standards.h>)
+ AC_N_DEFINE(_XOPEN_SOURCE,600)
+ AC_N_DEFINE(_BSD_TYPES)
;;
*hpux*)
# mmap on HPUX is completely broken...
@@ -102,9 +112,17 @@ case "$host_os" in
;;
esac
+# Do not check for standards.h on darwin, we get nasty warnings on
+# OS/X Lion. Probably a positive-list of OS'es like IRIX and AIX
+# would be the better choice, but this seems to work fine
-
-AC_CHECK_HEADERS([standards.h])
+case "$host_os" in
+ *darwin*)
+ ;;
+ *)
+ AC_CHECK_HEADERS([standards.h])
+ ;;
+esac
# Solaris needs HAVE_LONG_LONG defined
AC_CHECK_TYPES(long long)