diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/compiler.m4 | 51 | ||||
-rw-r--r-- | m4/platform.m4 | 48 |
2 files changed, 89 insertions, 10 deletions
diff --git a/m4/compiler.m4 b/m4/compiler.m4 index 69fad056a10..c7f2568c82a 100644 --- a/m4/compiler.m4 +++ b/m4/compiler.m4 @@ -40,10 +40,16 @@ AC_DEFUN(ACE_SET_COMPILER_FLAGS, dnl dnl running the configure script. As such, it is important dnl not to replace the existing value of CXXFLAGS; rather dnl one should only add to it. - dnl ACE_CXXFLAGS - General C++ flags the configure script should set before - dnl CXXFLAGS to allow the user override them. + dnl ACE_CXXFLAGS + dnl - General C++ flags the configure script should set before + dnl CXXFLAGS to allow the user override them. dnl DCXXFLAGS - C++ debugging flags dnl OCXXFLAGS - C++ optimization flags + dnl CPPFLAGS - C++ preprocessor flags + dnl ACE_CPPFLAGS + dnl - General C++ preprocessor flags the configure + dnl script should set before CPPFLAGS to allow the + dnl user override them. dnl WERROR - Compiler flag that converts warnings to errors if test -n "$GXX"; then @@ -51,13 +57,52 @@ AC_DEFUN(ACE_SET_COMPILER_FLAGS, dnl fi case "$target" in + *aix*) + dnl In case anything here or in the config depends on OS + dnl version number, grab it here and pass it all to the + dnl compiler as well. + AIX_MAJOR_VERS=`uname -v` + AIX_MINOR_VERS=`uname -r` + + ACE_CPPFLAGS="$ACE_CPPFLAGS -DACE_AIX_MAJOR_VERS=$AIX_MAJOR_VERS" + ACE_CPPFLAGS="$ACE_CPPFLAGS -DACE_AIX_MINOR_VERS=$AIX_MINOR_VERS" + + case "$CXX" in + xlC*) + dnl IBM C/C++ compiler 3.6.x produces a bazillion warnings about + dnl 0-valued preprocessor defs. Since both 3.1 and 3.4 could + dnl be installed, don't ask lslpp for one or the + dnl other. Instead, compile a file and see which compiler the + dnl user has set up for use. This trick was submitted by + dnl Craig Rodrigues <rodrigc@mediaone.net>, originally from + dnl the vacpp compiler newsgroup. It relies on the + dnl preprocessor defining __xlC__ to the proper version + dnl number of the compiler. + + AC_EGREP_CPP(0x0306, + [ + __xlC__ + ], + [ + CXXFLAGS="$CXXFLAGS -qflag=e:e" + ], + [ + CXXFLAGS="$CXXFLAGS -qflag=w:w" + ]) + ;; + esac + ;; + esac + + case "$target" in *aix4.2* | *aix4.3*) case "$CXX" in xlC*) CXXFLAGS="$CXXFLAGS" - ACE_CXXFLAGS="$ACE_CXXFLAGS -qtempinc -qlanglvl=ansi -qflag=w:w -qinfo" + ACE_CXXFLAGS="$ACE_CXXFLAGS " DCXXFLAGS="-g -qcheck=nobounds:div:null" OCXXFLAGS="-qarch=com" + CPPFLAGS="$CPPFLAGS -qlanglvl=ansi" ;; *) if test -n "$GXX"; then diff --git a/m4/platform.m4 b/m4/platform.m4 index 7ec5daaca00..ae2b765282f 100644 --- a/m4/platform.m4 +++ b/m4/platform.m4 @@ -26,40 +26,64 @@ AC_DEFUN(ACE_SET_PLATFORM_MACROS, dnl [ dnl Begin ACE_SET_PLATFORM_MACROS -dnl At some point the below platform specific settings should be automated -dnl as much as possible! We set things manually just to get things going -dnl with the auto{conf,make}/libtool integration into the ACE source tree. - -dnl These settings need to be done _after_ the header, function and library -dnl checks! +dnl At some point the below platform specific settings should be +dnl automated as much as possible! We set things manually just to get +dnl things going with the auto{conf,make}/libtool integration into the +dnl ACE source tree. dnl Platform specific flags case "$target" in *aix3*) + AC_DEFINE(AIX) AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) ;; *aix4.1*) AC_DEFINE(AIX) + dnl Use BSD 4.4 socket definitions for pre-AIX 4.2. The _BSD + dnl setting also controls the data type used for waitpid(), + dnl wait(), and wait3(). + AC_DEFINE(_BSD, 44) + dnl pre-AIX 4.3 requires _BSD_INCLUDES + AC_DEFINE(_BSD_INCLUDES) AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) AC_DEFINE(ACE_HAS_AIX_BROKEN_SOCKET_HEADER) ;; *aix4.2*) AC_DEFINE(AIX) + dnl pre-AIX 4.3 requires _BSD_INCLUDES + AC_DEFINE(_BSD_INCLUDES) AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) dnl AC_DEFINE(ACE_HAS_AIX_BROKEN_SOCKET_HEADER) AC_DEFINE(ACE_TLI_TCP_DEVICE, "/dev/xti/tcp") ;; - *cray*) + *aix*) + AC_DEFINE(AIX) + ;; + t3e-cray-unicosmk*) + AC_DEFINE(_CRAYMPP) + AC_DEFINE(_CRAYT3E) + AC_DEFINE(_UNICOS,) + ;; + t3e-cray*) + AC_DEFINE(_CRAYT3E) + AC_DEFINE(_UNICOS,) + ;; + *cray-unicos*) + AC_DEFINE(_UNICOS,) ;; *dgux4.11*) AC_DEFINE(ACE_DGUX) AC_DEFINE(IP_ADD_MEMBERSHIP, 0x13) AC_DEFINE(IP_DROP_MEMBERSHIP, 0x14) + AC_DEFINE(_POSIX_SOURCE) + AC_DEFINE(_DGUX_SOURCE) ;; *dgux4*) AC_DEFINE(ACE_DGUX) AC_DEFINE(IP_ADD_MEMBERSHIP, 0x13) AC_DEFINE(IP_DROP_MEMBERSHIP, 0x14) + AC_DEFINE(_POSIX4A_DRAFT10_SOURCE) + AC_DEFINE(_POSIX4_DRAFT_SOURCE) ;; *freebsd*) ;; @@ -73,6 +97,7 @@ dnl FIXME: "FSU" isn't a platform! We need to move this somewhere. *hpux10*) AC_DEFINE(HPUX) AC_DEFINE(HPUX_10) + AC_DEFINE(_HPUX_SOURCE) AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) AC_DEFINE(ACE_TLI_TCP_DEVICE, "/dev/inet_cots") ;; @@ -99,6 +124,9 @@ dnl FIXME: "FSU" isn't a platform! We need to move this somewhere. ;; *irix5.3*) AC_DEFINE(IRIX5) + if test -z "$GXX"; then + AC_DEFINE(_BSD_TYPES) + fi ;; *irix6*) AC_DEFINE(IRIX6) @@ -108,6 +136,8 @@ dnl FIXME: "FSU" isn't a platform! We need to move this somewhere. AC_DEFINE(ACE_HAS_IRIX62_THREADS) fi AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) + AC_DEFINE(_SGI_MP_SOURCE) + AC_DEFINE(_MODERN_C_) ;; *linux*) AC_DEFINE(ACE_DEFAULT_MAX_SOCKET_BUFSIZ, 65535) @@ -118,6 +148,8 @@ dnl FIXME: "FSU" isn't a platform! We need to move this somewhere. AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) ;; *lynxos*) + AC_DEFINE(_POSIX_THREADS_CALLS) + AC_DEFINE(__NO_INCLUDE_WARN__) AC_DEFINE(ACE_MALLOC_ALIGN, 8) AC_DEFINE(ACE_MAP_PRIVATE, ACE_MAP_SHARED) AC_DEFINE(ACE_USE_RCSID, 0) @@ -131,6 +163,7 @@ dnl FIXME: "FSU" isn't a platform! We need to move this somewhere. AC_DEFINE(IP_DROP_MEMBERSHIP, 0x14) ;; *mvs*) + AC_DEFINE(_ALL_SOURCE) ;; *netbsd*) AC_DEFINE(ACE_NETBSD) @@ -196,6 +229,7 @@ dnl Check for _POSIX_C_SOURCE macro AC_DEFINE(ACE_DEFAULT_CLOSE_ALL_HANDLES, 0) ;; *sco5*) + AC_DEFINE(_SVID3) AC_DEFINE(SCO) AC_DEFINE(ACE_DEFAULT_CLOSE_ALL_HANDLES, 0) AC_DEFINE(ACE_HAS_BIG_FD_SET) dnl FIXME: We need a test for this! |