diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-09-06 14:29:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:17:46 -0500 |
commit | 21ef15d703557cfa8c71b72df35c8d485b3c2ab0 (patch) | |
tree | 446e8ab4226cfc61386ccd02cf269f105dbb4421 /source4/build/m4/check_cc.m4 | |
parent | 8ebc545e5799c7c0ff7adf05071f6072cb1c5c5d (diff) | |
download | samba-21ef15d703557cfa8c71b72df35c8d485b3c2ab0.tar.gz samba-21ef15d703557cfa8c71b72df35c8d485b3c2ab0.tar.bz2 samba-21ef15d703557cfa8c71b72df35c8d485b3c2ab0.zip |
r18179: - move CC specific stuff to check_cc.m4
- add some AC_DEFINES to rewrite.m4
(I'll remove them from check_ld.m4 soon)
(I've also merged new values from samba3)
metze
(This used to be commit de0c8d1b1729daef984d5b44e0224481cf9e2164)
Diffstat (limited to 'source4/build/m4/check_cc.m4')
-rw-r--r-- | source4/build/m4/check_cc.m4 | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4 index 4769d5087d..7f166ff641 100644 --- a/source4/build/m4/check_cc.m4 +++ b/source4/build/m4/check_cc.m4 @@ -198,6 +198,49 @@ if test -n "$DEVELOPER_CFLAGS"; then CFLAGS="${OLD_CFLAGS}" fi +# +# Config CPPFLAG settings for strange OS's that must be set +# before other tests. +# +case "$host_os" in + # Try to work out if this is the native HPUX compiler that uses the -Ae flag. + *hpux*) + AC_PROG_CC_FLAG(Ae) + # mmap on HPUX is completely broken... + AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) + if test $ac_cv_prog_cc_Ae = yes; then + CPPFLAGS="$CPPFLAGS -Ae" + fi + ;; + + *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 "$CPPFLAGS" in + *-D_POSIX_C_SOURCE*);; + *) + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" + AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Whether to enable POSIX support]) + ;; + esac + case "$CPPFLAGS" in + *-D_SYSV*|*-D_SVID_SOURCE*);; + *) + CPPFLAGS="$CPPFLAGS -D_SYSV" + AC_DEFINE(_SYSV, 1, [Whether to enable System V compatibility]) + ;; + esac + ;; +esac + # allow for --with-hostcc=gcc AC_ARG_WITH(hostcc,[ --with-hostcc=compiler choose host compiler], [HOSTCC=$withval], |