summaryrefslogtreecommitdiff
path: root/source4/lib/replace/libreplace_cc.m4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-14 18:46:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:42 -0500
commitfafa8c3e47497a9f399e9ca52a7e6a904f1fb9f6 (patch)
tree68c5a064dfd23b1b6390177c75256f4f9b342f7e /source4/lib/replace/libreplace_cc.m4
parentf7b29f23ad06403673a44915d5d85b09da69857a (diff)
downloadsamba-fafa8c3e47497a9f399e9ca52a7e6a904f1fb9f6.tar.gz
samba-fafa8c3e47497a9f399e9ca52a7e6a904f1fb9f6.tar.bz2
samba-fafa8c3e47497a9f399e9ca52a7e6a904f1fb9f6.zip
r18535: move the AC_CANONICAL_HOST and host specific flag tests into
libreplace. This should fix the standalone build of tdb on HPUX, where we need to blacklist mmap. Unfortunately this requires that we have a copy of config.guess and config.sub in each of our project subdirectories. I tried to find a way to use something like AC_CONFIG_AUX_DIR($libreplacedir) and just put config.{guess,sub} in the lib/replace/ directory, but I couldn't figure out how to do that in a way that kept autoconf happy for each of our separate builds. Any autoconf guru out there see a way to do this? (This used to be commit 823cd3ab35456769dcefee17bdaca21f01ba0f63)
Diffstat (limited to 'source4/lib/replace/libreplace_cc.m4')
-rw-r--r--source4/lib/replace/libreplace_cc.m431
1 files changed, 31 insertions, 0 deletions
diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4
index 5e44da73a3..4f2ce034bf 100644
--- a/source4/lib/replace/libreplace_cc.m4
+++ b/source4/lib/replace/libreplace_cc.m4
@@ -47,8 +47,39 @@ dnl Add #include for broken IRIX header files
case "$host_os" in
*irix6*) AC_ADD_INCLUDE(<standards.h>)
;;
+ *hpux*)
+ # mmap on HPUX is completely broken...
+ AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken])
+ ;;
+ *aix*)
+ if test "${GCC}" != "yes"; then
+ ## for funky AIX compiler using strncpy()
+ CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
+ fi
+ ;;
+ #
+ # VOS may need to have POSIX support and System V compatibility enabled.
+ #
+ *vos*)
+ case "$CFLAGS" in
+ *-D_POSIX_C_SOURCE*);;
+ *)
+ CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L"
+ AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Whether to enable POSIX support])
+ ;;
+ esac
+ case "$CFLAGS" in
+ *-D_SYSV*|*-D_SVID_SOURCE*);;
+ *)
+ CFLAGS="$CFLAGS -D_SYSV"
+ AC_DEFINE(_SYSV, 1, [Whether to enable System V compatibility])
+ ;;
+ esac
+ ;;
esac
+
+
AC_CHECK_HEADERS([standards.h])
# Solaris needs HAVE_LONG_LONG defined