diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ace.m4 | 327 | ||||
-rw-r--r-- | m4/acinclude.m4 | 472 | ||||
-rw-r--r-- | m4/compiler.m4 | 90 | ||||
-rw-r--r-- | m4/config_h.m4 | 1424 | ||||
-rw-r--r-- | m4/features.m4 | 62 | ||||
-rw-r--r-- | m4/platform.m4 | 216 | ||||
-rw-r--r-- | m4/subsets.m4 | 177 | ||||
-rw-r--r-- | m4/threads.m4 | 251 |
8 files changed, 2247 insertions, 772 deletions
diff --git a/m4/ace.m4 b/m4/ace.m4 index 0393c191863..7abf1cf87f0 100644 --- a/m4/ace.m4 +++ b/m4/ace.m4 @@ -8,7 +8,7 @@ dnl for enabling/disabling certain ACE features. dnl dnl ------------------------------------------------------------------------- -dnl Copyright (C) 1998, 1999, 2000 Ossama Othman +dnl Copyright (C) 1998, 1999, 2000, 2002 Ossama Othman dnl dnl All Rights Reserved dnl @@ -22,12 +22,10 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dnl Macros that add ACE configuration options to a `configure' script. dnl ACE_CONFIGURATION_OPTIONS -AC_DEFUN(ACE_CONFIGURATION_OPTIONS, dnl +AC_DEFUN([ACE_CONFIGURATION_OPTIONS], [ - AC_ARG_ENABLE(log-msg-prop, - [ --enable-log-msg-prop enable threads inheriting - ACE_Log_Msg properties from parent - thread [default=yes]], + AC_ARG_ENABLE([log-msg-prop], + AC_HELP_STRING([--enable-log-msg-prop],[enable threads inheriting ACE_Log_Msg properties from parent thread [[yes]]]), [ case "${enableval}" in yes) @@ -37,96 +35,95 @@ AC_DEFUN(ACE_CONFIGURATION_OPTIONS, dnl AC_DEFINE(ACE_THREADS_DONT_INHERIT_LOG_MSG) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-log-msg-prop) + AC_MSG_ERROR([bad value ${enableval} for --enable-log-msg-prop]) ;; esac ],) - AC_ARG_ENABLE(logging, - [ --enable-logging enable ACE logging macros [default=yes]], + AC_ARG_ENABLE([logging], + AC_HELP_STRING([--enable-logging],[enable ACE logging macros [[yes]]]), [ case "${enableval}" in yes) dnl nothing to do ;; no) - AC_DEFINE(ACE_NLOGGING) + AC_DEFINE([ACE_NLOGGING]) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-logging) + AC_MSG_ERROR([bad value ${enableval} for --enable-logging]) ;; esac ],) - AC_ARG_ENABLE(malloc-stats, - [ --enable-malloc-stats enable malloc statistics - collection [default=no]], + AC_ARG_ENABLE([malloc-stats], + AC_HELP_STRING([--enable-malloc-stats],[enable malloc statistics collection [[no]]]), [ case "${enableval}" in yes) - AC_DEFINE(ACE_HAS_MALLOC_STATS) + AC_DEFINE([ACE_HAS_MALLOC_STATS]) ;; no) dnl nothing to do ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-malloc-stats) + AC_MSG_ERROR([bad value ${enableval} for --enable-malloc-stats]) ;; esac ],) - AC_ARG_ENABLE(pi-pointers, - [ --enable-pi-pointers enable pos. indep. pointers [default=yes]], + AC_ARG_ENABLE([pi-pointers], + AC_HELP_STRING([--enable-pi-pointers],[enable pos. indep. pointers [[yes]]]), [ case "${enableval}" in yes) - AC_DEFINE(ACE_HAS_POSITION_INDEPENDENT_POINTERS) + AC_DEFINE([ACE_HAS_POSITION_INDEPENDENT_POINTERS]) ;; no) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-pi-pointers) + AC_MSG_ERROR([bad value ${enableval} for --enable-pi-pointers]) ;; esac ], [ - AC_DEFINE(ACE_HAS_POSITION_INDEPENDENT_POINTERS) + AC_DEFINE([ACE_HAS_POSITION_INDEPENDENT_POINTERS]) ]) - AC_ARG_ENABLE(probe, - [ --enable-probe enable ACE_Timeprobes [default=no]], + AC_ARG_ENABLE([probe], + AC_HELP_STRING([--enable-probe],[enable ACE_Timeprobes [[no]]]), [ case "${enableval}" in yes) - AC_DEFINE(ACE_COMPILE_TIMEPROBES) + AC_DEFINE([ACE_COMPILE_TIMEPROBES]) ;; no) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-probe) + AC_MSG_ERROR([bad value ${enableval} for --enable-probe]) ;; esac ],) - AC_ARG_ENABLE(static-obj-mgr, - [ --enable-static-obj-mgr enable static Object_Manager [default=yes]], + AC_ARG_ENABLE([static-obj-mgr], + AC_HELP_STRING([--enable-static-obj-mgr],[enable static Object_Manager [[yes]]]), [ case "${enableval}" in yes) dnl nothing to do ;; no) - AC_DEFINE(ACE_HAS_NONSTATIC_OBJECT_MANAGER) + AC_DEFINE([ACE_HAS_NONSTATIC_OBJECT_MANAGER]) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-static-obj-mgr) + AC_MSG_ERROR([bad value ${enableval} for --enable-static-obj-mgr]) ;; esac ],) - AC_ARG_ENABLE(threads, - [ --enable-threads enable thread support [default=yes]], + AC_ARG_ENABLE([threads], + AC_HELP_STRING([--enable-threads],[enable thread support [[yes]]]), [ case "${enableval}" in yes) @@ -136,7 +133,7 @@ AC_DEFUN(ACE_CONFIGURATION_OPTIONS, dnl ace_user_enable_threads=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-threads) + AC_MSG_ERROR([bad value ${enableval} for --enable-threads]) ;; esac ], @@ -144,42 +141,42 @@ AC_DEFUN(ACE_CONFIGURATION_OPTIONS, dnl ace_user_enable_threads=yes ]) - AC_ARG_ENABLE(verb-not-sup, - [ --enable-verb-not-sup enable verbose ENOTSUP reports [default=no]], + AC_ARG_ENABLE([verb-not-sup], + AC_HELP_STRING([--enable-verb-not-sup],[enable verbose ENOTSUP reports [[no]]]), [ case "${enableval}" in yes) - AC_DEFINE(ACE_HAS_VERBOSE_NOTSUP) + AC_DEFINE([ACE_HAS_VERBOSE_NOTSUP]) ;; no) dnl Do nothing ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-verb-not-sup) + AC_MSG_ERROR([bad value ${enableval} for --enable-verb-not-sup]) ;; esac ],) - AC_ARG_ENABLE(trace, - [ --enable-trace enable ACE tracing [default=no]], + AC_ARG_ENABLE([trace], + AC_HELP_STRING([--enable-trace],[enable ACE tracing [[no]]]), [ case "${enableval}" in yes) ;; no) - AC_DEFINE(ACE_NTRACE) + AC_DEFINE([ACE_NTRACE]) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-trace) + AC_MSG_ERROR([bad value ${enableval} for --enable-trace]) ;; esac ], [ - AC_DEFINE(ACE_NTRACE) + AC_DEFINE([ACE_NTRACE]) ]) - AC_ARG_ENABLE(xt-reactor, - [ --enable-xt-reactor build support for the XtReactor [default=no]], + AC_ARG_ENABLE([xt-reactor], + AC_HELP_STRING([--enable-xt-reactor],[build support for the XtReactor [[no]]]), [ case "${enableval}" in yes) @@ -192,8 +189,8 @@ dnl line, then "no_x" is set to "yes." else ACE_XLIBS="" ace_user_enable_xt_reactor=no - AC_MSG_WARN(X was not found or it was disabled.) - AC_MSG_WARN(ACE_XtReactor will not be enabled.) + AC_MSG_WARN([X was not found or it was disabled.]) + AC_MSG_WARN([ACE_XtReactor will not be enabled.]) fi ;; no) @@ -201,61 +198,121 @@ dnl line, then "no_x" is set to "yes." ace_user_enable_xt_reactor=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-xt-reactor) + AC_MSG_ERROR([bad value ${enableval} for --enable-xt-reactor]) ;; esac ],) - AC_ARG_ENABLE(fl-reactor, - [ --enable-fl-reactor build support for the FlReactor [default=no]], + AC_ARG_ENABLE([fl-reactor], + AC_HELP_STRING([--enable-fl-reactor],[build support for the FlReactor [[no]]]), [ case "${enableval}" in yes) - AC_MSG_ERROR(--enable-fl-reactor currently unimplemented) + AC_MSG_ERROR([--enable-fl-reactor currently unimplemented]) ace_user_enable_fl_reactor=yes ;; no) - AC_MSG_ERROR(--enable-fl-reactor currently unimplemented) + AC_MSG_ERROR([--enable-fl-reactor currently unimplemented]) ace_user_enable_fl_reactor=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-fl-reactor) + AC_MSG_ERROR([bad value ${enableval} for --enable-fl-reactor]) ;; esac ],) - AC_ARG_WITH(gperf, - [ --with-gperf compile the gperf program [default=yes]], + AC_ARG_WITH([gperf], + AC_HELP_STRING([--with-gperf],[compile the gperf program [[yes]]]), [ case "${withval}" in yes) ace_user_with_gperf=yes - AC_DEFINE(ACE_HAS_GPERF) + AC_DEFINE([ACE_HAS_GPERF]) if test -n "$GPERF"; then - AC_MSG_WARN(gperf program already exists) - AC_MSG_WARN(existing gperf may be overwritten during installation) + AC_MSG_WARN([gperf program already exists]) + AC_MSG_WARN([existing gperf may be overwritten during installation]) fi ;; no) ace_user_with_gperf=no ;; *) - AC_MSG_ERROR(bad value ${withval} for --with-gperf) + AC_MSG_ERROR([bad value ${withval} for --with-gperf]) ;; esac ], [ ace_user_with_gperf=yes - AC_DEFINE(ACE_HAS_GPERF) + AC_DEFINE([ACE_HAS_GPERF]) if test -n "$GPERF"; then - AC_MSG_WARN(gperf program already exists) - AC_MSG_WARN(existing gperf may be overwritten during installation) + AC_MSG_WARN([gperf program already exists]) + AC_MSG_WARN([existing gperf may be overwritten during installation]) fi ]) -AM_CONDITIONAL(COMPILE_GPERF, test X$ace_user_with_gperf = Xyes) + AM_CONDITIONAL([COMPILE_GPERF], [test X$ace_user_with_gperf = Xyes]) -#AC_ARG_WITH(tao, -# [ --with-tao build TAO (the ACE ORB) [default=yes]], + AC_ARG_WITH([rmcast], + AC_HELP_STRING([--with-rmcast],[compile the ACE_RMCast library [[yes]]]), + [ + case "${withval}" in + yes) + ace_user_with_rmcast=yes + ;; + no) + ace_user_with_rmcast=no + ;; + *) + AC_MSG_ERROR([bad value ${withval} for --with-rmcast]) + ;; + esac + ], + [ + ace_user_with_rmcast=yes + ]) + AM_CONDITIONAL([BUILD_RMCAST], [test X$ace_user_with_rmcast = Xyes]) + + AC_ARG_WITH([qos], + AC_HELP_STRING([--with-qos],[compile the ACE_QoS library [[no]]]), + [ + case "${withval}" in + yes) + ace_user_with_qos=yes + ;; + no) + ace_user_with_qos=no + ;; + *) + AC_MSG_ERROR([bad value ${withval} for --with-qos]) + ;; + esac + ], + [ + ace_user_with_qos=no + ]) + AM_CONDITIONAL([BUILD_QOS], [test X$ace_user_with_qos = Xyes]) + + AC_ARG_WITH([ssl], + AC_HELP_STRING([--with-ssl],[compile the ACE_SSL library [[no]]]), + [ + case "${withval}" in + yes) + ace_user_with_ssl=yes + ;; + no) + ace_user_with_ssl=no + ;; + *) + AC_MSG_ERROR([bad value ${withval} for --with-ssl]) + ;; + esac + ], + [ + ace_user_with_ssl=no + ]) + AM_CONDITIONAL([BUILD_SSL], [test X$ace_user_with_ssl = Xyes]) + +#AC_ARG_WITH([tao], +# AC_HELP_STRING([--with-tao],[build TAO (the ACE ORB) [[yes]]]), # [ # case "${withval}" in # yes) @@ -264,7 +321,7 @@ AM_CONDITIONAL(COMPILE_GPERF, test X$ace_user_with_gperf = Xyes) # no) # ;; # *) -# AC_MSG_ERROR(bad value ${withval} for --with-tao) +# AC_MSG_ERROR([bad value ${withval} for --with-tao]) # ;; # esac # ], @@ -272,27 +329,27 @@ AM_CONDITIONAL(COMPILE_GPERF, test X$ace_user_with_gperf = Xyes) # ace_user_with_tao=yes # ]) - AC_ARG_WITH(tli-device, - [ --with-tli-device[=DEV] device for TCP on TLI [default=/dev/tcp]], + AC_ARG_WITH([tli-device], + AC_HELP_STRING([--with-tli-device(=DEV)],[device for TCP on TLI [[/dev/tcp]]]), [ case "${withval}" in yes) - AC_MSG_ERROR(Specify the TLI/TCP device if you use this option.) + AC_MSG_ERROR([Specify the TLI/TCP device if you use this option.]) ;; no) ;; *) if test -e "${withval}"; then - AC_DEFINE_UNQUOTED(ACE_TLI_TCP_DEVICE, "${withval}") + AC_DEFINE_UNQUOTED([ACE_TLI_TCP_DEVICE], ["${withval}"]) else - AC_MSG_ERROR(TLI/TCP device ${withval} does not exist.) + AC_MSG_ERROR([TLI/TCP device ${withval} does not exist.]) fi ;; esac ],) - AC_ARG_ENABLE(reentrant, - [ --enable-reentrant enable reentrant functions [default=yes]], + AC_ARG_ENABLE([reentrant], + AC_HELP_STRING([--enable-reentrant],[enable reentrant functions [[yes]]]), [ case "${enableval}" in yes) @@ -302,7 +359,7 @@ AM_CONDITIONAL(COMPILE_GPERF, test X$ace_user_with_gperf = Xyes) ace_user_enable_reentrant_funcs=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-reentrant) + AC_MSG_ERROR([bad value ${enableval} for --enable-reentrant]) ;; esac ], @@ -316,26 +373,26 @@ AM_CONDITIONAL(COMPILE_GPERF, test X$ace_user_with_gperf = Xyes) dnl Macros that add ACE compilation options to a `configure' script. dnl ACE_COMPILATION_OPTIONS -AC_DEFUN(ACE_COMPILATION_OPTIONS, dnl +AC_DEFUN([ACE_COMPILATION_OPTIONS], [ - AC_ARG_ENABLE(debug, - [ --enable-debug enable debugging [default=yes]], + AC_ARG_ENABLE([debug], + AC_HELP_STRING([--enable-debug],[enable debugging [[yes]]]), [ case "${enableval}" in yes) ACE_CXXFLAGS="$ACE_CXXFLAGS $DCXXFLAGS" ;; no) - AC_DEFINE(ACE_NDEBUG) + AC_DEFINE([ACE_NDEBUG]) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-debug) + AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; esac ],) - AC_ARG_ENABLE(exceptions, - [ --enable-exceptions enable C++ exception handling [default=no]], + AC_ARG_ENABLE([exceptions], + AC_HELP_STRING([--enable-exceptions],[enable C++ exception handling [[yes]]]), [ case "${enableval}" in yes) @@ -343,35 +400,39 @@ AC_DEFUN(ACE_COMPILATION_OPTIONS, dnl ;; no) ace_user_enable_exceptions=no - if test -n "$GXX"; then + if test "$GXX" = yes; then dnl Temporarily change M4 quotes to prevent "regex []" from being eaten changequote(, )dnl - if $CXX --version | egrep -v '^2\.[0-7]' > /dev/null; then + if $CXX --version | $EGREP -v '^2\.[0-7]' > /dev/null; then changequote([, ])dnl ACE_CXXFLAGS="$ACE_CXXFLAGS -fno-exceptions" fi fi ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-exceptions) + AC_MSG_ERROR([bad value ${enableval} for --enable-exceptions]) ;; esac ], [ - ace_user_enable_exceptions=no - if test -n "$GXX"; then -dnl Temporarily change M4 quotes to prevent "regex []" from being eaten -changequote(, )dnl - if $CXX --version | egrep -v '^2\.[0-7]' > /dev/null; then -changequote([, ])dnl - ACE_CXXFLAGS="$ACE_CXXFLAGS -fno-exceptions" - fi - fi + ace_user_enable_exceptions=yes + +dnl THE FOLLOWING WAS ONLY USED WHEN DISABLING EXCEPTION SUPPORT BY +dnl DEFAULT. +dnl +dnl if test "$GXX" = yes; then +dnl dnl Temporarily change M4 quotes to prevent "regex []" from being eaten +dnl changequote(, )dnl +dnl if $CXX --version | $EGREP -v '^2\.[0-7]' > /dev/null; then +dnl changequote([, ])dnl +dnl ACE_CXXFLAGS="$ACE_CXXFLAGS -fno-exceptions" +dnl fi +dnl fi ]) - AC_ARG_ENABLE(fast, - [ --enable-fast enable -fast flag, e.g. Sun C++ [default=no]], + AC_ARG_ENABLE([fast], + AC_HELP_STRING([--enable-fast],[enable -fast flag, e.g. Sun C++ [[no]]]), [ case "${enableval}" in yes) @@ -381,42 +442,42 @@ changequote([, ])dnl no) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-fast) + AC_MSG_ERROR([bad value ${enableval} for --enable-fast]) ;; esac ],) - AC_ARG_ENABLE(inline, - [ --enable-inline enable code inlining [default=yes]], + AC_ARG_ENABLE([inline], + AC_HELP_STRING([--enable-inline],[enable code inlining [[yes]]]), [ case "${enableval}" in yes) - AC_DEFINE(__ACE_INLINE__) + AC_DEFINE([__ACE_INLINE__]) ;; no) - AC_DEFINE(ACE_NO_INLINE) + AC_DEFINE([ACE_NO_INLINE]) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-inline) + AC_MSG_ERROR([bad value ${enableval} for --enable-inline]) ;; esac ], [ - AC_DEFINE(__ACE_INLINE__) + AC_DEFINE([__ACE_INLINE__]) ]) - AC_ARG_ENABLE(optimize, - [ --enable-optimize enable additional optimizations [default=yes]], + AC_ARG_ENABLE([optimize], + AC_HELP_STRING([--enable-optimize],[enable additional optimizations [[yes]]]), [ case "${enableval}" in yes) ace_user_enable_optimize=yes ;; no) - AC_MSG_WARN(Optimization configure support not fully implemented yet.) + AC_MSG_WARN([Optimization configure support not fully implemented yet.]) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-optimize) + AC_MSG_ERROR([bad value ${enableval} for --enable-optimize]) ;; esac ], @@ -425,13 +486,13 @@ changequote([, ])dnl ]) - AC_ARG_ENABLE(profile, - [ --enable-profile enable profiling [default=no]], + AC_ARG_ENABLE([profile], + AC_HELP_STRING([--enable-profile],[enable profiling [[no]]]), [ case "${enableval}" in yes) if test -z "$PROF"; then - AC_MSG_WARN(No profiling program found. Assuming 'prof' exists) + AC_MSG_WARN([No profiling program found. Assuming 'prof' exists.]) ACE_CXXFLAGS="$ACE_CXXFLAGS -p" ACE_CFLAGS="$ACE_CFLAGS -p" else @@ -448,7 +509,7 @@ changequote([, ])dnl ;; *) dnl We shouldn't get here. - AC_MSG_WARN(Assuming 'prof' exists) + AC_MSG_WARN([Assuming 'prof' exists.]) ACE_CXXFLAGS="$ACE_CXXFLAGS -p" ACE_CFLAGS="$ACE_CFLAGS -p" ;; @@ -459,17 +520,17 @@ changequote([, ])dnl dnl Do nothing ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-profile) + AC_MSG_ERROR([bad value ${enableval} for --enable-profile]) ;; esac ],) - AC_ARG_ENABLE(purify, - [ --enable-purify Purify all executables [default=no]], + AC_ARG_ENABLE([purify], + AC_HELP_STRING([--enable-purify],[Purify all executables [[no]]]), [ case "${enableval}" in yes) - AC_CHECK_PROG(PURIFY, purify, purify,) + AC_CHECK_PROG([PURIFY], [purify], [purify],[]) if test -n "$PURIFY"; then PURE_CACHE_BASE_DIR=/tmp/purifycache PURE_CACHE_DIR="${PURE_CACHE_BASE_DIR}-${LOGNAME}" @@ -479,25 +540,25 @@ changequote([, ])dnl ACE_PURIFY_DIR=`type purify | sed -e 's/.* is //' -e 's%/purify'` ACE_CPPFLAGS="-DACE_HAS_PURIFY -I$ACE_PURIFY_DIR" else - AC_MSG_WARN(Purify program was not found.) - AC_MSG_WARN(Disabling purify support.) + AC_MSG_WARN([Purify program was not found.]) + AC_MSG_WARN([Disabling purify support.]) fi ;; no) PURELINK="" ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-purify) + AC_MSG_ERROR([bad value ${enableval} for --enable-purify]) ;; esac ], PURELINK="") - AC_ARG_ENABLE(quantify, - [ --enable-quantify Quantify all executables [default=no]], + AC_ARG_ENABLE([quantify], + AC_HELP_STRING([--enable-quantify],[Quantify all executables [[no]]]), [ case "${enableval}" in yes) - AC_CHECK_PROG(QUANTIFY, quantify, quantify,) + AC_CHECK_PROG([QUANTIFY], [quantify], [quantify],[]) if test -n "$QUANTIFY"; then PURE_CACHE_BASE_DIR=/tmp/purifycache PURE_CACHE_DIR="${PURE_CACHE_BASE_DIR}-${LOGNAME}" @@ -508,40 +569,38 @@ changequote([, ])dnl ACE_QUANTIFY_DIR=`type quantify | sed -e 's/.* is //' -e 's%/quantify$$%%'` ACE_CPPFLAGS="-DACE_HAS_QUANTIFY -I$ACE_QUANTIFY_DIR" else - AC_MSG_WARN(Quantify program was not found.) - AC_MSG_WARN(Disabling quantify support.) + AC_MSG_WARN([Quantify program was not found.]) + AC_MSG_WARN([Disabling quantify support.]) fi ;; no) PRELINK="" ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-quantify) + AC_MSG_ERROR([bad value ${enableval} for --enable-quantify]) ;; esac ], PRELINK="") - AC_ARG_ENABLE(repo, - [ --enable-repo use GNU template repository - GNU C++ with repo patches and - EGCS only [default=no]], + AC_ARG_ENABLE([repo], + AC_HELP_STRING([--enable-repo],[use GNU template repository GNU C++ with repo patches and EGCS only [[no]]]), [ case "${enableval}" in yes) - if test -n "$GXX"; then + if test "$GXX" = yes; then ace_user_enable_repo=yes ACE_CXXFLAGS="$ACE_CXXFLAGS -frepo" AC_DEFINE(ACE_HAS_GNU_REPO) else ace_user_enable_repo=no - AC_MSG_WARN(Not using GNU C++! GNU template respository disabled) + AC_MSG_WARN([Not using GNU C++! GNU template respository disabled.]) fi ;; no) ace_user_enable_repo=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-repo) + AC_MSG_ERROR([bad value ${enableval} for --enable-repo]) ;; esac ], @@ -549,14 +608,12 @@ changequote([, ])dnl ace_user_enable_repo=no ]) - AC_ARG_ENABLE(rtti, - [ --enable-rtti enable run-time type - identification - *Currently only for Sun C++ [default=no]], + AC_ARG_ENABLE([rtti], + AC_HELP_STRING([--enable-rtti],[enable run-time type identification *Currently only for Sun C++* [[no]]]), [ case "${enableval}" in yes) - if test -z "$GXX"; then + if test "$GXX" = no; then case "$host" in *solaris*) ace_user_enable_rtti=yes @@ -565,13 +622,13 @@ changequote([, ])dnl ;; esac else - AC_MSG_WARN(Not using Sun C++. RTTI will not be enabled.) + AC_MSG_WARN([Not using Sun C++. RTTI will not be enabled.]) fi ;; no) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-rtti) + AC_MSG_ERROR([bad value ${enableval} for --enable-rtti]) ;; esac ],) diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index fa5a6e11faf..8bda90ecda5 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -9,7 +9,7 @@ dnl general enough for general use. dnl dnl ------------------------------------------------------------------------- -dnl Copyright (C) 1998, 1999, 2000 Ossama Othman +dnl Copyright (C) 1998, 1999, 2000, 2002 Ossama Othman dnl dnl All Rights Reserved dnl @@ -32,7 +32,7 @@ dnl a directory that doesn't contain any CVS controlled sources and files, dnl i.e. that doesn't contain a CVS directory. dnl dnl Usage: ACE_CHECK_FOR_CVS_DIR -AC_DEFUN(ACE_CHECK_FOR_CVS_DIR, +AC_DEFUN([ACE_CHECK_FOR_CVS_DIR], [ if test -d CVS; then AC_MSG_ERROR( @@ -64,9 +64,9 @@ dnl configuration is being performed in the top-level directory. The dnl idea is to prevent files generated during configuration and build dnl from overwriting the stock files of the same name. dnl Usage: ACE_CHECK_TOP_SRCDIR -AC_DEFUN(ACE_CHECK_TOP_SRCDIR, +AC_DEFUN([ACE_CHECK_TOP_SRCDIR], [ - if test $srcdir = "." && test $USE_MAINTAINER_MODE != yes; then + if test "$srcdir" = "." && test "$USE_MAINTAINER_MODE" != "yes"; then AC_MSG_ERROR( [ Please configure and build in a directory other than the @@ -91,28 +91,23 @@ AC_DEFUN(ACE_CHECK_TOP_SRCDIR, ]) dnl Add compiler flags to the CXXFLAGS and CFLAGS variables when doing an -dnl AC_TRY_COMPILE (not ACE_TRY_COMPILE). +dnl AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) (not ACE_TRY_COMPILE). dnl Use this macro when adding include directories to the compiler flags, dnl for example. dnl Usage: ACE_TRY_COMPILE(COMPILER-FLAGS, INCLUDES, FUNCTION-BODY, dnl [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) -AC_DEFUN(ACE_TRY_COMPILE, dnl +AC_DEFUN([ACE_TRY_COMPILE], [ - ifelse(AC_LANG, [CPLUSPLUS], - [ - ace_pre_try_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $1" - ], - [ - ace_pre_try_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" - ]) + AC_LANG([C++]) + AC_REQUIRE([AC_LANG]) - AC_TRY_COMPILE([$2],[$3],[$4],[$5]) + ace_pre_try_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $1" - dnl Restore the C++ and C flags - ifelse(AC_LANG, [CPLUSPLUS], - [CXXFLAGS="$ace_pre_try_CXXFLAGS"],[CFLAGS="$ace_pre_try_CFLAGS"]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])],[$4],[$5]) + + dnl Restore the C++ flags + CXXFLAGS="$ace_pre_try_CXXFLAGS" ]) @@ -122,9 +117,9 @@ dnl exist. Files will be created under the source directory, not the build dnl directory. dnl Use this macro when you need a particular file available but want it to be dnl empty. This is useful to prevent conflicts with autoconf's confdefs.h -dnl header when doing an AC_TRY_COMPILE. +dnl header when doing an AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]). dnl Usage: ACE_USE_TEMP_FILE(TEMP-FILE-TO-CREATE, COMMANDS-THAT-WILL-USE-IT) -AC_DEFUN(ACE_USE_TEMP_FILE, dnl +AC_DEFUN([ACE_USE_TEMP_FILE], [ test -d ./$1 && AC_MSG_ERROR([cannot create file: $acetmp is a directory]) @@ -167,10 +162,10 @@ changequote([, ])dnl dnl Run given test(s) with warnings converted to errors dnl Usage: ACE_CONVERT_WARNINGS_TO_ERRORS(TEST-BLOCK) -AC_DEFUN(ACE_CONVERT_WARNINGS_TO_ERRORS, dnl +AC_DEFUN([ACE_CONVERT_WARNINGS_TO_ERRORS], [ dnl $WERROR is set in the ACE_SET_COMPILER_FLAGS macro. - AC_REQUIRE([ACE_SET_COMPILER_FLAGS])dnl + AC_REQUIRE([ACE_SET_COMPILER_FLAGS]) dnl Some tests may pass because the compiler issues warnings dnl instead of errors when errors should occur. This macro converts @@ -195,11 +190,11 @@ dnl The COMMANDS-TO-SET-CACHE-VAL should set the CACHE-ID to yes or "no," dnl otherwise the "ACTION-IF*" commands may not run. The dnl COMMANDS-TO-SET-CACHE-VAL should only set the CACHE value. For example, dnl no AC_DEFINES should be placed in the COMMANDS-TO-SET-CACHE-VAL. -AC_DEFUN(ACE_CACHE_CHECK, +AC_DEFUN([ACE_CACHE_CHECK], [ AC_MSG_CHECKING([$1]) AC_CACHE_VAL([$2], [$3]) - AC_MSG_RESULT([$]$2) + AC_MSG_RESULT([[$]$2]) if test "[$]$2" != no; then ace_just_a_place_holder=fixme ifelse([$4], , :, [$4]) @@ -222,25 +217,22 @@ dnl Check for specific typedef in given header file dnl Usage: ACE_CHECK_TYPE(TYPEDEF, INCLUDE, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl This macro can only check for one typedef in one header file at a time!! -AC_DEFUN(ACE_CHECK_TYPE, dnl +AC_DEFUN([ACE_CHECK_TYPE], [ dnl AC_REQUIRE([AC_PROG_CXX]) dnl AC_REQUIRE([AC_PROG_CXXCPP]) -dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) +dnl AC_LANG([C++]) +dnl AC_REQUIRE([AC_LANG]) ACE_CACHE_CHECK([for $1 in $2], [ace_cv_type_$1], [ - AC_TRY_COMPILE( - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <$2> - ], - [ + ]], [[ $1 ace_$1; - ], - [ + ]])],[ ace_cv_type_$1=yes - ], - [ + ],[ ace_cv_type_$1=no ]) ],[$3],[$4]) @@ -253,11 +245,12 @@ dnl Check for specific struct in given header file dnl Usage: ACE_CHECK_STRUCT(STRUCTURE, INCLUDE, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl This macro can only check for one struct in one header file at a time!! -AC_DEFUN(ACE_CHECK_STRUCT, dnl +AC_DEFUN([ACE_CHECK_STRUCT], [ dnl AC_REQUIRE([AC_PROG_CXX]) dnl AC_REQUIRE([AC_PROG_CXXCPP]) -dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) +dnl AC_LANG([C++]) +dnl AC_REQUIRE([AC_LANG]) dnl Do the transliteration at runtime so arg 1 can be a shell variable. dnl ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` @@ -279,36 +272,33 @@ dnl program. This macro is used by ACE_CHECK_STRUCT. dnl Usage: ACE_TRY_COMPILE_STRUCT(STRUCTURE, INCLUDE, dnl [ACTION-IF-SUCCESSFUL[, ACTION-IF-NOT-SUCCESSFUL]]) dnl This macro can only check for one struct in one header file at a time!! -AC_DEFUN(ACE_TRY_COMPILE_STRUCT, dnl +AC_DEFUN([ACE_TRY_COMPILE_STRUCT], [ dnl AC_REQUIRE([AC_PROG_CXX]) dnl AC_REQUIRE([AC_PROG_CXXCPP]) -dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) +dnl AC_LANG([C++]) +dnl AC_REQUIRE([AC_LANG]) - AC_TRY_COMPILE( - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <$2> - ], - [ + ]], [[ struct $1 ace_$1; - ], - [ + ]])],[ $3 - ], - [ + ],[ dnl Some compilers don't like the "struct" but we need the struct for dnl some platforms to resolve ambiguities between functions and dnl structures with with the same name. So, we try the same test but dnl without "struct" if the above test with "struct" fails. If both dnl tests fail, then we can be reasonably sure that we don't have the dnl structure we are testing for. - AC_TRY_COMPILE( - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ #include <$2> - ], - [ + ]], + [[ $1 ace_$1; - ], + ]])], [ $3 ], @@ -332,19 +322,17 @@ dnl things "transparent." If the given header does not exist then this dnl macro acts just like the standard AC_CHECK_FUNC macro. dnl Usage: ACE_CHECK_FUNC(FUNCTION, HEADER, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(ACE_CHECK_FUNC, dnl +AC_DEFUN([ACE_CHECK_FUNC], [ dnl AC_REQUIRE([AC_PROG_CXX]) dnl AC_REQUIRE([AC_PROG_CXXCPP]) -dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) +dnl AC_LANG([C++]) +dnl AC_REQUIRE([AC_LANG]) AC_REQUIRE([AC_PROG_AWK]) - AC_TRY_CPP( - [ + AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include <$2> - ], - [ace_header_exists=yes], - [ace_header_exists=no]) + ]])],[ace_header_exists=yes],[ace_header_exists=no]) cat > conftest.$ac_ext <<EOF @@ -359,7 +347,7 @@ EOF fi if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "ACE_REAL_FUNCTION" | + $EGREP "ACE_REAL_FUNCTION" | (eval "$AWK '{print \[$]2}' > conftest.awk 2>&1"); then rm -f conftest.$ac_ext ace_real_function=`cat conftest.awk` @@ -385,17 +373,17 @@ dnl things "transparent." If the given header does not exist then this dnl macro acts just like the standard AC_CHECK_LIB macro. dnl Usage: ACE_CHECK_LIB(LIBRARY, FUNCTION, HEADER, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(ACE_CHECK_LIB, dnl +AC_DEFUN([ACE_CHECK_LIB], [ dnl AC_REQUIRE([AC_PROG_CXX]) dnl AC_REQUIRE([AC_PROG_CXXCPP]) -dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) +dnl AC_LANG([C++]) +dnl AC_REQUIRE([AC_LANG]) AC_REQUIRE([AC_PROG_AWK]) - AC_TRY_CPP( - [ + AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include <$3> - ], ace_header_exists=yes, ace_header_exists=no) + ]])],[ace_header_exists=yes],[ace_header_exists=no]) cat > conftest.$ac_ext <<EOF @@ -406,11 +394,11 @@ EOF if test "$ace_header_exists" = yes; then if test -z "$AWK"; then - AC_MSG_WARN(No awk program found. "Real" function in library may not be found.) + AC_MSG_WARN([No awk program found. "Real" function in library may not be found.]) fi if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "ACE_REAL_FUNCTION" | + $EGREP "ACE_REAL_FUNCTION" | eval "$AWK '{print \[$]2}'" > conftest.awk 2>&1; then rm -f conftest.$ac_ext ace_real_function=`cat conftest.awk` @@ -418,20 +406,20 @@ EOF fi if test $2 != "$ace_real_function"; then - AC_MSG_CHECKING(for real $2 from $3) - AC_MSG_RESULT($ace_real_function) + AC_MSG_CHECKING([for real $2 from $3]) + AC_MSG_RESULT([$ace_real_function]) fi else ace_real_function=$2 fi dnl test "$ace_header_not_exist" != yes - AC_CHECK_LIB($1, $ace_real_function, $4, $5) + AC_CHECK_LIB([$1], [$ace_real_function], [$4], [$5]) ]) dnl Check if getrlimit() takes an enum as 1st argument dnl Usage: ACE_CHECK_SETRLIMIT_ENUM -AC_DEFUN(ACE_CHECK_SETRLIMIT_ENUM, dnl +AC_DEFUN([ACE_CHECK_SETRLIMIT_ENUM], [ if test "$ac_cv_func_setrlimit" = yes; then AC_MSG_CHECKING([if setrlimit() takes an enum as 1st argument]) @@ -447,7 +435,7 @@ dnl Here we attempt to determine the type of the first argument of dnl getrusage from its prototype. It should either be an int or an dnl enum. If it is an enum, determine the enum type. ace_setrlimit_enum=`eval "$ac_cpp conftest.$ac_ext" | \ - egrep '[ ]+setrlimit.*\(.*[^,]*enum' | \ + $EGREP '[ ]+setrlimit.*\(.*[^,]*enum' | \ sed -e 's/^.*setrlimit.*(.*enum//' -e 's/[^ ]*,.*$//'` changequote([, ])dnl @@ -474,11 +462,11 @@ fi dnl test "$ac_cv_func_setrlimit" = yes dnl Check if getrusage() takes an enum as 1st argument dnl Usage: ACE_CHECK_GETRUSAGE_ENUM -AC_DEFUN(ACE_CHECK_GETRUSAGE_ENUM, dnl +AC_DEFUN([ACE_CHECK_GETRUSAGE_ENUM], [ if test "$ac_cv_func_getrusage" = yes; then AC_MSG_CHECKING([if getrusage() takes an enum as 1st argument]) - AC_EGREP_HEADER([getrusage.*\(.*[^,]*enum], sys/resource.h, + AC_EGREP_HEADER([getrusage.*\(.*[^,]*enum], [sys/resource.h], [ cat > conftest.$ac_ext <<EOF #include "confdefs.h" @@ -490,7 +478,7 @@ dnl Here we attempt to determine the type of the first argument of dnl getrusage from its prototype. It should either be an int or an dnl enum. If it is an enum, determine the enum type. ace_rusage_who=`eval "$ac_cpp conftest.$ac_ext" | \ - egrep '[ ]+getrusage.*\(.*[^,]*enum' | \ + $EGREP '[ ]+getrusage.*\(.*[^,]*enum' | \ sed -e 's/^.*getrusage.*(.*enum//' -e 's/[^ ]*,.*$//'` changequote([, ])dnl @@ -536,7 +524,7 @@ AC_DEFUN([ACE_CHECK_LSEEK64], ace_save_CPPFLAGS="$CPPFLAGS" ace_no_largefile64="-U_LARGEFILE64_SOURCE" CPPFLAGS="$CPPFLAGS $ace_no_largefile64" - AC_EGREP_HEADER([[^_]+lseek64], unistd.h, + AC_EGREP_HEADER([[^_]+lseek64], [unistd.h], [ ace_cv_lib_has_lseek64_prototype=yes ], @@ -545,7 +533,7 @@ AC_DEFUN([ACE_CHECK_LSEEK64], ]) dnl Reset the compiler flags CPPFLAGS="$ace_save_CPPFLAGS" - ],, AC_DEFINE(ACE_LACKS_LSEEK64_PROTOTYPE)) + ],[],[AC_DEFINE([ACE_LACKS_LSEEK64_PROTOTYPE])]) ], [ AC_CHECK_FUNC([llseek], @@ -565,7 +553,7 @@ AC_DEFUN([ACE_CHECK_LSEEK64], ace_save_CPPFLAGS="$CPPFLAGS" ace_no_largefile64="-U_LARGEFILE64_SOURCE" CPPFLAGS="$CPPFLAGS $ace_no_largefile64" - AC_EGREP_HEADER([[^_]+llseek], unistd.h, + AC_EGREP_HEADER([[^_]+llseek],[unistd.h], [ ace_cv_lib_has_llseek_prototype=no ], @@ -574,7 +562,7 @@ AC_DEFUN([ACE_CHECK_LSEEK64], ],) dnl Reset the compiler flags CPPFLAGS="$ace_save_CPPFLAGS" - ],, AC_DEFINE(ACE_LACKS_LLSEEK_PROTOTYPE)) + ],[],[AC_DEFINE([ACE_LACKS_LLSEEK_PROTOTYPE])]) ],) @@ -587,7 +575,7 @@ dnl Usage: ACE_CHECK_LOFF_64(LSEEK64-FUNC) AC_DEFUN([ACE_CHECK_OFF64_T], [ AC_MSG_CHECKING([for 64 bit offset type]) - AC_EGREP_HEADER([[ ]+$1.*\(.*], unistd.h, + AC_EGREP_HEADER([[ ]+$1.*\(.*],[unistd.h], [ cat > conftest.$ac_ext <<EOF #include "confdefs.h" @@ -606,7 +594,7 @@ changequote(, )dnl dnl Here we attempt to determine the type of the second argument of dnl lseek64()/llseek() from its prototype. ace_off64_t=`eval "$ac_cpp conftest.$ac_ext" | \ - egrep '[ ]+lseek64.*\(.*' | \ + $EGREP '[ ]+lseek64.*\(.*' | \ sed -e 's/^.*(.*,[ ]*\(.*\) .*,.*$/\1/'` changequote([, ])dnl @@ -638,166 +626,164 @@ dnl This section contains my own *re*implementation of the functionality dnl provided by some tests/macros found in GNU Autoconf since the ones found dnl in Autoconf don't appear to work as expected. dnl -dnl -Ossama Othman <ossama@debian.org> -dnl -dnl The copyright for the following macros is listed below. -dnl Note that all macros listed prior to this section are copyrighted -dnl by Ossama Othman, not the Free Software Foundation. Nevertheless, -dnl all software found in this file is free software. Please read the -dnl distribution terms found at the top of this file and the ones below. - -dnl Parameterized macros. -dnl Requires GNU m4. -dnl This file is part of Autoconf. -dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception, the Free Software Foundation gives unlimited -dnl permission to copy, distribute and modify the configure scripts that -dnl are the output of Autoconf. You need not follow the terms of the GNU -dnl General Public License when using or distributing such scripts, even -dnl though portions of the text of Autoconf appear in them. The GNU -dnl General Public License (GPL) does govern all other use of the material -dnl that constitutes the Autoconf program. -dnl -dnl Certain portions of the Autoconf source text are designed to be copied -dnl (in certain cases, depending on the input) into the output of -dnl Autoconf. We call these the "data" portions. The rest of the Autoconf -dnl source text consists of comments plus executable code that decides which -dnl of the data portions to output in any given case. We call these -dnl comments and executable code the "non-data" portions. Autoconf never -dnl copies any of the non-data portions into its output. -dnl -dnl This special exception to the GPL applies to versions of Autoconf -dnl released by the Free Software Foundation. When you make and -dnl distribute a modified version of Autoconf, you may extend this special -dnl exception to the GPL to apply to your modified version as well, *unless* -dnl your modified version has the potential to copy into its output some -dnl of the text that was the non-data portion of the version that you started -dnl with. (In other words, unless your change moves or copies text from -dnl the non-data portions to the data portions.) If your modification has -dnl such potential, you must delete any notice of this special exception -dnl to the GPL from your modified version. -dnl -dnl Written by David MacKenzie, with help from -dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -dnl Roland McGrath, Noah Friedman, david d zuhn, and many others. - - -dnl Usage: ACE_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) -dnl Search for a library defining FUNCTION, if it's not already available. -AC_DEFUN(ACE_SEARCH_LIBS, dnl -[ - AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], - [ - ac_func_search_save_LIBS="$LIBS" - - ac_cv_search_$1="no" - - ACE_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"]) - - test "$ac_cv_search_$1" = "no" && for i in $2; do - LIBS="-l$i $5 $ac_func_search_save_LIBS" - ACE_TRY_LINK_FUNC([$1], - [ - ac_cv_search_$1="-l$i" - break - ]) - done - - LIBS="$ac_func_search_save_LIBS" - ]) - - if test "$ac_cv_search_$1" != "no"; then - test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS" - $3 - else : - $4 - fi -]) - -dnl Usage: ACE_TRY_LINK_FUNC(FUNCTION,[, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND]) -dnl Search for a library defining FUNCTION, if it's not already available. -AC_DEFUN(ACE_TRY_LINK_FUNC, dnl -[ -AC_TRY_LINK( -dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h> -dnl which includes <sys/select.h> which contains a prototype for -dnl select. Similarly for bzero. -[/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $1(); below. */ -#include <assert.h> -/* Override any gcc2 internal prototype to avoid an error. */ -]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -])dnl -[/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $1(); -], [ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$1) || defined (__stub___$1) -choke me -#else -$1(); -#endif -],[$2],[$3]) -]) - -AC_DEFUN(ACE_SYS_RESTARTABLE_SYSCALLS, -[AC_REQUIRE([AC_HEADER_SYS_WAIT]) -AC_CHECK_HEADERS(unistd.h) -AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls, -[AC_TRY_RUN( -[/* Exit 0 (true) if wait returns something other than -1, - i.e. the pid of the child, which means that wait was restarted - after getting the signal. */ -#include <sys/types.h> -#include <signal.h> -#if HAVE_UNISTD_H -# include <unistd.h> -#endif -#if HAVE_SYS_WAIT_H -# include <sys/wait.h> -#endif - -/* Some platforms explicitly require an extern "C" signal handler - when using C++. */ -#ifdef __cplusplus -extern "C" -#endif -void ucatch (int) { } - -main () { - int i = fork (), status; - if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } - signal (SIGINT, ucatch); - status = wait(&i); - if (status == -1) wait(&i); - exit (status == -1); -} -], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)]) -if test $ac_cv_sys_restartable_syscalls = yes; then - AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS) -fi -]) +dnl dnl -Ossama Othman <ossama@debian.org> +dnl dnl +dnl dnl The copyright for the following macros is listed below. +dnl dnl Note that all macros listed prior to this section are copyrighted +dnl dnl by Ossama Othman, not the Free Software Foundation. Nevertheless, +dnl dnl all software found in this file is free software. Please read the +dnl dnl distribution terms found at the top of this file and the ones below. + +dnl dnl Parameterized macros. +dnl dnl Requires GNU m4. +dnl dnl This file is part of Autoconf. +dnl dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. +dnl dnl +dnl dnl This program is free software; you can redistribute it and/or modify +dnl dnl it under the terms of the GNU General Public License as published by +dnl dnl the Free Software Foundation; either version 2, or (at your option) +dnl dnl any later version. +dnl dnl +dnl dnl This program is distributed in the hope that it will be useful, +dnl dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl dnl GNU General Public License for more details. +dnl dnl +dnl dnl You should have received a copy of the GNU General Public License +dnl dnl along with this program; if not, write to the Free Software +dnl dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl dnl 02111-1307, USA. +dnl dnl +dnl dnl As a special exception, the Free Software Foundation gives unlimited +dnl dnl permission to copy, distribute and modify the configure scripts that +dnl dnl are the output of Autoconf. You need not follow the terms of the GNU +dnl dnl General Public License when using or distributing such scripts, even +dnl dnl though portions of the text of Autoconf appear in them. The GNU +dnl dnl General Public License (GPL) does govern all other use of the material +dnl dnl that constitutes the Autoconf program. +dnl dnl +dnl dnl Certain portions of the Autoconf source text are designed to be copied +dnl dnl (in certain cases, depending on the input) into the output of +dnl dnl Autoconf. We call these the "data" portions. The rest of the Autoconf +dnl dnl source text consists of comments plus executable code that decides which +dnl dnl of the data portions to output in any given case. We call these +dnl dnl comments and executable code the "non-data" portions. Autoconf never +dnl dnl copies any of the non-data portions into its output. +dnl dnl +dnl dnl This special exception to the GPL applies to versions of Autoconf +dnl dnl released by the Free Software Foundation. When you make and +dnl dnl distribute a modified version of Autoconf, you may extend this special +dnl dnl exception to the GPL to apply to your modified version as well, *unless* +dnl dnl your modified version has the potential to copy into its output some +dnl dnl of the text that was the non-data portion of the version that you started +dnl dnl with. (In other words, unless your change moves or copies text from +dnl dnl the non-data portions to the data portions.) If your modification has +dnl dnl such potential, you must delete any notice of this special exception +dnl dnl to the GPL from your modified version. +dnl dnl +dnl dnl Written by David MacKenzie, with help from +dnl dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, +dnl dnl Roland McGrath, Noah Friedman, david d zuhn, and many others. + + +dnl dnl Usage: ACE_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND +dnl dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) +dnl dnl Search for a library defining FUNCTION, if it's not already available. +dnl AC_DEFUN([ACE_SEARCH_LIBS], +dnl [ +dnl AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], +dnl [ +dnl ac_func_search_save_LIBS="$LIBS" + +dnl ac_cv_search_$1="no" + +dnl ACE_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"]) + +dnl test "$ac_cv_search_$1" = "no" && for i in $2; do +dnl LIBS="-l$i $5 $ac_func_search_save_LIBS" +dnl ACE_TRY_LINK_FUNC([$1], +dnl [ +dnl ac_cv_search_$1="-l$i" +dnl break +dnl ]) +dnl done + +dnl LIBS="$ac_func_search_save_LIBS" +dnl ]) + +dnl if test "$ac_cv_search_$1" != "no"; then +dnl test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS" +dnl $3 +dnl else : +dnl $4 +dnl fi +dnl ]) + +dnl dnl Usage: ACE_TRY_LINK_FUNC(FUNCTION,[, ACTION-IF-FOUND +dnl dnl [, ACTION-IF-NOT-FOUND]) +dnl dnl Search for a library defining FUNCTION, if it's not already available. +dnl AC_DEFUN([ACE_TRY_LINK_FUNC], +dnl [ +dnl AC_LINK_IFELSE([AC_LANG_PROGRAM([[dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h> +dnl dnl which includes <sys/select.h> which contains a prototype for +dnl dnl select. Similarly for bzero. +dnl /* System header to define __stub macros and hopefully few prototypes, +dnl which can conflict with char $1(); below. */ +dnl #include <assert.h> +dnl /* Override any gcc2 internal prototype to avoid an error. */ +dnl ifelse(AC_LANG, C++, #ifdef __cplusplus +dnl extern "C" +dnl #endif +dnl )dnl +dnl /* We use char because int might match the return type of a gcc2 +dnl builtin and then its argument prototype would still apply. */ +dnl char $1(); +dnl ]], [[ +dnl /* The GNU C library defines this for functions which it implements +dnl to always fail with ENOSYS. Some functions are actually named +dnl something starting with __ and the normal name is an alias. */ +dnl #if defined (__stub_$1) || defined (__stub___$1) +dnl choke me +dnl #else +dnl $1(); +dnl #endif +dnl ]])],[$2],[$3]) +dnl ]) + +dnl AC_DEFUN([ACE_SYS_RESTARTABLE_SYSCALLS], +dnl [AC_REQUIRE([AC_HEADER_SYS_WAIT]) +dnl AC_CHECK_HEADERS([unistd.h]) +dnl AC_CACHE_CHECK([for restartable system calls, ac_cv_sys_restartable_syscalls], +dnl [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Exit 0 (true) if wait returns something other than -1, +dnl i.e. the pid of the child, which means that wait was restarted +dnl after getting the signal. */ +dnl #include <sys/types.h> +dnl #include <signal.h> +dnl #if HAVE_UNISTD_H +dnl # include <unistd.h> +dnl #endif +dnl #if HAVE_SYS_WAIT_H +dnl # include <sys/wait.h> +dnl #endif + +dnl /* Some platforms explicitly require an extern "C" signal handler +dnl when using C++. */ +dnl #ifdef __cplusplus +dnl extern "C" +dnl #endif +dnl void ucatch (int) { } + +dnl main () { +dnl int i = fork (), status; +dnl if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } +dnl signal (SIGINT, ucatch); +dnl status = wait(&i); +dnl if (status == -1) wait(&i); +dnl exit (status == -1); +dnl } +dnl ]])],[ac_cv_sys_restartable_syscalls=yes],[ac_cv_sys_restartable_syscalls=no],[])]) +dnl if test $ac_cv_sys_restartable_syscalls = yes; then +dnl AC_DEFINE([HAVE_RESTARTABLE_SYSCALLS]) +dnl fi +dnl ]) diff --git a/m4/compiler.m4 b/m4/compiler.m4 index 328a3b81222..e72d81e92ff 100644 --- a/m4/compiler.m4 +++ b/m4/compiler.m4 @@ -25,26 +25,27 @@ dnl The flags set here are generally only useful for _KNOWN_ compilers. dnl ACE_SET_COMPILER_FLAGS dnl Usage: ACE_SET_COMPILER_FLAGS -AC_DEFUN(ACE_SET_COMPILER_FLAGS, dnl +AC_DEFUN([ACE_SET_COMPILER_FLAGS], [ - AC_BEFORE([$0], [AM_PROG_LIBTOOL]) dnl +dnl AC_BEFORE([$0], [AM_PROG_LIBTOOL]) dnl Make sure we know what C++ compiler and preprocessor we have! AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) - AC_REQUIRE([AC_LANG_CPLUSPLUS]) + AC_LANG([C++]) + AC_REQUIRE([AC_LANG]) AC_REQUIRE([ACE_COMPILATION_OPTIONS]) - if test -n "$GXX"; then + if test "$GXX" = yes; then dnl Temporarily change M4 quotes to prevent "regex []" from being eaten changequote(, )dnl - if $CXX --version | egrep -v '^2\.[0-7]' > /dev/null; then + if $CXX --version | $EGREP -v '^2\.[0-7]' > /dev/null; then changequote([, ])dnl : # Do nothing else - AC_DEFINE(ACE_HAS_GNUG_PRE_2_8)dnl - AC_DEFINE(ACE_HAS_GNUC_BROKEN_TEMPLATE_INLINE_FUNCTIONS)dnl + AC_DEFINE([ACE_HAS_GNUG_PRE_2_8]) + AC_DEFINE([ACE_HAS_GNUC_BROKEN_TEMPLATE_INLINE_FUNCTIONS]) fi case `$CXX --version` in @@ -74,7 +75,7 @@ changequote([, ])dnl dnl user override them. dnl WERROR - Compiler flag that converts warnings to errors - if test -n "$GXX"; then + if test "$GXX" = yes; then WERROR="-Werror" fi @@ -101,7 +102,7 @@ changequote([, ])dnl dnl preprocessor defining __xlC__ to the proper version dnl number of the compiler. - AC_EGREP_CPP(0x0306, + AC_EGREP_CPP([0x0306], [ __xlC__ ], @@ -127,7 +128,7 @@ changequote([, ])dnl CPPFLAGS="$CPPFLAGS -qlanglvl=ansi" ;; *) - if test -n "$GXX"; then + if test "$GXX" = yes; then ACE_CXXFLAGS="-mcpu=common" fi ;; @@ -142,7 +143,7 @@ changequote([, ])dnl OCXXFLAGS="-qarch=ppc -qtune=604" ;; *) - if test -n "$GXX"; then + if test "$GXX" = yes; then ACE_CXXFLAGS="-mcpu=common" fi ;; @@ -161,7 +162,7 @@ changequote([, ])dnl OCXXFLAGS="" ;; *) - if test -n "$GXX"; then + if test "$GXX" = yes; then ACE_CXXFLAGS="$ACE_CXXFLAGS" fi ;; @@ -170,7 +171,7 @@ changequote([, ])dnl *freebsd*) case "$CXX" in *) - if test -n "$GXX"; then + if test "$GXX" = yes; then CXXFLAGS="$CXXFLAGS" ACE_CXXFLAGS="$ACE_CXXFLAGS -w -fno-strict-prototypes" DCXXFLAGS="" @@ -180,6 +181,19 @@ changequote([, ])dnl esac ;; *hpux*) + # HP-UX OS version specific settings. + case "$host" in + *hpux11*) +# aCC's "-mt" flag detected by the configure script should already set +# the appropriate preprocessor, compiler and linker flags. +# if test "$ace_user_enable_threads" = yes; then +# # Prefer kernel threads over CMA (user) threads. +# ACE_CPPFLAGS="$ACE_CPPFLAGS -D_POSIX_C_SOURCE=199506L" +# fi + ;; + esac + + # HP-UX compiler specific settings. case "$CXX" in CC) CXXFLAGS="$CXXFLAGS -pta -ti,/bin/true -tr,/bin/true" @@ -189,14 +203,36 @@ changequote([, ])dnl ;; aCC) CXXFLAGS="$CXXFLAGS" - ACE_CXXFLAGS="$ACE_CXXFLAGS +W302,495,667,829" + # Warning 930 is spurious when new(std::nothrow) is + # used. Reported to HP as support call 3201224717. (Steve + # Huston, 23-Nov-2002) + # + # Suppress warning 302 ((...) parameter list is a + # non-portable feature) + # + # Additionally, on HP-UX 10.20, suppress 495 to shut up the + # warnings from the system header files. 667 is also + # suppressed, but the compiler still tells you there was a + # future error, but at least you can pick out any real errors + # by quickly scanning the output. 829 is suppressed because + # the system headers have offending string literals assigned + # to char *. + ACE_CXXFLAGS="$ACE_CXXFLAGS +W302,495,667,829,908,930" DCXXFLAGS="-g" - OCXXFLAGS="" + OCXXFLAGS="-O" + # Warning 67: Invalid pragma name -- needed for + # ACE_LACKS_PRAGMA_ONCE WERROR="+We67" - # Warning 67: Invalid pragma name -- needed for ACE_LACKS_PRAGMA_ONCE + + # If exception support is explicitly disabled, tell the + # compiler. This is not recommended since the run-time + # library can throw exceptions. + if test "$ace_user_enable_exceptions" != yes; then + ACE_CXXFLAGS="$ACE_CXXFLAGS +noeh" + fi ;; *) - if test -n "$GXX"; then + if test "$GXX" = yes; then ACE_CXXFLAGS="$ACE_CXXFLAGS -w" fi ;; @@ -228,7 +264,7 @@ changequote([, ])dnl *linux*) case "$CXX" in *) - if test -n "$GXX"; then + if test "$GXX" = yes; then CXXFLAGS="$CXXFLAGS" ACE_CXXFLAGS="$ACE_CXXFLAGS" DCXXFLAGS="$DCXXFLAGS" @@ -263,7 +299,7 @@ changequote([, ])dnl fi dnl Some flags only work with Sun C++ 4.2 - if (CC -V 2>&1 | egrep 'Compilers 4\.2' > /dev/null); then + if (CC -V 2>&1 | $EGREP 'Compilers 4\.2' > /dev/null); then CXXFLAGS="$CXXFLAGS -features=castop" if test "$ace_user_enable_rtti" = yes; then CXXFLAGS="$CXXFLAGS -features=rtti" @@ -271,16 +307,16 @@ changequote([, ])dnl fi dnl Sun C++ 5.0 weirdness - if (CC -V 2>&1 | egrep 'Compilers 5\.0' > /dev/null); then + if (CC -V 2>&1 | $EGREP 'Compilers 5\.0' > /dev/null); then CXXFLAGS="$CXXFLAGS -library=iostream,no%Cstd -instances=explicit" dnl Inlining appears to cause link problems with early dnl releases of CC 5.0. - AC_DEFINE(ACE_LACKS_INLINE_FUNCTIONS) + AC_DEFINE([ACE_LACKS_INLINE_FUNCTIONS]) if test "$ace_user_enable_exceptions" != yes; then dnl See /opt/SUNWspro_5.0/SC5.0/include/CC/stdcomp.h. - AC_DEFINE(_RWSTD_NO_EXCEPTIONS) + AC_DEFINE([_RWSTD_NO_EXCEPTIONS]) fi fi @@ -306,14 +342,14 @@ changequote([, ])dnl esac dnl Additional flags - if test -n "$GXX"; then + if test "$GXX" = yes; then ACE_CXXFLAGS="$ACE_CXXFLAGS -W -Wall -Wpointer-arith" - if test "$ace_user_enable_repo" = no; then - ACE_CXXFLAGS="$ACE_CXXFLAGS -fno-implicit-templates" - fi +dnl if test "$ace_user_enable_repo" = no; then +dnl ACE_CXXFLAGS="$ACE_CXXFLAGS -fno-implicit-templates" +dnl fi fi - if test -n "$GCC"; then + if test "$GCC" = yes; then ACE_CFLAGS="$ACE_CFLAGS -W -Wall -Wpointer-arith" fi ]) diff --git a/m4/config_h.m4 b/m4/config_h.m4 new file mode 100644 index 00000000000..2227fc994fa --- /dev/null +++ b/m4/config_h.m4 @@ -0,0 +1,1424 @@ +dnl ------------------------------------------------------------------------- +dnl $Id$ +dnl +dnl config_h.m4 +dnl +dnl ACE M4 include file which contains preprocessor constants +dnl and other items to be place in the generated ace/config.h +dnl header. +dnl +dnl ------------------------------------------------------------------------- + +dnl Copyright (C) 2002, 2003 Ossama Othman +dnl +dnl All Rights Reserved +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the current ACE distribution terms. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +dnl Prepare the ace/config.h.in template. +dnl +dnl Usage: ACE_PREP_CONFIG_HEADER +AC_DEFUN([ACE_PREP_CONFIG_HEADER], +[ +dnl Text to be placed at the top of the `ace/config.h' header. +AH_TOP([ +// -*- C++ -*- + +#ifndef ACE_CONFIG_H +#define ACE_CONFIG_H + +// ACE configuration header file + + +]) + +dnl Text to be placed at the bottom of the `ace/config.h' header. +AH_BOTTOM([ + + +#endif /* ACE_CONFIG_H */ +]) + + +AH_VERBATIM([_POSIX_PTHREAD_SEMANTICS], +[/* Some platforms need _POSIX_PTHREAD_SEMANTICS to make some functions work */ +#undef _POSIX_PTHREAD_SEMANTICS +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +]) + +dnl ACE currently doesn't use these; however the configure script does +AH_TEMPLATE([ACE_LACKS_SYSTIMES_H],[The `sys/times.h' header is unavailable]) +AH_TEMPLATE([ACE_LACKS_UNBUFFERED_STREAMBUF],[]) +AH_TEMPLATE([ACE_HAS_STDCPP_STL_INCLUDES],[]) + +AH_TEMPLATE([ACE_HAS_LIBC_H],[]) +AH_TEMPLATE([ACE_HAS_OSFCN_H],[]) +AH_TEMPLATE([ACE_HAS_NEW_NO_H],[Platform provides new style C++ <new> header]) +AH_TEMPLATE([ACE_HAS_NEW_H],[Platform provides C++ <new.h> header]) +AH_TEMPLATE([ACE_HAS_STDEXCEPT_NO_H],[Platform provides C++ <stdexcept> header]) +AH_TEMPLATE([ACE_HAS_EXCEPTION_H],[Platform provides C++ <exception.h> header]) + +AH_TEMPLATE([ACE_HAS_SYS_IOCTL_H],[Platform provides <sys/ioctl.h> header.]) + +dnl Deprecated! (or soon to be?) +AH_TEMPLATE([ACE_HAS_OSF1_GETTIMEOFDAY], +[timezone* 2nd parameter & no prototype]) +AH_TEMPLATE([ACE_HAS_LYNXOS_SIGNALS],[]) +AH_TEMPLATE([ACE_HAS_TANDEM_SIGNALS],[]) +AH_TEMPLATE([ACE_HAS_IRIX_53_SIGNALS],[]) + +AH_TEMPLATE([PTHREAD_STACK_MIN],[]) +AH_TEMPLATE([PTHREAD_STACK_MAX],[]) + +dnl ///////////////////// OSSAMA'S NEW STUFF ////////////////// */ +dnl THIS STUFF WILL REPLACE THE ABOVE OLDER STUFF AND/OR WILL BE MERGED INTO IT + + +dnl /* results from checks for programs */ +dnl /* results from checks for libraries */ +dnl /* results from checks for header files */ +dnl /* results from checks for typedefs */ +dnl /* results from checks for structures */ +dnl /* results from checks for variables */ +dnl /* results from checks for compiler characteristics */ +dnl /* results from checks for library functions */ +dnl /* results from checks for system services */ + +dnl AIX specific configuration parameters +AH_TEMPLATE([AIX],[Configure for use on AIX]) +AH_TEMPLATE([_BSD],[]) +AH_TEMPLATE([_BSD_INCLUDES],[]) + +dnl /* Cray specific configuration parameters */ +dnl /* +dnl * The following predefined macros are used within ACE ifdefs. +dnl * These are defined when using the Cray compilers. _CRAYMPP +dnl * is defined, for example, if you are running on a Cray T3E +dnl * massively parallel machine. Moreover, in the case of the T3E, +dnl * _CRAYT3E will be defined. This is used to determine the +dnl * ACE_SIZEOF defines for primitive types. +dnl * +dnl * _UNICOS is defined as either the major version of UNICOS being run, +dnl * e.g. 9 or 10 on the vector machines (e.g. C90, T90, J90, YMP, ...) +dnl * or the major+minor+level UNICOS/mk version, e.g. 2.0.3 => 203, +dnl * being run on an MPP machine. +dnl * +dnl * Summary: +dnl * +dnl * _CRAYMPP (defined only if running on MPP machine, e.g. T3E, UNICOS/mk) +dnl * _CRAYT3E (defined specifically if compiling on a Cray T3E) +dnl * _UNICOS (defined if running UNICOS or UNICOS/mk) +dnl * +dnl * Tested on UNICOS 10.0.0.2, UNICOS/mk 2.0.3.10 +dnl * +dnl * Contributed by Doug Anderson <doug "at" clark.net> +dnl */ +AH_TEMPLATE([_CRAYMPP], +[defined only if running on MPP machine, e.g. T3E, UNICOS/mk]) +AH_TEMPLATE([_CRAYT3E],[defined specifically if compiling on a Cray T3E]) +AH_TEMPLATE([_UNICOS],[defined if running UNICOS or UNICOS/mk]) + +dnl DG/UX specific configuration parameters +AH_TEMPLATE([ACE_DGUX],[]) +AH_TEMPLATE([_DGUX_SOURCE],[]) +AH_TEMPLATE([_POSIX4A_DRAFT10_SOURCE],[]) +AH_TEMPLATE([_POSIX4_DRAFT_SOURCE],[]) + +dnl FreeBSD specific configuration parameters +dnl Nothing yet + +dnl HP/UX specific configuration parameters +AH_TEMPLATE([HPUX],[Configure for use on HP-UX]) +AH_TEMPLATE([HPUX_10],[Configure for use on HP-UX 10]) +AH_TEMPLATE([HPUX_11],[Configure for use on HP-UX 11]) +AH_TEMPLATE([_HPUX_SOURCE],[Enable HP-UX specific features in platform headers]) +AH_TEMPLATE([ACE_HAS_BROKEN_HPUX_TEMPLATES], +[Earlier versions of HP/UX C++ are damned...]) + +dnl Irix specific configuration parameters +AH_TEMPLATE([IRIX5],[Configure for use on Irix 5]) +AH_TEMPLATE([IRIX6],[Configure for use on Irix 6]) +AH_TEMPLATE([_BSD_TYPES],[]) +AH_TEMPLATE([_SGI_MP_SOURCE],[]) +AH_TEMPLATE([_MODERN_C_],[Enable modern features in SGI C++ compiler]) +AH_TEMPLATE([ACE_HAS_IRIX62_THREADS], +[Platform supports the very odd IRIX 6.2 threads...]) + +dnl Linux specific configuration parameters +dnl Nothing yet */ + +dnl LynxOS specific configuration parameters +AH_TEMPLATE([__NO_INCLUDE_WARN__],[]) +AH_TEMPLATE([_POSIX_THREADS_CALLS],[]) + +dnl M88K specific configuration parameters +AH_TEMPLATE([m88k],[]) +AH_TEMPLATE([__m88k__],[]) + +dnl MVS specific configuration parameters +dnl Nothing yet + +dnl NetBSD specific configuration parameters +AH_TEMPLATE([ACE_NETBSD],[Configure for use on NetBSD]) + +dnl OSF/1 and Digital Unix specific configuration parameters +AH_TEMPLATE([DEC_CXX],[]) +AH_TEMPLATE([DIGITAL_UNIX],[Configure for use on Digital Unix]) + +dnl pSOS specific configuration parameters +AH_TEMPLATE([ACE_PSOS],[Configure for use on pSoS]) +AH_TEMPLATE([ACE_PSOSIM],[]) +AH_TEMPLATE([ACE_PSOSTBD],[]) + +dnl SCO specific configuration parameters +AH_TEMPLATE([SCO],[]) +AH_TEMPLATE([_SVID3],[]) + +dnl SunOS / Solaris specific configuration parameters +AH_TEMPLATE([_RWSTD_NO_EXCEPTIONS],[]) + +dnl Tandem specific configuration parameters +dnl Nothing yet + +dnl UnixWare specific configuration parameters +AH_TEMPLATE([UNIXWARE],[Configure for use on UnixWare]) +AH_TEMPLATE([UNIXWARE_2_0],[]) +AH_TEMPLATE([UNIXWARE_2_1],[]) + +dnl VXWorks specific configuration parameters +AH_TEMPLATE([VXWORKS],[Configure for use on VxWorks]) + +dnl Win32 specific configuration parameters +AH_TEMPLATE([ACE_WIN32],[Configure for use on Win32]) + +AH_TEMPLATE([ACE_DISABLE_DEBUG_DLL_CHECK], +[Define this if you don't want debug version ACE search for debug version +DLLs first before looking for the DLL names specified.]) + +AH_TEMPLATE([ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS], +[Platform/compiler supports Win32 structural exceptions.]) + +AH_TEMPLATE([ACE_WSOCK_VERSION], +[A parameter list indicating the version of WinSock (e.g., "1, 1" is +version 1.1).]) + +AH_TEMPLATE([ACE_HAS_MFC],[Platform supports Microsoft Foundation Classes]) + +AH_TEMPLATE([ACE_USES_STATIC_MFC], +[When linking MFC as a static library is desired]) + +AH_TEMPLATE([ACE_HAS_CANCEL_IO], +[Platform supports the Win32 CancelIO() function. (WinNT 4.0 and beyond)]) + +AH_TEMPLATE([ACE_HAS_WIN32_TRYLOCK], +[The Win32 platform support TryEnterCriticalSection(). (WinNT 4.0 and +beyond)]) + +AH_TEMPLATE([ACE_HAS_WINSOCK2],[The Win32 platform supports WinSock 2.0.]) + +AH_TEMPLATE([ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL], +[For Win32: Use Select_Reactor as default implementation of Reactor + instead of WFMO_Reactor.]) + +AH_TEMPLATE([ACE_HAS_DLL],[Build ACE using the frigging PC DLL nonsense...]) + +AH_TEMPLATE([ACE_HAS_STRICT],[Use the STRICT compilation mode on Win32.]) + +AH_TEMPLATE([CYGWIN32], [GNU Win32 environement]) +AH_TEMPLATE([ACE_HAS_CYGWIN32_SOCKET_H],[Platform has cygwin32 socket.h.]) + + +dnl ACE internals +AH_TEMPLATE([ACE_DEFAULT_BASE_ADDR],[]) +AH_TEMPLATE([ACE_DEFAULT_BASE_ADDRL],[]) +AH_TEMPLATE([ACE_DEFAULT_CLOSE_ALL_HANDLES],[]) +AH_TEMPLATE([ACE_DEFAULT_MAX_SOCKET_BUFSIZ],[]) +AH_TEMPLATE([ACE_DEFAULT_SELECT_REACTOR_SIZE],[The default number of handles the select()-based reactor should handle]) +AH_TEMPLATE([ACE_MALLOC_ALIGN],[]) +AH_TEMPLATE([ACE_MAP_PRIVATE],[]) +AH_TEMPLATE([ACE_THR_PRI_FIFO_DEF],[]) +AH_TEMPLATE([ACE_TIMER_SKEW],[]) +AH_TEMPLATE([ACE_UINT64_FORMAT_SPECIFIER],[The format specifier (e.g. "%Lu") for the 64 bit unsigned integer type]) +AH_TEMPLATE([ACE_USE_RCSID],[Enable embedding of global RCS ID strings into compiled object file]) +AH_TEMPLATE([IP_ADD_MEMBERSHIP],[]) +AH_TEMPLATE([IP_DROP_MEMBERSHIP],[]) + + +dnl Specify sizes of given built-in types. If a size isn't defined here, +dnl then ace/Basic_Types.h will attempt to deduce the size. +dnl AH_TEMPLATE([ACE_SIZEOF_CHAR],[Size of native "char" type]) +AH_TEMPLATE([ACE_SIZEOF_SHORT],[Size of the native "short" type]) +AH_TEMPLATE([ACE_SIZEOF_INT],[Size of the native "int" type]) +AH_TEMPLATE([ACE_SIZEOF_LONG],[Size of the native "long" type]) +AH_TEMPLATE([ACE_SIZEOF_LONG_LONG],[Size of the native "long long" type]) +AH_TEMPLATE([ACE_SIZEOF_VOID_P],[Size of the native "pointer to void" type]) +AH_TEMPLATE([ACE_SIZEOF_FLOAT],[Size of the native "float" type]) +AH_TEMPLATE([ACE_SIZEOF_DOUBLE],[Size of the native "double" type]) +AH_TEMPLATE([ACE_SIZEOF_LONG_DOUBLE],[Size of the native "long double" type]) + + +AH_VERBATIM([ACE_UINT64_TYPEDEF], +[ +/* + typedef for ACE_UINT64 + + We only make the typedef if ACE_UINT64_TYPEDEF is defined. Otherwise, + let ace/Basic_Types.h do the work for us. +*/ +#undef ACE_UINT64_TYPEDEF +#ifdef ACE_UINT64_TYPEDEF + typedef ACE_UINT64_TYPEDEF ACE_UINT64; +#endif /* ACE_UINT64_TYPEDEF */ +]) + +AH_TEMPLATE([ACE_LOFF_T_TYPEDEF],[typedef for ACE_LOFF_T]) + +AH_TEMPLATE([__ACE_INLINE__],[Enable ACE inlining]) + +AH_TEMPLATE([ACE_NO_INLINE],[Explicitly disable ACE inlining]) + +AH_TEMPLATE([ACE_COMPILE_TIMEPROBES],[Enable ACE_Timeprobes]) + +AH_TEMPLATE([ACE_HAS_GNU_REPO], +[Enable use of GNU template repositories. GNU C++ w/repo patch +and EGCS only]) + +AH_TEMPLATE([ACE_HAS_AIO_CALLS],[Platform supports Asynchronous IO calls]) + +AH_TEMPLATE([ACE_HAS_ALT_CUSERID], +[Use ACE's alternate cuserid() implementation since a system +cuserid() may not exist, or it is not desirable to use it. The +implementation requires ACE_LACKS_PWD_FUNCTIONS to be undefined and +that the geteuid() system call exists.]) + +AH_TEMPLATE([ACE_HAS_ANSI_CASTS], +[Platform supports new C++ style casts (dynamic_cast, static_cast, +reinterpret_cast and const_cast)]) + +AH_TEMPLATE([ACE_DEFAULT_THREAD_KEYS], +[Number of TSS keys, with ACE_HAS_TSS_EMULATION _only_. Defaults to 64.]) + +AH_TEMPLATE([ACE_THREADS_DONT_INHERIT_LOG_MSG], +[Specify this if you don't want threads to inherit parent thread's +ACE_Log_Msg properties.]) + +AH_TEMPLATE([ACE_HAS_ONE_DEFINITION_RULE], +[Compiler enforces C++ One Definition Rule]) + +AH_TEMPLATE([ACE_HAS_PRIOCNTL],[OS has priocntl (2)]) + +dnl Platform has the MIT pthreads APIs for timed send/recv operations +AH_TEMPLATE([ACE_HAS_RECV_TIMEDWAIT],[]) +AH_TEMPLATE([ACE_HAS_RECVFROM_TIMEDWAIT],[]) +AH_TEMPLATE([ACE_HAS_RECVMSG_TIMEDWAIT],[]) +AH_TEMPLATE([ACE_HAS_SEND_TIMEDWAIT],[]) +AH_TEMPLATE([ACE_HAS_SENDTO_TIMEDWAIT],[]) +AH_TEMPLATE([ACE_HAS_SENDMSG_TIMEDWAIT],[]) +AH_TEMPLATE([ACE_HAS_READ_TIMEDWAIT],[]) +AH_TEMPLATE([ACE_HAS_READV_TIMEDWAIT],[]) +AH_TEMPLATE([ACE_HAS_WRITE_TIMEDWAIT],[]) +AH_TEMPLATE([ACE_HAS_WRITEV_TIMEDWAIT],[]) + +AH_TEMPLATE([ACE_HAS_RLIMIT_RESOURCE_ENUM], +[Platform has enum instead of int for first argument to ::{get,set}rlimit (). +The value of this macro is the enum definition, e.g., +enum __rlimit_resource, for Linux glibc 2.0.]) + +AH_TEMPLATE([ACE_HAS_RUSAGE_WHO_ENUM], +[Platform has enum instead of int for first argument to ::getrusage (). The +value of this macro is the enum definition, e.g., enum __rusage_who, for +Linux glibc 2.0.]) + +AH_TEMPLATE([ACE_HAS_STDARG_THR_DEST], +[Platform has void (*)(...) prototype for pthread_key_create() +destructor (e.g., LynxOS).]) + +AH_TEMPLATE([ACE_HAS_STL_MAP_CONFLICT], +[Used when users want to compile ACE with STL and STL map class +conflicts with <net/if.h> map struct.]) + +AH_TEMPLATE([ACE_HAS_STL_QUEUE_CONFLICT], +[Used when users want to compile ACE with STL and STL queue class +conflicts with <netinet/in.h> queue struct.]) + +AH_TEMPLATE([ACE_HAS_4_4BSD_SENDMSG_RECVMSG], +[Platform has BSD 4.4 sendmsg()/recvmsg() APIs.]) + +AH_TEMPLATE([ACE_HAS_P_READ_WRITE], +[Platform has pread() and pwrite() support.]) + +AH_TEMPLATE([ACE_HAS_AIX_BROKEN_SOCKET_HEADER], +[Platform, such as AIX4, needs to wrap #include of sys/socket.h with +#undef/#define of __cplusplus. +]) + +AH_TEMPLATE([ACE_HAS_AIX_HI_RES_TIMER], +[Platform has AIX4 ::read_real_time()]) + +AH_TEMPLATE([ACE_HAS_ALLOCA],[Compiler/platform supports alloca().]) + +AH_TEMPLATE([ACE_HAS_ALLOCA_H],[Compiler/platform has <alloca.h>]) + +AH_TEMPLATE([ACE_HAS_ALPHA_TIMER], +[CPU is an Alpha, with the rpcc instruction to read the tick timer.]) + +AH_TEMPLATE([ACE_HAS_AUTOMATIC_INIT_FINI], +[Compiler/platform correctly calls init()/fini() for shared libraries.]) + +AH_TEMPLATE([ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR], +[Compiler handles explicit calling of template destructor correctly. +See `ace/OS.h' for details.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_MAP_FAILED], +[Platform doesn't cast MAP_FAILED to a (void *).]) + +AH_TEMPLATE([ACE_HAS_BROKEN_NAMESPACES], +[Compiler/platform doesn't support namespaces (or the support is not +fully implemented.)]) + +AH_TEMPLATE([ACE_HAS_BROKEN_BITSHIFT], +[Compiler has integer overflow problem with bit-shift operations.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS], +[Compiler can't handle const char * as rvalue in conditional operator.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_CONVERSIONS], +[Compiler can't handle calls like foo->operator T *()]) + +AH_TEMPLATE([ACE_HAS_BROKEN_CTIME], +[Compiler/platform uses macro for ctime (e.g., MVS)]) + +AH_TEMPLATE([ACE_HAS_BROKEN_DGRAM_SENDV], +[Platform sendv() does not work properly with datagrams, i.e. it +fails when the iovec size is IOV_MAX.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_MSG_H], +[Platform headers don't support <msg.h> prototypes]) + +AH_TEMPLATE([ACE_HAS_BROKEN_MMAP_H], +[HP/UX does not wrap the mmap(2) header files with extern "C".]) + +AH_TEMPLATE([ACE_HAS_BROKEN_NESTED_TEMPLATES], +[MSVC has trouble with defining STL containers for nested structs and +classes.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS], +[Platform has a bug with non-blocking connects (e.g., WinNT 4.0)]) + +AH_TEMPLATE([ACE_HAS_BROKEN_POSIX_TIME], +[Platform defines struct timespec in <sys/timers.h>]) + +AH_TEMPLATE([ACE_HAS_BROKEN_R_ROUTINES], +[Platform defines ctime_r, asctime_r, rand_r and getpwnam_r as macros]) + +AH_TEMPLATE([ACE_HAS_BROKEN_RANDR], +[OS/compiler's header files are inconsistent with libC definition of +rand_r().]) + +AH_TEMPLATE([ACE_HAS_BROKEN_READV], +[OS/Compiler's header files are not consistent with readv() definition.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_SAP_ANY], +[Compiler can't handle the static ACE_Addr::sap_any construct.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_SENDMSG], +[OS/compiler omits the const from the sendmsg() prototype.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_SETRLIMIT], +[OS/compiler omits the const from the rlimit parameter in the +setrlimit() prototype.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_T_ERROR], +[Compiler/platform has the wrong prototype for t_error(), i.e., +t_error(char *) rather than t_error(const char *).]) + +AH_TEMPLATE([ACE_HAS_BROKEN_TIMESPEC_MEMBERS], +[Platform defines struct timespec members as ts_sec and ts_nsec +instead of tv_sec and tv_nsec. This is highly non-portable. +Currently only FreeBSD 2.1.x uses it.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_WRITEV], +[OS/compiler omits the const from the iovec parameter in the +writev() prototype.]) + +AH_TEMPLATE([ACE_HAS_BROKEN_XTI_MACROS], +[OS header files have some problems with XTI (HP/UX 11).]) + +AH_TEMPLATE([ACE_HAS_BSTRING], +[Platform has <bstring.h> (which contains bzero() prototype)]) + +AH_TEMPLATE([ACE_HAS_BYTESEX_H],[Platform has <bytesex.h>.]) + +AH_TEMPLATE([ACE_HAS_CHARPTR_DL], +[OS/platform uses char * for dlopen/dlsym args, rather than const char *.]) + +AH_TEMPLATE([ACE_HAS_CHARPTR_SOCKOPT], +[OS/platform uses char * for sockopt, rather than const char *]) + +AH_TEMPLATE([ACE_HAS_CHARPTR_SPRINTF], +[sprintf() returns char * rather than int (e.g., SunOS 4.x)]) + +AH_TEMPLATE([ACE_HAS_CLOCK_GETTIME], +[Platform supports POSIX 1.b clock_gettime()]) + +AH_TEMPLATE([ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES], +[Prototypes for both signal() and struct sigaction are consistent.]) + +AH_TEMPLATE([ACE_HAS_CPLUSPLUS_HEADERS], +[Compiler/platform has correctly prototyped header files.]) + +AH_TEMPLATE([ACE_HAS_DIRENT], +[Platform supports operations on directories via struct dirent, +readdir_r, etc.]) + +AH_TEMPLATE([ACE_HAS_DLFCN_H_BROKEN_EXTERN_C], +[For platforms, e.g., RedHat 4.2/Linux 2.0.30/Alpha, that don't +declare dl* functions as extern "C" in dlfcn.h.]) + +AH_TEMPLATE([ACE_HAS_EXCEPTIONS],[Compiler supports C++ exception handling.]) + +AH_TEMPLATE([ACE_HAS_FL],[Platform has Fast-Light (FL) toolkit installed.]) + +AH_TEMPLATE([ACE_HAS_GETPAGESIZE], +[Platform supports getpagesize() call (otherwise, ACE_PAGE_SIZE must +be defined, except on Win32).]) + +AH_TEMPLATE([ACE_HAS_GETRUSAGE], +[Platform supports the getrusage() system call.]) + +AH_TEMPLATE([ACE_HAS_GETRUSAGE_PROTO], +[Platform has a getrusage () prototype in sys/resource.h that + differs from the one in ace/OS.i.]) + +AH_TEMPLATE([ACE_HAS_GNUC_BROKEN_TEMPLATE_INLINE_FUNCTIONS], +[GNUC 2.7.3 mistakenly takes the template definition as the place + where an inline function of an argument class is first used.]) + +AH_TEMPLATE([ACE_HAS_GNU_CSTRING_H], +[Denotes that GNU has cstring.h as standard which redefines memchr()]) + +AH_TEMPLATE([ACE_HAS_GPERF], +[The GPERF utility is compiled for this platform]) + +AH_TEMPLATE([ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT], +[Optimize ACE_Handle_Set::count_bits for select() operations (common case)]) + +AH_TEMPLATE([ACE_HAS_LSEEK64], +[Platform supports lseek64(). This should not be defined if + ACE_HAS_LLSEEK is defined.]) + +AH_TEMPLATE([ACE_HAS_LLSEEK], +[Platform supports llseek(). This should not be defined if + ACE_HAS_LSEEK64 is defined.]) + +AH_TEMPLATE([ACE_HAS_HI_RES_TIMER], +[Compiler/platform supports SunOS high resolution timers]) + +AH_TEMPLATE([ACE_HAS_IDTYPE_T],[Compiler/platform supports idtype_t.]) + +AH_TEMPLATE([ACE_HAS_INLINED_OSCALLS],[ +Inline all the static class OS methods to remove call overhead +Note: This gets defined by OS.h if __ACE_INLINE__ is defined]) + +AH_TEMPLATE([ACE_HAS_IP_MULTICAST],[Platform supports IP multicast]) + +AH_TEMPLATE([ACE_HAS_IPV6],[Platform supports IPv6]) + +AH_TEMPLATE([ACE_HAS_NONSTATIC_OBJECT_MANAGER], +[Causes the ACE_Object_Manager instance to be created in + main (int, char *[]), instead of as a static (global) instance.]) + +AH_TEMPLATE([ACE_HAS_THR_KEYDELETE], +[Platform supports thr_keydelete (e.g,. UNIXWARE)]) + +AH_TEMPLATE([ACE_HAS_THR_MINSTACK], +[Platform calls thr_minstack() rather than thr_min_stack() (e.g., Tandem).]) + +AH_TEMPLATE([ACE_HAS_LIMITED_RUSAGE_T], +[The rusage_t structure has only two fields.]) + +AH_TEMPLATE([ACE_HAS_BIG_FD_SET], +[Compiler/platform has "big" fd_set, i.e. large number of bits set + in fd_set passed back from select().]) + +AH_TEMPLATE([ACE_HAS_LONG_MAP_FAILED], +[Platform defines MAP_FAILED as a long constant.]) + +AH_TEMPLATE([ACE_HAS_MALLOC_STATS], [Enabled malloc statistics collection.]) + +AH_TEMPLATE([ACE_HAS_MEMCHR],[Use native implementation of memchr().]) + +AH_TEMPLATE([ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION], +[Avoid #including ace/streams.h in OS.h. Users must include + ace/streams.h, <iostream>, or <iostream.h> explicitly in their code. + Some platforms, such as g++/VxWorks, have trouble compiling templates + and iostreams header because of static variables in the stream + headers. This flag will also avoid extra compilation and runtime + overheads on some platforms.]) + +AH_TEMPLATE([ACE_USES_OLD_IOSTREAMS], +[Some files, such as ace/streams.h, want to include new style C++ + stream headers. These headers are iomanip, ios, iostream, istream, + ostream, fstream and streambuf. If _all_ of these headers aren't + available, then assume that only iostream.h and fstream.h are + available.]) + +AH_TEMPLATE([ACE_HAS_MSG],[Platform supports recvmsg and sendmsg]) + +AH_TEMPLATE([ACE_HAS_MT_SAFE_MKTIME], +[Platform supports MT safe mktime() call (do any of them?)]) + +AH_TEMPLATE([ACE_HAS_MT_SAFE_SOCKETS], +[Sockets may be called in multi-threaded programs]) + +AH_TEMPLATE([ACE_HAS_NONCONST_GETBY], +[Platform uses non-const char * in calls to gethostbyaddr, + gethostbyname, getservbyname]) + +AH_TEMPLATE([ACE_HAS_NONCONST_MSGSND], +[Platform has a non-const parameter to msgsnd() (e.g., SCO).]) + +AH_TEMPLATE([ACE_HAS_NONCONST_SELECT_TIMEVAL], +[Platform's select() uses non-const timeval* (only found on Linux + right now)]) + +AH_TEMPLATE([ACE_HAS_GNUG_PRE_2_8], +[Platform has "old" GNU compiler, i.e. does not completely support + standard C++. (compiling with g++ prior to version 2.8.0)]) + +AH_TEMPLATE([ACE_HAS_OLD_MALLOC], +[Compiler/platform uses old malloc()/free() prototypes (ugh)]) + +AH_TEMPLATE([ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R], +[Uses ctime_r & asctime_r with only two parameters vs. three.]) + +AH_TEMPLATE([ACE_HAS_ONLY_SCHED_OTHER], +[Platform, e.g., Solaris 2.5, only supports SCHED_OTHER POSIX + scheduling policy.]) + +AH_TEMPLATE([ACE_HAS_OPTIMIZED_MESSAGE_QUEUE], +[Use the semaphore implementation of ACE_Message_Queue rather than + the emulated condition variable (NT and VxWorks).]) + +AH_TEMPLATE([ACE_HAS_OSF_TIMOD_H], +[Platform supports the OSF TLI timod STREAMS module]) + +AH_TEMPLATE([ACE_HAS_PENTIUM],[Platform is an Intel Pentium microprocessor.]) + +AH_TEMPLATE([ACE_HAS_POLL],[Platform contains <poll.h>]) + +AH_TEMPLATE([ACE_HAS_POSITION_INDEPENDENT_POINTERS], +[Platform supports "position-independent" features provided by + ACE_Based_Pointer<>.]) + +AH_TEMPLATE([ACE_HAS_POSIX_GETPWNAM_R], +[Platform supports POSIX getpwnam_r() function]) + +AH_TEMPLATE([ACE_HAS_POSIX_NONBLOCK], +[Platform supports POSIX O_NONBLOCK semantics]) + +AH_TEMPLATE([ACE_HAS_POSIX_SEM], +[Platform supports POSIX real-time semaphores (e.g., VxWorks and + Solaris)]) + +AH_TEMPLATE([ACE_HAS_POSIX_TIME], +[Platform supports the POSIX struct timespec type]) + +AH_TEMPLATE([ACE_HAS_PROC_FS], +[Platform supports the /proc file system and defines tid_t + in <sys/procfs.h>]) + +AH_TEMPLATE([ACE_HAS_POWERPC_TIMER], +[Platform supports PowerPC time-base register.]) + +AH_TEMPLATE([ACE_HAS_PRUSAGE_T],[Platform supports the prusage_t struct]) + +AH_TEMPLATE([ACE_HAS_PTHREADS],[Platform supports POSIX Threads]) + +AH_TEMPLATE([ACE_HAS_PTHREADS_DRAFT4], +[Platform supports POSIX Threads .4a Draft 4]) + +AH_TEMPLATE([ACE_HAS_PTHREADS_DRAFT6], +[Platform supports POSIX Threads .4a Draft 6]) + +AH_TEMPLATE([ACE_HAS_PTHREADS_DRAFT7],a +[Platform supports POSIX Threads .1c Draft 7]) + +AH_TEMPLATE([ACE_HAS_PTHREADS_STD],[Platform supports POSIX.1c-1995 threads]) + +AH_TEMPLATE([ACE_HAS_PTHREADS_UNIX98_EXT], +[Platform has the UNIX98 extensions to Pthreads (suspend, continue, + rwlocks)]) + +AH_TEMPLATE([ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP], +[Platform has pthread_condattr_setkind_np().]) + +AH_TEMPLATE([ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP], +[Platform has pthread_mutexattr_setkind_np().]) + +AH_TEMPLATE([ACE_HAS_PTHREAD_PROCESS_ENUM], +[pthread.h declares an enum with PTHREAD_PROCESS_PRIVATE and + PTHREAD_PROCESS_SHARED values]) + +AH_TEMPLATE([ACE_HAS_PURIFY],[Purify'ing. Defined on command line.]) + +AH_TEMPLATE([ACE_HAS_QUANTIFY],[Quantify'ing. Defined on command line.]) + +AH_TEMPLATE([ACE_HAS_RECURSIVE_MUTEXES], +[Mutexes are inherently recursive (e.g., Win32) ]) + +AH_TEMPLATE([ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS], +[Platform will recurse infinitely on thread exits from TSS cleanup + routines (e.g., AIX)]) + +AH_TEMPLATE([ACE_HAS_REENTRANT_FUNCTIONS], +[Platform supports reentrant functions (i.e., all the POSIX *_r + functions).]) + +AH_TEMPLATE([ACE_HAS_X86_STAT_MACROS], +[Solaris for intel uses macros for fstat() and stat(), these are + wrappers for _fxstat() and _xstat() uses of the macros. Causes + compile and runtime problems.]) + +AH_TEMPLATE([ACE_HAS_XPG4_MULTIBYTE_CHAR], +[Platform has support for multi-byte character support compliant + with the XPG4 Worldwide Portability Interface wide-character + classification.]) + +AH_TEMPLATE([ACE_LACKS_AUTO_MMAP_REPLACEMENT], +[No system support for replacing any previous mappings.]) + +AH_TEMPLATE([ACE_LACKS_AUTO_PTR], +[Platform lacks support for the standard C++ auto_ptr class]) + +AH_TEMPLATE([ACE_AUTO_PTR_LACKS_RESET], +[Compiler/platform standard C++ auto_ptr implementation lacks + reset() method]) + +AH_TEMPLATE([ACE_LACKS_BSEARCH], +[Compiler/platform lacks the standard C library bsearch() function]) + +AH_TEMPLATE([ACE_LACKS_CMSG_DATA_MACRO], +[Platform has ACE_HAS_4_4BSD_SENDMSG_RECVMSG but does not define + CMSG_DATA (cmsg) macro.]) + +AH_TEMPLATE([ACE_LACKS_CMSG_DATA_MEMBER], +[Platform has ACE_HAS_4_4BSD_SENDMSG_RECVMSG but its cmsghdr + structure does not contain an 'unsigned char cmsg_data[0]' member. + (This may be 'unsigned char __cmsg_data[0]' on some platforms, in + which case we need another macro.)]) + +AH_TEMPLATE([ACE_LACKS_FGETWC], +[Compiler/platform lacks the fgetwc() function]) + +AH_TEMPLATE([ACE_LACKS_QSORT], +[Compiler/platform lacks the standard C library qsort() function]) + +AH_TEMPLATE([ACE_LACKS_FCNTL],[Platform lacks POSIX-style fcntl ()]) + +AH_TEMPLATE([ACE_LACKS_FSYNC],[Platform lacks fsync()]) + +AH_TEMPLATE([ACE_LACKS_RTTI], +[Compiler does not support dynamic_cast. Usually used with + ACE_HAS_ANSI_CASTS]) + +AH_TEMPLATE([ACE_LACKS_READDIR_R],[Platform lacks readdir_r()]) + +AH_TEMPLATE([ACE_LACKS_SEEKDIR],[Platform lacks seekdir()]) + +AH_TEMPLATE([ACE_LACKS_TELLDIR],[Platform lacks telldir()]) + +AH_TEMPLATE([ACE_LACKS_INLINE_FUNCTIONS], +[Platform can't handle "inline" keyword correctly.]) + +AH_TEMPLATE([ACE_LACKS_IOSTREAM_TOTALLY], +[iostreams are not supported adequately on the given platform.]) + +AH_TEMPLATE([ACE_LACKS_NETDB_REENTRANT_FUNCTIONS], +[Platform does not support reentrant netdb functions + (getprotobyname_r, getprotobynumber_r, gethostbyaddr_r, + gethostbyname_r, getservbyname_r).]) + +AH_TEMPLATE([ACE_HAS_REGEX], +[Platform supports the POSIX regular expression library]) + +AH_TEMPLATE([ACE_HAS_SCANDIR], +[Platform supports the scandir() function.]) + +AH_TEMPLATE([ACE_HAS_SELECT_H], +[Platform has special header for select().]) + +AH_TEMPLATE([ACE_HAS_SEMUN], +[Compiler/platform defines a union semun for SysV shared memory ]) + +AH_TEMPLATE([ACE_HAS_SET_T_ERRNO], +[Platform has a function to set t_errno (e.g., Tandem).]) + +AH_TEMPLATE([ACE_HAS_SHM_OPEN],[Platform has shm_open()]) + +AH_TEMPLATE([ACE_HAS_SIGINFO_T],[Platform supports SVR4 extended signals]) + +AH_TEMPLATE([ACE_HAS_SIGISMEMBER_BUG], +[Platform has bug with sigismember() (HP/UX 11).]) + +AH_TEMPLATE([ACE_HAS_SIG_MACROS], +[Platform/compiler has macros for sig{empty,fill,add,del}set (e.g., + SCO and FreeBSD)]) + +AH_TEMPLATE([ACE_HAS_SIGNAL_OBJECT_AND_WAIT], +[Platform supports the Win32 SignalObjectAndWait() function (WinNT + 4.0 and beyond).]) + +AH_TEMPLATE([ACE_HAS_SIGNAL_SAFE_OS_CALLS], +[Automatically restart OS system calls when EINTR occurs]) + +AH_TEMPLATE([ACE_HAS_SIGSUSPEND],[Platform has the sigsuspend() system call]) + +AH_TEMPLATE([ACE_HAS_SIGTIMEDWAIT], +[Platform has the sigtimedwait() system call]) + +AH_TEMPLATE([ACE_HAS_SIGWAIT],[Platform/compiler has the sigwait(2) prototype]) + +AH_TEMPLATE([ACE_HAS_SIG_ATOMIC_T], +[Compiler/platform defines the sig_atomic_t typedef]) + +AH_TEMPLATE([ACE_HAS_SIG_C_FUNC], +[Compiler requires extern "C" functions for signals.]) + +AH_TEMPLATE([ACE_HAS_SIN_LEN],[Platform supports new BSD inet_addr len field.]) + +AH_TEMPLATE([ACE_HAS_SIZET_SOCKET_LEN], +[OS/compiler uses size_t * rather than int * for socket lengths]) + +AH_TEMPLATE([ACE_HAS_SNPRINTF],[Platform offers snprintf().]) + +AH_TEMPLATE([ACE_HAS_SOCKADDR_MSG_NAME], +[Platform requires (struct sockaddr *) for msg_name field of + struct msghdr.]) + +AH_TEMPLATE([ACE_HAS_SOCKIO_H], +[Compiler/platform provides the sys/sockio.h file]) + +AH_TEMPLATE([ACE_HAS_SOCKLEN_T], +[Platform provides socklen_t type, such as Linux with glibc2.]) + +AH_TEMPLATE([ACE_HAS_SPARCWORKS_401_SIGNALS], +[Compiler has brain-damaged SPARCwork SunOS 4.x signal prototype...]) + +AH_TEMPLATE([ACE_HAS_SSIZE_T],[Compiler supports the ssize_t typedef]) + +AH_TEMPLATE([ACE_HAS_STHREADS],[Platform supports UNIX International Threads]) + +AH_TEMPLATE([ACE_HAS_THR_YIELD],[Platform has thr_yield()]) + +AH_TEMPLATE([ACE_HAS_STANDARD_CPP_LIBRARY], +[Platform/compiler supports Standard C++ Library]) + +AH_TEMPLATE([ACE_HAS_STRBUF_T],[Compiler/platform supports struct strbuf]) + +AH_TEMPLATE([ACE_HAS_STRDUP_EMULATION], +[Platform/compiler lacks strdup() (e.g., VxWorks, Chorus, WinCE)]) + +AH_TEMPLATE([ACE_HAS_STRPTIME],[Compile ACE_OS::strptime() wrapper into ACE.]) + +AH_TEMPLATE([ACE_HAS_STREAMS],[Platform supports STREAMS]) + +AH_TEMPLATE([ACE_HAS_STREAM_PIPES],[Platform supports STREAM pipes]) + +AH_TEMPLATE([ACE_HAS_STRERROR],[Compiler/platform supports strerror()]) + +AH_TEMPLATE([ACE_HAS_STRING_CLASS], +[Platform/Compiler supports a String class (e.g., GNU or Win32).]) + +AH_TEMPLATE([ACE_HAS_STRINGS], +[Platform has <strings.h> (which contains bzero() prototype)]) + +AH_TEMPLATE([ACE_HAS_STRUCT_NETDB_DATA], +[Compiler/platform has strange hostent API for socket *_r() calls]) + +AH_TEMPLATE([ACE_HAS_SUNOS4_GETTIMEOFDAY], +[Platform has void * as second parameter to gettimeofday and a has a + prototype]) + +AH_TEMPLATE([ACE_HAS_SUNOS4_SIGNAL_T], +[Compiler has horrible SunOS 4.x signal handlers...]) + +AH_TEMPLATE([ACE_HAS_SVR4_DYNAMIC_LINKING], +[Compiler/platform supports SVR4 dynamic linking semantics]) + +AH_TEMPLATE([ACE_HAS_SVR4_GETTIMEOFDAY], +[Compiler/platform supports SVR4 gettimeofday() prototype but + doesn't have a prototype]) + +AH_TEMPLATE([ACE_HAS_SVR4_SIGNAL_T], +[Compiler/platform supports SVR4 signal typedef.]) + +AH_TEMPLATE([ACE_HAS_SVR4_TLI], +[Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff).]) + +AH_TEMPLATE([ACE_HAS_SYSCALL_GETRUSAGE], +[HP/UX has an undefined syscall for GETRUSAGE.]) + +AH_TEMPLATE([ACE_HAS_SYSCALL_H], +[Compiler/platform contains the <sys/syscall.h> file.]) + +AH_TEMPLATE([ACE_HAS_SYSENT_H],[Platform provides <sysent.h> header]) + +AH_TEMPLATE([ACE_HAS_SYSINFO], +[Platform supports system configuration information.]) + +AH_TEMPLATE([ACE_HAS_SYSV_IPC], +[Platform supports System V IPC (most versions of UNIX, but not Win32)]) + +AH_TEMPLATE([ACE_HAS_SYS_ERRLIST], +[Platform/compiler supports _sys_errlist symbol]) + +AH_TEMPLATE([ACE_HAS_SYS_FILIO_H],[Platform provides <sys/filio.h> header]) + +AH_TEMPLATE([ACE_HAS_SYS_SIGLIST], +[Compiler/platform supports _sys_siglist array]) + +AH_TEMPLATE([ACE_HAS_SYS_XTI_H],[Platform provides <sys/xti.h> header]) + +AH_TEMPLATE([ACE_HAS_TEMPLATE_SPECIALIZATION], +[Compiler implements template specialization]) + +AH_TEMPLATE([ACE_HAS_STD_TEMPLATE_SPECIALIZATION], +[Compiler supports standard C++ template specializations + (e.g. "template <>" syntax.)]) + +AH_TEMPLATE([ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION], +[Compiler supports standard C++ template method specializations + (e.g. "template <>" syntax.)]) + +AH_TEMPLATE([ACE_HAS_TEMPLATE_TYPEDEFS], +[Compiler implements templates that support typedefs inside of + classes used as formal arguments to a template class.]) + +AH_TEMPLATE([ACE_HAS_TERM_IOCTLS], +[Platform has terminal ioctl flags like TCGETS and TCSETS.]) + +AH_TEMPLATE([ACE_HAS_THREADS],[Platform supports threads.]) + +AH_TEMPLATE([ACE_HAS_THREAD_SAFE_ACCEPT], +[Platform allows multiple threads to call accept() on the same port + (e.g., WinNT).]) + +AH_TEMPLATE([ACE_HAS_THREAD_SELF], +[Platform has thread_self() rather than pthread_self() (e.g., + DCETHREADS and AIX)]) + +AH_TEMPLATE([ACE_HAS_THREAD_SPECIFIC_STORAGE], +[Compiler/platform has thread-specific storage]) + +AH_TEMPLATE([ACE_HAS_THR_C_DEST], +[The pthread_keycreate() routine *must* take extern C functions.]) + +AH_TEMPLATE([ACE_HAS_THR_C_FUNC], +[The pthread_create() routine *must* take extern C functions.]) + +AH_TEMPLATE([ACE_HAS_TIMEZONE_GETTIMEOFDAY], +[Platform/compiler supports timezone * as second parameter to + gettimeofday() and has a prototype.]) + +AH_TEMPLATE([ACE_HAS_TIMOD_H], +[Platform supports TLI timod STREAMS module]) + +AH_TEMPLATE([ACE_HAS_TIUSER_H],[Platform supports TLI tiuser header]) + +AH_TEMPLATE([ACE_HAS_TIUSER_H_BROKEN_EXTERN_C], +[Platform does not protect <tiuser.h> with extern "C"]) + +AH_TEMPLATE([ACE_HAS_TLI], +[Platform supports TLI. Also see ACE_TLI_TCP_DEVICE.]) + +AH_TEMPLATE([ACE_HAS_TLI_PROTOTYPES], +[Platform provides TLI function prototypes]) + +AH_TEMPLATE([ACE_HAS_TSS_EMULATION], +[ACE provides TSS emulation. See also ACE_DEFAULT_THREAD_KEYS.]) + +AH_TEMPLATE([ACE_HAS_UALARM],[Platform supports ualarm()]) + +AH_TEMPLATE([ACE_HAS_UCONTEXT_T], +[Platform supports ucontext_t (which is used in the extended signal API).]) + +AH_TEMPLATE([ACE_HAS_UNION_WAIT], +[The wait() system call takes a (union wait *) rather than int *]) + +AH_TEMPLATE([ACE_HAS_UNIXWARE_SVR4_SIGNAL_T], +[Has inconsistent SVR4 signal stuff, but not the same as the other + platforms]) + +AH_TEMPLATE([ACE_HAS_WCHAR],[Platform/compiler supports wchar_t]) + +AH_TEMPLATE([ACE_HAS_UTIME],[Platform has <utime.h> header file]) + +AH_TEMPLATE([ACE_HAS_EXPLICIT_KEYWORD], +[Compiler supports explicit constructors.]) + +AH_TEMPLATE([ACE_HAS_MUTABLE_KEYWORD], +[Compiler supports the C++ `mutable' keyword.]) + +AH_TEMPLATE([ACE_HAS_TYPENAME_KEYWORD], +[Compiler supports the C++ typename keyword]) + +AH_TEMPLATE([ACE_HAS_USING_KEYWORD], +[Compiler supports the new using keyword for C++ namespaces.]) + +AH_TEMPLATE([ACE_HAS_VERBOSE_NOTSUP], +[Prints out console message in ACE_NOTSUP. Useful for tracking down + origin of ACE_NOTSUP.]) + +AH_TEMPLATE([ACE_HAS_VOIDPTR_MMAP],[Platform requires void * for mmap().]) + +AH_TEMPLATE([ACE_HAS_VOIDPTR_SOCKOPT], +[OS/compiler uses void * arg 4 setsockopt() rather than const char *]) + +AH_TEMPLATE([ACE_HAS_XLI],[Platform has the XLI version of TLI]) + +AH_TEMPLATE([ACE_HAS_XT],[Platform has Xt Intrinsics Toolkit]) + +AH_TEMPLATE([ACE_LACKS_MOTIF], +[Platform does not have Motif X toolkit available]) + +AH_TEMPLATE([ACE_HAS_XTI], +[Platform has XTI (X/Open-standardized superset of TLI). Implies + ACE_HAS_TLI but uses a different header file.]) + +AH_TEMPLATE([ACE_LACKS_ACCESS], +[Platform lacks access() (e.g., VxWorks and Chorus)]) + +AH_TEMPLATE([ACE_LACKS_ACE_IOSTREAM], +[Platform can not build ace/IOStream{,_T}.cpp. This does not + necessarily mean that the platform does not support iostreams.]) + +AH_TEMPLATE([ACE_LACKS_ACE_CODECS], +[Do not compile support for the "Codecs" ACE features.]) + +AH_TEMPLATE([ACE_LACKS_ACE_OTHER], +[Do not compile support for the "other" ACE features, such as CORBA + handling, name services, and QoS.]) + +AH_TEMPLATE([ACE_LACKS_ACE_SVCCONF], +[Do not compile support for the ACE Service Configurator.]) + +AH_TEMPLATE([ACE_LACKS_ACE_TOKEN], +[Do not compile support for the ACE Token feature.]) + +AH_TEMPLATE([ACE_LACKS_COND_T], +[Platform lacks condition variables (e.g., Win32 and VxWorks)]) + +AH_TEMPLATE([ACE_LACKS_COND_TIMEDWAIT_RESET], +[pthread_cond_timedwait does *not* reset the time argument when + the lock is acquired.]) + +AH_TEMPLATE([ACE_LACKS_CONDATTR_PSHARED], +[Platform has no implementation of pthread_condattr_setpshared(), even + though it supports pthreads!]) + +AH_TEMPLATE([ACE_LACKS_CONST_STRBUF_PTR], +[Platform uses struct strbuf * rather than const struct strbuf * + (e.g., HP/UX 10.x)]) + +AH_TEMPLATE([ACE_LACKS_CONST_TIMESPEC_PTR], +[Platform forgot const in cond_timewait (e.g., HP/UX).]) + +AH_TEMPLATE([ACE_LACKS_DIFFTIME],[Platform lacks difftime() implementation]) + +AH_TEMPLATE([ACE_LACKS_EXEC], +[Platform lacks the exec() family of system calls (e.g., Win32, + VxWorks, Chorus)]) + +AH_TEMPLATE([ACE_LACKS_FILELOCKS],[Platform lacks file locking mechanism]) + +AH_TEMPLATE([ACE_LACKS_FLOATING_POINT], +[Platform does not support floating point operations]) + +AH_TEMPLATE([ACE_LACKS_FORK], +[Platform lacks the fork() system call (e.g., Win32, VxWorks, Chorus)]) + +AH_TEMPLATE([ACE_LACKS_GETOPT_PROTO], +[Platform lacks the getopt() prototype (e.g., LynxOS)]) + +AH_TEMPLATE([ACE_LACKS_GETPGID], +[Platform lacks getpgid() call (e.g., Win32, Chorus, and FreeBSD).]) + +AH_TEMPLATE([ACE_LACKS_GETPPID],[Platform lacks getppid() call.]) + +AH_TEMPLATE([ACE_LACKS_SETREGID],[Platform lacks setregid() call.]) + +AH_TEMPLATE([ACE_LACKS_SETREUID],[Platform lacks setreuid() call.]) + +AH_TEMPLATE([ACE_LACKS_GETSERVBYNAME], +[Platforms lacks getservbyname() (e.g., VxWorks and Chorus).]) + +AH_TEMPLATE([ACE_LACKS_IOSTREAM_FX], +[iostream header does not declare ipfx (), opfx (), etc.]) + +AH_TEMPLATE([ACE_LACKS_LINEBUFFERED_STREAMBUF], +[Platform lacks streambuf "linebuffered ()".]) + +AH_TEMPLATE([ACE_LACKS_LONGLONG_T], +[Compiler/platform does not support the unsigned long long datatype.]) + +AH_TEMPLATE([ACE_LACKS_LSTAT],[Platform lacks the lstat() function.]) + +AH_TEMPLATE([ACE_LACKS_U_LONGLONG_T], +[Platform does not have u_longlong_t typedef]) + +AH_TEMPLATE([ACE_LACKS_MADVISE], +[Platform lacks madvise() (e.g., Linux)]) + +AH_TEMPLATE([ACE_LACKS_MALLOC_H],[Platform lacks malloc.h]) + +AH_TEMPLATE([ACE_LACKS_MEMORY_H], +[Platform lacks memory.h (e.g., VxWorks and Chorus)]) + +AH_TEMPLATE([ACE_LACKS_MKFIFO], +[Platform lacks mkfifo(), e.g. VxWorks, Chorus, pSoS, and WinNT.]) + +AH_TEMPLATE([ACE_LACKS_MKTEMP],[ACE has no mktemp()]) + +AH_TEMPLATE([ACE_LACKS_MMAP], +[The platform doesn't have mmap(2) (e.g., SCO UNIX).]) + +AH_TEMPLATE([ACE_LACKS_MODE_MASKS], +[Platform/compiler doesn't have open() mode masks.]) + +AH_TEMPLATE([ACE_LACKS_MPROTECT], +[The platform doesn't have mprotect(2) (e.g., EPLX real time OS from CDC + (based on LYNX))]) + +AH_TEMPLATE([ACE_LACKS_MSG_ACCRIGHTS], +[Platform defines ACE_HAS_MSG, but lacks msg_accrights{len}.]) + +AH_TEMPLATE([ACE_LACKS_MSGBUF_T], +[Platform lacks struct msgbuf (e.g., NT and MSV).]) + +AH_TEMPLATE([ACE_LACKS_MSYNC],[Platform lacks msync()]) + +AH_TEMPLATE([ACE_HAS_BROKEN_NETBSD_MSYNC], +[Platform doesn't support "sync" third argument to msync (?)]) + +AH_TEMPLATE([ACE_LACKS_TEMPNAM],[Platform doesn't support tempnam]) + +AH_TEMPLATE([ACE_LACKS_MUTEXATTR_PSHARED], +[Platform lacks pthread_mutexattr_setpshared().]) + +AH_TEMPLATE([ACE_LACKS_NULL_PTHREAD_STATUS], +[OS requires non-null status pointer for pthread_join ()]) + +AH_TEMPLATE([ACE_HAS_MUTEX_TIMEOUTS], +[Compiler supports timed mutex acquisitions (e.g. pthread_mutex_timedlock()).]) + +AH_TEMPLATE([ACE_LACKS_PARAM_H],[Platform lacks <sys/param.h> (e.g., MVS)]) + +AH_TEMPLATE([ACE_LACKS_NAMED_POSIX_SEM], +[Platform lacks named POSIX semaphores (e.g., Chorus)]) + +AH_TEMPLATE([ACE_LACKS_NATIVE_STRPTIME], +[Platform lacks native strptime() implementation.]) + +AH_TEMPLATE([ACE_LACKS_RLIMIT], +[Platform/compiler lacks {get,set}rlimit() function (e.g., VxWorks, + Chorus, and SCO UNIX)]) + +AH_TEMPLATE([ACE_LACKS_RLIMIT_PROTOTYPE], +[Platform/compiler lacks {get,set}rlimit() prototypes (e.g., Tandem)]) + +AH_TEMPLATE([ACE_LACKS_POSIX_PROTOTYPES], +[Platform lacks POSIX prototypes for certain System V functions like + shared memory and message queues.]) + +AH_TEMPLATE([ACE_LACKS_SOME_POSIX_PROTOTYPES], +[Platform lacks POSIX prototypes for certain System V functions like + shared memory and message queues.]) + +AH_TEMPLATE([ACE_LACKS_PLACEMENT_OPERATOR_NEW], +[Compiler doesn't support placement operator new(size_t, void *).]) + +AH_TEMPLATE([ACE_LACKS_PLACEMENT_OPERATOR_DELETE], +[Compiler doesn't support placement operator delete(void *, void *).]) + +AH_TEMPLATE([ACE_LACKS_PRAGMA_ONCE], +[Compiler complains about use of obsolete "pragma once"]) + +AH_TEMPLATE([ACE_LACKS_PRI_T], +[Platform lacks pri_t (e.g., Tandem NonStop UNIX).]) + +AH_TEMPLATE([ACE_LACKS_THREAD_STACK_ADDR], +[Platform lack pthread_attr_setstackaddr()]) + +AH_TEMPLATE([ACE_LACKS_PTHREAD_CANCEL],[Platform lacks pthread_cancel()]) + +AH_TEMPLATE([ACE_LACKS_PTHREAD_SIGMASK],[Platform lacks pthread_sigmask()]) + +AH_TEMPLATE([ACE_LACKS_PTHREAD_THR_SIGSETMASK], +[Platform lacks pthread_thr_sigsetmask (e.g., MVS, HP/UX, and OSF/1 3.2)]) + +AH_TEMPLATE([ACE_LACKS_PTHREAD_YIELD], +[Platfrom lack pthread_yield() support.]) + +AH_TEMPLATE([ACE_LACKS_PWD_FUNCTIONS], +[Platform lacks, getpwnam(), etc.]) + +AH_TEMPLATE([ACE_LACKS_PWD_REENTRANT_FUNCTIONS], +[Platform lacks getpwnam_r() methods (e.g., SGI 6.2).]) + +AH_TEMPLATE([ACE_LACKS_READLINK],[Platform lacks the readlink() function.]) + +AH_TEMPLATE([ACE_LACKS_RENAME],[Platform lacks the rename() function.]) + +AH_TEMPLATE([ACE_LACKS_RECVMSG],[Platform lacks recvmsg()]) + +AH_TEMPLATE([ACE_LACKS_RWLOCK_T],[Platform lacks readers/writer locks.]) + +AH_TEMPLATE([ACE_LACKS_SBRK], +[Platform lacks a working sbrk() (e.g., Win32 and VxWorks)]) + +AH_TEMPLATE([ACE_LACKS_SEMBUF_T], +[Platform lacks struct sembuf (e.g., Win32 and VxWorks)]) + +AH_TEMPLATE([ACE_LACKS_SETDETACH], +[Platform lacks pthread_attr_setdetachstate() (e.g., HP/UX 10.x)]) + +AH_TEMPLATE([ACE_LACKS_SETSCHED], +[Platform lacks pthread_attr_setsched() (e.g. MVS)]) + +AH_TEMPLATE([ACE_LACKS_SIGACTION], +[Platform lacks struct sigaction (e.g., Win32 and Chorus)]) + +AH_TEMPLATE([ACE_LACKS_SIGNED_CHAR], +[Platform lacks "signed char" type (broken!)]) + +AH_TEMPLATE([ACE_LACKS_SIGSET], +[Platform lacks signal sets (e.g., Chorus and Win32)]) + +AH_TEMPLATE([ACE_LACKS_STRRCHR], +[Platform/compiler lacks strrchr () function.]) + +AH_TEMPLATE([ACE_LACKS_STRUCT_DIR], +[Platform lacks dirent structure.]) + +AH_TEMPLATE([ACE_LACKS_SYS_NERR], +[Platforms/compiler lacks the sys_nerr variable (e.g., VxWorks and MVS).]) + +AH_TEMPLATE([ACE_LACKS_SYSV_MSG_H], +[Platform lacks sys/msg.h (e.g., Chorus and VxWorks)]) + +AH_TEMPLATE([ACE_LACKS_SYSV_MSQ_PROTOS], +[Platform lacks SYSV message queue prototypes]) + +AH_TEMPLATE([ACE_LACKS_KEY_T], +[Platform lacks key_t (e.g., Chorus, VxWorks, Win32)]) + +AH_TEMPLATE([ACE_LACKS_SENDMSG],[Platform lacks sendmsg()]) + +AH_TEMPLATE([ACE_LACKS_SI_ADDR], +[Platform lacks the si_addr field of siginfo_t (e.g., VxWorks and + HP/UX 10.x)]) + +AH_TEMPLATE([ACE_LACKS_SYSV_SHMEM], +[Platform lacks System V shared memory (e.g., Win32 and VxWorks)]) + +AH_TEMPLATE([ACE_LACKS_SIGINFO_H], +[Platform lacks the siginfo.h include file (e.g., MVS)]) + +AH_TEMPLATE([ACE_LACKS_SOCKET_BUFSIZ], +[Platform doesn't support SO_SNDBUF/SO_RCVBUF (used in TAO)]) + +AH_TEMPLATE([ACE_LACKS_SOCKETPAIR], +[Platform lacks the socketpair() call (e.g., SCO UNIX)]) + +AH_TEMPLATE([ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES], +[Compiler doesn't support static data member templates]) + +AH_TEMPLATE([ACE_LACKS_STRCASECMP], +[Compiler/platform lacks strcasecmp() (e.g., DG/UX, UNIXWARE, VXWORKS)]) + +AH_TEMPLATE([ACE_LACKS_STRRECVFD],[Platform doesn't define struct strrecvfd.]) + +AH_TEMPLATE([ACE_LACKS_SYSCALL],[Platform doesn't have syscall() prototype]) + +AH_TEMPLATE([ACE_LACKS_SYS_TYPES_H],[Platform lacks <sys/types.h> header file]) + +AH_TEMPLATE([ACE_LACKS_T_ERRNO],[Header files lack t_errno for TLI]) + +AH_TEMPLATE([ACE_LACKS_TCP_H],[Platform doesn't have netinet/tcp.h]) + +AH_TEMPLATE([ACE_LACKS_TCP_NODELAY],[OS does not support TCP_NODELAY]) + +AH_TEMPLATE([ACE_LACKS_THREAD_PROCESS_SCOPING], +[Platform lacks pthread_attr_setscope()]) + +AH_TEMPLATE([ACE_LACKS_THREAD_STACK_SIZE], +[Platform lacks pthread_attr_setstacksize() (e.g., Linux pthreads)]) + +AH_TEMPLATE([ACE_LACKS_TIMEDWAIT_PROTOTYPES], +[MIT pthreads platform lacks the timedwait prototypes]) + +AH_TEMPLATE([ACE_LACKS_TIMESPEC_T], +[Platform does not define timepec_t as a typedef for struct timespec.]) + +AH_TEMPLATE([ACE_LACKS_TRUNCATE], +[Platform doesn't have truncate() (e.g., vxworks)]) + +AH_TEMPLATE([ACE_LACKS_GETPGID_PROTOTYPE], +[Platform/compiler lacks the getpgid() prototype]) + +AH_TEMPLATE([ACE_LACKS_SETREGID_PROTOTYPE], +[Platform/compiler lacks the setregid() prototype]) + +AH_TEMPLATE([ACE_LACKS_SETREUID_PROTOTYPE], +[Platform/compiler lacks the setreuid() prototype]) + +AH_TEMPLATE([ACE_LACKS_STRPTIME_PROTOTYPE], +[Platform/compiler lacks the strptime() prototype]) + +AH_TEMPLATE([ACE_LACKS_STRTOK_R_PROTOTYPE], +[Platform/compiler lacks the strtok_r() prototype]) + +AH_TEMPLATE([ACE_LACKS_LSEEK64_PROTOTYPE], +[Platform/compiler lacks the lseek64() prototype. This should not + be defined if ACE_LACKS_LLSEEK_PROTOTYPE is defined.]) + +AH_TEMPLATE([ACE_LACKS_LLSEEK_PROTOTYPE], +[Platform/compiler lacks the llseek() prototype. This should not + be defined if ACE_LACKS_LSEEK64_PROTOTYPE is defined.]) + +AH_TEMPLATE([ACE_LACKS_PREAD_PROTOTYPE], +[Platform/compiler lacks the pread() and pwrite() prototypes]) + +AH_TEMPLATE([ACE_LACKS_UALARM_PROTOTYPE], +[Platform/compiler lacks the ualarm() prototype (e.g., Solaris)]) + +AH_TEMPLATE([ACE_LACKS_CHAR_RIGHT_SHIFTS], +[Compiler does not have any istream operator>> for chars, u_chars, or + signed chars.]) + +AH_TEMPLATE([ACE_LACKS_CHAR_STAR_RIGHT_SHIFTS], +[Compiler does not have operator>> (istream &, u_char *) or + operator>> (istream &, signed char *)]) + +AH_TEMPLATE([ACE_LACKS_UCONTEXT_H],[Platform lacks the ucontext.h file]) + +AH_TEMPLATE([ACE_LACKS_UNISTD_H], +[Platform lacks the unistd.h file (e.g., VxWorks and Win32) ]) + +AH_TEMPLATE([ACE_LACKS_UNIX_DOMAIN_SOCKETS], +[ACE platform has no UNIX domain sockets]) + +AH_TEMPLATE([ACE_LACKS_UNIX_SIGNALS], +[Platform lacks full signal support (e.g., Win32 and Chorus).]) + +AH_TEMPLATE([ACE_LACKS_UTSNAME_T], +[Platform lacks struct utsname (e.g., Win32 and VxWorks)]) + +AH_TEMPLATE([ACE_LACKS_WCHAR_T],[Platform lacks wchar_t typedef]) + +AH_TEMPLATE([ACE_LACKS_WILDCARD_BIND], +[The bind() call will not select the port if it's 0.]) + +AH_TEMPLATE([ACE_MAIN], +[Renames "main (int, char *[])", for platforms such as g++/VxWorks + that don't allow main. Requires the use of + ACE_HAS_NONSTATIC_OBJECT_MANAGER.]) + +AH_TEMPLATE([ACE_MT_SAFE],[Compile using multi-thread libraries]) + +AH_TEMPLATE([ACE_NDEBUG],[Turns off debugging features]) + +AH_TEMPLATE([ACE_NEEDS_DEV_IO_CONVERSION], +[Necessary with some compilers to pass ACE_TTY_IO as parameter to + DEV_Connector.]) + +AH_TEMPLATE([ACE_NEEDS_HUGE_THREAD_STACKSIZE], +[Required by platforms with small default stacks.]) + +AH_TEMPLATE([ACE_NEEDS_LWP_PRIO_SET], +[OS has LWPs, and when the priority of a bound thread is set, then + the LWP priority must be set also.]) + +AH_TEMPLATE([ACE_LACKS_READV], +[Platform doesn't define readv, so use our own]) + +AH_TEMPLATE([ACE_LACKS_WRITEV], +[Platform doesn't define writev, so use our own]) + +AH_TEMPLATE([ACE_NEEDS_REGEXPR_H], +[Platform needs regexpr.h for regular expression support]) + +AH_TEMPLATE([ACE_NEEDS_SCHED_H], +[Platform needs to #include <sched.h> to get thread scheduling defs.]) + +AH_TEMPLATE([ACE_LACKS_SYSTIME_H], +[<time.h> doesn't automatically #include <sys/time.h>]) + +AH_TEMPLATE([ACE_NEW_THROWS_EXCEPTIONS], +[Compiler's 'new' throws exception on failure (ANSI C++ behavior).]) + +AH_TEMPLATE([ACE_NLOGGING], +[Turns off the LM_DEBUG and LM_ERROR logging macros...]) + +AH_TEMPLATE([ACE_NTRACE],[Turns off the tracing feature.]) + +AH_TEMPLATE([ACE_PAGE_SIZE], +[Defines the page size of the system (not used on Win32 or with + ACE_HAS_GETPAGESIZE).]) + +AH_TEMPLATE([ACE_REDEFINES_XTI_FUNCTIONS], +[Platform redefines the t_... names (UnixWare)]) + +AH_TEMPLATE([ACE_SELECT_USES_INT], +[Platform uses int for select() rather than fd_set]) + +AH_TEMPLATE([ACE_TEMPLATES_REQUIRE_PRAGMA], +[Compiler's template mechanism must use a pragma. This is used for + AIX's C++ compiler.]) + +AH_TEMPLATE([ACE_TEMPLATES_REQUIRE_SOURCE], +[Compiler's template mechanim must see source code (i.e., .cpp + files). This is used for GNU G++.]) + +AH_TEMPLATE([ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION], +[Compiler's template instantiation mechanism supports the use of + explicit C++ specializations for all used templates. This is also + used for GNU G++ if you don't use the "repo" patches.]) + +AH_TEMPLATE([ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA], +[Compiler's template instantiation mechanism supports the use of + "#pragma instantiate". Edison Design Group compilers, e.g., SGI + C++ and Green Hills 1.8.8 and later, support this.]) + +AH_TEMPLATE([ACE_NEEDS_FUNC_DEFINITIONS], +[Compiler requires a definition for a "hidden" function, e.g., a + private, unimplemented copy constructor or assignment operator. + The SGI C++ compiler needs this, in template classes, with + ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA.]) + +AH_TEMPLATE([ACE_TLI_TCP_DEVICE], +[Device the platform uses for TCP on TLI. Only needed if not + /dev/tcp.]) + +AH_TEMPLATE([ACE_USE_POLL], +[The OS/platform supports the poll() event demultiplexor]) + +AH_TEMPLATE([ACE_POLL_IS_BROKEN],[Platform has broken poll()]) + +AH_TEMPLATE([ACE_USES_ASM_SYMBOL_IN_DLSYM], +[Platform uses assembly symbols instead of C symbols in dlsym()]) + +AH_TEMPLATE([ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB], +[Platform has its standard c++ library in the namespace std.]) + +AH_TEMPLATE([HAVE_RESTARTABLE_SYSCALLS],[]) + +]) dnl End ACE_PREP_CONFIG_HEADER diff --git a/m4/features.m4 b/m4/features.m4 index 2817698a83f..1b1b91e806d 100644 --- a/m4/features.m4 +++ b/m4/features.m4 @@ -8,7 +8,7 @@ dnl that determine availablility of certain OS features for ACE. dnl dnl ------------------------------------------------------------------------- -dnl Copyright (C) 1998, 1999 Ossama Othman +dnl Copyright (C) 1998, 1999, 2002 Ossama Othman dnl dnl All Rights Reserved dnl @@ -23,11 +23,12 @@ dnl Asynchronous IO check dnl Use this macro to determine if asynchronous IO is working on a dnl given platform. dnl Usage: ACE_CHECK_ASYNCH_IO -AC_DEFUN(ACE_CHECK_ASYNCH_IO, dnl +AC_DEFUN([ACE_CHECK_ASYNCH_IO], [ AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) - AC_REQUIRE([AC_LANG_CPLUSPLUS]) + AC_LANG([C++]) + AC_REQUIRE([AC_LANG]) AC_REQUIRE([ACE_CHECK_THREADS]) dnl In case a library with the asynchronous libraries is found but @@ -42,15 +43,14 @@ AC_DEFUN(ACE_CHECK_ASYNCH_IO, dnl dnl In some cases, the thread library must be linked to in addition to the dnl real-time support library. As such, make sure these checks are done dnl after the thread library checks. - ACE_SEARCH_LIBS([aio_read], [aio rt posix4], + AC_SEARCH_LIBS([aio_read], [aio rt posix4], [ace_has_aio_funcs=yes], [ace_has_aio_funcs=no]) if test "$ace_has_aio_funcs" = yes; then ACE_CACHE_CHECK([for working asynchronous IO], [ace_cv_feature_aio_calls], [ - AC_TRY_RUN( - [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #ifndef ACE_LACKS_UNISTD_H #include <unistd.h> #endif @@ -252,7 +252,7 @@ Test_Aio::do_aio (void) } int -main (int argc, char **argv) +main () { Test_Aio test_aio; @@ -273,8 +273,7 @@ main (int argc, char **argv) // "ACE_POSIX_AIOCB_PROACTOR should work in this platform\n"); return 0; } - ], - [ + ]])],[ dnl Now try another test dnl Create a file for the test program to read. @@ -286,8 +285,8 @@ FOO BAR FOO BAR FOO BAR FOO BAR FOO BAR FOO BAR FOO BAR EOF - AC_TRY_RUN( - [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #ifndef ACE_LACKS_UNISTD_H #include <unistd.h> #endif @@ -311,11 +310,11 @@ extern "C" #endif void null_handler (int /* signal_number */, siginfo_t * /* info */, - void * /* context */); + void * /* context */); int file_handle = -1; -char mb1 [BUFSIZ + 1]; -char mb2 [BUFSIZ + 1]; +char mb1[BUFSIZ + 1]; +char mb2[BUFSIZ + 1]; aiocb aiocb1, aiocb2; sigset_t completion_signal; @@ -569,22 +568,21 @@ null_handler (int /* signal_number */, } int -main (int, char *[]) +main () { if (test_aio_calls () == 0) { - //printf ("RT SIG test successful:\n" - // "ACE_POSIX_SIG_PROACTOR should work in this platform\n"); + // printf ("RT SIG test successful:\n" + // "ACE_POSIX_SIG_PROACTOR should work in this platform\n"); return 0; } - else - { - //printf ("RT SIG test failed:\n" - // "ACE_POSIX_SIG_PROACTOR may not work in this platform\n"); + + //printf ("RT SIG test failed:\n" + // "ACE_POSIX_SIG_PROACTOR may not work in this platform\n"); return -1; - } + } - ], + ]])], [ ace_cv_feature_aio_calls=yes ], @@ -599,21 +597,19 @@ main (int, char *[]) dnl from complaining. ace_just_a_place_holder=ignoreme ]) - ], - [ + ],[ ace_cv_feature_aio_calls=no - ], - [ + ],[ dnl Asynchronous IO test for cross-compiled platforms dnl This test is weaker than the above run-time tests but it will dnl have to do. - AC_TRY_COMPILE( - [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ #include <aio.h> - ], - [ + ]], + [[ aiocb* aiocb_ptr (void); - ], + ]])], [ ace_cv_feature_aio_calls=yes ], @@ -621,6 +617,6 @@ main (int, char *[]) ace_cv_feature_aio_calls=no ]) ]) - ],[AC_DEFINE(ACE_HAS_AIO_CALLS)],[LIBS="$ace_save_LIBS"]) + ],[AC_DEFINE([ACE_HAS_AIO_CALLS])],[LIBS="$ace_save_LIBS"]) fi dnl test "$ace_has_aio_funcs" = yes ]) diff --git a/m4/platform.m4 b/m4/platform.m4 index 8d97cbb55cf..392cf57959f 100644 --- a/m4/platform.m4 +++ b/m4/platform.m4 @@ -9,7 +9,7 @@ dnl to define. dnl dnl ------------------------------------------------------------------------- -dnl Copyright (C) 1998, 1999, 2000 Ossama Othman +dnl Copyright (C) 1998, 1999, 2000, 2002 Ossama Othman dnl dnl All Rights Reserved dnl @@ -22,7 +22,7 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dnl Check for thread related libraries and compiler flags dnl Usage: ACE_SET_PLATFORM_MACROS -AC_DEFUN(ACE_SET_PLATFORM_MACROS, dnl +AC_DEFUN([ACE_SET_PLATFORM_MACROS], [ dnl Begin ACE_SET_PLATFORM_MACROS @@ -34,30 +34,30 @@ dnl ACE source tree. dnl Platform specific flags case "$host" in *aix3*) - AC_DEFINE(AIX) - AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) + AC_DEFINE([AIX]) + AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)]) ;; *aix4.1*) - AC_DEFINE(AIX) + 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(). ACE_CPPFLAGS="$ACE_CPPFLAGS -D_BSD=44" dnl pre-AIX 4.3 requires _BSD_INCLUDES ACE_CPPFLAGS="$ACE_CPPFLAGS -D_BSD_INCLUDES" - AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) - AC_DEFINE(ACE_HAS_AIX_BROKEN_SOCKET_HEADER) + AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)]) + AC_DEFINE([ACE_HAS_AIX_BROKEN_SOCKET_HEADER]) ;; *aix4.2*) - AC_DEFINE(AIX) + AC_DEFINE([AIX]) dnl pre-AIX 4.3 requires _BSD_INCLUDES ACE_CPPFLAGS="$ACE_CPPFLAGS -D_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") + 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"]) ;; *aix*) - AC_DEFINE(AIX) + AC_DEFINE([AIX]) ;; t3e-cray-unicosmk*) ACE_CPPFLAGS="$ACE_CPPFLAGS -D_CRAYMPP -D_CRAYT3E -D_UNICOS" @@ -69,127 +69,127 @@ dnl AC_DEFINE(ACE_HAS_AIX_BROKEN_SOCKET_HEADER) ACE_CPPFLAGS="$ACE_CPPFLAGS -D_UNICOS" ;; *dgux4.11*) - AC_DEFINE(ACE_DGUX) - AC_DEFINE(IP_ADD_MEMBERSHIP, 0x13) - AC_DEFINE(IP_DROP_MEMBERSHIP, 0x14) + AC_DEFINE([ACE_DGUX]) + AC_DEFINE([IP_ADD_MEMBERSHIP], [0x13]) + AC_DEFINE([IP_DROP_MEMBERSHIP], [0x14]) ACE_CPPFLAGS="$ACE_CPPFLAGS -D_POSIX_SOURCE -D_DGUX_SOURCE" ;; *dgux4*) - AC_DEFINE(ACE_DGUX) - AC_DEFINE(IP_ADD_MEMBERSHIP, 0x13) - AC_DEFINE(IP_DROP_MEMBERSHIP, 0x14) + AC_DEFINE([ACE_DGUX]) + AC_DEFINE([IP_ADD_MEMBERSHIP], [0x13]) + AC_DEFINE([IP_DROP_MEMBERSHIP], [0x14]) ACE_CPPFLAGS="$ACE_CPPFLAGS -D_POSIX4A_DRAFT10_SOURCE -D_POSIX4_DRAFT_SOURCE" ;; *freebsd*) ;; *fsu*) dnl FIXME: "FSU" isn't a platform! We need to move this somewhere. - AC_DEFINE(PTHREAD_STACK_MIN, (1024*10)) + AC_DEFINE([PTHREAD_STACK_MIN], [(1024*10)]) ;; *hpux9*) - AC_DEFINE(HPUX) + AC_DEFINE([HPUX]) ;; *hpux10*) - AC_DEFINE(HPUX) - AC_DEFINE(HPUX_10) + AC_DEFINE([HPUX]) + AC_DEFINE([HPUX_10]) ACE_CPPFLAGS="$ACE_CPPFLAGS -D_HPUX_SOURCE" - AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) - AC_DEFINE(ACE_TLI_TCP_DEVICE, "/dev/inet_cots") + AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)]) + AC_DEFINE([ACE_TLI_TCP_DEVICE], ["/dev/inet_cots"]) ;; *hpux11*) - AC_DEFINE(HPUX) - AC_DEFINE(HPUX_11) - AC_EGREP_CPP(ACE_ON_64BIT_HP, + AC_DEFINE([HPUX]) + AC_DEFINE([HPUX_11]) + AC_EGREP_CPP([ACE_ON_64BIT_HP], [ #ifdef __LP64__ ACE_ON_64BIT_HP #endif ], [ - AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x0000001100000000)) - AC_DEFINE(ACE_DEFAULT_BASE_ADDRL, ((char *) 0x0000001100000000)) + AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x0000001100000000)]) + AC_DEFINE([ACE_DEFAULT_BASE_ADDRL], [((char *) 0x0000001100000000)]) ], [ - AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) + AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)]) ]) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) ;; *irix5.2*) - AC_DEFINE(IRIX5) + AC_DEFINE([IRIX5]) ;; *irix5.3*) - AC_DEFINE(IRIX5) - if test -z "$GXX"; then + AC_DEFINE([IRIX5]) + if test "$GXX" = no; then ACE_CPPFLAGS="$ACE_CPPFLAGS -D_BSD_TYPES" fi ;; *irix6*) - AC_DEFINE(IRIX6) - AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) (1024U * 1024 * 1024))) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) + AC_DEFINE([IRIX6]) + AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) (1024U * 1024 * 1024))]) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) ACE_CPPFLAGS="$ACE_CPPFLAGS -D_SGI_MP_SOURCE -D_MODERN_C_" case "$host" in *irix6.2*) dnl Recent versions of IRIX do not appear to require this macro. if test "$ace_user_enable_threads" = yes; then - AC_DEFINE(ACE_HAS_IRIX62_THREADS) + AC_DEFINE([ACE_HAS_IRIX62_THREADS]) fi ;; esac ;; *linux*) - AC_DEFINE(ACE_DEFAULT_MAX_SOCKET_BUFSIZ, 65535) - AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) - AC_DEFINE(ACE_HAS_BIG_FD_SET) dnl FIXME: We need a test for this! - AC_DEFINE(ACE_UINT64_FORMAT_SPECIFIER, "%Lu") - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) + AC_DEFINE([ACE_DEFAULT_MAX_SOCKET_BUFSIZ], [65535]) + AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)]) + AC_DEFINE([ACE_HAS_BIG_FD_SET]) dnl FIXME: We need a test for this! + AC_DEFINE([ACE_UINT64_FORMAT_SPECIFIER], ["%Lu"]) + 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) - AC_DEFINE(ACE_HAS_LYNXOS_SIGNALS) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) + 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]) + AC_DEFINE([ACE_HAS_LYNXOS_SIGNALS]) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) ;; *m88k*) - AC_DEFINE(m88k) - AC_DEFINE(__m88k__) - AC_DEFINE(IP_ADD_MEMBERSHIP, 0x13) - AC_DEFINE(IP_DROP_MEMBERSHIP, 0x14) + AC_DEFINE([m88k]) + AC_DEFINE([__m88k__]) + AC_DEFINE([IP_ADD_MEMBERSHIP], [0x13]) + AC_DEFINE([IP_DROP_MEMBERSHIP], [0x14]) ;; *mvs*) ACE_CPPFLAGS="$ACE_CPPFLAGS -D_ALL_SOURCE" ;; *netbsd*) - AC_DEFINE(ACE_NETBSD) + AC_DEFINE([ACE_NETBSD]) ;; *osf3.2*) - AC_EGREP_CPP(ACE_DEC_CXX, + AC_EGREP_CPP([ACE_DEC_CXX], [ #if defined(__DECCXX) ACE_DEC_CXX #endif ], [ - AC_DEFINE(DEC_CXX) + AC_DEFINE([DEC_CXX]) ],) ;; *osf4.0*) dnl We need to add checks for g++, DEC C++ and Rational C++ - AC_EGREP_CPP(ACE_DEC_CXX, + AC_EGREP_CPP([ACE_DEC_CXX], [ #if defined(__DECCXX) ACE_DEC_CXX #endif ], [ - AC_DEFINE(DEC_CXX) + AC_DEFINE([DEC_CXX]) ],) dnl Check for _POSIX_C_SOURCE macro - AC_EGREP_CPP(ACE_ON_DEC_WITH_POS_SRC, + AC_EGREP_CPP([ACE_ON_DEC_WITH_POS_SRC], [ /* Include unistd.h to define _POSIX_C_SOURCE. */ #ifndef ACE_LACKS_UNISTD_H @@ -201,95 +201,95 @@ dnl Check for _POSIX_C_SOURCE macro #endif ], [ - AC_DEFINE(DIGITAL_UNIX) + AC_DEFINE([DIGITAL_UNIX]) ],) - AC_DEFINE(ACE_DEFAULT_BASE_ADDR, ((char *) 0x80000000)) - AC_DEFINE(ACE_NEEDS_HUGE_THREAD_STACKSIZE, (1024 * 1024)) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) + AC_DEFINE([ACE_DEFAULT_BASE_ADDR], [((char *) 0x80000000)]) + AC_DEFINE([ACE_NEEDS_HUGE_THREAD_STACKSIZE], [(1024 * 1024)]) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) ;; *psos*) - AC_DEFINE(ACE_PSOS) - AC_DEFINE(ACE_PSOSIM) - AC_DEFINE(ACE_PSOSTBD) + AC_DEFINE([ACE_PSOS]) + AC_DEFINE([ACE_PSOSIM]) + AC_DEFINE([ACE_PSOSTBD]) dnl need ACE_HAS_TSS_EMULATION for ACE_DEFAULT_THREAD_KEYS! - AC_EGREP_CPP(ACE_TSS_EMULATION, + AC_EGREP_CPP([ACE_TSS_EMULATION], [ #if defined (ACE_HAS_TSS_EMULATION) ACE_TSS_EMULATION #endif - ], AC_DEFINE(ACE_DEFAULT_THREAD_KEYS, 256),) - AC_DEFINE(ACE_MAIN, extern "C" void root) - AC_DEFINE(ACE_MALLOC_ALIGN, 8) - AC_DEFINE(ACE_USE_RCSID, 0) + ], [AC_DEFINE([ACE_DEFAULT_THREAD_KEYS], [256])],[]) + AC_DEFINE([ACE_MAIN], [extern "C" void root]) + AC_DEFINE([ACE_MALLOC_ALIGN], [8]) + AC_DEFINE([ACE_USE_RCSID], [0]) ;; *sco4.2*) - AC_DEFINE(SCO) - AC_DEFINE(ACE_DEFAULT_CLOSE_ALL_HANDLES, 0) + AC_DEFINE([SCO]) + AC_DEFINE([ACE_DEFAULT_CLOSE_ALL_HANDLES], [0]) ;; *sco5*) ACE_CPPFLAGS="$ACE_CPPFLAGS -D_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! + 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! ;; *sunos4*) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) ;; *solaris2.4*) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) - AC_DEFINE(ACE_NEEDS_LWP_PRIO_SET) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) + AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET]) ;; *solaris2.5*) - AC_DEFINE(ACE_MALLOC_ALIGN, 8) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) - AC_DEFINE(ACE_NEEDS_LWP_PRIO_SET) + AC_DEFINE([ACE_MALLOC_ALIGN], [8]) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) + AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET]) ;; *solaris2.6*) - AC_DEFINE(ACE_MALLOC_ALIGN, 8) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) - AC_DEFINE(ACE_NEEDS_LWP_PRIO_SET) + AC_DEFINE([ACE_MALLOC_ALIGN], [8]) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) + AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET]) ;; *solaris2.7*) - AC_DEFINE(ACE_MALLOC_ALIGN, 8) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) - AC_DEFINE(ACE_NEEDS_LWP_PRIO_SET) + AC_DEFINE([ACE_MALLOC_ALIGN], [8]) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) + AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET]) ;; *86*solaris*) - AC_DEFINE(ACE_HAS_X86_STAT_MACROS) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) - AC_DEFINE(ACE_NEEDS_LWP_PRIO_SET) + AC_DEFINE([ACE_HAS_X86_STAT_MACROS]) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) + AC_DEFINE([ACE_NEEDS_LWP_PRIO_SET]) ;; *tandem*) - AC_DEFINE(ACE_TIMER_SKEW, (1000 * 10)) + AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)]) ;; *unixware2.0*) - AC_DEFINE(UNIXWARE) - AC_DEFINE(UNIXWARE_2_0) + AC_DEFINE([UNIXWARE]) + AC_DEFINE([UNIXWARE_2_0]) ;; *unixware2.1*) - AC_DEFINE(UNIXWARE) - AC_DEFINE(UNIXWARE_2_1) + AC_DEFINE([UNIXWARE]) + AC_DEFINE([UNIXWARE_2_1]) ;; *vxworks*) - AC_DEFINE(VXWORKS) - AC_DEFINE(ACE_MAIN, ace_main) - AC_DEFINE(ACE_DEFAULT_MAX_SOCKET_BUFSIZ, 32768) + AC_DEFINE([VXWORKS]) + AC_DEFINE([ACE_MAIN], [ace_main]) + AC_DEFINE([ACE_DEFAULT_MAX_SOCKET_BUFSIZ], [32768]) dnl need ACE_HAS_TSS_EMULATION for ACE_DEFAULT_THREAD_KEYS! - AC_EGREP_CPP(ACE_TSS_EMULATION, + AC_EGREP_CPP([ACE_TSS_EMULATION], [ #if defined (ACE_HAS_TSS_EMULATION) ACE_TSS_EMULATION #endif - ], AC_DEFINE(ACE_DEFAULT_THREAD_KEYS, 16),) - AC_DEFINE(ACE_THR_PRI_FIFO_DEF, 101) - AC_DEFINE(ACE_USE_RCSID, 0) + ], [AC_DEFINE([ACE_DEFAULT_THREAD_KEYS], [16])],[]) + AC_DEFINE([ACE_THR_PRI_FIFO_DEF], [101]) + AC_DEFINE([ACE_USE_RCSID], [0]) ;; *cygwin32*) - AC_DEFINE(CYGWIN32) + AC_DEFINE([CYGWIN32]) ;; *win32*) - AC_DEFINE(ACE_WIN32) - AC_DEFINE(ACE_UINT64_FORMAT_SPECIFIER, "%I64u") + AC_DEFINE([ACE_WIN32]) + AC_DEFINE([ACE_UINT64_FORMAT_SPECIFIER], ["%I64u"]) dnl AC_DEFINE(ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL) if test "$ace_u_long_long_typedef_set" != yes; then ACE_UINT64="unsigned __int64" @@ -307,7 +307,7 @@ dnl AC_DEFINE(ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL) changequote(, )dnl i[3456]86*) changequote([, ])dnl - if test -n "$GXX"; then + if test "$GXX" = yes; then # Neutrino defines memcpy as a macro on x86, which then # hoses the ACE_OS::memcpy() method. Undefining # __OPTIMIZE__ prevents this from happening. diff --git a/m4/subsets.m4 b/m4/subsets.m4 index 0b241612f7c..69a6fe5274e 100644 --- a/m4/subsets.m4 +++ b/m4/subsets.m4 @@ -22,16 +22,15 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dnl Check for thread related libraries and compiler flags dnl Usage: ACE_CHECK_SUBSETS -AC_DEFUN(ACE_CHECK_SUBSETS, dnl +AC_DEFUN([ACE_CHECK_SUBSETS], [ - dnl Begin ACE_CHECK_SUBSETS dnl Assume all subsets will be built, including the full ACE library. dnl If any of the components is explicitly enabled or disabled by the user dnl then do NOT build the full ACE library. -AC_ARG_ENABLE(lib-all, - [ --enable-lib-all build all ACE components [default=no]], +AC_ARG_ENABLE([lib-all], + AC_HELP_STRING([--enable-lib-all],[build all ACE components [[no]]]), [ case "${enableval}" in yes) @@ -41,7 +40,7 @@ AC_ARG_ENABLE(lib-all, ace_user_enable_lib_all=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-all) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-all]) ;; esac ], @@ -49,8 +48,8 @@ AC_ARG_ENABLE(lib-all, ace_user_enable_lib_all=no ]) -AC_ARG_ENABLE(lib-full, - [ --enable-lib-full build the full ACE library [default=yes]], +AC_ARG_ENABLE([lib-full], + AC_HELP_STRING([--enable-lib-full],[build the full ACE library [[yes]]]), [ case "${enableval}" in yes) @@ -60,7 +59,7 @@ AC_ARG_ENABLE(lib-full, ace_user_enable_lib_full=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-full) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-full]) ;; esac ], @@ -68,8 +67,8 @@ AC_ARG_ENABLE(lib-full, ace_user_enable_lib_full=yes ]) -AC_ARG_ENABLE(lib-os, - [ --enable-lib-os build libACE_OS library ], +AC_ARG_ENABLE([lib-os], + AC_HELP_STRING([--enable-lib-os],[build ACE_OS library]), [ case "${enableval}" in yes) @@ -79,7 +78,7 @@ AC_ARG_ENABLE(lib-os, ace_user_enable_lib_os=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-os) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-os]) ;; esac @@ -87,8 +86,8 @@ AC_ARG_ENABLE(lib-os, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-utils, - [ --enable-lib-utils build libACE_Utils library ], +AC_ARG_ENABLE([lib-utils], + AC_HELP_STRING([--enable-lib-utils],[build ACE_Utils library]), [ case "${enableval}" in yes) @@ -98,7 +97,7 @@ AC_ARG_ENABLE(lib-utils, ace_user_enable_lib_utils=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-utils) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-utils]) ;; esac @@ -106,8 +105,8 @@ AC_ARG_ENABLE(lib-utils, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-logging, - [ --enable-lib-logging build libACE_Logging library ], +AC_ARG_ENABLE([lib-logging], + AC_HELP_STRING([--enable-lib-logging],[build ACE_Logging library]), [ case "${enableval}" in yes) @@ -117,7 +116,7 @@ AC_ARG_ENABLE(lib-logging, ace_user_enable_lib_logging=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-logging) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-logging]) ;; esac @@ -125,8 +124,8 @@ AC_ARG_ENABLE(lib-logging, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-threads, - [ --enable-lib-threads build libACE_Threads library ], +AC_ARG_ENABLE([lib-threads], + AC_HELP_STRING([--enable-lib-threads],[build ACE_Threads library]), [ case "${enableval}" in yes) @@ -136,7 +135,7 @@ AC_ARG_ENABLE(lib-threads, ace_user_enable_lib_threads=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-threads) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-threads]) ;; esac @@ -144,8 +143,8 @@ AC_ARG_ENABLE(lib-threads, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-demux, - [ --enable-lib-demux build libACE_Demux library ], +AC_ARG_ENABLE([lib-demux], + AC_HELP_STRING([--enable-lib-demux],[build ACE_Demux library]), [ case "${enableval}" in yes) @@ -155,7 +154,7 @@ AC_ARG_ENABLE(lib-demux, ace_user_enable_lib_demux=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-demux) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-demux]) ;; esac @@ -163,8 +162,8 @@ AC_ARG_ENABLE(lib-demux, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-connection, - [ --enable-lib-connection build libACE_Connection library ], +AC_ARG_ENABLE([lib-connection], + AC_HELP_STRING([--enable-lib-connection],[build ACE_Connection library ]), [ case "${enableval}" in yes) @@ -174,7 +173,7 @@ AC_ARG_ENABLE(lib-connection, ace_user_enable_lib_connection=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-connection) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-connection]) ;; esac @@ -182,8 +181,8 @@ AC_ARG_ENABLE(lib-connection, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-sockets, - [ --enable-lib-sockets build libACE_Sockets library ], +AC_ARG_ENABLE([lib-sockets], + AC_HELP_STRING([--enable-lib-sockets],[build ACE_Sockets library]), [ case "${enableval}" in yes) @@ -193,7 +192,7 @@ AC_ARG_ENABLE(lib-sockets, ace_user_enable_lib_sockets=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-sockets) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-sockets]) ;; esac @@ -201,8 +200,8 @@ AC_ARG_ENABLE(lib-sockets, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-ipc, - [ --enable-lib-ipc build libACE_IPC library ], +AC_ARG_ENABLE([lib-ipc], + AC_HELP_STRING([--enable-lib-ipc],[build ACE_IPC library]), [ case "${enableval}" in yes) @@ -212,7 +211,7 @@ AC_ARG_ENABLE(lib-ipc, ace_user_enable_lib_ipc=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-ipc) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-ipc]) ;; esac @@ -220,8 +219,8 @@ AC_ARG_ENABLE(lib-ipc, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-svcconf, - [ --enable-lib-svcconf build libACE_Svcconf library ], +AC_ARG_ENABLE([lib-svcconf], + AC_HELP_STRING([--enable-lib-svcconf],[build ACE_Svcconf library]), [ case "${enableval}" in yes) @@ -229,10 +228,10 @@ AC_ARG_ENABLE(lib-svcconf, ;; no) ace_user_enable_lib_svcconf=no - AC_DEFINE(ACE_LACKS_ACE_SVCCONF) + AC_DEFINE([ACE_LACKS_ACE_SVCCONF]) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-svcconf) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-svcconf]) ;; esac @@ -240,8 +239,8 @@ AC_ARG_ENABLE(lib-svcconf, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-streams, - [ --enable-lib-streams build libACE_Streams library ], +AC_ARG_ENABLE([lib-streams], + AC_HELP_STRING([--enable-lib-streams],[build ACE_Streams library]), [ case "${enableval}" in yes) @@ -251,7 +250,7 @@ AC_ARG_ENABLE(lib-streams, ace_user_enable_lib_streams=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-streams) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-streams]) ;; esac @@ -259,8 +258,8 @@ AC_ARG_ENABLE(lib-streams, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-memory, - [ --enable-lib-memory build libACE_Memory library ], +AC_ARG_ENABLE([lib-memory], + AC_HELP_STRING([--enable-lib-memory],[build ACE_Memory library]), [ case "${enableval}" in yes) @@ -270,7 +269,7 @@ AC_ARG_ENABLE(lib-memory, ace_user_enable_lib_memory=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-memory) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-memory]) ;; esac @@ -279,8 +278,8 @@ AC_ARG_ENABLE(lib-memory, ],) -AC_ARG_ENABLE(lib-timer, - [ --enable-lib-timer build libACE_Timer library ], +AC_ARG_ENABLE([lib-timer], + AC_HELP_STRING([--enable-lib-timer],[build ACE_Timer library]), [ case "${enableval}" in yes) @@ -290,7 +289,7 @@ AC_ARG_ENABLE(lib-timer, ace_user_enable_lib_timer=no ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-timer) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-timer]) ;; esac @@ -298,8 +297,8 @@ AC_ARG_ENABLE(lib-timer, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-token, - [ --enable-lib-token build libACE_Token library ], +AC_ARG_ENABLE([lib-token], + AC_HELP_STRING([--enable-lib-token],[build ACE_Token library]), [ case "${enableval}" in yes) @@ -307,10 +306,10 @@ AC_ARG_ENABLE(lib-token, ;; no) ace_user_enable_lib_token=no - AC_DEFINE(ACE_LACKS_ACE_TOKEN) + AC_DEFINE([ACE_LACKS_ACE_TOKEN]) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-token) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-token]) ;; esac @@ -318,8 +317,28 @@ AC_ARG_ENABLE(lib-token, ace_user_enable_lib_full=no ],) -AC_ARG_ENABLE(lib-other, - [ --enable-lib-other build libACE_Other library ], +AC_ARG_ENABLE([lib-codecs], + AC_HELP_STRING([--enable-lib-codecs],[build ACE_Codecs library]), + [ + case "${enableval}" in + yes) + ACE_CREATE_LIBACE_CODECS + ;; + no) + ace_user_enable_lib_codecs=no + AC_DEFINE([ACE_LACKS_ACE_CODECS]) + ;; + *) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-codecs]) + ;; + esac + + dnl Disable full ACE library build + ace_user_enable_lib_full=no + ],) + +AC_ARG_ENABLE([lib-other], + AC_HELP_STRING([--enable-lib-other],[build ACE_Other library]), [ case "${enableval}" in yes) @@ -327,10 +346,10 @@ AC_ARG_ENABLE(lib-other, ;; no) ace_user_enable_lib_other=no - AC_DEFINE(ACE_LACKS_ACE_OTHER) + AC_DEFINE([ACE_LACKS_ACE_OTHER]) ;; *) - AC_MSG_ERROR(bad value ${enableval} for --enable-lib-other) + AC_MSG_ERROR([bad value ${enableval} for --enable-lib-other]) ;; esac @@ -365,10 +384,11 @@ if test $ace_user_enable_lib_full = no && test $ace_user_enable_lib_memory = no && test $ace_user_enable_lib_timer = no && test $ace_user_enable_lib_token = no && + test $ace_user_enable_lib_codecs = no && test $ace_user_enable_lib_other = no; then dnl If we get here then no ACE libraries will be built! - AC_MSG_ERROR(No ACE components will be built. Specify which components to build) + AC_MSG_ERROR([No ACE components will be built. Specify which components to build.]) fi dnl No components will be built! @@ -412,6 +432,9 @@ AM_CONDITIONAL(BUILD_TIMER_FILES, AM_CONDITIONAL(BUILD_TOKEN_FILES, test X$ace_user_enable_lib_token = Xyes) +AM_CONDITIONAL(BUILD_CODECS_FILES, + test X$ace_user_enable_lib_codecs = Xyes) + AM_CONDITIONAL(BUILD_OTHER_FILES, test X$ace_user_enable_lib_other = Xyes) @@ -423,14 +446,14 @@ dnl End ACE_CHECK_SUBSETS dnl Set the component dependencies for the libACE_OS library dnl Usage: ACE_CREATE_LIBACE_OS -AC_DEFUN(ACE_CREATE_LIBACE_OS, +AC_DEFUN([ACE_CREATE_LIBACE_OS], [ ace_user_enable_lib_os=yes ]) dnl Set the component dependencies for the libACE_Utils library dnl Usage: ACE_CREATE_LIBACE_UTILS -AC_DEFUN(ACE_CREATE_LIBACE_UTILS, +AC_DEFUN([ACE_CREATE_LIBACE_UTILS], [ ace_user_enable_lib_utils=yes @@ -440,7 +463,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_UTILS, dnl Set the component dependencies for the libACE_Logging library dnl Usage: ACE_CREATE_LIBACE_Logging -AC_DEFUN(ACE_CREATE_LIBACE_LOGGING, +AC_DEFUN([ACE_CREATE_LIBACE_LOGGING], [ ace_user_enable_lib_logging=yes @@ -450,7 +473,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_LOGGING, dnl Set the component dependencies for the libACE_Threads library dnl Usage: ACE_CREATE_LIBACE_THREADS -AC_DEFUN(ACE_CREATE_LIBACE_THREADS, +AC_DEFUN([ACE_CREATE_LIBACE_THREADS], [ ace_user_enable_lib_threads=yes @@ -460,7 +483,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_THREADS, dnl Set the component dependencies for the libACE_Demux library dnl Usage: ACE_CREATE_LIBACE_DEMUX -AC_DEFUN(ACE_CREATE_LIBACE_DEMUX, +AC_DEFUN([ACE_CREATE_LIBACE_DEMUX], [ ace_user_enable_lib_demux=yes @@ -471,7 +494,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_DEMUX, dnl Set the component dependencies for the libACE_Connection library dnl Usage: ACE_CREATE_LIBACE_CONNECTION -AC_DEFUN(ACE_CREATE_LIBACE_CONNECTION, +AC_DEFUN([ACE_CREATE_LIBACE_CONNECTION], [ ace_user_enable_lib_connection=yes @@ -483,7 +506,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_CONNECTION, dnl Set the component dependencies for the libACE_Sockets library dnl Usage: ACE_CREATE_LIBACE_SOCKETS -AC_DEFUN(ACE_CREATE_LIBACE_SOCKETS, +AC_DEFUN([ACE_CREATE_LIBACE_SOCKETS], [ ace_user_enable_lib_sockets=yes @@ -493,7 +516,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_SOCKETS, dnl Set the component dependencies for the libACE_IPC library dnl Usage: ACE_CREATE_LIBACE_IPC -AC_DEFUN(ACE_CREATE_LIBACE_IPC, +AC_DEFUN([ACE_CREATE_LIBACE_IPC], [ ace_user_enable_lib_ipc=yes @@ -504,7 +527,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_IPC, dnl Set the component dependencies for the libACE_Svcconf library dnl Usage: ACE_CREATE_LIBACE_SVCCONF -AC_DEFUN(ACE_CREATE_LIBACE_SVCCONF, +AC_DEFUN([ACE_CREATE_LIBACE_SVCCONF], [ ace_user_enable_lib_svcconf=yes @@ -517,7 +540,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_SVCCONF, dnl Set the component dependencies for the libACE_Streams library dnl Usage: ACE_CREATE_LIBACE_STREAMS -AC_DEFUN(ACE_CREATE_LIBACE_STREAMS, +AC_DEFUN([ACE_CREATE_LIBACE_STREAMS], [ ace_user_enable_lib_streams=yes @@ -529,7 +552,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_STREAMS, dnl Set the component dependencies for the libACE_Memory library dnl Usage: ACE_CREATE_LIBACE_MEMORY -AC_DEFUN(ACE_CREATE_LIBACE_MEMORY, +AC_DEFUN([ACE_CREATE_LIBACE_MEMORY], [ ace_user_enable_lib_memory=yes @@ -539,7 +562,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_MEMORY, dnl Set the component dependencies for the libACE_Timer library dnl Usage: ACE_CREATE_LIBACE_TIMER -AC_DEFUN(ACE_CREATE_LIBACE_TIMER, +AC_DEFUN([ACE_CREATE_LIBACE_TIMER], [ ace_user_enable_lib_timer=yes @@ -549,7 +572,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_TIMER, dnl Set the component dependencies for the libACE_Token library dnl Usage: ACE_CREATE_LIBACE_TOKEN -AC_DEFUN(ACE_CREATE_LIBACE_TOKEN, +AC_DEFUN([ACE_CREATE_LIBACE_TOKEN], [ ace_user_enable_lib_token=yes @@ -568,9 +591,19 @@ AC_DEFUN(ACE_CREATE_LIBACE_TOKEN, dnl ACE_CREATE_LIBACE_OTHER ]) -dnl Set the component dependencies for the libACE_Utils library +dnl Set the component dependencies for the libACE_Codecs library +dnl Usage: ACE_CREATE_LIBACE_CODECS +AC_DEFUN([ACE_CREATE_LIBACE_CODECS], +[ + ace_user_enable_lib_codecs=yes + + dnl Be careful not to go into a circular/recursive loop with these macros! + ACE_CREATE_LIBACE_OS +]) + +dnl Set the component dependencies for the libACE_Other library dnl Usage: ACE_CREATE_LIBACE_OTHER -AC_DEFUN(ACE_CREATE_LIBACE_OTHER, +AC_DEFUN([ACE_CREATE_LIBACE_OTHER], [ ace_user_enable_lib_other=yes @@ -591,7 +624,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_OTHER, dnl Build all ACE component libraries dnl Usage: ACE_CREATE_ALL_COMPONENTS -AC_DEFUN(ACE_CREATE_ALL_COMPONENTS, +AC_DEFUN([ACE_CREATE_ALL_COMPONENTS], [ ace_user_enable_lib_os=yes ace_user_enable_lib_utils=yes @@ -606,12 +639,13 @@ AC_DEFUN(ACE_CREATE_ALL_COMPONENTS, ace_user_enable_lib_memory=yes ace_user_enable_lib_timer=yes ace_user_enable_lib_token=yes + ace_user_enable_lib_codecs=yes ace_user_enable_lib_other=yes ]) dnl Disable all ACE component libraries dnl Usage: ACE_CREATE_ALL_COMPONENTS -AC_DEFUN(ACE_DISABLE_ALL_COMPONENTS, +AC_DEFUN([ACE_DISABLE_ALL_COMPONENTS], [ ace_user_enable_lib_os=no ace_user_enable_lib_utils=no @@ -626,5 +660,6 @@ AC_DEFUN(ACE_DISABLE_ALL_COMPONENTS, ace_user_enable_lib_memory=no ace_user_enable_lib_timer=no ace_user_enable_lib_token=no + ace_user_enable_lib_codecs=no ace_user_enable_lib_other=no ]) diff --git a/m4/threads.m4 b/m4/threads.m4 index e652000a96c..56f2fe394e9 100644 --- a/m4/threads.m4 +++ b/m4/threads.m4 @@ -1,21 +1,21 @@ dnl ------------------------------------------------------------------------- dnl $Id$ -dnl +dnl dnl threads.m4 -dnl +dnl dnl ACE M4 include file which contains ACE specific M4 macros dnl for configuring thread support. This file is to be used dnl with the configure script. -dnl +dnl dnl ------------------------------------------------------------------------- -dnl Copyright (C) 1998, 1999 Ossama Othman +dnl Copyright (C) 1998, 1999, 2002 Ossama Othman dnl dnl All Rights Reserved dnl dnl This library is free software; you can redistribute it and/or dnl modify it under the current ACE distribution terms. -dnl +dnl dnl This library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -27,19 +27,18 @@ dnl Tests should probably be more platform specific later on. dnl Check for thread related libraries and compiler flags dnl Usage: ACE_CHECK_THREADS -AC_DEFUN(ACE_CHECK_THREADS, dnl +AC_DEFUN([ACE_CHECK_THREADS], [ dnl AC_REQUIRE([AC_PROG_CXX]) dnl AC_REQUIRE([AC_PROG_CXXCPP]) -dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) +dnl AC_LANG([C++]) +dnl AC_REQUIRE([AC_LANG]) dnl Check if compiler accepts specific flag to enable threads - ACE_CACHE_CHECK(if compiler may need a thread flag, - ace_cv_feature_may_need_thread_flag, + ACE_CACHE_CHECK([if compiler may need a thread flag], + [ace_cv_feature_may_need_thread_flag], [ - ifelse(AC_LANG, [CPLUSPLUS], - [ace_save_CXXFLAGS="$CXXFLAGS"], - [ace_save_CFLAGS="$CFLAGS"]) + ace_save_CXXFLAGS="$CXXFLAGS" ACE_CHECK_THREAD_FLAGS( [ @@ -51,8 +50,7 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) dnl Reset the flags to a consistent state. dnl This prevents duplicate flags from being added to dnl the C/CXXFLAGS variable. - ifelse(AC_LANG, [CPLUSPLUS], - [CXXFLAGS="$ace_save_CXXFLAGS"],[CFLAGS="$ace_save_CFLAGS"]) + CXXFLAGS="$ace_save_CXXFLAGS" ], [ dnl The compiler/platform has no thread support linked in by default @@ -70,10 +68,10 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) ]) dnl Check for UNIX International Threads -- STHREADS - ACE_SEARCH_LIBS(thr_create, thread, + AC_SEARCH_LIBS([thr_create], [thread], [ ace_has_sthreads=yes - AC_DEFINE(ACE_HAS_STHREADS) + AC_DEFINE([ACE_HAS_STHREADS]) ], [ ace_has_sthreads=no @@ -81,7 +79,7 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) dnl Sometimes thr_create is actually found with explicitly linking against dnl -lthread, so try a more "exotic" function. - ACE_SEARCH_LIBS(rwlock_destroy, thread,,) + AC_SEARCH_LIBS([rwlock_destroy], [thread],[],[]) dnl Check if any thread related preprocessor flags are needed. ACE_CHECK_THREAD_CPPFLAGS @@ -96,14 +94,14 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) dnl pthread_create() to co-exist with the old implementation of dnl of pthread_create().) - ACE_CACHE_CHECK(for pthreads backward compatibility macros, - ace_cv_lib_pthread_compat_macros, + ACE_CACHE_CHECK([for pthreads backward compatibility macros], + [ace_cv_lib_pthread_compat_macros], [ dnl Add thread preprocessor flags, if any. ace_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$ACE_THR_CPPFLAGS $CPPFLAGS" dnl User's CPPFLAGS go last - AC_EGREP_CPP(ACE_PTHREAD_MACROS, + AC_EGREP_CPP([ACE_PTHREAD_MACROS], [ #include <pthread.h> @@ -124,20 +122,20 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) [ dnl Check if pthread function names are mangled (e.g. DU 4.0) dnl to maintain older Pthread Draft compatibility. - ACE_CHECK_FUNC(pthread_create, pthread.h, + ACE_CHECK_FUNC([pthread_create], [pthread.h], [ ace_has_pthreads=yes - AC_DEFINE(ACE_HAS_PTHREADS) + AC_DEFINE([ACE_HAS_PTHREADS]) ], [ - ACE_CHECK_LIB(pthread, pthread_create, pthread.h, dnl + ACE_CHECK_LIB([pthread], [pthread_create], [pthread.h], [ ace_has_pthreads=yes dnl Since we AC_DEFINE(ACE_HAS_PTHREADS), the default behavior dnl of adding "-lpthread" to the "LIBS" variable no longer dnl works, so we have to add it manually. LIBS="$LIBS -lpthread" - AC_DEFINE(ACE_HAS_PTHREADS) + AC_DEFINE([ACE_HAS_PTHREADS]) ], [ ace_has_pthreads=yes @@ -145,10 +143,10 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) ]) ], [ - ACE_SEARCH_LIBS(pthread_create, pthread pthreads c_r gthreads, + AC_SEARCH_LIBS([pthread_create], [pthread pthreads c_r gthreads], [ ace_has_pthreads=yes - AC_DEFINE(ACE_HAS_PTHREADS) + AC_DEFINE([ACE_HAS_PTHREADS]) dnl This is ugly but some platforms appear to implement stubs dnl in the C library, so it is possible that a no-op function @@ -161,7 +159,7 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) dnl to the LIBS variable, which may not even be necessary. In dnl any case, it may be the better solution. If problems arise dnl in the future regarding this issue, then we should probably - dnl switch to doing an AC_CHECK_LIB before each ACE_SEARCH_LIBS + dnl switch to doing an AC_CHECK_LIB before each AC_SEARCH_LIBS dnl below. dnl Search for functions in more recent standards first. @@ -171,16 +169,16 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) dnl pthread_mutexattr_init. dnl Draft 7 and Standard - ACE_SEARCH_LIBS([pthread_setschedparam], - [pthread pthreads c_r gthreads],, + AC_SEARCH_LIBS([pthread_setschedparam], + [pthread pthreads c_r gthreads],, [ dnl Draft 6 - ACE_SEARCH_LIBS([pthread_attr_setprio], - [pthread pthreads c_r gthreads],, + AC_SEARCH_LIBS([pthread_attr_setprio], + [pthread pthreads c_r gthreads],, [ dnl Draft 4 - ACE_SEARCH_LIBS([pthread_setprio], - [pthread pthreads c_r gthreads],,) + AC_SEARCH_LIBS([pthread_setprio], + [pthread pthreads c_r gthreads],,) ]) ]) ], @@ -191,7 +189,7 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) dnl If we don't have any thread library, then disable threading altogether! - if test "$ace_has_pthreads" != yes && + if test "$ace_has_pthreads" != yes && test "$ace_has_sthreads" != yes; then ace_user_enable_threads=no fi @@ -200,13 +198,12 @@ dnl AC_REQUIRE([AC_LANG_CPLUSPLUS]) dnl This macro will check that the current compiler flags do something dnl useful in terms of thread libraries and/or functions. dnl Usage: ACE_CHECK_THREAD_FLAGS(ACTION-IF-USABLE [, ACTION-IF-NOT-USABLE]]) -AC_DEFUN(ACE_CHECK_THREAD_FLAGS, dnl +AC_DEFUN([ACE_CHECK_THREAD_FLAGS], [ AC_REQUIRE([AC_PROG_AWK]) ACE_CONVERT_WARNINGS_TO_ERRORS([ - -dnl Check for UI thread support first. + dnl Check for UI thread support first. dnl Because some platforms are brain damaged enough to provide dnl useless thread function stubs, link tests may succeed despite the @@ -215,27 +212,23 @@ dnl Check for UI thread support first. dnl thr_create(). The cross-compiled case will use a link-time dnl test, instead. - AC_TRY_RUN( - [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <thread.h> - ] -ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -]) - [ -void * ace_start_func(void *arg) + +extern "C" void * +ace_start_func (void *) { - return arg; -}; + return 0; +} -int main (int argc, char **argv) +int +main () { thread_t tid = 0; return thr_create (0, 0, ace_start_func, 0, 0, &tid); } - ], + ]])], [$1], [ dnl Now check for POSIX thread support. @@ -246,108 +239,63 @@ int main (int argc, char **argv) dnl to get around this nuisance by checking the return value of dnl pthread_create(). The cross-compiled case will use a link-time dnl test, instead. - AC_TRY_RUN( - [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <pthread.h> - ] -ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -]) - [ -void * ace_start_func(void *arg) + +extern "C" void * +ace_start_func (void *) { - return arg; -}; + return 0; +} -int main (int argc, char **argv) +int +main () { pthread_t tid = 0; return pthread_create (&tid, 0, ace_start_func, 0); } - ], + ]])], [$1], [$2], [ dnl POSIX threads cross-compiled case - AC_TRY_CPP( - [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <pthread.h> - ], - [ - cat > conftest.$ac_ext <<EOF -#include <pthread.h> - ACE_REAL_FUNCTION pthread_create - -EOF - - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "ACE_REAL_FUNCTION" | - (eval "$AWK '{print \[$]2}' > conftest.awk 2>&1"); then - rm -f conftest.$ac_ext - ace_real_function=`cat conftest.awk` - rm -f conftest.awk - fi - ], - [ - ace_real_function="pthread_create" - ]) +extern "C" void * +ace_start_func (void *) +{ + return 0; +} + ]], + [[ + pthread_t tid = 0; - AC_TRY_LINK( - [ -/* - * Don't use definition of specific preprocessor macros as criterion - * for determining if thread support is found. - * - * #if !defined (_REENTRANT) && !defined (_THREAD_SAFE) - * #error Neither _REENTRANT nor _THREAD_SAFE were defined. - * THROW ME AN ERROR! - * #endif - * - */ - ] -ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -])dnl - [ -char $ace_real_function(); - ], - [ -$ace_real_function(); - ], + (void) pthread_create (&tid, 0, ace_start_func, 0); + ]])], [$1], [$2]) ]) ], [ dnl UI threads cross-compiled case - AC_TRY_LINK( - [ -/* - * Don't use definition of specific preprocessor macros as criterion - * for determining if thread support is found. - * - * #if !defined (_REENTRANT) && !defined (_THREAD_SAFE) - * #error Neither _REENTRANT nor _THREAD_SAFE were defined. - * THROW ME AN ERROR! - * #endif - * - */ - ] -ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -]) - [ -char thr_create(); - ], - [ -thr_create(); - ], + + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include <thread.h> + +extern "C" void * +ace_start_func (void *) +{ + return 0; +} + ]], + [[ + thread_t tid = 0; + + (void) thr_create (&tid, 0, ace_start_func, 0); + ]])], [$1], [$2]) ]) @@ -358,17 +306,18 @@ dnl Check what compiler thread flag may be used, if any, from the given list. dnl The flag list is separated by white space. dnl Usage: ACE_SEARCH_THREAD_FLAGS(THREAD-FLAG-LIST, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -AC_DEFUN(ACE_SEARCH_THREAD_FLAGS, dnl +AC_DEFUN([ACE_SEARCH_THREAD_FLAGS], [ - ACE_CACHE_CHECK(for compiler thread flag, - ace_cv_thread_flag_search, + AC_LANG([C++]) + AC_REQUIRE([AC_LANG]) + + ACE_CACHE_CHECK([for compiler thread flag], + [ace_cv_thread_flag_search], [ - ifelse(AC_LANG, [CPLUSPLUS], - [ace_save_CXXFLAGS="$CXXFLAGS"],[ace_save_CFLAGS="$CFLAGS"]) + ace_save_CXXFLAGS="$CXXFLAGS" for i in $1; do - ifelse(AC_LANG, [CPLUSPLUS], - [CXXFLAGS="$CXXFLAGS -$i"],[CFLAGS="$CFLAGS -$i"]) + CXXFLAGS="$CXXFLAGS -$i" ACE_CHECK_THREAD_FLAGS( [ @@ -382,21 +331,17 @@ AC_DEFUN(ACE_SEARCH_THREAD_FLAGS, dnl ]) dnl Reset the flags for the next flag check. - ifelse(AC_LANG, [CPLUSPLUS], - [CXXFLAGS="$ace_save_CXXFLAGS"],[CFLAGS="$ace_save_CFLAGS"]) + CXXFLAGS="$ace_save_CXXFLAGS" done dnl Reset the flags to a consistent state. dnl This prevents duplicate flags from being added to - dnl the C/CXXFLAGS variable. - ifelse(AC_LANG, [CPLUSPLUS], - [CXXFLAGS="$ace_save_CXXFLAGS"],[CFLAGS="$ace_save_CFLAGS"]) + dnl the CCXXFLAGS variable. + CXXFLAGS="$ace_save_CXXFLAGS" ], [ dnl Add the found/cached thread flag to the C/CXXFLAGS variables - ifelse(AC_LANG, [CPLUSPLUS], - [CXXFLAGS="$CXXFLAGS $ace_cv_thread_flag_search"], - [CFLAGS="$CFLAGS $ace_cv_thread_flag_search"]) + CXXFLAGS="$CXXFLAGS $ace_cv_thread_flag_search" $2 ], @@ -409,25 +354,21 @@ AC_DEFUN(ACE_SEARCH_THREAD_FLAGS, dnl dnl Check if the compiler defines thread related preprocessor flags. dnl If not, then provide them. dnl Usage: ACE_CHECK_THREAD_CPPFLAGS -AC_DEFUN(ACE_CHECK_THREAD_CPPFLAGS, dnl +AC_DEFUN([ACE_CHECK_THREAD_CPPFLAGS], [ - dnl A compile-time test is used instead of a preprocessor-time test + dnl A compile-time test is used instead of a preprocesse-time test dnl because compiler thread flags defined in CFLAGS or CXXFLAGS dnl should be used for this test. - AC_TRY_COMPILE( - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if !defined (_REENTRANT) && !defined (_THREAD_SAFE) #error Neither _REENTRANT nor _THREAD_SAFE were defined. THROW ME AN ERROR! #endif - ], - [ + ]], [[ int a = 0; a++; - ], - [ + ]])],[ ACE_THR_CPPFLAGS= - ], - [ + ],[ ACE_THR_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE" ]) ]) |