summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2003-01-01 18:29:02 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2003-01-01 18:29:02 +0000
commit3e421074789ae3941730433fd1aebd452c9e911f (patch)
treea4787cec1e0661cb15778025039d2b45972b710d
parent4e3403530c6a3e609f553c0c49fbe8063df09431 (diff)
downloadATCD-3e421074789ae3941730433fd1aebd452c9e911f.tar.gz
Wed Jan 1 10:28:27 2003 Ossama Othman <ossama@uci.edu>
-rw-r--r--ChangeLog37
-rw-r--r--ChangeLogs/ChangeLog-03a37
-rw-r--r--acconfig.h1469
-rwxr-xr-xbin/bootstrap100
-rw-r--r--configure.ac7203
-rw-r--r--m4/ace.m4259
-rw-r--r--m4/acinclude.m4462
-rw-r--r--m4/compiler.m423
-rw-r--r--m4/config_h.m41415
-rw-r--r--m4/features.m462
-rw-r--r--m4/platform.m4212
-rw-r--r--m4/subsets.m4199
-rw-r--r--m4/threads.m4251
13 files changed, 9436 insertions, 2293 deletions
diff --git a/ChangeLog b/ChangeLog
index 92288013eb9..b0571dcff30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+Wed Jan 1 10:28:27 2003 Ossama Othman <ossama@uci.edu>
+
+ * configure.ac:
+
+ Ported old `configure.in' file to the latest Autoconf
+ `configure.ac' syntax.
+
+ Initialize Automake with the new AM_INIT_AUTOMAKE macro format.
+
+ * bin/bootstrap:
+
+ Updated `autoheader' invocation to latest command line format.
+
+ Commented out documentation generation shell script code. At
+ this early stage in the new autotool effort, we need not deal
+ with documentation generation.
+
+ Commented out ACE workspace/release configuration shell script
+ code. It may be re-enabled in the future when it is clearer how
+ releases will be performed.
+
+ * m4/ace.m4:
+ * m4/acinclude.m4:
+ * m4/compiler.m4:
+ * m4/features.m4:
+ * m4/platform.m4:
+ * m4/subsets.m4:
+ * m4/threads.m4:
+
+ Updated all macros to the latest Autoconf 2.57 syntax.
+
+ * acconfig.h:
+ * m4/config_h.m4:
+
+ Replaced old `config.h' header template (acconfig.h) with the
+ latest "AH_TEMPLATE" form of the configuration header template.
+
Tue Dec 31 21:21:26 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
* bin/generate_topinfo_charts.sh:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 92288013eb9..b0571dcff30 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,40 @@
+Wed Jan 1 10:28:27 2003 Ossama Othman <ossama@uci.edu>
+
+ * configure.ac:
+
+ Ported old `configure.in' file to the latest Autoconf
+ `configure.ac' syntax.
+
+ Initialize Automake with the new AM_INIT_AUTOMAKE macro format.
+
+ * bin/bootstrap:
+
+ Updated `autoheader' invocation to latest command line format.
+
+ Commented out documentation generation shell script code. At
+ this early stage in the new autotool effort, we need not deal
+ with documentation generation.
+
+ Commented out ACE workspace/release configuration shell script
+ code. It may be re-enabled in the future when it is clearer how
+ releases will be performed.
+
+ * m4/ace.m4:
+ * m4/acinclude.m4:
+ * m4/compiler.m4:
+ * m4/features.m4:
+ * m4/platform.m4:
+ * m4/subsets.m4:
+ * m4/threads.m4:
+
+ Updated all macros to the latest Autoconf 2.57 syntax.
+
+ * acconfig.h:
+ * m4/config_h.m4:
+
+ Replaced old `config.h' header template (acconfig.h) with the
+ latest "AH_TEMPLATE" form of the configuration header template.
+
Tue Dec 31 21:21:26 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
* bin/generate_topinfo_charts.sh:
diff --git a/acconfig.h b/acconfig.h
deleted file mode 100644
index b4ec9cdc6f2..00000000000
--- a/acconfig.h
+++ /dev/null
@@ -1,1469 +0,0 @@
-/* -*- C++ -*- */
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-
-/* ACE configuration header file */
-
-/* @TOP@ */
-/* All lines above "@TOP@" will be placed at the top of config.h.in. */
-
-/*
- $Id$
-
- This file, "acconfig.h," contains additional preprocessor symbols that
- autoheader may encounter.
-*/
-
-
-#ifndef _POSIX_THREADS
-# undef _POSIX_THREADS
-#endif
-
-#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
-# undef _POSIX_THREAD_SAFE_FUNCTIONS
-#endif
-
-/* Some platforms need _POSIX_PTHREAD_SEMANTICS to make some functions work */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-
-/* ACE currently doesn't use these; however the configure script does */
-#undef ACE_LACKS_SYSTIMES_H
-#undef ACE_LACKS_UNBUFFERED_STREAMBUF
-#undef ACE_HAS_STDCPP_STL_INCLUDES
-
-#undef ACE_HAS_LIBC_H
-#undef ACE_HAS_OSFCN_H
-#undef ACE_HAS_NEW_NO_H
-#undef ACE_HAS_NEW_H
-#undef ACE_HAS_STDEXCEPT_NO_H
-#undef ACE_HAS_EXCEPTION_H
-
-/* Platform provides <sys/ioctl.h> header */
-#undef ACE_HAS_SYS_IOCTL_H
-
-/*
- * Deprecated! (or soon to be?)
- */
-#undef ACE_HAS_OSF1_GETTIMEOFDAY /* timezone* 2nd parameter & no prototype */
-#undef ACE_HAS_LYNXOS_SIGNALS
-#undef ACE_HAS_TANDEM_SIGNALS
-#undef ACE_HAS_IRIX_53_SIGNALS
-
-#undef PTHREAD_STACK_MIN
-#undef PTHREAD_STACK_MAX
-
-/* ///////////////////// OSSAMA'S NEW STUFF ////////////////// */
-/*
- THIS STUFF WILL REPLACE THE ABOVE OLDER STUFF AND/OR WILL BE MERGED INTO IT
-*/
-
-/* results from checks for programs */
-/* results from checks for libraries */
-/* results from checks for header files */
-/* results from checks for typedefs */
-/* results from checks for structures */
-/* results from checks for variables */
-/* results from checks for compiler characteristics */
-/* results from checks for library functions */
-/* results from checks for system services */
-
-/* AIX specific configuration parameters */
-#undef AIX
-#undef _BSD
-#undef _BSD_INCLUDES
-
-/* Cray specific configuration parameters */
-/*
- * The following predefined macros are used within ACE ifdefs.
- * These are defined when using the Cray compilers. _CRAYMPP
- * is defined, for example, if you are running on a Cray T3E
- * massively parallel machine. Moreover, in the case of the T3E,
- * _CRAYT3E will be defined. This is used to determine the
- * ACE_SIZEOF defines for primitive types.
- *
- * _UNICOS is defined as either the major version of UNICOS being run,
- * e.g. 9 or 10 on the vector machines (e.g. C90, T90, J90, YMP, ...)
- * or the major+minor+level UNICOS/mk version, e.g. 2.0.3 => 203,
- * being run on an MPP machine.
- *
- * Summary:
- *
- * _CRAYMPP (defined only if running on MPP machine, e.g. T3E, UNICOS/mk)
- * _CRAYT3E (defined specifically if compiling on a Cray T3E)
- * _UNICOS (defined if running UNICOS or UNICOS/mk)
- *
- * Tested on UNICOS 10.0.0.2, UNICOS/mk 2.0.3.10
- *
- * Contributed by Doug Anderson <doug "at" clark.net>
- */
-#undef _CRAYMPP
-#undef _CRAYT3E
-#undef _UNICOS
-
-/* DG/UX specific configuration parameters */
-#undef ACE_DGUX
-#undef _DGUX_SOURCE
-#undef _POSIX4A_DRAFT10_SOURCE
-#undef _POSIX4_DRAFT_SOURCE
-
-/* FreeBSD specific configuration parameters */
-/* Nothing yet */
-
-/* HP/UX specific configuration parameters */
-#undef HPUX
-#undef HPUX_10
-#undef HPUX_11
-#undef _HPUX_SOURCE
-
-/* Irix specific configuration parameters */
-#undef IRIX5
-#undef IRIX6
-#undef _BSD_TYPES
-#undef _SGI_MP_SOURCE
-#undef _MODERN_C_
-
-/* Linux specific configuration parameters */
-/* Nothing yet */
-
-/* LynxOS specific configuration parameters */
-#undef __NO_INCLUDE_WARN__
-#undef _POSIX_THREADS_CALLS
-
-/* M88K specific configuration parameters */
-#undef m88k
-#undef __m88k__
-
-/* MVS specific configuration parameters */
-/* Nothing yet */
-
-/* NetBSD specific configuration parameters */
-#undef ACE_NETBSD
-
-/* OSF/1 and Digital Unix specific configuration parameters */
-#undef DEC_CXX
-#undef DIGITAL_UNIX
-
-/* pSOS specific configuration parameters */
-#undef ACE_PSOS
-#undef ACE_PSOSIM
-#undef ACE_PSOSTBD
-
-/* SCO specific configuration parameters */
-#undef SCO
-#undef _SVID3
-
-/* SunOS / Solaris specific configuration parameters */
-#undef _RWSTD_NO_EXCEPTIONS
-
-/* Tandem specific configuration parameters */
-/* Nothing yet */
-
-/* UnixWare specific configuration parameters */
-#undef UNIXWARE
-#undef UNIXWARE_2_0
-#undef UNIXWARE_2_1
-
-/* VXWorks specific configuration parameters */
-#undef VXWORKS
-
-/* Win32 specific configuration parameters */
-#undef ACE_WIN32
-
-/* ACE internals */
-#undef ACE_DEFAULT_BASE_ADDR
-#undef ACE_DEFAULT_BASE_ADDRL
-#undef ACE_DEFAULT_CLOSE_ALL_HANDLES
-#undef ACE_DEFAULT_MAX_SOCKET_BUFSIZ
-#undef ACE_DEFAULT_SELECT_REACTOR_SIZE
-#undef ACE_MALLOC_ALIGN
-#undef ACE_MAP_PRIVATE
-#undef ACE_THR_PRI_FIFO_DEF
-#undef ACE_TIMER_SKEW
-#undef ACE_UINT64_FORMAT_SPECIFIER
-#undef ACE_USE_RCSID
-#undef IP_ADD_MEMBERSHIP
-#undef IP_DROP_MEMBERSHIP
-
-
-/* Specify sizes of given built-in types. If a size isn't defined here,
- then ace/Basic_Types.h will attempt to deduce the size. */
-/* #undef ACE_SIZEOF_CHAR */
-#undef ACE_SIZEOF_SHORT
-#undef ACE_SIZEOF_INT
-#undef ACE_SIZEOF_LONG
-#undef ACE_SIZEOF_LONG_LONG
-#undef ACE_SIZEOF_VOID_P
-#undef ACE_SIZEOF_FLOAT
-#undef ACE_SIZEOF_DOUBLE
-#undef ACE_SIZEOF_LONG_DOUBLE
-
-
-/* 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
-#if defined(ACE_UINT64_TYPEDEF)
- typedef ACE_UINT64_TYPEDEF ACE_UINT64;
-#endif /* ACE_UINT64_TYPEDEF */
-
-/* typedef for ACE_LOFF_T */
-#undef ACE_LOFF_T_TYPEDEF
-
-/* Enable ACE inlining */
-#undef __ACE_INLINE__
-
-/* Explicitly disable ACE inlining */
-#undef ACE_NO_INLINE
-
-/* Enable ACE_Timeprobes */
-#undef ACE_COMPILE_TIMEPROBES
-
-/* Enable use of GNU template repositories. GNU C++ w/repo patch
- and EGCS only */
-#undef ACE_HAS_GNU_REPO
-
-/* Define this if you don't want debug version ACE search for debug version
- DLLs first before looking for the DLL names specified. */
-#undef ACE_DISABLE_DEBUG_DLL_CHECK
-
-/* Platform supports Asynchronous IO calls */
-#undef ACE_HAS_AIO_CALLS
-
-/* 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. */
-#undef ACE_HAS_ALT_CUSERID
-
-/* Platform supports new C++ style casts (dynamic_cast, static_cast,
- reinterpret_cast and const_cast) */
-#undef ACE_HAS_ANSI_CASTS
-
-/* Number of TSS keys, with ACE_HAS_TSS_EMULATION _only_. Defaults to 64. */
-#undef ACE_DEFAULT_THREAD_KEYS
-
-/* Specify this if you don't want threads to inherit parent thread's
- ACE_Log_Msg properties. */
-#undef ACE_THREADS_DONT_INHERIT_LOG_MSG
-
-/* Compiler enforces C++ One Definition Rule */
-#undef ACE_HAS_ONE_DEFINITION_RULE
-
-/* OS has priocntl (2) */
-#undef ACE_HAS_PRIOCNTL
-
-/* Platform has the MIT pthreads APIs for timed send/recv operations */
-#undef ACE_HAS_RECV_TIMEDWAIT
-#undef ACE_HAS_RECVFROM_TIMEDWAIT
-#undef ACE_HAS_RECVMSG_TIMEDWAIT
-#undef ACE_HAS_SEND_TIMEDWAIT
-#undef ACE_HAS_SENDTO_TIMEDWAIT
-#undef ACE_HAS_SENDMSG_TIMEDWAIT
-#undef ACE_HAS_READ_TIMEDWAIT
-#undef ACE_HAS_READV_TIMEDWAIT
-#undef ACE_HAS_WRITE_TIMEDWAIT
-#undef ACE_HAS_WRITEV_TIMEDWAIT
-
-/* 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. */
-#undef ACE_HAS_RLIMIT_RESOURCE_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. */
-#undef ACE_HAS_RUSAGE_WHO_ENUM
-
-/* Platform has void (*)(...) prototype for pthread_key_create()
- destructor (e.g., LynxOS). */
-#undef ACE_HAS_STDARG_THR_DEST
-
-/* Used when users want to compile ACE with STL and STL map class
- conflicts with <net/if.h> map struct. */
-#undef ACE_HAS_STL_MAP_CONFLICT
-
-/* Used when users want to compile ACE with STL and STL queue class
- conflicts with <netinet/in.h> queue struct. */
-#undef ACE_HAS_STL_QUEUE_CONFLICT
-
-/* Platform/compiler supports Win32 structural exceptions */
-#undef ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS
-
-/* Platform has BSD 4.4 sendmsg()/recvmsg() APIs. */
-#undef ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-
-/* Platform has pread() and pwrite() support */
-#undef ACE_HAS_P_READ_WRITE
-
-/* Platform, such as AIX4, needs to wrap #include of sys/socket.h with
- #undef/#define of __cplusplus. */
-#undef ACE_HAS_AIX_BROKEN_SOCKET_HEADER
-
-/* Platform has AIX4 ::read_real_time () */
-#undef ACE_HAS_AIX_HI_RES_TIMER
-
-/* Compiler/platform supports alloca() */
-#undef ACE_HAS_ALLOCA
-
-/* Compiler/platform has <alloca.h> */
-#undef ACE_HAS_ALLOCA_H
-
-/* CPU is an Alpha, with the rpcc instruction to read the tick timer. */
-#undef ACE_HAS_ALPHA_TIMER
-
-/* Compiler/platform correctly calls init()/fini() for shared libraries */
-#undef ACE_HAS_AUTOMATIC_INIT_FINI
-
-/* Compiler handles explicit calling of template destructor correctly.
- See "ace/OS.h" for details. */
-#undef ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
-
-/* Platform doesn't cast MAP_FAILED to a (void *). */
-#undef ACE_HAS_BROKEN_MAP_FAILED
-
-/* Compiler/platform doesn't support namespaces (or the support is not
- fully implemented.) */
-#undef ACE_HAS_BROKEN_NAMESPACES
-
-/* Compiler has integer overflow problem with bit-shift operations. */
-#undef ACE_HAS_BROKEN_BITSHIFT
-
-/* Compiler can't handle const char * as rvalue in conditional operator. */
-#undef ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS
-
-/* Compiler can't handle calls like foo->operator T *() */
-#undef ACE_HAS_BROKEN_CONVERSIONS
-
-/* Compiler/platform uses macro for ctime (e.g., MVS) */
-#undef ACE_HAS_BROKEN_CTIME
-
-/* Platform sendv() does not work properly with datagrams, i.e. it
- fails when the iovec size is IOV_MAX. */
-#undef ACE_HAS_BROKEN_DGRAM_SENDV
-
-/* Earlier versions of HP/UX C++ are damned... */
-#undef ACE_HAS_BROKEN_HPUX_TEMPLATES
-
-/* Platform headers don't support <msg.h> prototypes */
-#undef ACE_HAS_BROKEN_MSG_H
-
-/* HP/UX does not wrap the mmap(2) header files with extern "C". */
-#undef ACE_HAS_BROKEN_MMAP_H
-
-/* MSVC has trouble with defining STL containers for nested structs and
- classes */
-#undef ACE_HAS_BROKEN_NESTED_TEMPLATES
-
-/* Platform has a bug with non-blocking connects (e.g., WinNT 4.0) */
-#undef ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS
-
-/* Platform defines struct timespec in <sys/timers.h> */
-#undef ACE_HAS_BROKEN_POSIX_TIME
-
-/* Platform defines ctime_r, asctime_r, rand_r and getpwnam_r as macros */
-#undef ACE_HAS_BROKEN_R_ROUTINES
-
-/* OS/compiler's header files are inconsistent with libC definition of
- rand_r(). */
-#undef ACE_HAS_BROKEN_RANDR
-
-/* OS/Compiler's header files are not consistent with readv() definition. */
-#undef ACE_HAS_BROKEN_READV
-
-/* Compiler can't handle the static ACE_Addr::sap_any construct. */
-#undef ACE_HAS_BROKEN_SAP_ANY
-
-/* OS/compiler omits the const from the sendmsg() prototype. */
-#undef ACE_HAS_BROKEN_SENDMSG
-
-/* OS/compiler omits the const from the rlimit parameter in the
- setrlimit() prototype. */
-#undef ACE_HAS_BROKEN_SETRLIMIT
-
-/* Compiler/platform has the wrong prototype for t_error(), i.e.,
- t_error(char *) rather than t_error(const char *). */
-#undef ACE_HAS_BROKEN_T_ERROR
-
-/* platform define 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. */
-#undef ACE_HAS_BROKEN_TIMESPEC_MEMBERS
-
-/* OS/compiler omits the const from the iovec parameter in the
- writev() prototype. */
-#undef ACE_HAS_BROKEN_WRITEV
-
-/* OS header files have some problems with XTI (HP/UX 11). */
-#undef ACE_HAS_BROKEN_XTI_MACROS
-
-/* Platform has <bstring.h> (which contains bzero() prototype) */
-#undef ACE_HAS_BSTRING
-
-/* Platform has <bytesex.h>. */
-#undef ACE_HAS_BYTESEX_H
-
-/* Platform supports the Win32 CancelIO() function (WinNT 4.0 and beyond). */
-#undef ACE_HAS_CANCEL_IO
-
-/* OS/platform uses char * for dlopen/dlsym args, rather than const char *. */
-#undef ACE_HAS_CHARPTR_DL
-
-/* OS/platform uses char * for sockopt, rather than const char * */
-#undef ACE_HAS_CHARPTR_SOCKOPT
-
-/* sprintf() returns char * rather than int (e.g., SunOS 4.x) */
-#undef ACE_HAS_CHARPTR_SPRINTF
-
-/* Platform supports POSIX 1.b clock_gettime () */
-#undef ACE_HAS_CLOCK_GETTIME
-
-/* Prototypes for both signal() and struct sigaction are consistent. */
-#undef ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-/* Compiler/platform has correctly prototyped header files */
-#undef ACE_HAS_CPLUSPLUS_HEADERS
-
-/* Platform has cygwin32 socket.h */
-#undef ACE_HAS_CYGWIN32_SOCKET_H
-
-/* Platform supports operations on directories via struct dirent,
- readdir_r, etc. */
-#undef ACE_HAS_DIRENT
-
-/* For platforms, e.g., RedHat 4.2/Linux 2.0.30/Alpha, that don't
- declare dl* functions as extern "C" in dlfcn.h.*/
-#undef ACE_HAS_DLFCN_H_BROKEN_EXTERN_C
-
-/* Build ACE using the frigging PC DLL nonsense... */
-#undef ACE_HAS_DLL
-
-/* Compiler supports C++ exception handling */
-#undef ACE_HAS_EXCEPTIONS
-
-/* Platform has Fast-Light (FL) toolkit installed */
-#undef ACE_HAS_FL
-
-/* Platform supports getpagesize() call (otherwise, ACE_PAGE_SIZE must
- be defined, except on Win32) */
-#undef ACE_HAS_GETPAGESIZE
-
-/* Platform supports the getrusage() system call. */
-#undef ACE_HAS_GETRUSAGE
-
-/* Platform has a getrusage () prototype in sys/resource.h that
- differs from the one in ace/OS.i. */
-#undef ACE_HAS_GETRUSAGE_PROTO
-
-/* GNUC 2.7.3 mistakenly takes the template definition as the place
- where an inline function of an argument class is first used. */
-#undef ACE_HAS_GNUC_BROKEN_TEMPLATE_INLINE_FUNCTIONS
-
-/* Denotes that GNU has cstring.h as standard which redefines memchr() */
-#undef ACE_HAS_GNU_CSTRING_H
-
-/* The GPERF utility is compiled for this platform */
-#undef ACE_HAS_GPERF
-
-/* Optimize ACE_Handle_Set::count_bits for select() operations (common case) */
-#undef ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-/* Platform supports lseek64(). This should not be defined if
- ACE_HAS_LLSEEK is defined. */
-#undef ACE_HAS_LSEEK64
-
-/* Platform supports llseek(). This should not be defined if
- ACE_HAS_LSEEK64 is defined.*/
-#undef ACE_HAS_LLSEEK
-
-/* Compiler/platform supports SunOS high resolution timers */
-#undef ACE_HAS_HI_RES_TIMER
-
-/* Compiler/platform supports idtype_t. */
-#undef ACE_HAS_IDTYPE_T
-
-/* Inline all the static class OS methods to remove call overhead */
-/* Note: This gets defined by OS.h if __ACE_INLINE__ is defined */
-#undef ACE_HAS_INLINED_OSCALLS
-
-/* Platform supports IP multicast */
-#undef ACE_HAS_IP_MULTICAST
-
-/* Platform supports IPv6 */
-#undef ACE_HAS_IP6
-
-/* Platform supports the very odd IRIX 6.2 threads... */
-#undef ACE_HAS_IRIX62_THREADS
-
-/* Causes the ACE_Object_Manager instance to be created in
- main (int, char *[]), instead of as a static (global) instance. */
-#undef ACE_HAS_NONSTATIC_OBJECT_MANAGER
-
-/* Platform supports thr_keydelete (e.g,. UNIXWARE) */
-#undef ACE_HAS_THR_KEYDELETE
-
-/* Platform calls thr_minstack() rather than thr_min_stack() (e.g., Tandem). */
-#undef ACE_HAS_THR_MINSTACK
-
-/* The rusage_t structure has only two fields. */
-#undef ACE_HAS_LIMITED_RUSAGE_T
-
-/* Compiler/platform has "big" fd_set, i.e. large number of bits set
- in fd_set passed back from select(). */
-#undef ACE_HAS_BIG_FD_SET
-
-/* Platform defines MAP_FAILED as a long constant. */
-#undef ACE_HAS_LONG_MAP_FAILED
-
-/* Enabled malloc statistics collection. */
-#undef ACE_HAS_MALLOC_STATS
-
-/* Use native implementation of memchr(). */
-#undef ACE_HAS_MEMCHR
-
-/* 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. */
-#undef ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION
-
-/* 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. */
-#undef ACE_USES_OLD_IOSTREAMS
-
-/* Platform supports Microsoft Foundation Classes */
-#undef ACE_HAS_MFC
-
-/* Platform supports recvmsg and sendmsg */
-#undef ACE_HAS_MSG
-
-/* Platform supports MT safe mktime() call (do any of them?) */
-#undef ACE_HAS_MT_SAFE_MKTIME
-
-/* Sockets may be called in multi-threaded programs */
-#undef ACE_HAS_MT_SAFE_SOCKETS
-
-/* Platform uses non-const char * in calls to gethostbyaddr,
- gethostbyname, getservbyname */
-#undef ACE_HAS_NONCONST_GETBY
-
-/* Platform has a non-const parameter to msgsnd() (e.g., SCO). */
-#undef ACE_HAS_NONCONST_MSGSND
-
-/* Platform's select() uses non-const timeval* (only found on Linux
- right now) */
-#undef ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-/* Platform has "old" GNU compiler, i.e. does not completely support
- standard C++. (compiling with g++ prior to version 2.8.0) */
-#undef ACE_HAS_GNUG_PRE_2_8
-
-/* Compiler/platform uses old malloc()/free() prototypes (ugh) */
-#undef ACE_HAS_OLD_MALLOC
-
-/* Uses ctime_r & asctime_r with only two parameters vs. three. */
-#undef ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-
-/* Platform, e.g., Solaris 2.5, only supports SCHED_OTHER POSIX
- scheduling policy. */
-#undef ACE_HAS_ONLY_SCHED_OTHER
-
-/* Use the semaphore implementation of ACE_Message_Queue rather than
- the emulated condition variable (NT and VxWorks). */
-#undef ACE_HAS_OPTIMIZED_MESSAGE_QUEUE
-
-/* Platform supports the OSF TLI timod STREAMS module */
-#undef ACE_HAS_OSF_TIMOD_H
-
-/* Platform is an Intel Pentium microprocessor. */
-#undef ACE_HAS_PENTIUM
-
-/* Platform contains <poll.h> */
-#undef ACE_HAS_POLL
-
-/* Platform supports "position-independent" features provided by
- ACE_Based_Pointer<>. */
-#undef ACE_HAS_POSITION_INDEPENDENT_POINTERS
-
-/* Platform supports POSIX O_NONBLOCK semantics */
-#undef ACE_HAS_POSIX_NONBLOCK
-
-/* Platform supports POSIX real-time semaphores (e.g., VxWorks and
- Solaris) */
-#undef ACE_HAS_POSIX_SEM
-
-/* Platform supports the POSIX struct timespec type */
-#undef ACE_HAS_POSIX_TIME
-
-/* Platform supports the /proc file system and defines tid_t
- in <sys/procfs.h> */
-#undef ACE_HAS_PROC_FS
-
-/* Platform supports PowerPC time-base register. */
-#undef ACE_HAS_POWERPC_TIMER
-
-/* Platform supports the prusage_t struct */
-#undef ACE_HAS_PRUSAGE_T
-
-/* Platform supports POSIX Threads */
-#undef ACE_HAS_PTHREADS
-
-/* Platform supports POSIX Threads .4a Draft 4 */
-#undef ACE_HAS_PTHREADS_DRAFT4
-
-/* Platform supports POSIX Threads .4a Draft 6 */
-#undef ACE_HAS_PTHREADS_DRAFT6
-
-/* Platform supports POSIX Threads .1c Draft 7 */
-#undef ACE_HAS_PTHREADS_DRAFT7
-
-/* Platform supports POSIX.1c-1995 threads */
-#undef ACE_HAS_PTHREADS_STD
-
-/* Platform has the UNIX98 extensions to Pthreads (suspend, continue,
- rwlocks) */
-#undef ACE_HAS_PTHREADS_UNIX98_EXT
-
-/* Platform has pthread_condattr_setkind_np(). */
-#undef ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP
-
-/* Platform has pthread_mutexattr_setkind_np(). */
-#undef ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP
-
-/* pthread.h declares an enum with PTHREAD_PROCESS_PRIVATE and
- PTHREAD_PROCESS_SHARED values */
-#undef ACE_HAS_PTHREAD_PROCESS_ENUM
-
-/* Purify'ing. Defined on command line. */
-#undef ACE_HAS_PURIFY
-
-/* Quantify'ing. Defined on command line. */
-#undef ACE_HAS_QUANTIFY
-
-/* Mutexes are inherently recursive (e.g., Win32) */
-#undef ACE_HAS_RECURSIVE_MUTEXES
-
-/* Platform will recurse infinitely on thread exits from TSS cleanup
- routines (e.g., AIX) */
-#undef ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
-
-/* Platform supports reentrant functions (i.e., all the POSIX *_r
- functions). */
-#undef ACE_HAS_REENTRANT_FUNCTIONS
-
-/* 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. */
-#undef ACE_HAS_X86_STAT_MACROS
-
-/* Platform has support for multi-byte character support compliant
- with the XPG4 Worldwide Portability Interface wide-character
- classification. */
-#undef ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-/* No system support for replacing any previous mappings. */
-#undef ACE_LACKS_AUTO_MMAP_REPLACEMENT
-
-/* Platform lacks support for the standard C++ auto_ptr class */
-#undef ACE_LACKS_AUTO_PTR
-
-/* Compiler/platform standard C++ auto_ptr implementation lacks
- reset() method */
-#undef ACE_AUTO_PTR_LACKS_RESET
-
-/* Compiler/platform lacks the standard C library bsearch() function */
-#undef ACE_LACKS_BSEARCH
-
-/* Platform has ACE_HAS_4_4BSD_SENDMSG_RECVMSG but does not define
- CMSG_DATA (cmsg) macro. */
-#undef ACE_LACKS_CMSG_DATA_MACRO
-
-/* 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.) */
-#undef ACE_LACKS_CMSG_DATA_MEMBER
-
-/* Compiler/platform lacks the standard C library qsort() function */
-#undef ACE_LACKS_QSORT
-
-/* Platform lacks POSIX-style fcntl () */
-#undef ACE_LACKS_FCNTL
-
-/* Platform lacks fsync() */
-#undef ACE_LACKS_FSYNC
-
-/* Compiler does not support dynamic_cast. Usually used with
- ACE_HAS_ANSI_CASTS */
-#undef ACE_LACKS_RTTI
-
-/* Platform lacks readdir_r() */
-#undef ACE_LACKS_READDIR_R
-
-/* Platform lacks seekdir() */
-#undef ACE_LACKS_SEEKDIR
-
-/* Platform lacks telldir() */
-#undef ACE_LACKS_TELLDIR
-
-/* Platform can't handle "inline" keyword correctly. */
-#undef ACE_LACKS_INLINE_FUNCTIONS
-
-/* Iostreams are not supported adequately on the given platform. */
-#undef ACE_LACKS_IOSTREAM_TOTALLY
-
-/* Platform does not support reentrant netdb functions
- (getprotobyname_r, getprotobynumber_r, gethostbyaddr_r,
- gethostbyname_r, getservbyname_r). */
-#undef ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-
-/* Platform supports the POSIX regular expression library */
-#undef ACE_HAS_REGEX
-
-/* Platform has special header for select(). */
-#undef ACE_HAS_SELECT_H
-
-/* For Win32: Use Select_Reactor as default implementation of Reactor
- instead of WFMO_Reactor. */
-#undef ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL
-
-/* Compiler/platform defines a union semun for SysV shared memory */
-#undef ACE_HAS_SEMUN
-
-/* Platform has a function to set t_errno (e.g., Tandem). */
-#undef ACE_HAS_SET_T_ERRNO
-
-/* Platform has shm_open() */
-#undef ACE_HAS_SHM_OPEN
-
-/* Platform supports SVR4 extended signals */
-#undef ACE_HAS_SIGINFO_T
-
-/* Platform has bug with sigismember() (HP/UX 11). */
-#undef ACE_HAS_SIGISMEMBER_BUG
-
-/* Platform/compiler has macros for sig{empty,fill,add,del}set (e.g.,
- SCO and FreeBSD) */
-#undef ACE_HAS_SIG_MACROS
-
-/* Platform supports the Win32 SignalObjectAndWait() function (WinNT
- 4.0 and beyond). */
-#undef ACE_HAS_SIGNAL_OBJECT_AND_WAIT
-
-/* Automatically restart OS system calls when EINTR occurs */
-#undef ACE_HAS_SIGNAL_SAFE_OS_CALLS
-
-/* Platform has the sigsuspend() system call */
-#undef ACE_HAS_SIGSUSPEND
-
-/* Platform has the sigtimedwait() system call */
-#undef ACE_HAS_SIGTIMEDWAIT
-
-/* Platform/compiler has the sigwait(2) prototype */
-#undef ACE_HAS_SIGWAIT
-
-/* Compiler/platform defines the sig_atomic_t typedef */
-#undef ACE_HAS_SIG_ATOMIC_T
-
-/* Compiler requires extern "C" functions for signals. */
-#undef ACE_HAS_SIG_C_FUNC
-
-/* Platform supports new BSD inet_addr len field. */
-#undef ACE_HAS_SIN_LEN
-
-/* OS/compiler uses size_t * rather than int * for socket lengths */
-#undef ACE_HAS_SIZET_SOCKET_LEN
-
-/* Platform requires (struct sockaddr *) for msg_name field of
- struct msghdr. */
-#undef ACE_HAS_SOCKADDR_MSG_NAME
-
-/* Compiler/platform provides the sys/sockio.h file */
-#undef ACE_HAS_SOCKIO_H
-
-/* Platform provides socklen_t type, such as Linux with glibc2. */
-#undef ACE_HAS_SOCKLEN_T
-
-/* Compiler has brain-damaged SPARCwork SunOS 4.x signal prototype... */
-#undef ACE_HAS_SPARCWORKS_401_SIGNALS
-
-/* Compiler supports the ssize_t typedef */
-#undef ACE_HAS_SSIZE_T
-
-/* Platform supports UNIX International Threads */
-#undef ACE_HAS_STHREADS
-
-/* Platform has thr_yield() */
-#undef ACE_HAS_THR_YIELD
-
-/* Platform/compiler supports Standard C++ Library */
-#undef ACE_HAS_STANDARD_CPP_LIBRARY
-
-/* Compiler/platform supports struct strbuf */
-#undef ACE_HAS_STRBUF_T
-
-/* Platform/compiler lacks strdup() (e.g., VxWorks, Chorus, WinCE) */
-#undef ACE_HAS_STRDUP_EMULATION
-
-/* Compile ACE_OS::strptime() wrapper into ACE. */
-#undef ACE_HAS_STRPTIME
-
-/* Platform supports STREAMS */
-#undef ACE_HAS_STREAMS
-
-/* Platform supports STREAM pipes */
-#undef ACE_HAS_STREAM_PIPES
-
-/* Compiler/platform supports strerror () */
-#undef ACE_HAS_STRERROR
-
-/* Use the STRICT compilation mode on Win32. */
-#undef ACE_HAS_STRICT
-
-/* Platform/Compiler supports a String class (e.g., GNU or Win32). */
-#undef ACE_HAS_STRING_CLASS
-
-/* Platform has <strings.h> (which contains bzero() prototype) */
-#undef ACE_HAS_STRINGS
-
-/* Compiler/platform has strange hostent API for socket *_r() calls */
-#undef ACE_HAS_STRUCT_NETDB_DATA
-
-/* Platform has void * as second parameter to gettimeofday and a has a
- prototype */
-#undef ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-/* Compiler has horrible SunOS 4.x signal handlers... */
-#undef ACE_HAS_SUNOS4_SIGNAL_T
-
-/* Compiler/platform supports SVR4 dynamic linking semantics */
-#undef ACE_HAS_SVR4_DYNAMIC_LINKING
-
-/* Compiler/platform supports SVR4 gettimeofday() prototype but
- doesn't have a prototype */
-#undef ACE_HAS_SVR4_GETTIMEOFDAY
-
-/* Compiler/platform supports SVR4 signal typedef. */
-#undef ACE_HAS_SVR4_SIGNAL_T
-
-/* Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff). */
-#undef ACE_HAS_SVR4_TLI
-
-/* HP/UX has an undefined syscall for GETRUSAGE. */
-#undef ACE_HAS_SYSCALL_GETRUSAGE
-
-/* Compiler/platform contains the <sys/syscall.h> file. */
-#undef ACE_HAS_SYSCALL_H
-
-/* Platform provides <sysent.h> header */
-#undef ACE_HAS_SYSENT_H
-
-/* Platform supports system configuration information */
-#undef ACE_HAS_SYSINFO
-
-/* Platform supports System V IPC (most versions of UNIX, but not Win32) */
-#undef ACE_HAS_SYSV_IPC
-
-/* Platform/compiler supports _sys_errlist symbol */
-#undef ACE_HAS_SYS_ERRLIST
-
-/* Platform provides <sys/filio.h> header */
-#undef ACE_HAS_SYS_FILIO_H
-
-/* Compiler/platform supports _sys_siglist array */
-#undef ACE_HAS_SYS_SIGLIST
-
-/* Platform provides <sys/xti.h> header */
-#undef ACE_HAS_SYS_XTI_H
-
-/* Compiler implements template specialization */
-#undef ACE_HAS_TEMPLATE_SPECIALIZATION
-
-/* Compiler supports standard C++ template specializations
- (e.g. "template <>" syntax.) */
-#undef ACE_HAS_STD_TEMPLATE_SPECIALIZATION
-
-/* Compiler supports standard C++ template method specializations
- (e.g. "template <>" syntax.) */
-#undef ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION
-
-/* Compiler implements templates that support typedefs inside of
- classes used as formal arguments to a template class. */
-#undef ACE_HAS_TEMPLATE_TYPEDEFS
-
-/* Platform has terminal ioctl flags like TCGETS and TCSETS. */
-#undef ACE_HAS_TERM_IOCTLS
-
-/* Platform supports threads */
-#undef ACE_HAS_THREADS
-
-/* Platform allows multiple threads to call accept() on the same port
- (e.g., WinNT). */
-#undef ACE_HAS_THREAD_SAFE_ACCEPT
-
-/* Platform has thread_self() rather than pthread_self() (e.g.,
- DCETHREADS and AIX) */
-#undef ACE_HAS_THREAD_SELF
-
-/* Compiler/platform has thread-specific storage */
-#undef ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-/* The pthread_keycreate() routine *must* take extern C functions. */
-#undef ACE_HAS_THR_C_DEST
-
-/* The pthread_create() routine *must* take extern C functions. */
-#undef ACE_HAS_THR_C_FUNC
-
-/* Platform/compiler supports timezone * as second parameter to
- gettimeofday() and has a prototype*/
-#undef ACE_HAS_TIMEZONE_GETTIMEOFDAY
-
-/* Platform supports TLI timod STREAMS module */
-#undef ACE_HAS_TIMOD_H
-
-/* Platform supports TLI tiuser header */
-#undef ACE_HAS_TIUSER_H
-
-/* Platform does not protect <tiuser.h> with extern "C" */
-#undef ACE_HAS_TIUSER_H_BROKEN_EXTERN_C
-
-/* Platform supports TLI. Also see ACE_TLI_TCP_DEVICE. */
-#undef ACE_HAS_TLI
-
-/* Platform provides TLI function prototypes */
-#undef ACE_HAS_TLI_PROTOTYPES
-
-/* ACE provides TSS emulation. See also ACE_DEFAULT_THREAD_KEYS. */
-#undef ACE_HAS_TSS_EMULATION
-
-/* Platform supports ualarm() */
-#undef ACE_HAS_UALARM
-
-/* Platform supports ucontext_t (which is used in the extended signal API). */
-#undef ACE_HAS_UCONTEXT_T
-
-/* The wait() system call takes a (union wait *) rather than int * */
-#undef ACE_HAS_UNION_WAIT
-
-/* Has inconsistent SVR4 signal stuff, but not the same as the other
- platforms */
-#undef ACE_HAS_UNIXWARE_SVR4_SIGNAL_T
-
-/* Platform/compiler supports wchar_t */
-#undef ACE_HAS_WCHAR
-
-/* Platform has <utime.h> header file */
-#undef ACE_HAS_UTIME
-
-/* Compiler supports explicit constructors. */
-#undef ACE_HAS_EXPLICIT_KEYWORD
-
-/* Compiler supports the C++ `mutable' keyword. */
-#undef ACE_HAS_MUTABLE_KEYWORD
-
-/* Compiler supports the C++ typename keyword */
-#undef ACE_HAS_TYPENAME_KEYWORD
-
-/* Compiler supports the new using keyword for C++ namespaces. */
-#undef ACE_HAS_USING_KEYWORD
-
-/* Prints out console message in ACE_NOTSUP. Useful for tracking down
- origin of ACE_NOTSUP. */
-#undef ACE_HAS_VERBOSE_NOTSUP
-
-/* Platform requires void * for mmap(). */
-#undef ACE_HAS_VOIDPTR_MMAP
-
-/* OS/compiler uses void * arg 4 setsockopt() rather than const char * */
-#undef ACE_HAS_VOIDPTR_SOCKOPT
-
-/* The Win32 platform support TryEnterCriticalSection() (WinNT 4.0 and
- beyond) */
-#undef ACE_HAS_WIN32_TRYLOCK
-
-/* The Win32 platform supports WinSock 2.0 */
-#undef ACE_HAS_WINSOCK2
-
-/* Platform has the XLI version of TLI */
-#undef ACE_HAS_XLI
-
-/* Platform has Xt Intrinsics Toolkit */
-#undef ACE_HAS_XT
-
-/* Platform does not have Motif X toolkit available */
-#undef ACE_LACKS_MOTIF
-
-/* Platform has XTI (X/Open-standardized superset of TLI). Implies
- ACE_HAS_TLI but uses a different header file. */
-#undef ACE_HAS_XTI
-
-/* Platform lacks access() (e.g., VxWorks and Chorus) */
-#undef ACE_LACKS_ACCESS
-
-/* Platform can not build ace/IOStream{,_T}.cpp. This does not
- necessarily mean that the platform does not support iostreams. */
-#undef ACE_LACKS_ACE_IOSTREAM
-
-/* Do not compile support for the "other" ACE features, such as CORBA
- handling, name services, and QOS. */
-#undef ACE_LACKS_ACE_OTHER
-
-/* Do not compile support for the ACE Service Configurator. */
-#undef ACE_LACKS_ACE_SVCCONF
-
-/* Do not compile support for the ACE Token feature. */
-#undef ACE_LACKS_ACE_TOKEN
-
-/* Platform lacks condition variables (e.g., Win32 and VxWorks) */
-#undef ACE_LACKS_COND_T
-
-/* pthread_cond_timedwait does *not* reset the time argument when
- the lock is acquired. */
-#undef ACE_LACKS_COND_TIMEDWAIT_RESET
-
-/* Platform has no implementation of pthread_condattr_setpshared(), even
- though it supports pthreads! */
-#undef ACE_LACKS_CONDATTR_PSHARED
-
-/* Platform uses struct strbuf * rather than const struct strbuf *
- (e.g., HP/UX 10.x) */
-#undef ACE_LACKS_CONST_STRBUF_PTR
-
-/* Platform forgot const in cond_timewait (e.g., HP/UX). */
-#undef ACE_LACKS_CONST_TIMESPEC_PTR
-
-/* Platform lacks difftime() implementation */
-#undef ACE_LACKS_DIFFTIME
-
-/* Platform lacks the exec() family of system calls (e.g., Win32,
- VxWorks, Chorus) */
-#undef ACE_LACKS_EXEC
-
-/* Platform lacks file locking mechanism */
-#undef ACE_LACKS_FILELOCKS
-
-/* Platform does not support floating point operations */
-#undef ACE_LACKS_FLOATING_POINT
-
-/* Platform lacks the fork() system call (e.g., Win32, VxWorks, Chorus) */
-#undef ACE_LACKS_FORK
-
-/* Platform lacks the getopt() prototype (e.g., LynxOS) */
-#undef ACE_LACKS_GETOPT_PROTO
-
-/* Platform lacks getpgid() call (e.g., Win32, Chorus, and FreeBSD). */
-#undef ACE_LACKS_GETPGID
-
-/* Platform lacks getppid() call. */
-#undef ACE_LACKS_GETPPID
-
-/* Platform lacks setregid() call. */
-#undef ACE_LACKS_SETREGID
-
-/* Platform lacks setreuid() call. */
-#undef ACE_LACKS_SETREUID
-
-/* Platforms lacks getservbyname() (e.g., VxWorks and Chorus). */
-#undef ACE_LACKS_GETSERVBYNAME
-
-/* iostream header does not declare ipfx (), opfx (), etc. */
-#undef ACE_LACKS_IOSTREAM_FX
-
-/* Platform lacks streambuf "linebuffered ()". */
-#undef ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-/* Compiler/platform does not support the unsigned long long datatype. */
-#undef ACE_LACKS_LONGLONG_T
-
-/* Platform lacks the lstat() function. */
-#undef ACE_LACKS_LSTAT
-
-/* Platform does not have u_longlong_t typedef */
-#undef ACE_LACKS_U_LONGLONG_T
-
-/* Platform lacks madvise() (e.g., Linux) */
-#undef ACE_LACKS_MADVISE
-
-/* Platform lacks malloc.h */
-#undef ACE_LACKS_MALLOC_H
-
-/* Platform lacks memory.h (e.g., VxWorks and Chorus) */
-#undef ACE_LACKS_MEMORY_H
-
-/* Platform lacks mkfifo(), e.g. VxWorks, Chorus, pSoS, and WinNT. */
-#undef ACE_LACKS_MKFIFO
-
-/* ACE has no mktemp() */
-#undef ACE_LACKS_MKTEMP
-
-/* The platform doesn't have mmap(2) (e.g., SCO UNIX). */
-#undef ACE_LACKS_MMAP
-
-/* Platform/compiler doesn't have open() mode masks. */
-#undef ACE_LACKS_MODE_MASKS
-
-/* The platform doesn't have mprotect(2) (e.g., EPLX real time OS from CDC
- (based on LYNX)) */
-#undef ACE_LACKS_MPROTECT
-
-/* Platform defines ACE_HAS_MSG, but lacks msg_accrights{,len}. */
-#undef ACE_LACKS_MSG_ACCRIGHTS
-
-/* Platform lacks struct msgbuf (e.g., NT and MSV). */
-#undef ACE_LACKS_MSGBUF_T
-
-/* Platform lacks msync() */
-#undef ACE_LACKS_MSYNC
-
-/* Platform doesn't support "sync" third argument to msync (?) */
-#undef ACE_HAS_BROKEN_NETBSD_MSYNC
-
-/* Platform doesn't support tempnam */
-#undef ACE_LACKS_TEMPNAM
-
-/* Platform lacks pthread_mutexattr_setpshared(). */
-#undef ACE_LACKS_MUTEXATTR_PSHARED
-
-/* OS requires non-null status pointer for ::pthread_join () */
-#undef ACE_LACKS_NULL_PTHREAD_STATUS
-
-/* Platform lacks <sys/param.h> (e.g., MVS) */
-#undef ACE_LACKS_PARAM_H
-
-/* Platform lacks named POSIX semaphores (e.g., Chorus) */
-#undef ACE_LACKS_NAMED_POSIX_SEM
-
-/* Platform lacks native strptime() implementation. */
-#undef ACE_LACKS_NATIVE_STRPTIME
-
-/* Platform/compiler lacks {get,set}rlimit() function (e.g., VxWorks,
- Chorus, and SCO UNIX) */
-#undef ACE_LACKS_RLIMIT
-
-/* Platform/compiler lacks {get,set}rlimit() prototypes (e.g., Tandem) */
-#undef ACE_LACKS_RLIMIT_PROTOTYPE
-
-/* Platform lacks POSIX prototypes for certain System V functions like
- shared memory and message queues. */
-#undef ACE_LACKS_POSIX_PROTOTYPES
-
-/* Platform lacks POSIX prototypes for certain System V functions like
- shared memory and message queues. */
-#undef ACE_LACKS_SOME_POSIX_PROTOTYPES
-
-/* Compiler doesn't support placement operator new(size_t, void *). */
-#undef ACE_LACKS_PLACEMENT_OPERATOR_NEW
-
-/* Compiler doesn't support placement operator delete(void *, void *). */
-#undef ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-
-/* Compiler complains about use of obsolete "#pragma once" */
-#undef ACE_LACKS_PRAGMA_ONCE
-
-/* Platform lacks pri_t (e.g., Tandem NonStop UNIX). */
-#undef ACE_LACKS_PRI_T
-
-/* Platform lack pthread_attr_setstackaddr() */
-#undef ACE_LACKS_THREAD_STACK_ADDR
-
-/* Platform lacks pthread_cancel() */
-#undef ACE_LACKS_PTHREAD_CANCEL
-
-/* Platform lacks pthread_sigmask () */
-#undef ACE_LACKS_PTHREAD_SIGMASK
-
-/* Platform lacks pthread_thr_sigsetmask (e.g., MVS, HP/UX, and OSF/1 3.2) */
-#undef ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-/* Platfrom lack pthread_yield() support. */
-#undef ACE_LACKS_PTHREAD_YIELD
-
-/* Platform lacks, getpwnam(), etc. */
-#undef ACE_LACKS_PWD_FUNCTIONS
-
-/* Platform lacks getpwnam_r() methods (e.g., SGI 6.2). */
-#undef ACE_LACKS_PWD_REENTRANT_FUNCTIONS
-
-/* Platform lacks the readlink() function. */
-#undef ACE_LACKS_READLINK
-
-/* Platform lacks the rename() function. */
-#undef ACE_LACKS_RENAME
-
-/* Platform lacks recvmsg() */
-#undef ACE_LACKS_RECVMSG
-
-/* Platform lacks readers/writer locks. */
-#undef ACE_LACKS_RWLOCK_T
-
-/* Platform lacks a working sbrk() (e.g., Win32 and VxWorks) */
-#undef ACE_LACKS_SBRK
-
-/* Platform lacks struct sembuf (e.g., Win32 and VxWorks) */
-#undef ACE_LACKS_SEMBUF_T
-
-/* Platform lacks pthread_attr_setdetachstate() (e.g., HP/UX 10.x) */
-#undef ACE_LACKS_SETDETACH
-
-/* Platform lacks pthread_attr_setsched() (e.g. MVS) */
-#undef ACE_LACKS_SETSCHED
-
-/* Platform lacks struct sigaction (e.g., Win32 and Chorus) */
-#undef ACE_LACKS_SIGACTION
-
-/* Platform lacks "signed char" type (broken!) */
-#undef ACE_LACKS_SIGNED_CHAR
-
-/* Platform lacks signal sets (e.g., Chorus and Win32) */
-#undef ACE_LACKS_SIGSET
-
-/* Platform/compiler lacks strrchr () function. */
-#undef ACE_LACKS_STRRCHR
-
-/* Platforms/compiler lacks the sys_nerr variable (e.g., VxWorks and MVS). */
-#undef ACE_LACKS_SYS_NERR
-
-/* Platform lacks sys/msg.h (e.g., Chorus and VxWorks) */
-#undef ACE_LACKS_SYSV_MSG_H
-
-/* Platform lacks SYSV message queue prototypes */
-#undef ACE_LACKS_SYSV_MSQ_PROTOS
-
-/* Platform lacks key_t (e.g., Chorus, VxWorks, Win32) */
-#undef ACE_LACKS_KEY_T
-
-/* Platform lacks sendmsg() */
-#undef ACE_LACKS_SENDMSG
-
-/* Platform lacks the si_addr field of siginfo_t (e.g., VxWorks and
- HP/UX 10.x) */
-#undef ACE_LACKS_SI_ADDR
-
-/* Platform lacks System V shared memory (e.g., Win32 and VxWorks) */
-#undef ACE_LACKS_SYSV_SHMEM
-
-/* Platform lacks the siginfo.h include file (e.g., MVS) */
-#undef ACE_LACKS_SIGINFO_H
-
-/* Platform doesn't support SO_SNDBUF/SO_RCVBUF (used in TAO) */
-#undef ACE_LACKS_SOCKET_BUFSIZ
-
-/* Platform lacks the socketpair() call (e.g., SCO UNIX) */
-#undef ACE_LACKS_SOCKETPAIR
-
-/* Compiler doesn't support static data member templates */
-#undef ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
-
-/* Compiler/platform lacks strcasecmp() (e.g., DG/UX, UNIXWARE, VXWORKS) */
-#undef ACE_LACKS_STRCASECMP
-
-/* Platform doesn't define struct strrecvfd. */
-#undef ACE_LACKS_STRRECVFD
-
-/* Platform doesn't have syscall() prototype */
-#undef ACE_LACKS_SYSCALL
-
-/* Platform lacks <sys/types.h> header file */
-#undef ACE_LACKS_SYS_TYPES_H
-
-/* Header files lack t_errno for TLI */
-#undef ACE_LACKS_T_ERRNO
-
-/* Platform doesn't have netinet/tcp.h */
-#undef ACE_LACKS_TCP_H
-
-/* OS does not support TCP_NODELAY */
-#undef ACE_LACKS_TCP_NODELAY
-
-/* Platform lacks pthread_attr_setscope() */
-#undef ACE_LACKS_THREAD_PROCESS_SCOPING
-
-/* Platform lacks pthread_attr_setstacksize() (e.g., Linux pthreads) */
-#undef ACE_LACKS_THREAD_STACK_SIZE
-
-/* MIT pthreads platform lacks the timedwait prototypes */
-#undef ACE_LACKS_TIMEDWAIT_PROTOTYPES
-
-/* Platform does not define timepec_t as a typedef for struct timespec. */
-#undef ACE_LACKS_TIMESPEC_T
-
-/* Platform doesn't have truncate() (e.g., vxworks) */
-#undef ACE_LACKS_TRUNCATE
-
-/* Platform/compiler lacks the getpgid() prototype */
-#undef ACE_LACKS_GETPGID_PROTOTYPE
-
-/* Platform/compiler lacks the setregid() prototype */
-#undef ACE_LACKS_SETREGID_PROTOTYPE
-
-/* Platform/compiler lacks the setreuid() prototype */
-#undef ACE_LACKS_SETREUID_PROTOTYPE
-
-/* Platform/compiler lacks the strptime() prototype */
-#undef ACE_LACKS_STRPTIME_PROTOTYPE
-
-/* Platform/compiler lacks the strtok_r() prototype */
-#undef ACE_LACKS_STRTOK_R_PROTOTYPE
-
-/* Platform/compiler lacks the lseek64() prototype. This should not
- be defined if ACE_LACKS_LLSEEK_PROTOTYPE is defined. */
-#undef ACE_LACKS_LSEEK64_PROTOTYPE
-
-/* Platform/compiler lacks the llseek() prototype. This should not
- be defined if ACE_LACKS_LSEEK64_PROTOTYPE is defined. */
-#undef ACE_LACKS_LLSEEK_PROTOTYPE
-
-/* Platform/compiler lacks the pread() and pwrite() prototypes */
-#undef ACE_LACKS_PREAD_PROTOTYPE
-
-/* Platform/compiler lacks the ualarm() prototype (e.g., Solaris) */
-#undef ACE_LACKS_UALARM_PROTOTYPE
-
-/* Compiler does not have any istream operator>> for chars, u_chars, or
- signed chars. */
-#undef ACE_LACKS_CHAR_RIGHT_SHIFTS
-
-/* Compiler does not have operator>> (istream &, u_char *) or
- operator>> (istream &, signed char *) */
-#undef ACE_LACKS_CHAR_STAR_RIGHT_SHIFTS
-
-/* Platform lacks the ucontext.h file */
-#undef ACE_LACKS_UCONTEXT_H
-
-/* Platform lacks the unistd.h file (e.g., VxWorks and Win32) */
-#undef ACE_LACKS_UNISTD_H
-
-/* ACE platform has no UNIX domain sockets */
-#undef ACE_LACKS_UNIX_DOMAIN_SOCKETS
-
-/* Platform lacks full signal support (e.g., Win32 and Chorus). */
-#undef ACE_LACKS_UNIX_SIGNALS
-
-/* Platform lacks struct utsname (e.g., Win32 and VxWorks) */
-#undef ACE_LACKS_UTSNAME_T
-
-/* Platform lacks wchar_t typedef */
-#undef ACE_LACKS_WCHAR_T
-
-/* The bind() call will not select the port if it's 0. */
-#undef ACE_LACKS_WILDCARD_BIND
-
-/* Renames "main (int, char *[])", for platforms such as g++/VxWorks
- that don't allow main. Requires the use of
- ACE_HAS_NONSTATIC_OBJECT_MANAGER. */
-#undef ACE_MAIN
-
-/* Compile using multi-thread libraries */
-#undef ACE_MT_SAFE
-
-/* Turns off debugging features */
-#undef ACE_NDEBUG
-
-/* Necessary with some compilers to pass ACE_TTY_IO as parameter to
- DEV_Connector. */
-#undef ACE_NEEDS_DEV_IO_CONVERSION
-
-/* Required by platforms with small default stacks. */
-#undef ACE_NEEDS_HUGE_THREAD_STACKSIZE
-
-/* OS has LWPs, and when the priority of a bound thread is set, then
- the LWP priority must be set also. */
-#undef ACE_NEEDS_LWP_PRIO_SET
-
-/* Platform doesn't define readv, so use our own */
-#undef ACE_LACKS_READV
-
-/* Platform doesn't define writev, so use our own */
-#undef ACE_LACKS_WRITEV
-
-/* Platform needs regexpr.h for regular expression support */
-#undef ACE_NEEDS_REGEXPR_H
-
-/* Platform needs to #include <sched.h> to get thread scheduling defs. */
-#undef ACE_NEEDS_SCHED_H
-
-/* <time.h> doesn't automatically #include <sys/time.h> */
-#undef ACE_LACKS_SYSTIME_H
-
-/* Compiler's 'new' throws exception on failure (ANSI C++ behavior). */
-#undef ACE_NEW_THROWS_EXCEPTIONS
-
-/* Turns off the LM_DEBUG and LM_ERROR logging macros... */
-#undef ACE_NLOGGING
-
-/* Turns off the tracing feature. */
-#undef ACE_NTRACE
-
-/* Defines the page size of the system (not used on Win32 or with
- ACE_HAS_GETPAGESIZE). */
-#undef ACE_PAGE_SIZE
-
-/* Platform redefines the t_... names (UnixWare) */
-#undef ACE_REDEFINES_XTI_FUNCTIONS
-
-/* Platform uses int for select() rather than fd_set */
-#undef ACE_SELECT_USES_INT
-
-/* Compiler's template mechanism must use a pragma. This is used for
- AIX's C++ compiler. */
-#undef ACE_TEMPLATES_REQUIRE_PRAGMA
-
-/* Compiler's template mechanim must see source code (i.e., .cpp
- files). This is used for GNU G++. */
-#undef ACE_TEMPLATES_REQUIRE_SOURCE
-
-/* 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. */
-#undef ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-
-/* 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. */
-#undef ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA
-
-/* 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. */
-#undef ACE_NEEDS_FUNC_DEFINITIONS
-
-/* Device the platform uses for TCP on TLI. Only needed if not
- /dev/tcp. */
-#undef ACE_TLI_TCP_DEVICE
-
-/* The OS/platform supports the poll() event demultiplexor */
-#undef ACE_USE_POLL
-
-/* Platform has broken poll() */
-#undef ACE_POLL_IS_BROKEN
-
-/* Platform uses assembly symbols instead of C symbols in dlsym() */
-#undef ACE_USES_ASM_SYMBOL_IN_DLSYM
-
-/* When linking MFC as a static library is desired */
-#undef ACE_USES_STATIC_MFC
-
-/* Platform has its standard c++ library in the namespace std. */
-#undef ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB
-
-/* A parameter list indicating the version of WinSock (e.g., "1, 1" is
- version 1.1). */
-#undef ACE_WSOCK_VERSION
-
-#undef HAVE_RESTARTABLE_SYSCALLS
-
-
-/* @BOTTOM@ */
-/* All lines below "@BOTTOM@" will be placed at the bottom of config.h.in. */
-
-
-#endif /* ACE_CONFIG_H */
diff --git a/bin/bootstrap b/bin/bootstrap
index dcb770c3507..2c6dd32de23 100755
--- a/bin/bootstrap
+++ b/bin/bootstrap
@@ -10,7 +10,7 @@
#
# -------------------------------------------------------------------------
-# Copyright (C) 1999 Ossama Othman
+# Copyright (C) 1999, 2002 Ossama Othman
#
# All Rights Reserved
#
@@ -122,60 +122,60 @@ if test -d m4; then
aclocal -I m4
# Generate a `config.h.in' configuration header template from `acconfig.h'.
- echo 'Running autoheader (expect some "AC_TRY_RUN" warnings)'
- autoheader
+ echo Running autoheader
+ autoheader -I m4
# Generate the `configure' script from the `configure.in'.
- echo 'Running autoconf (expect some "AC_TRY_RUN" warnings)'
+ echo Running autoconf
autoconf
- # Generate all `Makefile.in' templates in the directories listed in
- # `configure.in' and add any missing files that GNU Automake needs so
- # that the distribution and configuration processes will run properly.
- echo Running automake
- if test $bootstrap_release = no && test $enable_deps = no; then
- automake --add-missing --include-deps #--verbose
- else
+# # Generate all `Makefile.in' templates in the directories listed in
+# # `configure.in' and add any missing files that GNU Automake needs so
+# # that the distribution and configuration processes will run properly.
+# echo Running automake
+# if test $bootstrap_release = no && test $enable_deps = no; then
+# automake --add-missing --include-deps #--verbose
+# else
automake --add-missing #--verbose
- fi
-
- # Generate the man pages.
- # Only generate man pages if bootstrapping a release.
- if test $bootstrap_release = yes; then
- if test -f man/man3/ACE.3; then
- echo ACE man pages have already been generated.
- else
- echo 'Generating the ACE man pages (this may take several minutes)'
-
- (ACE_ROOT=.; \
- export ACE_ROOT; \
- ./bin/generate_doxygen.pl -is_release -exclude_tao > /dev/null)
- fi # test -f man/man3/ACE.3
- fi # test $bootstrap_release = yes
-
- # Regenerate the man pages lists in the man page Makefiles.
-
- if test -f man/man3/Makefile.am; then
- # Only insert man page lists if bootstrapping a release.
- if test $bootstrap_release = yes; then
- echo 'Inserting ACE man page lists into appropriate Makefile.am files.'
- ACE_MAN_PAGES=`(cd man/man3 && echo *.3)`
- else
- ACE_MAN_PAGES=
- fi
-
- (cd man/man3; \
- eval "sed -e 's/^man_MANS =.*$/man_MANS = $ACE_MAN_PAGES/' \
- Makefile.am > Makefile.am.new"; \
- mv Makefile.am.new Makefile.am)
- (cd man/html; \
- eval "sed -e 's/^html_DATA =.*$/html_DATA = $ACE_HTML_MAN_PAGES/' \
- Makefile.am > Makefile.am.new"; \
- mv Makefile.am.new Makefile.am)
- else
- test -f man/man3/Makefile.am || echo 'man/man3/Makefile.am is missing!'
- exit 1;
- fi # test -f man/man3/Makefile.am
+# fi
+
+# # Generate the man pages.
+# # Only generate man pages if bootstrapping a release.
+# if test $bootstrap_release = yes; then
+# if test -f man/man3/ACE.3; then
+# echo ACE man pages have already been generated.
+# else
+# echo 'Generating the ACE man pages (this may take several minutes)'
+
+# (ACE_ROOT=.; \
+# export ACE_ROOT; \
+# ./bin/generate_doxygen.pl -is_release -exclude_tao > /dev/null)
+# fi # test -f man/man3/ACE.3
+# fi # test $bootstrap_release = yes
+
+# # Regenerate the man pages lists in the man page Makefiles.
+
+# if test -f man/man3/Makefile.am; then
+# # Only insert man page lists if bootstrapping a release.
+# if test $bootstrap_release = yes; then
+# echo 'Inserting ACE man page lists into appropriate Makefile.am files.'
+# ACE_MAN_PAGES=`(cd man/man3 && echo *.3)`
+# else
+# ACE_MAN_PAGES=
+# fi
+
+# (cd man/man3; \
+# eval "sed -e 's/^man_MANS =.*$/man_MANS = $ACE_MAN_PAGES/' \
+# Makefile.am > Makefile.am.new"; \
+# mv Makefile.am.new Makefile.am)
+# (cd man/html; \
+# eval "sed -e 's/^html_DATA =.*$/html_DATA = $ACE_HTML_MAN_PAGES/' \
+# Makefile.am > Makefile.am.new"; \
+# mv Makefile.am.new Makefile.am)
+# else
+# test -f man/man3/Makefile.am || echo 'man/man3/Makefile.am is missing!'
+# exit 1;
+# fi # test -f man/man3/Makefile.am
# Provide some more "useful" information.
echo Done bootstrapping.
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000000..071e6a7b64a
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,7203 @@
+dnl
+dnl An autoconf script to automatically configure ACE.
+dnl Process this file with autoconf to produce a configure script.
+dnl
+
+dnl @todo PACKAGE and VERSION should be static, not computed by the
+dnl shell. Or M4 should be used to compute if necessary.
+dnl AC_INIT(["$PACKAGE"], ["$ACE_VERSION"], [ace-bugs@cs.wustl.edu],[ace])
+AC_INIT([ACE],[TEST-VERSION],[ace-bugs@cs.wustl.edu],[ace])
+
+
+AC_REVISION([$Id$])
+
+AC_COPYRIGHT([ACE(TM) and TAO(TM) are copyrighted by Douglas C. Schmidt and
+his research group at Washington University, Copyright (c) 1993-2002,
+all rights reserved. Since ACE and TAO are open-source, free
+software, you are free to use, modify, and distribute the ACE and TAO
+source code and object code produced from the source, as long as you
+include this copyright statement along with code built using ACE and
+TAO.
+
+Please see the file `COPYING' in the top level ACE directory for
+additional details.])
+
+
+dnl Require GNU Autoconf 2.57 or better.
+AC_PREREQ(2.57)dnl
+
+AC_CONFIG_SRCDIR([ace/ACE.cpp])
+
+dnl Check what platform we are running on.
+AC_CANONICAL_TARGET([])
+
+dnl Initialize GNU Automake, and require Automake 1.7 or better.
+AM_INIT_AUTOMAKE([1.7])
+
+changequote(, )dnl
+ACE_VERSION=`head -1 ${srcdir}/VERSION | sed 's/.*version \([0-9.]*\).*/\1/'`
+changequote([, ])dnl
+
+
+
+dnl Add maintainer mode option to the option list.
+dnl AM_MAINTAINER_MODE
+
+dnl The maintainer of this configure script.
+ACE_CONFIGURE_MAINTAINER='ace-users@cs.wustl.edu'
+
+
+dnl Until autoconf support in ACE is complete, prevent this script
+dnl from running unless the user explictly forces the configure script
+dnl to run using the "--enable-maintainer-mode" configure script
+dnl option.
+dnl if test $USE_MAINTAINER_MODE != yes; then
+dnl AC_MSG_ERROR([
+dnl ACE autoconf support is currently disabled by default since it is
+dnl still under development. Please use the stock ACE build procedure
+dnl detailed in the file \`ACE-INSTALL.html'.
+dnl
+dnl If you wish to experiment with ACE's autoconf support then use the
+dnl \"--enable-maintainer-mode\" configure script option to enable
+dnl autoconf support. For more details see the file
+dnl \`ACE-configuration.txt'.])
+dnl fi dnl test $USE_MAINTAINER_MODE != yes
+
+dnl If we are configuring in a CVS controlled directory then don't
+dnl continue any further. The idea is to prevent automatically
+dnl generated files from being checked into the repository. This
+dnl will prevent accidental overwrites of ACE's current Makefiles by
+dnl the automatically generated ones, for example.
+dnl ACE_CHECK_FOR_CVS_DIR
+
+dnl Prevent the configure script from continuing any further if
+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.
+ACE_CHECK_TOP_SRCDIR
+
+dnl Prepare the `ace/config.h.in' header template.
+ACE_PREP_CONFIG_HEADER
+
+dnl Allow the standard program name transformations.
+dnl We probably don't need AC_ARG_PROGRAM any longer since AM_INIT_AUTOMAKE
+dnl handles this functionality. -- Ossama
+dnl AC_ARG_PROGRAM
+
+dnl Generate a header file with all settings.
+AC_CONFIG_HEADERS([ace/config.h])
+
+dnl Move before the AC_ARG_ENABLE stuff to prevent autoconf complaints.
+dnl This is a bit messy but it makes life easier for me.
+dnl -Ossama
+dnl
+dnl SECTION: checks for programs
+dnl
+
+dnl Check if system supports "#! /bin/sh" line in scripts
+AC_SYS_INTERPRETER
+
+dnl Check the C compiler and preprocessor.
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CC_C_O
+
+dnl Check the C++ compiler and preprocessor.
+AC_PROG_CXX
+AC_PROG_CXXCPP
+
+dnl Set the test language as C++
+AC_LANG([C++])
+
+dnl If we are cross compiling disable certain things in the Makefiles.
+dnl AM_CONDITIONAL(ACE_CROSS_COMPILED, test X$cross_compiling = Xyes)dnl
+
+
+dnl This checks for a binary called gm4, gnum4 or m4, and assigns
+dnl whatever was found (or "gonzo") to the M4 macro.
+dnl AC_CHECK_PROGS(M4, gm4 gnum4 m4, gonzo)
+
+dnl Look for the best awk-style program available.
+AC_PROG_AWK
+
+dnl Set some version information
+ACE_CURRENT=0
+ACE_AGE=0
+ACE_REVISION=0
+
+if test -n "$AWK"; then
+ ACE_MAJOR=`echo "$ACE_VERSION" | sed 's/\./ /g' | $AWK '{ print \[$]1 }'`
+ ACE_MINOR=`echo "$ACE_VERSION" | sed 's/\./ /g' | $AWK '{ print \[$]2 }'`
+ ACE_BETA=`echo "$ACE_VERSION" | sed 's/\./ /g' | $AWK '{ print \[$]3 }'`
+
+dnl Make sure all of the versions have a legitimate value, i.e. not an
+dnl empty string.
+ test -z "$ACE_MAJOR" && ACE_MAJOR=0
+ test -z "$ACE_MINOR" && ACE_MINOR=0
+ test -z "$ACE_BETA" && ACE_BETA=0
+
+dnl This is a terrible kludge to fool libtool into making it produce a shared
+dnl library with the "right" version information.
+dnl We really should switch to a version scheme that is compatible with
+dnl libtool.
+dnl -Ossama
+ACE_CURRENT=`expr $ACE_MAJOR + $ACE_MINOR`
+ACE_AGE=$ACE_MINOR
+ACE_REVISION=$ACE_BETA
+
+fi
+
+AC_SUBST([ACE_CURRENT])
+AC_SUBST([ACE_AGE])
+AC_SUBST([ACE_REVISION])
+
+dnl Do the usual install settings; don't forget to include a
+dnl `install-sh' script, in case there is no BSD compatible `install'
+dnl installed (no pun intended) in your machine.
+
+dnl We don't need this anymore since AM_INIT_AUTOMAKE calls AC_PROG_INSTALL.
+dnl -- Ossama
+dnl AC_PROG_INSTALL
+
+dnl Special handling for some UNIX variants and Cygwin32
+dnl AC_AIX
+
+dnl AC_MINIX
+AC_DIAGNOSE([obsolete],[AC_CYGWIN is obsolete: use AC_CANONICAL_HOST and $host_os])
+case $host_os in
+ *cygwin* ) CYGWIN=yes;;
+ * ) CYGWIN=no;;
+esac
+
+
+dnl Check if we support symlinks
+AC_PROG_LN_S
+
+dnl Check if a lexical analyzer exists (lex, flex, etc.)
+AM_PROG_LEX
+
+dnl Check if some implementation of YACC exists (yacc, byacc, bison, etc.)
+AC_PROG_YACC
+dnl if test -z "$YACC"; then
+dnl ./missing yacc
+dnl fi
+
+dnl Check for perfect hash function generator
+AC_CHECK_PROG([GPERF],[gperf],[gperf])
+
+dnl Check for profiling progam
+AC_CHECK_PROGS([PROF],[gprof prof],)
+
+dnl The user's/default C++ flags are stored in "CXXFLAGS." We use
+dnl the variable "ACE_CXXFLAGS" to set the C++ flags we want. At the end
+dnl of the configuration process we combine ACE_CXXFLAGS and CXXFLAGS
+dnl into CXXFLAGS (e.g., CXXFLAGS="$ACE_CXXFLAGS $CXXFLAGS"). CXXFLAGS
+dnl goes after ACE_CXXFLAGS so that the user's C++ flag command line
+dnl choices always override the configure script's choices.
+ACE_CXXFLAGS=""
+ACE_CFLAGS=""
+
+
+
+dnl SECTION 2: Configure script command line options
+
+
+dnl Determine which subsets to build
+dnl This is done using the autoconf "--enable-foobar" mechanism.
+ACE_CHECK_SUBSETS
+
+dnl Add --{enable,disable,with,without}-feature options.
+ACE_CONFIGURATION_OPTIONS
+ACE_COMPILATION_OPTIONS
+
+dnl Configure the TAO directory if it exists.
+dnl TAO_CONFIGURATION_OPTIONS
+
+# Autoconf's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+# Libtool's setup macro calls AC_OBJEXT and AC_EXEEXT without setting
+# the test language to C. We do it before any libtool setup macros are
+# called so that the proper values are cached beforehand. We also do
+# it before any linker flags (LDFLAGS) are set so that C++ specific
+# ones don't break the tests.
+AC_LANG_PUSH([C])
+AC_OBJEXT
+AC_EXEEXT
+AC_LANG_POP([C])
+
+dnl Call ACE_SET_COMPILER_FLAGS before AC_PROG_LIBTOOL and after the
+dnl AC_ARG_ENABLE and AC_ARG_WITH calls.
+dnl ACE_SET_COMPILER_FLAGS
+
+
+dnl SECTION 3: check for programs <--- moved before section 2 (Ossama)
+
+
+dnl Platform specific libraries needed for ACE's autoconf tests
+dnl that currently do not have tests themselves.
+dnl Platform specific flags
+case "$host" in
+ *freebsd*)
+ LIBS="$LIBS -lcompat"
+ ;;
+ *osf3.2*)
+ LIBS="$LIBS -lmach -lsys5 -lcxx -lc"
+ ;;
+ *osf4.0* | *osf5.0*)
+ LIBS="$LIBS -lmach"
+ ;;
+ *psos*)
+ LIBS="$LIBS -lm"
+ ;;
+esac
+
+
+dnl SECTION 4: checks for libraries
+
+
+dnl Additional X library checks
+dnl We only check for these libraries if the user has
+dnl enabled XtReactor support.
+
+if test "$ace_user_enable_xt_reactor" = yes; then
+XTREACTOR_TEST_XLIBS=""
+dnl Check for Motif if we have X
+ T_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $X_LIBS"
+
+dnl Note that ACE currently only needs -lX11 and -lXt for the XtReactor
+dnl so we define another library variable that contains additional
+dnl libraries for the XtReactor test since it needs either Motif or the
+dnl Athena widget set.
+
+ xt_reactor_go=no
+ AC_CHECK_LIB([Xm],[XmCreateRowColumn],
+ [
+ AC_DEFINE([ACE_HAS_XT])
+ XTREACTOR_TEST_XLIBS="-lXm"
+ xt_reactor_go=yes
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_MOTIF])
+ AC_CHECK_LIB([Xaw],[XawInitializeWidgetSet],
+ [
+ AC_DEFINE([ACE_HAS_XT])
+ XTREACTOR_TEST_XLIBS="-lXaw -lXmu"
+ xt_reactor_go=yes
+ ],
+ [
+ xt_reactor_go=no
+ AC_MSG_WARN([No usable X widget libraries were found.])
+ AC_MSG_WARN([XtReactor support will be disabled.])
+ ],[-lXmu])
+ ],[-lXt])
+
+ AC_SUBST([XTREACTOR_TEST_XLIBS])
+
+dnl AM_CONDITIONAL([COMPILE_XTREACTOR_TEST],[test X$xt_reactor_go = Xyes])
+
+dnl Restore pre-test linker flags
+ LDFLAGS="$T_LDFLAGS"
+
+fi dnl test "$ace_user_enable_xt_reactor"= yes
+
+dnl End additional X library checks
+
+dnl Some platforms do not have a dynamic linking library, however the
+dnl dlopen, dlclose, etc., functions may exist in the C library.
+dnl (e.g. Digital UNIX)
+dnl Check for dynamic linking library
+AC_SEARCH_LIBS([dlopen],[dl svld],[ace_has_svr4_dynamic_linking=yes],
+ [
+ ace_has_svr4_dynamic_linking=no
+ AC_CHECK_LIB([dld],[shl_get],,)
+ ])
+
+dnl Check if the socket library is available
+AC_SEARCH_LIBS([socket],[socket],,,[-lnsl])
+
+dnl Check for gethostbyname in -lnsl since some platforms (e.g. Solaris)
+dnl put it there.
+AC_SEARCH_LIBS([gethostbyname],[nsl],,)
+
+dnl Check for getservbyname in -lxnet since some platforms (e.g. Solaris)
+dnl may put it there.
+AC_SEARCH_LIBS([getservbyname],[socket xnet],,[AC_DEFINE([ACE_LACKS_GETSERVBYNAME])],[-lnsl])
+
+
+dnl Check for compile() regex function in -lgen. Solaris, for example,
+dnl may put it there.
+AC_SEARCH_LIBS([compile],[gen],,)
+
+dnl Check for exception handling library (e.g. for Digital UNIX)
+AC_SEARCH_LIBS([exc_continue],[exc],,)
+
+dnl Check for ctime_r in -lc_r. Some platforms, such as Digital UNIX,
+dnl put reentrant functions such as asctime_r, ctime_r, gmtime_r, and
+dnl localtime_r in -lc_r.
+AC_SEARCH_LIBS([ctime_r],[c_r],,)
+
+dnl TLI library check
+AC_SEARCH_LIBS([t_accept],[xti tli_r tli nsl],
+ [ace_has_tli_funcs=yes],[ace_has_tli_funcs=no])
+
+dnl Check for all of the things we need to compile and link threads
+dnl properly.
+if test "$ace_user_enable_threads" = yes; then
+ ACE_CHECK_THREADS
+fi dnl test "$ace_user_enable_threads" = yes
+
+dnl Setup Libtool
+
+dnl This should be done in the "programs" section of this file but
+dnl libtool may then be unaware of compiler flags set during the
+dnl thread checks.
+
+dnl Disable building of static libraries by default
+AC_DISABLE_STATIC
+
+dnl Enable Libtool module support
+AC_LIBTOOL_DLOPEN
+
+dnl FIXME: Temporary hack to make libtool work with g++.
+dnl Shared library support will only work with GNU g++ and GNU ld
+dnl right now.
+dnl save_CC="$CC"
+dnl CC="$CXX"
+
+dnl Check for libtool and turn on Automake processing for Libtool
+dnl AC_PROG_LIBTOOL
+
+dnl Enable C++ support in libtool
+dnl AC_LIBTOOL_CXX
+
+dnl Temporary hack until I get integrate libtool's new tag support
+dnl into automake.
+dnl This hack forces libtool to always use the C++ tag.
+dnl LIBTOOL="$LIBTOOL --tag=CXX"
+
+dnl Check for sched_yield() in posix4 library.
+dnl Some platforms, such as Solaris, may define sched_yield() there.
+dnl Later we run AC_CHECK_FUNC(sched_yield), which is redundant in this case
+dnl but is needed if sched_yield() is defined in one of the other libraries
+dnl we check for.
+AC_SEARCH_LIBS([sched_yield],[rt posix4],[ace_has_sched_yield=yes],)
+
+dnl Check for asynchronous IO calls (perform check *after* thread check!)
+ACE_CHECK_ASYNCH_IO
+
+dnl Additional `-lposix4' library check since it may not be added by the
+dnl above checks on some platforms that may need it
+AC_SEARCH_LIBS([clock_gettime],
+ [rt posix4],[AC_DEFINE(ACE_HAS_CLOCK_GETTIME)],)
+
+
+dnl SECTION 5: checks for header files
+
+
+dnl Check for dirent headers
+AC_HEADER_DIRENT
+
+if test "$ac_cv_header_dirent_dirent_h" = yes ||
+ test "$ac_cv_header_dirent_sys_ndir_h" = yes ||
+ test "$ac_cv_header_dirent_sys_dir_h" = yes ||
+ test "$ac_cv_header_dirent_ndir_h" = yes; then
+ AC_DEFINE([ACE_HAS_DIRENT])
+fi
+
+dnl Check for sys/wait.h Posix.1 compliance
+AC_HEADER_SYS_WAIT
+
+if test "$ac_cv_cygwin" = yes; then
+ AC_CHECK_HEADER([cygwin32/socket.h],
+ [AC_DEFINE([ACE_HAS_CYGWIN32_SOCKET_H])],)
+fi
+
+AC_CHECK_HEADER([dlfcn.h],
+ [
+ dnl We already checked for dlopen in the previous library checks however,
+ dnl it is possible that ac_cv_func_dlopen=yes if dlopen wasn't found before
+ dnl the library test. Hence we cannot use AC_CHECK_FUNC(dlopen) here
+ dnl the previously cached value may prevent ACE_HAS_SVR4_DYNAMIC_LINKING
+ dnl from being defined.
+ dnl -Ossama
+ if test "$ace_has_svr4_dynamic_linking" = yes; then
+ AC_DEFINE([ACE_HAS_SVR4_DYNAMIC_LINKING])
+ fi
+ ],)
+
+AC_CHECK_HEADER([malloc.h],
+ ,
+ [AC_DEFINE([ACE_LACKS_MALLOC_H])])
+
+AC_CHECK_HEADER([memory.h],
+ ,
+ [AC_DEFINE([ACE_LACKS_MEMORY_H])])
+
+AC_CHECK_HEADER([bytesex.h],
+ [AC_DEFINE([ACE_HAS_BYTESEX_H])])
+
+dnl We don't need to explicitly include this on linux.
+dnl AC_CHECK_HEADER([features.h],
+dnl [AC_DEFINE([ACE_HAS_FEATURES_H])])
+
+AC_CHECK_HEADER([sys/msg.h],
+ [
+ ACE_CACHE_CHECK([if _KERNEL is needed for msg prototypes],
+ [ace_cv_lib_broken_msg_h],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/msg.h>
+ ]],[[
+ struct msg ace_msg;
+ ]])],[
+ ace_cv_lib_broken_msg_h=no
+ ],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef _KERNEL
+# define _KERNEL
+#endif
+#include <sys/msg.h>
+ ]],
+ [[
+ struct msg ace_msg;
+ ]])],
+ [
+ ace_cv_lib_broken_msg_h=yes
+ ],
+ [
+ dnl If we get here, then we have no idea if it is broken or not.
+ ace_cv_lib_broken_msg_h=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_BROKEN_MSG_H])
+ ],)
+ ],
+ [AC_DEFINE([ACE_LACKS_SYSV_MSG_H])])
+
+AC_CHECK_HEADER([sys/param.h],
+ [],
+ [AC_DEFINE([ACE_LACKS_PARAM_H])])
+
+AC_CHECK_HEADER([sys/priocntl.h],[],[])
+
+dnl Check for <ucontext.h> _before_ <sys/procfs.h>
+AC_CHECK_HEADER([ucontext.h],
+ [],
+ [AC_DEFINE([ACE_LACKS_UCONTEXT_H])])
+
+AC_CHECK_HEADER([sys/procfs.h],
+ [
+ dnl Check if <sys/procfs.h> conflicts with <ucontext.h>
+ dnl Some (early?) versions of glibc2.1 define the same variables
+ dnl in <sys/procfs.h> and <ucontext.h>.
+ ACE_CACHE_CHECK([if sys/procfs.h conflicts with ucontext.h],
+ [ace_has_procfs_conflict],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_UCONTEXT_H
+# include <ucontext.h>
+#endif
+
+#include <sys/procfs.h>
+ ]],[[
+ int a = 0;
+ ]])],[
+ ace_has_procfs_conflict=no
+ ],[
+ ace_has_procfs_conflict=yes
+ ])
+ ],
+ [
+ ],
+ [
+ dnl If ace_has_procfs_conflict = no then define ACE_HAS_PROC_FS.
+ AC_DEFINE([ACE_HAS_PROC_FS])
+ ])
+ ],)
+
+AC_CHECK_HEADER([sys/select.h],
+ [AC_DEFINE([ACE_HAS_SELECT_H])])
+
+AC_CHECK_HEADER([netinet/tcp.h],
+ [],
+ [AC_DEFINE([ACE_LACKS_TCP_H])])
+
+AC_CHECK_HEADER([sys/sockio.h],
+ [AC_DEFINE([ACE_HAS_SOCKIO_H])])
+
+AC_CHECK_HEADER([sysent.h],
+ [AC_DEFINE([ACE_HAS_SYSENT_H])],)
+
+AC_CHECK_HEADER([sys/systeminfo.h],[],[])
+
+AC_CHECK_HEADER([sys/filio.h],
+ [AC_DEFINE([ACE_HAS_SYS_FILIO_H])],)
+
+AC_CHECK_HEADER([sys/uio.h],,)
+
+AC_CHECK_HEADER([sys/ioctl.h],
+ [AC_DEFINE([ACE_HAS_SYS_IOCTL_H])],)
+
+AC_CHECK_HEADER([sys/types.h],
+ ,
+ [AC_DEFINE([ACE_LACKS_SYS_TYPES_H])])
+
+AC_CHECK_HEADER([sys/termios.h],
+ [
+ AC_EGREP_CPP([ACE_WITH_TERM_IOCTLS],
+ [
+#include <sys/termios.h>
+
+#if defined (ACE_HAS_SYS_IOCTL_H)
+# include <sys/ioctl.h>
+#endif
+
+#if defined(TCGETS) && defined(TCSETS)
+ ACE_WITH_TERM_IOCTLS
+#elif defined(TCGETA) && defined(TCSETA)
+ ACE_WITH_TERM_IOCTLS
+#endif
+ ],
+ [
+ AC_DEFINE([ACE_HAS_TERM_IOCTLS])
+ ],)
+ ],)
+
+if test "$ace_has_tli_funcs" = yes; then
+AC_CHECK_HEADER([xti.h],
+ [
+ ace_has_tli=yes
+ AC_DEFINE([ACE_HAS_XTI])
+ AC_DEFINE([ACE_HAS_TLI])
+ ],)
+
+AC_CHECK_HEADER([sys/xti.h],
+ [
+ ace_has_tli=yes
+ AC_DEFINE([ACE_HAS_SYS_XTI_H])
+ AC_DEFINE([ACE_HAS_XTI])
+ AC_DEFINE([ACE_HAS_TLI])
+ ],)
+
+AC_CHECK_HEADER([sys/timod.h],
+ [
+ AC_DEFINE([ACE_HAS_TIMOD_H])
+ ],
+ [
+ AC_CHECK_HEADER([tli/timod.h],
+ [
+ AC_DEFINE([ACE_HAS_OSF_TIMOD_H])
+ ],)
+ ])
+
+AC_CHECK_HEADER([tiuser.h],
+ [
+ ace_has_tli=yes
+ AC_DEFINE([ACE_HAS_TIUSER_H])
+ AC_DEFINE([ACE_HAS_TLI])
+ ],)
+
+dnl Check if XTI headers are broken
+if test "$ac_cv_header_xti_h" = yes ||
+ test "$ac_cv_header_sys_xti_h" = yes ||
+ test "$ac_cv_header_tiuser_h" = yes; then
+ ACE_CACHE_CHECK([if TCP macros are defined in XTI headers],
+ [ace_cv_lib_has_broken_xti_macros],
+ [
+ AC_EGREP_CPP([ACE_BROKEN_XTI_MACROS],
+ [
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if defined (ACE_HAS_TIUSER_H) || defined (ACE_HAS_XTI)
+# if defined (ACE_HAS_TIUSER_H)
+# include /**/ <tiuser.h>
+# elif defined (ACE_HAS_SYS_XTI_H)
+# include /**/ <sys/xti.h>
+# else
+# include /**/ <xti.h>
+# endif /* ACE_HAS_SYS_XTI_H */
+#endif /* ACE_HAS_TIUSER_H || ACE_HAS_XTI */
+
+#if defined (TCP_NODELAY) || defined (TCP_MAXSEG)
+ACE_BROKEN_XTI_MACROS
+#endif /* TCP_NODELAY || TCPMAXSEG */
+ ],
+ [
+ ace_cv_lib_has_broken_xti_macros=yes
+ ],
+ [
+ ace_cv_lib_has_broken_xti_macros=no
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_BROKEN_XTI_MACROS])
+ ],)
+fi
+
+if test "$ac_cv_header_tiuser_h" = yes; then
+ ACE_CACHE_CHECK([if tiuser.h is protected by extern \"C\"],
+ [ace_cv_lib_tiuser_with_extern_c],[
+ AC_EGREP_HEADER([extern \"C\"],[tiuser.h],
+ [
+ ace_cv_lib_tiuser_with_extern_c=yes
+ ],
+ [
+ ace_cv_lib_tiuser_with_extern_c=no
+ ])
+ ],,[AC_DEFINE([ACE_HAS_TIUSER_H_BROKEN_EXTERN_C])])
+fi dnl test "$ac_cv_header_tiuser_h" = yes
+
+AC_CHECK_HEADER([xliuser.h],
+ [
+ ace_has_tli=yes
+ AC_DEFINE([ACE_HAS_XLI])
+ AC_DEFINE([ACE_HAS_TLI])
+ ],)
+
+
+dnl Check for TLI prototypes
+if test "$ace_has_tli" = yes; then
+ ACE_CACHE_CHECK([for TLI prototypes],
+ [ace_cv_lib_tli_prototypes],
+ [
+dnl We only check for t_accept. This should hopefully be enough.
+ AC_EGREP_CPP([t_accept],
+ [
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if defined (ACE_HAS_TIMOD_H)
+# include <sys/timod.h>
+#endif
+
+#if defined (ACE_HAS_OSF_TIMOD_H)
+# include <tli/timod.h>
+#endif
+
+#if defined (ACE_HAS_TIUSER_H) || defined (ACE_HAS_XTI)
+# if defined (ACE_HAS_BROKEN_XTI_MACROS)
+# undef TCP_NODELAY
+# undef TCP_MAXSEG
+# endif /* ACE_HAS_BROKEN_XTI_MACROS */
+# if defined (ACE_HAS_TIUSER_H)
+# include /**/ <tiuser.h>
+# elif defined (ACE_HAS_SYS_XTI_H)
+# define class ace_xti_class
+# include /**/ <sys/xti.h>
+# undef class
+# else
+# include /**/ <xti.h>
+# endif /* ACE_HAS_TIUSER_H */
+#endif /* ACE_HAS_TIUSER_H || ACE_HAS_XTI */
+
+#if defined (ACE_HAS_XLI)
+# include <xliuser.h>
+#endif
+ ],
+ [
+ ace_cv_lib_tli_prototypes=yes
+ ],
+ [
+ ace_cv_lib_tli_prototypes=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_TLI_PROTOTYPES])],)
+
+dnl Check for t_errno type in TLI headers
+ ACE_CACHE_CHECK([for t_errno in TLI headers],
+ [ace_cv_lib_has_t_errno],
+ [
+ dnl Check if t_errno is declared in the TLI headers
+ AC_EGREP_CPP([t_errno],
+ [
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if defined (ACE_HAS_TIMOD_H)
+# include <sys/timod.h>
+#endif
+
+#if defined (ACE_HAS_OSF_TIMOD_H)
+# include <tli/timod.h>
+#endif
+
+#if defined (ACE_HAS_TIUSER_H) || defined (ACE_HAS_XTI)
+# if defined (ACE_HAS_BROKEN_XTI_MACROS)
+# undef TCP_NODELAY
+# undef TCP_MAXSEG
+# endif /* ACE_HAS_BROKEN_XTI_MACROS */
+# if defined (ACE_HAS_TIUSER_H)
+# include /**/ <tiuser.h>
+# elif defined (ACE_HAS_SYS_XTI_H)
+# define class ace_xti_class
+# include /**/ <sys/xti.h>
+# undef class
+# else
+# include /**/ <xti.h>
+# endif /* ACE_HAS_TIUSER_H */
+#endif /* ACE_HAS_TIUSER_H || ACE_HAS_XTI */
+
+#if defined (ACE_HAS_XLI)
+# include <xliuser.h>
+#endif
+ ],
+ [
+ ace_cv_lib_has_t_errno=yes
+ ],
+ [
+ ace_cv_lib_has_t_errno=no
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_T_ERRNO])])
+
+dnl Check if t_error incorrectly accepts char *
+ ACE_CACHE_CHECK([if t_error incorrectly accepts char *],
+ [ace_cv_lib_has_broken_t_error],
+ [
+ dnl Check if t_errno is declared in the TLI headers
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if defined (ACE_HAS_TIMOD_H)
+# include <sys/timod.h>
+#endif
+
+#if defined (ACE_HAS_OSF_TIMOD_H)
+# include <tli/timod.h>
+#endif
+
+#if defined (ACE_HAS_TIUSER_H) || defined (ACE_HAS_XTI)
+# if defined (ACE_HAS_BROKEN_XTI_MACROS)
+# undef TCP_NODELAY
+# undef TCP_MAXSEG
+# endif /* ACE_HAS_BROKEN_XTI_MACROS */
+# if defined (ACE_HAS_TIUSER_H)
+# include /**/ <tiuser.h>
+# elif defined (ACE_HAS_SYS_XTI_H)
+# define class ace_xti_class
+# include /**/ <sys/xti.h>
+# undef class
+# else
+# include /**/ <xti.h>
+# endif /* ACE_HAS_TIUSER_H */
+#endif /* ACE_HAS_TIUSER_H || ACE_HAS_XTI */
+
+#if defined (ACE_HAS_XLI)
+# include <xliuser.h>
+#endif
+ ]],[[
+ const char *ace_errmsg = "FOO";
+ t_error (ace_errmsg);
+ ]])],[
+ ace_cv_lib_has_broken_t_error=no
+ ],[
+ ace_cv_lib_has_broken_t_error=yes
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_BROKEN_T_ERROR])
+ ],)
+
+fi dnl test "$ace_has_tli" = yes
+fi dnl test "$ace_has_tli_funcs" = yes
+
+AC_CHECK_HEADER([sys/time.h],
+ [
+ dnl This is a weak test.
+ AC_EGREP_HEADER([sys/time.h],[time.h],
+ ,
+ [
+ AC_DEFINE([ACE_LACKS_SYSTIME_H])
+ ])
+ ],)
+
+dnl See the notes about ACE_LACKS_MMAP in the functions section of this
+dnl configure script.
+dnl -Ossama
+AC_CHECK_HEADER([sys/mman.h],
+ [
+ AC_EGREP_HEADER([extern \"C\"],[sys/mman.h],
+ ,
+ [
+ AC_DEFINE([ACE_HAS_BROKEN_MMAP_H])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_MMAP])
+ ])
+
+dnl Check for bzero() prototype if bstring.h exists.
+AC_CHECK_HEADER([bstring.h],
+ [
+ AC_EGREP_HEADER([bzero],[bstring.h],
+ [
+ AC_DEFINE([ACE_HAS_BSTRING])
+ ],)
+ ],)
+
+AC_CHECK_HEADER([strings.h],
+ [
+ AC_EGREP_HEADER([bzero],[strings.h],
+ [
+ AC_DEFINE([ACE_HAS_STRINGS])
+ ],)
+ ],)
+
+AC_CHECK_HEADER([sys/syscall.h],
+ [AC_DEFINE([ACE_HAS_SYSCALL_H])],)
+
+AC_CHECK_HEADER([poll.h],
+ [AC_DEFINE([ACE_HAS_POLL])],)
+
+dnl We want AC_CHECK_HEADERS so that "HAVE_PWD_H" gets defined if we have it.
+dnl "HAVE_PWD_H" is used in one of the tests later on.
+AC_CHECK_HEADERS([pwd.h],,)
+
+AC_CHECK_HEADER([regexpr.h],
+ [AC_DEFINE([ACE_HAS_REGEX])],)
+
+AC_CHECK_HEADER([stropts.h],
+ [AC_DEFINE([ACE_HAS_STREAMS])],)
+
+AC_CHECK_HEADER([siginfo.h],
+ ,
+ [AC_DEFINE([ACE_LACKS_SIGINFO_H])])
+
+AC_CHECK_HEADER([unistd.h],
+ ,
+ [AC_DEFINE([ACE_LACKS_UNISTD_H])])
+
+AC_CHECK_HEADER([utime.h],
+ [AC_DEFINE([ACE_HAS_UTIME])],)
+
+dnl This check will be disabled until we can get ACE to compile when it
+dnl ACE_HAS_WCHAR is defined on UN*X systems
+dnl AC_CHECK_HEADER([wchar.h],
+dnl [AC_DEFINE([ACE_HAS_WCHAR])],)
+
+AC_CHECK_HEADER([libc.h],
+ [AC_DEFINE([ACE_HAS_LIBC_H])])
+
+AC_CHECK_HEADER([osfcn.h],
+ [AC_DEFINE([ACE_HAS_OSFCN_H])])
+
+AC_CHECK_HEADER([new],
+ [AC_DEFINE([ACE_HAS_NEW_NO_H])],
+ [
+ AC_CHECK_HEADER([new.h],
+ [AC_DEFINE([ACE_HAS_NEW_H])])
+ ])
+
+AC_CHECK_HEADER([stdexcept],
+ [AC_DEFINE([ACE_HAS_STDEXCEPT_NO_H])],
+ [
+ AC_CHECK_HEADER([exception.h],
+ [AC_DEFINE([ACE_HAS_EXCEPTION_H])])
+ ])
+
+dnl ace/OS.i can #include <cstring>,not #include <cstring.h>
+dnl "cstring" is the correct form.
+dnl TODO: Double check the above comment.
+AC_CHECK_HEADER([cstring],
+ [AC_DEFINE([ACE_HAS_GNU_CSTRING_H])],)
+
+AC_CHECK_HEADER([memory],,)
+
+AC_CHECK_HEADER([map],
+[
+ AC_CHECK_HEADER([net/if.h],
+ [
+ ACE_CACHE_CHECK([if STL map class conflicts with <net/if.h> map struct],
+ [ace_cv_header_stl_map_conflict],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <map>
+#include <net/if.h>
+ ]],[[
+ map<char, char> ace_map;
+ ]])],[
+ ace_cv_header_stl_map_conflict=no
+ ],[
+ ace_cv_header_stl_map_conflict=yes
+ ])
+ ],[AC_DEFINE([ACE_HAS_STL_MAP_CONFLICT])],)
+ ],)
+],)
+
+AC_CHECK_HEADER([queue],
+[
+ AC_CHECK_HEADER([netinet/in.h],
+ [
+ ACE_CACHE_CHECK([if STL queue class conflicts with <netinet/in.h> queue struct],
+ [ace_cv_header_stl_queue_conflict],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <queue>
+#include <netinet/in.h>
+ ]],[[
+ queue<char> ace_queue;
+ ]])],[
+ ace_cv_header_stl_queue_conflict=no
+ ],[
+ ace_cv_header_stl_queue_conflict=yes
+ ])
+ ],[AC_DEFINE([ACE_HAS_STL_QUEUE_CONFLICT])],)
+ ],)
+],)
+
+dnl Check for availablity of "new style" C++ stream headers
+AC_CHECK_HEADERS([iomanip ios iostream istream ostream fstream streambuf],
+ ,
+ [AC_DEFINE([ACE_USES_OLD_IOSTREAMS])])
+
+AC_CHECK_HEADER([iostream.h],
+ [AC_CHECK_HEADER([fstream.h],,[AC_DEFINE([ACE_LACKS_IOSTREAM_TOTALLY])])],
+ [AC_DEFINE([ACE_LACKS_IOSTREAM_TOTALLY])])
+
+dnl Check if platform needs to #include <regexpr.h> for
+dnl regular expression support
+ACE_CACHE_CHECK([regexpr.h for regular expression support],
+ [ace_cv_needs_regexpr_h],[
+ AC_EGREP_HEADER([compile],[regexpr.h],
+ [
+ ace_cv_needs_regexpr_h=yes
+ AC_DEFINE([ACE_NEEDS_REGEXPR_H])
+ ],
+ [
+ AC_EGREP_HEADER([step],[regexpr.h],
+ [
+ ace_cv_needs_regexpr_h=yes
+ ],
+ [
+ ace_cv_needs_regexpr_h=no
+ ])
+ ])
+ ],[AC_DEFINE([ACE_NEEDS_REGEXPR_H])],)
+
+dnl Check if sprintf() returns char*
+ACE_CONVERT_WARNINGS_TO_ERRORS([
+ACE_CACHE_CHECK([if sprintf() returns char*],
+ [ace_cv_lib_charptr_sprintf],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stdlib.h>
+#include <stdio.h>
+ ]],[[
+ char *str = 0;
+ const char *fmt = "%d";
+ int num = 0;
+
+ char *s = 0;
+
+ s = sprintf(str, fmt, num);
+ ]])],[
+ ace_cv_lib_charptr_sprintf=yes
+ ],[
+ ace_cv_lib_charptr_sprintf=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_CHARPTR_SPRINTF])],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check for getopt() prototype
+ACE_CACHE_CHECK([for getopt() prototype],[ace_cv_lib_getopt_proto],[
+ AC_EGREP_HEADER([getopt],[unistd.h],
+ [
+ ace_cv_lib_getopt_proto=yes
+ ],
+ [
+ AC_EGREP_HEADER([[^_]+getopt],[stdlib.h],
+ [
+ ace_cv_lib_getopt_proto=yes
+ ],
+ [
+ ace_cv_lib_getopt_proto=no
+ ])
+ ])
+],,[AC_DEFINE([ACE_LACKS_GETOPT_PROTO])])
+
+dnl Check for old malloc() prototype.
+ACE_CONVERT_WARNINGS_TO_ERRORS([
+ACE_CACHE_CHECK([for old malloc() prototype],
+ [ace_cv_lib_old_malloc_proto],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stdlib.h>
+#ifndef ACE_LACKS_MALLOC_H
+# include <malloc.h>
+#endif
+ ]],[[
+ char *s = 0;
+ s = malloc(sizeof(int));
+ ]])],[
+ ace_cv_lib_old_malloc_proto=yes
+ ],[
+ ace_cv_lib_old_malloc_proto=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_OLD_MALLOC])],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check for *_timedwait() prototypes
+dnl TODO: We only check for one of the *_timedwait() prototypes.
+dnl Is this enough?
+ACE_CACHE_CHECK([for *_timedwait() prototypes],[ace_cv_lib_timedwait_proto],[
+ AC_EGREP_HEADER([recv_timedwait],[pthread.h],
+ [
+ ace_cv_lib_timedwait_proto=yes
+ ],
+ [
+ AC_EGREP_HEADER([recv_timedwait],[fcntl.h],
+ [
+ ace_cv_lib_timedwait_proto=yes
+ ],
+ [
+ ace_cv_lib_timedwait_proto=no
+ ])
+ ])
+],,[AC_DEFINE([ACE_LACKS_TIMEDWAIT_PROTOTYPES])])
+
+dnl Check for ualarm prototype in unistd.h.
+dnl Most Unices seem to put it there (?)
+ACE_CACHE_CHECK([for ualarm() prototype],[ace_cv_lib_ualarm_proto],[
+ AC_EGREP_HEADER([ualarm],[unistd.h],
+ [
+ ace_cv_lib_ualarm_proto=yes
+ ],
+ [
+ ace_cv_lib_ualarm_proto=no
+ ])
+],,[AC_DEFINE([ACE_LACKS_UALARM_PROTOTYPE])])
+
+dnl Check for getrusage prototype in sys/resource.h
+ACE_CACHE_CHECK([for getrusage() in sys/resource.h],
+ [ace_cv_lib_has_getrusage_proto],[
+ AC_EGREP_HEADER([getrusage],[sys/resource.h],
+ [
+ ace_cv_lib_has_getrusage_proto=yes
+ ],
+ [
+ ace_cv_lib_has_getrusage_proto=no
+ ])
+],[AC_DEFINE([ACE_HAS_GETRUSAGE_PROTO])],)
+
+dnl Check for {get,set}rlimit prototypes in sys/resource.h
+ACE_CACHE_CHECK([for getrlimit() and setrlimit() in sys/resource.h],
+ [ace_cv_lib_has_getsetrlimit_proto],[
+ AC_EGREP_HEADER([getrlimit],[sys/resource.h],
+ [
+ AC_EGREP_HEADER([getrlimit],[sys/resource.h],
+ [
+ ace_cv_lib_has_getsetrlimit_proto=yes
+ ],
+ [
+ ace_cv_lib_has_getsetrlimit_proto=no
+ ])
+ ],
+ [
+ ace_cv_lib_has_getsetrlimit_proto=no
+ ])
+],,[AC_DEFINE([ACE_LACKS_RLIMIT_PROTOTYPE])])
+
+dnl Check for platforms that don't declare dl* functions
+dnl as extern "C" in dlfcn.h.
+dnl TODO: This check looks feeble to me...
+dnl NOTE: Linux header files ARE protected with extern "C" by the
+dnl __BEGIN_DECLS macro, so don't be surprised!
+ACE_CACHE_CHECK([if dlfcn.h is protected by extern \"C\"],
+ [ace_cv_lib_dlfcn_with_extern_c],[
+ AC_EGREP_HEADER([extern \"C\"],[dlfcn.h],
+ [
+ ace_cv_lib_dlfcn_with_extern_c=yes
+ ],
+ [
+ ace_cv_lib_dlfcn_with_extern_c=no
+ ])
+],,[AC_DEFINE([ACE_HAS_DLFCN_H_BROKEN_EXTERN_C])])
+
+
+
+dnl SECTION 6: Checks for typedefs
+
+
+dnl dnl Standard typedef checks (All of them may not be needed)
+dnl AC_TYPE_UID_T
+dnl AC_TYPE_MODE_T
+dnl AC_TYPE_OFF_T
+dnl AC_TYPE_PID_T
+dnl AC_TYPE_SIZE_T
+
+dnl AC_CHECK_TYPE([off64_t],[long long])
+
+dnl Specific typedef checks
+dnl TODO: Check whether these typedefs can be defined somewhere else.
+ACE_CHECK_TYPE([idtype_t],[signal.h],[AC_DEFINE([ACE_HAS_IDTYPE_T])],)
+ACE_CHECK_TYPE([sem_t],[semaphore.h],,)
+ACE_CHECK_TYPE([key_t],[sys/types.h],,[AC_DEFINE([ACE_LACKS_KEY_T])])
+ACE_CHECK_TYPE([ssize_t],[sys/types.h],[AC_DEFINE([ACE_HAS_SSIZE_T])],)
+ACE_CHECK_TYPE([u_longlong_t],[sys/types.h],,[AC_DEFINE([ACE_LACKS_U_LONGLONG_T])])
+ACE_CHECK_TYPE([pri_t],[sys/types.h],,[AC_DEFINE([ACE_LACKS_PRI_T])])
+ACE_CHECK_TYPE([ucontext_t],[ucontext.h],
+ [
+ AC_DEFINE([ACE_HAS_UCONTEXT_T])
+ ],
+ [
+ dnl Some platforms define ucontext_t in <sys/ucontext.h>, but ACE
+ dnl doesn't explicitly include that header. However, it is very likely
+ dnl that <signal.h> does, either directly or indirectly.
+ ACE_CHECK_TYPE([ucontext_t],[signal.h],[AC_DEFINE([ACE_HAS_UCONTEXT_T])])
+ ])
+ACE_CHECK_TYPE([wchar_t],[wchar.h],,
+ [
+ ACE_CHECK_TYPE([wchar_t],[sys/types.h],,[AC_DEFINE([ACE_LACKS_WCHAR_T])])
+ ])
+
+ACE_CHECK_TYPE([socklen_t],[sys/socket.h],[AC_DEFINE([ACE_HAS_SOCKLEN_T])],
+ [
+ dnl The compiler in linux just issues a warning, and the test
+ dnl passes!!!
+
+ dnl FIXED by adding "-Werror" to compiler flags when using GNU C++
+ dnl -Ossama
+ ACE_CONVERT_WARNINGS_TO_ERRORS(
+ [
+ dnl Check if socket size is denoted by size_t
+ ACE_CACHE_CHECK([if socket size is denoted by size_t],
+ [ace_cv_lib_posix_socket_len_size_t],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]],[[
+ int s = 0;
+ struct sockaddr* addr = 0;
+ int* addrlen = 0;
+ accept(s, addr, addrlen);
+ ]])],[
+ ace_cv_lib_posix_socket_len_size_t=no
+ ],[
+ dnl Now see if it really does take a size_t socket size
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]],
+ [[
+ int s = 0;
+ struct sockaddr* addr = 0;
+ size_t* addrlen = 0;
+ accept(s, addr, addrlen);
+ ]])],
+ [
+ ace_cv_lib_posix_socket_len_size_t=yes
+ ],
+ [
+ ace_cv_lib_posix_socket_len_size_t=no
+ ])
+ ])
+ ],[AC_DEFINE([ACE_HAS_SIZET_SOCKET_LEN])],)
+ ])
+ ])
+
+dnl Check for sig_atomic_t
+ACE_CACHE_CHECK([for sig_atomic_t],
+ [ace_cv_lib_posix_defines_sig_atomic_t],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <signal.h>
+ ]],[[
+ sig_atomic_t sat;
+ ]])],[
+ ace_cv_lib_posix_defines_sig_atomic_t=yes
+ ],[
+ ace_cv_lib_posix_defines_sig_atomic_t=no
+ ])
+],[AC_DEFINE([ACE_HAS_SIG_ATOMIC_T])],)
+
+
+
+dnl SECTION 7: checks for structures
+
+
+dnl TODO: Check whether these structures can be defined somewhere else.
+ACE_CHECK_STRUCT([flock],[fcntl.h],,[AC_DEFINE([ACE_LACKS_FILELOCKS])])
+ACE_CHECK_STRUCT([rwlock_t],[synch.h],,[AC_DEFINE([ACE_LACKS_RWLOCK_T])])
+ACE_CHECK_STRUCT([strbuf],[stropts.h],[AC_DEFINE([ACE_HAS_STRBUF_T])],)
+ACE_CHECK_STRUCT([msgbuf],[sys/msg.h],,[AC_DEFINE([ACE_LACKS_MSGBUF_T])])
+case "$host" in
+*irix*)
+ dnl IRIX prusage fields don't match what ACE currently supports.
+ ;;
+*)
+ ACE_CHECK_STRUCT([prusage_t],[sys/procfs.h],[AC_DEFINE([ACE_HAS_PRUSAGE_T])],)
+ ;;
+esac
+ACE_CHECK_STRUCT([strrecvfd],[stropts.h],,[AC_DEFINE([ACE_LACKS_STRRECVFD])])
+ACE_CHECK_STRUCT([sigaction],[signal.h],,[AC_DEFINE([ACE_LACKS_SIGACTION])])
+ACE_CHECK_STRUCT([sigset_t],[signal.h],,[AC_DEFINE([ACE_LACKS_SIGSET])])
+ACE_CHECK_STRUCT([utsname],[sys/utsname.h],,[AC_DEFINE([ACE_LACKS_UTSNAME_T])])
+
+ACE_CACHE_CHECK([for struct sembuf],[ace_cv_struct_sembuf],
+ [
+ dnl Some platforms may need to include some headers before <sys/sem.h>.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/ipc.h>
+#include <sys/sem.h>
+ ]],[[
+ struct sembuf ace_sembuf;
+ ]])],[
+ ace_cv_struct_sembuf=yes
+ ],[
+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_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/ipc.h>
+#include <sys/sem.h>
+ ]],
+ [[
+ sembuf ace_sembuf;
+ ]])],
+ [
+ ace_cv_struct_sembuf=yes
+ ],
+ [
+ ace_cv_struct_sembuf=no
+ ])
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_SEMBUF_T])])
+
+dnl Thanks to Konstantinos Margaritis <kmargar@cc.uoa.gr> for pointing out
+dnl that struct siginfo_t may also be defined in signal.h
+ACE_CACHE_CHECK([for struct siginfo_t],[ace_cv_struct_siginfo_t],
+ [
+ dnl Since we are checking for siginfo_t in more than one header
+ dnl we can't use the ACE_CHECK_STRUCT macro so we have to do things
+ dnl manually.
+ ACE_TRY_COMPILE_STRUCT([siginfo_t],[siginfo.h],
+ [
+ ace_cv_struct_siginfo_t=yes
+ ],
+ [
+ ACE_TRY_COMPILE_STRUCT([siginfo_t],[signal.h],
+ [
+ ace_cv_struct_siginfo_t=yes
+ ],
+ [
+ ace_cv_struct_siginfo_t=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_SIGINFO_T])
+ ],)
+
+dnl Some platforms need to include sys/types.h before sys/socket.h
+dnl in order for struct msghdr to work.
+dnl Check for msghdr structure.
+ACE_CACHE_CHECK([for struct msghdr],[ace_cv_struct_msghdr],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]],[[
+ struct msghdr ace_msghdr;
+ ]])],[
+ ace_cv_struct_msghdr=yes
+ ],[
+ ace_cv_struct_msghdr=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_MSG])],)
+
+ACE_CACHE_CHECK([for condition variable support],[ace_cv_struct_cond_t],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+ ]],[[
+ pthread_cond_t ace_pthread_cond_t;
+ ]])],[
+ ace_cv_struct_cond_t=yes
+ ],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <synch.h>
+ ]],
+ [[
+ cond_t ace_cond_t;
+ ]])],
+ [
+ ace_cv_struct_cond_t=yes
+ ],
+ [
+ ace_cv_struct_cond_t=no
+ ])
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_COND_T])])
+
+dnl Check for struct timespec
+ACE_CACHE_CHECK([for POSIX timer structure],
+ [ace_cv_lib_posix_timer_struct],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <time.h>
+
+#if defined(ACE_LACKS_SYSTIME_H)
+# include <sys/time.h>
+#endif
+ ]],[[
+ timespec sr;
+ ]])],[
+ ace_cv_lib_posix_timer_struct=yes
+ ],[
+ dnl Check if platform uses struct timestruc_t for POSIX timers
+ dnl instead of struct timespec.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <time.h>
+
+#if defined(ACE_LACKS_SYSTIME_H)
+# include <sys/time.h>
+#endif
+ ]],
+ [[
+ timestruc_t sr;
+ ]])],
+ [
+ ace_cv_lib_posix_timer_struct=yes
+ dnl Check for struct timespec in <sys/timers.h>
+ ACE_CACHE_CHECK([for struct timespec in sys/timers.h],
+ [ace_cv_lib_posix_struct_timespec_broken],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <sys/timers.h>
+ ]],
+ [[
+ timespec sr;
+ ]])],
+ [
+ ace_cv_lib_posix_struct_timespec_broken=yes
+ ],
+ [
+ ace_cv_lib_posix_struct_timespec_broken=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_BROKEN_POSIX_TIME])],)
+ ],
+ [
+ ace_cv_lib_posix_timer_struct=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_POSIX_TIME])
+ if test "$ace_cv_lib_posix_struct_timespec_broken" = yes; then
+ AC_DEFINE([ACE_HAS_BROKEN_POSIX_TIME])
+ fi
+ ],
+ [
+ dnl Check for struct timespec in <sys/timers.h>
+ ACE_CACHE_CHECK([for struct timespec in sys/timers.h],
+ [ace_cv_lib_posix_struct_timespec_broken],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/timers.h>
+ ]],[[
+ timespec sr;
+ ]])],[
+ ace_cv_lib_posix_struct_timespec_broken=yes
+ ],[
+ ace_cv_lib_posix_struct_timespec_broken=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_BROKEN_POSIX_TIME])],)
+ ])
+
+dnl Check for typedef timespec_t
+dnl TODO: Check whether this typedef can be defined somewhere else.
+ACE_CACHE_CHECK([for timespec_t],
+ [ace_cv_lib_posix_timespec_t],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <time.h>
+
+#if defined(ACE_LACKS_SYSTIME_H)
+# include <sys/time.h>
+#endif
+ ]],[[
+ timespec_t tt;
+ ]])],[
+ ace_cv_lib_posix_timespec_t=yes
+ ],[
+ ace_cv_lib_posix_timespec_t=no
+ ])
+],,[AC_DEFINE([ACE_LACKS_TIMESPEC_T])])
+
+dnl Check for union semun
+ACE_CACHE_CHECK([for union semun],
+ [ace_cv_lib_posix_defines_union_semun],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/sem.h>
+ ]],[[
+/* We could also check if the macro _SEM_SEMUN_UNDEFINED is defined.
+ No big deal. */
+
+semun us;
+ ]])],[
+ ace_cv_lib_posix_defines_union_semun=yes
+ ],[
+ ace_cv_lib_posix_defines_union_semun=no
+ ])
+],[AC_DEFINE([ACE_HAS_SEMUN])],)
+
+
+
+dnl SECTION 8: checks for variables
+
+
+dnl Check for broken struct timespec members
+ACE_CACHE_CHECK([for broken struct timespec members],
+ [ace_cv_lib_broken_timespec],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <time.h>
+
+#if defined(ACE_LACKS_SYSTIME_H)
+# include <sys/time.h>
+#endif
+ ]],[[
+ timespec sr;
+ sr.ts_sec = 0;
+ sr.ts_nsec = 0;
+ ]])],[
+ ace_cv_lib_broken_timespec=yes
+ ],[
+ ace_cv_lib_broken_timespec=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_BROKEN_TIMESPEC_MEMBERS])],)
+
+dnl Check for more than two fields in struct rusage
+ACE_CACHE_CHECK([for limited struct rusage],
+ [ace_cv_lib_limited_rusage],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/resource.h>
+ ]],[[
+ rusage ace_rusage;
+ /*
+ We just pick three (i.e. > 2) of the fields that
+ ACE uses to see if we have a struct rusage that
+ has more than two fields.
+ */
+ ace_rusage.ru_ixrss = 0;
+ ace_rusage.ru_idrss = 0;
+ ace_rusage.ru_isrss = 0;
+ ]])],[
+ ace_cv_lib_limited_rusage=no
+ ],[
+ ace_cv_lib_limited_rusage=yes
+ ])
+],[AC_DEFINE([ACE_HAS_LIMITED_RUSAGE_T])],)
+
+if test "$ace_cv_struct_siginfo_t" = yes; then
+ dnl Check for si_addr member in struct siginfo_t
+ ACE_CACHE_CHECK([for si_addr member in struct siginfo_t],
+ [ace_cv_lib_posix_si_addr],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SIGINFO_H
+# include <siginfo.h>
+#endif
+#include <signal.h>
+ ]],[[
+ siginfo_t acesig;
+ acesig.si_addr = 0;
+ ]])],[
+ ace_cv_lib_posix_si_addr=yes
+ ],[
+ ace_cv_lib_posix_si_addr=no
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_SI_ADDR])])
+fi dnl test "$ace_cv_struct_siginfo_t" = yes
+
+dnl Check for sin_len member in struct sockaddr_in
+ACE_CACHE_CHECK([for sin_len member in struct sockaddr_in],
+ [ace_cv_lib_has_sin_len],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <netinet/in.h>
+ ]],[[
+ sockaddr_in ace_sin;
+ ace_sin.sin_len = sizeof(ace_sin);
+ ]])],[
+ ace_cv_lib_has_sin_len=yes
+ ],[
+ ace_cv_lib_has_sin_len=no
+ ])
+],[AC_DEFINE([ACE_HAS_SIN_LEN])],)
+
+dnl Check for sys_siglist
+dnl TODO: Check whether this variable can be defined somewhere else.
+dnl [OSSAMA: Should we use autoconf's AC_CHECK_DECLS([sys_siglist])
+dnl test instead?]
+ACE_CACHE_CHECK([for sys_siglist],
+ [ace_cv_lib_posix_sys_siglist],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#endif
+#include <signal.h>
+#if !defined (_sys_siglist)
+# define _sys_siglist sys_siglist
+#endif
+ ]],[[
+ void* vp = (void*) &_sys_siglist;
+ ]])],[
+ ace_cv_lib_posix_sys_siglist=yes
+ ],[
+ ace_cv_lib_posix_sys_siglist=no
+ ])
+],[AC_DEFINE([ACE_HAS_SYS_SIGLIST])],)
+
+dnl Check for sys_errlist
+dnl TODO: Check whether this variable can be defined somewhere else.
+ACE_CACHE_CHECK([for sys_errlist],
+ [ace_cv_lib_posix_sys_errlist],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <errno.h>
+#if !defined (_sys_errlist)
+# define _sys_errlist sys_errlist
+#endif
+ ]],[[
+ void* vp = (void*) &_sys_errlist;
+ ]])],[
+ ace_cv_lib_posix_sys_errlist=yes
+ ],[
+ dnl Check if sys_errlist is a global variable in a library
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <stdio.h>
+#include <errno.h>
+
+#if !defined (_sys_errlist)
+# define _sys_errlist sys_errlist
+#endif
+
+extern const char * const _sys_errlist[];
+ ]],
+ [[
+ void* vp = (void*) &_sys_errlist;
+ ]])],
+ [
+ ace_cv_lib_posix_sys_errlist=yes
+ ],
+ [
+ ace_cv_lib_posix_sys_errlist=no
+ ])
+ ])
+ ],[AC_DEFINE([ACE_HAS_SYS_ERRLIST])],)
+
+dnl Check for sys_nerr
+dnl TODO: Check whether this variable can be defined somewhere else.
+ACE_CACHE_CHECK([for sys_nerr],
+ [ace_cv_lib_posix_sys_nerr],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <errno.h>
+
+#if !defined (_sys_nerr)
+# define _sys_nerr sys_nerr
+#endif
+ ]],[[
+ void* vp = (void*) &_sys_nerr;
+ ]])],[
+ ace_cv_lib_posix_sys_nerr=yes
+ ],[
+ dnl Check if sys_nerr is a global variable in a library
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <stdio.h>
+#include <errno.h>
+
+#if !defined (_sys_nerr)
+# define _sys_nerr sys_nerr
+#endif
+
+extern int _sys_nerr;
+ ]],
+ [[
+ void* vp = (void*) &_sys_nerr;
+ ]])],
+ [
+ ace_cv_lib_posix_sys_nerr=yes
+ ],
+ [
+ ace_cv_lib_posix_sys_nerr=no
+ ])
+ ])
+ ],
+ [
+ dnl Do nothing
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_SYS_NERR])
+ ])
+
+dnl Save the cache for debugging purposes
+AC_CACHE_SAVE
+
+
+dnl SECTION 9: checks for compiler characteristics
+
+
+dnl Check if compiler accepts "#pragma once" directive
+ACE_CONVERT_WARNINGS_TO_ERRORS([
+ ACE_CACHE_CHECK([if compiler accepts \"pragma once\" directive],
+ [ace_cv_has_pragma_once],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#pragma once
+ ]],[[
+ int a = 0; /* Put this here so we don't have an empty main(). */
+ ]])],[
+ ace_cv_has_pragma_once=yes
+ ],[
+ ace_cv_has_pragma_once=no
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_PRAGMA_ONCE])])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl If we are using GNU C++, see if it accepts the -pipe compiler flag.
+dnl "-pipe" on cygwin32 doesn't seem to work, for example.
+if test -n "$GXX"; then
+ PREPIPECXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -pipe"
+ PREPIPECFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -pipe"
+ ACE_CACHE_CHECK([if \"-pipe\" compiler flag is supported],
+ [ace_cv_feature_gxx_has_pipe],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int a = 0;]])],[
+ ace_cv_feature_gxx_has_pipe=yes
+ ],[
+ ace_cv_feature_gxx_has_pipe=no
+ ])
+ ],
+ [
+ dnl We don't need to add "-pipe" here since it was already added
+ dnl for the test.
+ dnl CXXFLAGS="$PREPIPECXXFLAGS -pipe"
+ dnl CFLAGS="$PREPIPECFLAGS -pipe"
+ ],
+ [
+ CXXFLAGS="$PREPIPECXXFLAGS"
+ CFLAGS="$PREPIPECFLAGS"
+ ])
+fi
+
+dnl Check for working "const"
+dnl This test doesn't always work.
+dnl AC_C_CONST
+
+dnl Check for working "inline"
+dnl AC_C_INLINE dnl This test now appears to be broken!!!
+if test "$ac_cv_c_inline" = no; then
+ AC_DEFINE([ACE_LACKS_INLINE_FUNCTIONS])
+fi
+
+dnl Check to see if we are running on a big endian platform
+dnl "ace/Basic_Types.h" should perhaps be modified to take advantage
+dnl of the results of this test.
+dnl Do not run this test if we are using a cross-compiler.
+if test "$cross_compiling" != yes; then
+ AC_C_BIGENDIAN
+fi
+
+dnl Check type sizes
+dnl If we get a size of zero, then the type is unknown to the compiler.
+
+dnl We don't need to check for sizeof(char) right now. Also conflicts with
+dnl ACE definition in Basic_Types.h, so we leave the test out.
+if test "$cross_compiling" != yes; then
+ dnl AC_CHECK_SIZEOF([char],[1])
+ dnl if test "$ac_cv_sizeof_char" != "0"; then
+ dnl AC_DEFINE([ACE_SIZEOF_CHAR],[SIZEOF_CHAR])
+ dnl fi
+ AC_CHECK_SIZEOF([short])
+ if test $ac_cv_sizeof_short != 0; then
+ AC_DEFINE_UNQUOTED([ACE_SIZEOF_SHORT],[$ac_cv_sizeof_short])
+ fi
+ AC_CHECK_SIZEOF([int])
+ if test $ac_cv_sizeof_int != 0; then
+ AC_DEFINE_UNQUOTED([ACE_SIZEOF_INT],[$ac_cv_sizeof_int])
+ fi
+ AC_CHECK_SIZEOF([long])
+ if test $ac_cv_sizeof_long != 0; then
+ AC_DEFINE_UNQUOTED([ACE_SIZEOF_LONG],[$ac_cv_sizeof_long])
+ fi
+ AC_CHECK_SIZEOF([long long])
+ if test $ac_cv_sizeof_long_long != 0; then
+ AC_DEFINE_UNQUOTED([ACE_SIZEOF_LONG_LONG],[$ac_cv_sizeof_long_long])
+ else
+ AC_DEFINE([ACE_LACKS_LONGLONG_T])
+ fi
+ AC_CHECK_SIZEOF([void *])
+ if test $ac_cv_sizeof_void_p != 0; then
+ AC_DEFINE_UNQUOTED([ACE_SIZEOF_VOID_P],[$ac_cv_sizeof_void_p])
+ fi
+ AC_CHECK_SIZEOF([float])
+ if test $ac_cv_sizeof_float != 0; then
+ AC_DEFINE_UNQUOTED([ACE_SIZEOF_FLOAT],[$ac_cv_sizeof_float])
+ else
+ AC_DEFINE([ACE_LACKS_FLOATING_POINT])
+ fi
+ AC_CHECK_SIZEOF([double])
+ if test $ac_cv_sizeof_double != 0; then
+ AC_DEFINE_UNQUOTED([ACE_SIZEOF_DOUBLE],[$ac_cv_sizeof_double])
+ else
+ AC_DEFINE([ACE_LACKS_FLOATING_POINT])
+ fi
+ AC_CHECK_SIZEOF([long double])
+ if test $ac_cv_sizeof_long_double != 0; then
+ AC_DEFINE_UNQUOTED([ACE_SIZEOF_LONG_DOUBLE],[$ac_cv_sizeof_long_double])
+ fi
+
+ dnl Set the 64 bit unsigned int typedef
+ ACE_UINT64=""
+ dnl if test "$ace_cv_type_u_longlong_t" = yes; then
+ dnl This doesn't work: AC_CHECK_SIZEOF([u_longlong_t],[8])
+ dnl if test $ac_cv_sizeof_u_longlong_t = 8; then
+ dnl ACE_UINT64="u_longlong_t"
+ dnl ace_u_long_long_typedef_set=yes
+ dnl fi
+ dnl elif test $ac_cv_sizeof_long = 8; then
+ if test $ac_cv_sizeof_long = 8; then
+ ACE_UINT64="unsigned long"
+ ace_u_long_long_typedef_set=yes
+ elif test $ac_cv_sizeof_long_long = 8; then
+ ACE_UINT64="unsigned long long"
+ ace_u_long_long_typedef_set=yes
+ else
+ ace_u_long_long_typedef_set=no
+ fi
+
+ dnl Check for broken "signed char"
+ dnl If AC_CHECK_SIZEOF(signed char) returns zero then "signed char"
+ dnl is broken.
+ AC_CHECK_SIZEOF([signed char],[1])
+ if test $ac_cv_sizeof_signed_char = 0; then
+ AC_DEFINE([ACE_LACKS_SIGNED_CHAR])
+ fi
+fi dnl test "$cross_compiling" != yes
+
+dnl Other checks
+
+
+dnl Check for istream operator>> for char, unsigned char and signed char
+ACE_CACHE_CHECK([for istream operator>> for char types],
+ [ace_cv_feature_char_right_shifts],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <iostream.h>
+ ]],[[
+unsigned char a = 0;
+cin >> a;
+
+#ifndef ACE_LACKS_SIGNED_CHAR
+signed char b = 0;
+cin >> b;
+#endif
+ ]])],[
+ ace_cv_feature_char_right_shifts=yes
+ ],[
+ ace_cv_feature_char_right_shifts=no
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_CHAR_RIGHT_SHIFTS])])
+
+
+dnl Check for istream operator>> for char *, unsigned char * and signed char *
+ACE_CACHE_CHECK([for istream operator>> for char * types],
+ [ace_cv_feature_char_ptr_right_shifts],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <iostream.h>
+ ]],[[
+unsigned char * a = 0;
+cin >> a;
+
+#ifndef ACE_LACKS_SIGNED_CHAR
+signed char * b = 0;
+cin >> b;
+#endif
+ ]])],[
+ ace_cv_feature_char_ptr_right_shifts=yes
+ ],[
+ ace_cv_feature_char_ptr_right_shifts=no
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_CHAR_STAR_RIGHT_SHIFTS])])
+
+dnl Check if we have working C++ explicit template destructors
+dnl Thanks to Nanbor Wang <nanbor@cs.wustl.edu> for providing this test.
+ACE_CACHE_CHECK([for working C++ explicit template destructors],
+ [ace_cv_feature_working_explicit_des],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+
+class dyn
+{
+ public:
+ dyn () { }
+ ~dyn () { }
+};
+
+template <class T>
+class Base
+{
+ public:
+ Base () { }
+ virtual void f (void) { }
+ ~Base () { }
+};
+
+template <class T>
+class Derived
+{
+ public:
+ Derived ()
+ {
+ x_ = new Base<T> ();
+ }
+ virtual void f (void) { }
+ ~Derived () { x_->~Base (); }
+ private:
+ Base<T> *x_;
+ T t_;
+};
+ ]],[[
+ Derived<dyn> *x = new Derived<dyn> ();
+
+ x->f ();
+
+ delete x;
+ return 0;
+ ]])],[
+ ace_cv_feature_working_explicit_des=yes
+ ],[
+ ace_cv_feature_working_explicit_des=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR])],)
+
+dnl Check for working C++ conversions
+ACE_CACHE_CHECK([for working C++ conversions],
+ [ace_cv_feature_cxx_working_conversions],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ template <class T>
+ class Foo
+ {
+ public:
+ Foo (void) { ace_ptr = 0; }
+ operator T * (void) { return ace_ptr; }
+
+ private:
+ T * ace_ptr;
+ };
+ ]],[[
+ Foo<char> Bar;
+
+ Foo<char> * Bar_ptr = &Bar;
+
+ char * p = Bar_ptr->operator char * ();
+ ]])],[
+ ace_cv_feature_cxx_working_conversions=yes
+ ],[
+ ace_cv_feature_cxx_working_conversions=no
+ ])
+ ],,[AC_DEFINE([ACE_HAS_BROKEN_CONVERSIONS])])
+
+dnl Check for C++ namespace support
+ACE_CACHE_CHECK([for C++ namespace support],
+ [ace_cv_feature_cxx_namespaces],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ namespace ACE
+ {
+ int x;
+ }
+ ]],[[
+ ACE::x = 0;
+ ]])],[
+ ace_cv_feature_cxx_namespaces=yes
+ ],[
+ ace_cv_feature_cxx_namespaces=no
+ ])
+ ],,[AC_DEFINE([ACE_HAS_BROKEN_NAMESPACES])])
+
+dnl Check for C++ standard namespace
+ACE_CACHE_CHECK([for C++ standard namespace],
+ [ace_cv_feature_posix_uses_std_namespace],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <iostream.h>
+ ]],[[
+ std::cout << "FOO" << std::endl;
+ ]])],[
+ ace_cv_feature_posix_uses_std_namespace=yes
+ ],[
+ ace_cv_feature_posix_uses_std_namespace=no
+ ])
+ ],[AC_DEFINE([ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB])],)
+
+dnl Check for C++ "using" keyword support
+ACE_CACHE_CHECK([for C++ \"using\" keyword support],
+ [ace_cv_feature_cxx_using_keyword],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
+# include <iostream.h>
+#elif !defined (ACE_HAS_BROKEN_NAMESPACES)
+ namespace ACE
+ {
+ int x;
+ }
+#endif
+ ]],[[
+#if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
+ using namespace std;
+
+ cout << "FOO" << endl;
+#elif !defined (ACE_HAS_BROKEN_NAMESPACES)
+ using namespace ACE;
+
+ x++;
+#else
+# error Namespaces are not supported on this platform.
+Throw in some extraneous text since some compilers are stupid
+enough to interpret "#error" as a warning. Go figure.
+This extraneous text should force an error.
+#endif
+ ]])],[
+ ace_cv_feature_cxx_using_keyword=yes
+ ],[
+ ace_cv_feature_cxx_using_keyword=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_USING_KEYWORD])],)
+
+dnl Check for new style C++ include file support
+ACE_CACHE_CHECK([for new style C++ include file support],
+ [ace_cv_lib_posix_standard_includes],[
+ ace_cv_lib_posix_standard_includes=no
+ if test "$ace_cv_feature_posix_uses_std_namespace" = yes; then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <string>
+ ]],[[
+#ifdef ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB
+ std::string str;
+#else
+ string str;
+#endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
+ ]])],[ace_cv_lib_posix_standard_includes=yes],[])
+ fi
+ ],
+ [
+ AC_DEFINE([ACE_HAS_STDCPP_STL_INCLUDES])
+ AC_DEFINE([ACE_HAS_STRING_CLASS])
+ ],)
+
+dnl Check whether platform supports the standard C++ library
+dnl TODO: For now, check whether headers <new>, <iomanip>
+dnl and <memory> exist; is there a better way?
+if test "$ac_cv_header_new" = yes &&
+ test "$ac_cv_header_iomanip" = yes &&
+ test "$ac_cv_header_memory" = yes; then
+
+ dnl Check for auto_ptr class
+ ACE_CACHE_CHECK([for C++ auto_ptr class],
+ [ace_cv_lib_auto_ptr_class],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <memory>
+ ]],[[
+ int *foo = new int;
+
+#ifdef ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB
+ std::auto_ptr<int> safe (foo);
+#else
+ auto_ptr<int> safe (foo);
+#endif
+ foo = safe.release ();
+
+ delete foo;
+ ]])],[
+ ace_cv_lib_auto_ptr_class=yes
+ ],[
+ ace_cv_lib_auto_ptr_class=no
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_STANDARD_CPP_LIBRARY])
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_AUTO_PTR])
+ ])
+fi
+
+if test $ace_cv_lib_auto_ptr_class=yes; then
+ dnl Check for auto_ptr reset method
+ ACE_CACHE_CHECK([for C++ auto_ptr reset method],
+ [ace_cv_lib_auto_ptr_reset],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <memory>
+ ]],[[
+ int *foo = new int;
+
+#ifdef ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB
+ std::auto_ptr<int> safe (foo);
+#else
+ auto_ptr<Foo> safe (foo);
+#endif
+ int *bar = new int;
+
+ safe.reset (bar);
+
+ foo = safe.release ();
+ ]])],[
+ ace_cv_lib_auto_ptr_reset=yes
+ ],[
+ ace_cv_lib_auto_ptr_reset=no
+ ])
+ ],,[AC_DEFINE([ACE_AUTO_PTR_LACKS_RESET])])
+fi dnl test $ace_cv_lib_auto_ptr_class=yes
+
+dnl Check for ANSI C++ cast support
+ACE_CACHE_CHECK([for ANSI C++ cast support],
+ [ace_cv_lib_posix_standard_casts],[
+ ACE_CONVERT_WARNINGS_TO_ERRORS([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[/* No headers */]],[[
+ class B { public: int b_; virtual int b() const = 0; };
+ class D : public B { virtual int b() const { return b_; } };
+
+ void* vp = 0;
+ char* cp = 0;
+ float f = 1.0;
+ int i = 0;
+ int* ip = 0;
+ const int* jp = 0;
+
+ i = static_cast<int> (f);
+ ip = const_cast<int*> (jp);
+ cp = reinterpret_cast<char*> (vp);
+
+ B* bp = new D;
+ D* dp = dynamic_cast<D*> (bp);
+ delete bp;
+ ]])],[
+ ace_cv_lib_posix_standard_casts=yes
+ AC_CACHE_VAL([ace_cv_lib_rtti],[ace_cv_lib_rtti=yes])
+ ],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[/* No headers */]],
+ [[
+ class B { public: int b_; virtual int b() const = 0; };
+ class D : public B { virtual int b() const { return b_; } };
+
+ void* vp = 0;
+ char* cp = 0;
+ float f = 1.0;
+ int i = 0;
+ int* ip = 0;
+ const int* jp = 0;
+
+ i = static_cast<int> (f);
+ ip = const_cast<int*> (jp);
+ cp = reinterpret_cast<char*> (vp);
+ ]])],
+ [
+ ace_cv_lib_posix_standard_casts=yes
+ AC_CACHE_VAL([ace_cv_lib_rtti],[ace_cv_lib_rtti=no])
+ ],
+ [
+ ace_cv_lib_posix_standard_casts=no
+ ])
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_ANSI_CASTS])
+ if test "$ace_cv_lib_rtti" != yes; then
+ AC_DEFINE([ACE_LACKS_RTTI])
+ fi
+ ],)
+
+dnl Check for explicit C++ constructor support
+ACE_CACHE_CHECK([for explicit C++ constructor support],
+ [ace_cv_feature_explicit_constructor],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+class Foo
+{
+ public:
+ explicit Foo (int i) { this->val_ = i; }
+ private:
+ int val_;
+};
+ ]],[[
+Foo bar = 'a'; // error: no implicit char->Foo conversion
+ ]])],[
+dnl The above test *should* fail!
+ ace_cv_feature_explicit_constructor=no
+ ],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+class Foo
+{
+ public:
+ explicit Foo (int i) { this->val_ = i; }
+ private:
+ int val_;
+};
+ ]],
+ [[
+Foo bar (5);
+ ]])],
+ [
+ ace_cv_feature_explicit_constructor=yes
+ ],
+ [
+ ace_cv_feature_explicit_constructor=no
+ ])
+ ])
+ ],[AC_DEFINE([ACE_HAS_EXPLICIT_KEYWORD])],)
+
+dnl Check for C++ mutable keyword
+ACE_CACHE_CHECK([for C++ mutable keyword],
+ [ace_cv_feature_cxx_mutable_keyword],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+class Foo
+{
+ public:
+ Foo (void) : val_ (0) {}
+
+ mutable int val_;
+};
+ ]],[[
+const Foo bar;
+
+bar.val_ = 3; // mutable declaration should allow this to be modified
+ ]])],[
+ ace_cv_feature_cxx_mutable_keyword=yes
+ ],[
+ ace_cv_feature_cxx_mutable_keyword=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_MUTABLE_KEYWORD])],)
+
+dnl Check if platform supports typename keyword
+ACE_CACHE_CHECK([for C++ typename keyword],
+ [ace_cv_feature_posix_typename_keyword],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ class Bar
+ {
+ public:
+ typedef int Y;
+ Bar(int bar) : bar_(bar) {}
+ private:
+ int bar_;
+ };
+
+ template <class T>
+ class Foo
+ {
+ public:
+ typedef typename T::Y Y;
+ Foo(T* foo) : foo_(foo) {}
+ void bilbo(typename T::Y y);
+ private:
+ T* foo_;
+ };
+
+ template <class T>
+ void Foo<T>::bilbo(typename T::Y y)
+ {
+ }
+ ]],[[
+ Bar bar(15);
+ Foo<Bar> foo(&bar);
+ foo.bilbo(10);
+ ]])],[
+ ace_cv_feature_posix_typename_keyword=yes
+ ],[
+ ace_cv_feature_posix_typename_keyword=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_TYPENAME_KEYWORD])],)
+
+dnl Check if platform supports placement new operator
+ACE_CACHE_CHECK([for C++ placement new operator],
+ [ace_cv_feature_placement_new],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if defined (ACE_HAS_NEW_NO_H)
+# include <new>
+#elif defined (ACE_HAS_NEW_H)
+# include <new.h>
+#endif
+
+class foo
+{
+public:
+ void *operator new (size_t, void *p) { return p; }
+};
+ ]],[[
+int *x = 0;
+foo *f = new (x) foo;
+ ]])],[
+ ace_cv_feature_placement_new=yes
+ ],[
+ ace_cv_feature_placement_new=no
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_PLACEMENT_OPERATOR_NEW])])
+
+dnl Check if platform supports placement delete operator
+ACE_CACHE_CHECK([for C++ placement delete operator],
+ [ace_cv_feature_placement_delete],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if defined (ACE_HAS_NEW_NO_H)
+# include <new>
+#elif defined (ACE_HAS_NEW_H)
+# include <new.h>
+#endif
+
+class foo
+{
+public:
+ void *operator new (size_t, void *p) { return p; }
+ void operator delete (void *p, void *) {}
+};
+ ]],[[
+int *x = 0;
+foo *f = new (x) foo;
+
+// delete f; // Don't call delete for this test!
+ ]])],[
+ ace_cv_feature_placement_delete=yes
+ ],[
+ ace_cv_feature_placement_delete=no
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_PLACEMENT_OPERATOR_DELETE])])
+
+
+dnl Check if const char * can be rvalue in conditional operator
+ACE_CACHE_CHECK([if const char * can be rvalue in conditional operator],
+ [ace_cv_feature_conditional_str_cast],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[
+ const char * foo = 0;
+ const char * bar = 0;
+
+ const char * ace = ((1 < 2) ? foo : bar);
+ ]])],[
+ ace_cv_feature_conditional_str_cast=yes
+ ],[
+ ace_cv_feature_conditional_str_cast=no
+ ])
+ ],,[AC_DEFINE([ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS])])
+
+dnl Check if templates require source on platform
+dnl FIXME: This test may be broken.
+ACE_CACHE_CHECK([if templates require source],
+ [ace_cv_feature_templates_require_source],
+ [
+ dnl Create the common header file
+ cat > ace_test.h <<EOF
+#ifndef FOO_H
+#define FOO_H
+template <class T>
+class Foo
+{
+ public:
+ Foo (T val);
+ private:
+ T value_;
+};
+
+template <class T>
+class Bar
+{
+ public:
+ Bar (Foo<T> *);
+ private:
+ Foo<T> *foo_ptr;
+};
+#endif /* FOO_H */
+EOF
+
+ dnl Create template source test file
+ cat > ace_test.$ac_ext <<EOF
+#include "ace_test.h"
+#ifndef FOO_CXX
+#define FOO_CXX
+template <class T>
+Foo<T>::Foo (T val)
+ : value_ (val)
+{
+ // Nothing else to do.
+}
+
+template <class T>
+Bar<T>::Bar (Foo<T> *val)
+ : foo_ptr (val)
+{
+ // Nothing else to do.
+}
+#endif /* FOO_CXX */
+EOF
+
+ dnl Add the ACE-specific compiler flags to the compiler flags for
+ dnl the duration of this test.
+ ace_cxx_template_save_CXXFLAGS="$CXXFLAGS"
+ ace_cxx_template_save_CPPFLAGS="$CPPFLAGS"
+ ace_cxx_template_save_LDFLAGS="$LDFLAGS"
+ CXXFLAGS="$ACE_CXXFLAGS $CXXFLAGS"
+ CPPFLAGS="$ACE_CPPFLAGS $CPPFLAGS"
+ LDFLAGS="$ACE_LDFLAGS $LDFLAGS"
+
+ dnl Remove any template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl First try without explicit template instantiation.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include "ace_test.h"
+ ]],[[
+Foo<int> foo (15);
+Bar<char> bar (0);
+ ]])],[
+ dnl Template source is not required.
+ ace_cv_feature_templates_require_source=no
+
+ dnl Template source does not require pragma.
+ AC_CACHE_VAL([ace_cv_feature_templates_require_pragma],
+ [ace_cv_feature_templates_require_pragma=no])
+
+ dnl Explicit template instantiation is not required.
+ AC_CACHE_VAL([ace_cv_feature_explicit_template_instantiation],
+ [ace_cv_feature_explicit_template_instantiation=no])
+
+ dnl Pragma template instantiation is not required.
+ AC_CACHE_VAL([ace_cv_feature_pragma_template_instantiation],
+ [ace_cv_feature_pragma_template_instantiation=no])
+ ],[
+ dnl Remove any template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl Now try including the template source.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include "ace_test.h"
+#include "ace_test.$ac_ext"
+ ]],
+ [[
+Foo<int> foo (15);
+
+Bar<char> bar (0);
+ ]])],
+ [
+ dnl Template source is required!
+ ace_cv_feature_templates_require_source=yes
+
+ dnl Template source does not require pragma.
+ AC_CACHE_VAL([ace_cv_feature_templates_require_pragma],
+ [ace_cv_feature_templates_require_pragma=no])
+
+ dnl Explicit template instantiation is not required.
+ AC_CACHE_VAL([ace_cv_feature_explicit_template_instantiation],
+ [ace_cv_feature_explicit_template_instantiation=no])
+
+ dnl Pragma template instantiation is not required.
+ AC_CACHE_VAL([ace_cv_feature_pragma_template_instantiation],
+ [ace_cv_feature_pragma_template_instantiation=no])
+ ],
+ [
+dnl BEGIN OUTER REQUIRE SOURCE #########################################
+ dnl Remove any generated template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl Now try with explicit template instantiation.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include "ace_test.h"
+
+template class Foo<int>;
+template class Bar<char>;
+ ]],
+ [[
+Foo<int> foo (15);
+Bar<char> bar (0);
+ ]])],
+ [
+ dnl Template source is not required.
+ ace_cv_feature_templates_require_source=no
+
+ dnl Template source does not require pragma.
+ AC_CACHE_VAL([ace_cv_feature_templates_require_pragma],
+ [ace_cv_feature_templates_require_pragma=no])
+
+ dnl Explicit template instantiation is required.
+ AC_CACHE_VAL([ace_cv_feature_explicit_template_instantiation],
+ [ace_cv_feature_explicit_template_instantiation=yes])
+
+ dnl Pragma template instantiation is not required.
+ AC_CACHE_VAL([ace_cv_feature_pragma_template_instantiation],
+ [ace_cv_feature_pragma_template_instantiation=no])
+ ],
+ [
+ dnl Remove any generated template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl Don't set
+ dnl ace_cv_feature_pragma_template_instantiation
+ dnl to "no" here. It should only be set to "no" if
+ dnl explicit template instantiation works.
+
+ dnl Now try including the template source.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include "ace_test.h"
+#include "ace_test.$ac_ext"
+
+template class Foo<int>;
+template class Bar<char>;
+ ]],
+ [[
+Foo<int> foo (15);
+Bar<char> bar (0);
+ ]])],
+ [
+ dnl Template source is required!
+ ace_cv_feature_templates_require_source=yes
+
+ dnl Template source does not require pragma.
+ AC_CACHE_VAL([ace_cv_feature_templates_require_pragma],
+ [ace_cv_feature_templates_require_pragma=no])
+
+ dnl Explicit template instantiation is required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_explicit_template_instantiation],
+ [ace_cv_feature_explicit_template_instantiation=yes])
+
+ dnl Pragma template instantiation is not required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_pragma_template_instantiation],
+ [ace_cv_feature_pragma_template_instantiation=no])
+ ],
+ [
+dnl BEGIN INNER REQUIRE SOURCE #########################################
+ dnl Remove any generated template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl Don't set
+ dnl ace_cv_feature_explicit_template_instantiation
+ dnl to "no" here. It should only be set to "no" if
+ dnl pragma template instantiation works.
+
+ dnl Now try with pragma template instantiation.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include "ace_test.h"
+
+#pragma instantiate Foo<int>
+#pragma instantiate Bar<char>
+ ]],
+ [[
+Foo<int> foo (15);
+Bar<char> bar (0);
+ ]])],
+ [
+ dnl Template source is not required.
+ ace_cv_feature_templates_require_source=no
+
+ dnl Template source does not require pragma.
+ AC_CACHE_VAL(
+ [ace_cv_feature_templates_require_pragma],
+ [ace_cv_feature_templates_require_pragma=no])
+
+ dnl Explicit template instantiation is not required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_explicit_template_instantiation],
+ [ace_cv_feature_explicit_template_instantiation=no])
+
+ dnl Pragma template instantiation is required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_pragma_template_instantiation],
+ [ace_cv_feature_pragma_template_instantiation=yes])
+ ],
+ [
+ dnl Remove any generated template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl Don't set
+ dnl ace_cv_feature_explicit_template_instantiation
+ dnl to "no" here. It should only be set to "no" if
+ dnl pragma template instantiation works.
+
+ dnl Now try including the template source.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include "ace_test.h"
+#include "ace_test.$ac_ext"
+
+#pragma instantiate Foo<int>
+#pragma instantiate Bar<char>
+ ]],
+ [[
+Foo<int> foo (15);
+Bar<char> bar (0);
+ ]])],
+ [
+ dnl Template source is required!
+ ace_cv_feature_templates_require_source=yes
+
+ dnl Template source does not require pragma.
+ AC_CACHE_VAL(
+ [ace_cv_feature_templates_require_pragma],
+ [ace_cv_feature_templates_require_pragma=no])
+
+ dnl Explicit template instantiation is not required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_explicit_template_instantiation],
+ [ace_cv_feature_explicit_template_instantiation=no])
+
+ dnl Pragma template instantiation is required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_pragma_template_instantiation],
+ [ace_cv_feature_pragma_template_instantiation=yes])
+ ],
+ [
+ dnl If we get here, then we have no idea what is needed!
+ ace_cv_feature_templates_require_source=no
+ ])
+ ])
+dnl END INNER REQUIRE SOURCE #########################################
+ ])
+ ])
+dnl END OUTER REQUIRE SOURCE #########################################
+ ])
+ ])
+
+ dnl Remove any generated template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl Remove the test additional test files.
+ rm -f ace_test*
+
+ dnl Restore the compiler flags
+ CXXFLAGS="$ace_cxx_template_save_CXXFLAGS"
+ CPPFLAGS="$ace_cxx_template_save_CPPFLAGS"
+ LDFLAGS="$ace_cxx_template_save_LDFLAGS"
+ ],
+ [
+ AC_DEFINE([ACE_TEMPLATES_REQUIRE_SOURCE])
+ ],
+ [
+ dnl Check if templates require pragma.
+ ACE_CACHE_CHECK([if templates require pragma],
+ [ace_cv_feature_templates_require_pragma],
+ [
+ dnl Create the common header file
+ cat > ace_test.h <<EOF
+#ifndef FOO_H
+#define FOO_H
+template <class T>
+class Foo
+{
+ public:
+ Foo (T val);
+ private:
+ T value_;
+};
+
+template <class T>
+class Bar
+{
+ public:
+ Bar (Foo<T> *);
+ private:
+ Foo<T> *foo_ptr;
+};
+#endif /* FOO_H */
+EOF
+
+ dnl Create template source test file
+ cat > ace_test.$ac_ext <<EOF
+#include "ace_test.h"
+#ifndef FOO_CXX
+#define FOO_CXX
+template <class T>
+Foo<T>::Foo (T val)
+ : value_ (val)
+{
+ // Nothing else to do.
+}
+
+template <class T>
+Bar<T>::Bar (Foo<T> *val)
+ : foo_ptr (val)
+{
+ // Nothing else to do.
+}
+#endif /* FOO_CXX */
+EOF
+
+ dnl Add the ACE-specific compiler flags to the compiler flags for
+ dnl the duration of this test.
+ ace_cxx_template_save_CXXFLAGS="$CXXFLAGS"
+ ace_cxx_template_save_CPPFLAGS="$CPPFLAGS"
+ ace_cxx_template_save_LDFLAGS="$LDFLAGS"
+ CXXFLAGS="$ACE_CXXFLAGS $CXXFLAGS"
+ CPPFLAGS="$ACE_CPPFLAGS $CPPFLAGS"
+ LDFLAGS="$ACE_LDFLAGS $LDFLAGS"
+
+ dnl Remove any template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl We already know that the simplest case doesn't work so go
+ dnl straight to the "require pragma" test.
+
+ dnl Now try including the template pragma.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include "ace_test.h"
+
+#pragma implementation ("ace_test.$ac_ext")
+ ]],[[
+Foo<int> foo (15);
+Bar<char> bar (0);
+ ]])],[
+ dnl Template source is required!
+ ace_cv_feature_templates_require_pragma=yes
+ ],[
+dnl BEGIN OUTER REQUIRE PRAGMA #########################################
+ dnl Remove any generated template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl Now try with explicit template instantiation.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include "ace_test.h"
+
+#pragma implementation ("ace_test.$ac_ext")
+
+template class Foo<int>;
+template class Bar<char>;
+ ]],
+ [[
+Foo<int> foo (15);
+Bar<char> bar (0);
+ ]])],
+ [
+ dnl Template pragma is required!
+ ace_cv_feature_templates_require_pragma=yes
+
+ dnl Explicit template instantiation is required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_explicit_template_instantiation],
+ [ace_cv_feature_explicit_template_instantiation=yes])
+
+ dnl Pragma template instantiation is not required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_pragma_template_instantiation],
+ [ace_cv_feature_pragma_template_instantiation=no])
+ ],
+ [
+dnl BEGIN INNER REQUIRE PRAGMA #########################################
+ dnl Remove any generated template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl Now try with pragma template instantiation.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include "ace_test.h"
+
+#pragma implementation ("ace_test.$ac_ext")
+
+#pragma instantiate Foo<int>
+#pragma instantiate Bar<char>
+ ]],
+ [[
+Foo<int> foo (15);
+Bar<char> bar (0);
+ ]])],
+ [
+ dnl Template pragma is required!
+ ace_cv_feature_templates_require_pragma=yes
+
+ dnl Explicit template instantiation is not required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_explicit_template_instantiation],
+ [ace_cv_feature_explicit_template_instantiation=no])
+
+ dnl Pragma template instantiation is required.
+ AC_CACHE_VAL(
+ [ace_cv_feature_pragma_template_instantiation],
+ [ace_cv_feature_pragma_template_instantiation=yes])
+ ],
+ [
+ dnl If we get here, then we have no idea what is needed!
+ ace_cv_feature_templates_require_pragma=no
+ ])
+dnl END INNER REQUIRE PRAGMA #########################################
+ ])
+dnl END OUTER REQUIRE PRAGMA #########################################
+ ])
+
+ dnl Remove any generated template repositories.
+ rm -rf Templates.DB SunWS_cache ptrepository *.rpo
+
+ dnl Remove the additional test files.
+ rm -f ace_test*
+
+ dnl Restore the compiler flags
+ CXXFLAGS="$ace_cxx_template_save_CXXFLAGS"
+ CPPFLAGS="$ace_cxx_template_save_CPPFLAGS"
+ LDFLAGS="$ace_cxx_template_save_LDFLAGS"
+ ],
+ [
+ AC_DEFINE([ACE_TEMPLATES_REQUIRE_PRAGMA])
+ ],
+ [
+ dnl Do nothing.
+ ])
+ ])
+
+ACE_CACHE_CHECK([if explicit template instantiation is needed],
+ [ace_cv_feature_explicit_template_instantiation],
+ [
+ AC_MSG_ERROR([
+Bug in configure script, check for need of explicit template
+instantiation should have occurred during check for need of template
+source. Please e-mail the maintainer of this configure script:
+ $ACE_CONFIGURE_MAINTAINER
+this message.
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION])
+ ],
+ [
+ ACE_CACHE_CHECK([if pragma template instantiation is needed],
+ [ace_cv_feature_pragma_template_instantiation],
+ [
+ AC_MSG_FAILURE([
+Bug in configure script, check for need of pragma template
+instantiation should have occurred during check for need of template
+source. Please e-mail the maintainer of this configure script:
+ $ACE_CONFIGURE_MAINTAINER
+this message.
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA])
+ ],
+ [
+ dnl Do nothing
+ ])
+ ])
+
+
+dnl Check if platform supports template specialization
+ACE_CACHE_CHECK([for template specialization],
+ [ace_cv_feature_cxx_template_specialization],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ template <class T>
+ class Foo
+ {
+ public:
+ Foo(T bar) : bar_(bar) {};
+ private:
+ T bar_;
+ };
+
+ class Foo<int>
+ {
+ public:
+ Foo(int bar) : bar_(bar + 1) {};
+ private:
+ int bar_;
+ };
+ ]],[[
+ Foo<int> foo(11);
+ ]])],[
+ ace_cv_feature_cxx_template_specialization=yes
+ ],[
+ ace_cv_feature_cxx_template_specialization=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_TEMPLATE_SPECIALIZATION])],)
+
+dnl Check if platform supports *standard *template specialization
+ACE_CACHE_CHECK([for standard template specialization],
+ [ace_cv_feature_cxx_std_template_specialization],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+// Some compilers have a hard time with this test since the syntax is
+// too "new" for them.
+
+// general vector type
+template<class T>
+class Vector
+{
+public:
+ Vector (void);
+ Vector (int);
+
+ T& elem (int i) { return v[i]; }
+ T& operator[] (int i);
+private:
+ T* v;
+ int sz;
+};
+
+// void * specialization
+template<>
+class Vector<void *>
+{
+public:
+ Vector (void);
+ Vector (int);
+
+ void*& elem (int i) { return p[i]; }
+ void*& operator[] (int i);
+private:
+ void** p;
+ int sz;
+};
+ ]],[[
+Vector<int> vi;
+Vector<void *> vpv;
+ ]])],[
+ ace_cv_feature_cxx_std_template_specialization=yes
+ ],[
+ ace_cv_feature_std_cxx_template_specialization=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_STD_TEMPLATE_SPECIALIZATION])],)
+
+if test "$ace_cv_feature_cxx_std_template_specialization" = yes; then
+
+dnl Check if platform needs *standard* template method specialization
+ACE_CACHE_CHECK([if platform needs standard template method specialization],
+ [ace_cv_feature_cxx_std_template_method_specialization],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+// Some compilers have a hard time with this test since the syntax is
+// too "new" for them.
+
+// general vector type
+template<class T>
+class Vector
+{
+public:
+ Vector (void);
+ Vector (int);
+
+ T& elem (int i) { return v[i]; }
+ T& operator[] (int i);
+private:
+ T* v;
+ int sz;
+};
+
+// void * specialization
+template<>
+class Vector<void *>
+{
+public:
+ Vector (void);
+ Vector (int);
+
+ void*& elem (int i) { return p[i]; }
+ void*& operator[] (int i);
+private:
+ void** p;
+ int sz;
+};
+
+void *&
+Vector<void *>::operator[] (int i)
+{
+ return p[i];
+}
+ ]],[[
+ Vector <void *> vpv;
+ ]])],[
+dnl template method specialization is *not* needed
+ ace_cv_feature_cxx_std_template_method_specialization=no
+ ],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+// Some compilers have a hard time with this test since the syntax is
+// too "new" for them.
+
+// general vector type
+template<class T>
+class Vector
+{
+public:
+ Vector (void);
+ Vector (int);
+
+ T& elem (int i) { return v[i]; }
+ T& operator[] (int i);
+private:
+ T* v;
+ int sz;
+};
+
+// void * specialization
+template<>
+class Vector<void *>
+{
+public:
+ Vector (void);
+ Vector (int);
+
+ void*& elem (int i) { return p[i]; }
+ void*& operator[] (int i);
+private:
+ void** p;
+ int sz;
+};
+
+template <>
+void *&
+Vector<void *>::operator[] (int i)
+{
+ return p[i];
+}
+ ]],
+ [[
+ Vector<void *> vpv;
+ ]])],
+ [
+dnl template method specialization is needed
+ ace_cv_feature_cxx_std_template_method_specialization=yes
+ ],
+ [
+dnl template method specialization is *not* needed
+ ace_cv_feature_cxx_std_template_method_specialization=no
+ ])
+ ])
+ ],[AC_DEFINE([ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION])],)
+fi dnl test $ace_cv_feature_cxx_std_template_specialization = yes
+
+dnl Check if platform supports template typedefs
+ACE_CACHE_CHECK([for template typedefs],
+ [ace_cv_feature_posix_template_typedefs],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if defined (ACE_HAS_TYPENAME_KEYWORD)
+#define TYPENAME typename
+#else
+#define TYPENAME
+#endif
+
+class Bar
+{
+public:
+ typedef int Y;
+ Bar(int bar) : bar_(bar) {}
+ int value() const { return bar_; }
+private:
+ int bar_;
+};
+
+template <class T>
+class Foo
+{
+public:
+ typedef TYPENAME T::Y Y;
+ Foo(T* foo) : foo_(foo) {}
+ void print(Y);
+private:
+ T* foo_;
+};
+
+template <class T>
+void Foo<T>::print(TYPENAME T::Y)
+{
+}
+ ]],[[
+Bar bar(15);
+Foo<Bar> foo(&bar);
+foo.print(11);
+ ]])],[
+ ace_cv_feature_posix_template_typedefs=yes
+ ],[
+ ace_cv_feature_posix_template_typedefs=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_TEMPLATE_TYPEDEFS])],)
+
+dnl Check if platform supports static data member templates
+ACE_CACHE_CHECK([for static data member templates],
+ [ace_cv_feature_posix_static_data_member_templates],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+template <class T>
+class Foo
+{
+public:
+ static T* sdm;
+};
+
+template <class T> T* Foo<T>::sdm = 0;
+ ]],[[
+ /* No body */
+ ]])],[
+ ace_cv_feature_posix_static_data_member_templates=yes
+ ],[
+ ace_cv_feature_posix_static_data_member_templates=no
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES])])
+
+dnl Check if compiler needs definitions for hidden functions
+ACE_CACHE_CHECK([if definition is needed for hidden functions],
+ [ace_cv_feature_need_func_def],
+ [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ class Foo
+ {
+ public:
+ Foo (void) { a_ = 0; }
+ private:
+ Foo (const Foo &);
+ void operator= (const Foo &);
+
+ int a_;
+ };
+ ]],[[
+ Foo Bar;
+ ]])],[
+ ace_cv_feature_need_func_def=no
+ ],[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+ class Foo
+ {
+ public:
+ Foo (void) { a_ = 0; }
+ private:
+ Foo (const Foo &);
+ const Foo & operator= (const Foo &);
+
+ int a_;
+ };
+
+ Foo::Foo (const Foo &)
+ {
+ a_ = 0;
+ }
+
+ const Foo &
+ Foo::operator= (const Foo &)
+ {
+ a_ = 0;
+
+ return *this;
+ }
+ ]],
+ [[
+ Foo Bar;
+ ]])],
+ [
+ ace_cv_feature_need_func_def=yes
+ ],
+ [
+ dnl If we get here then we don't know what is needed!
+ ace_cv_feature_need_func_def=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_NEEDS_FUNC_DEFINITIONS])
+ ],)
+
+dnl Check if platform supports C++ exceptions
+if test "$ace_user_enable_exceptions" = yes; then
+ ACE_CACHE_CHECK([for C++ exceptions],
+ [ace_cv_feature_posix_exceptions],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[
+ int ret = 0;
+ class ACE {};
+ try
+ {
+ throw ACE();
+ }
+ catch (ACE)
+ {
+ ret = 1;
+ }
+ ]])],[
+ ace_cv_feature_posix_exceptions=yes
+ ],[
+ ace_cv_feature_posix_exceptions=no
+ ])
+ ],[AC_DEFINE([ACE_HAS_EXCEPTIONS])],[ace_user_enable_exceptions=no])
+
+fi dnl test "$ace_user_enable_exceptions" = yes
+
+dnl Check if we need a non-static object manager
+dnl TODO / FIXME
+dnl ACE_CACHE_CHECK([if we need a non-static object manager],
+dnl [ace_cv_feature_nonstatic_object_manager],[
+dnl ace_cv_feature_nonstatic_object_manager=yes
+ dnl TODO: Should we check for this thing (and HOW), or
+ dnl should it be the user's choice?
+
+ dnl For now, we will leave it as a user's choice.
+ dnl -Ossama
+dnl ],
+dnl [
+ dnl Don't define anything until we have a test for this.
+ dnl AC_DEFINE([ACE_HAS_NONSTATIC_OBJECT_MANAGER])
+dnl ],)
+
+dnl Save the cache for debugging purposes
+AC_CACHE_SAVE
+
+
+dnl SECTION 10: checks for library functions
+
+
+AC_FUNC_ALLOCA
+if test "$ac_cv_header_alloca_h" = yes; then
+ AC_DEFINE([ACE_HAS_ALLOCA_H])
+fi
+if test "$ac_cv_func_alloca_works" = yes; then
+ AC_DEFINE([ACE_HAS_ALLOCA])
+fi
+
+dnl ACE should really have something for both the sys/mman.h header
+dnl and the mmap function since we need sys/mman.h for functions like
+dnl mprotect and msync, but don't want to use mmap if it doesn't work.
+dnl For now, we just check for the sys/mman.h header earlier in this
+dnl configure script.
+
+dnl AC_FUNC_MMAP
+dnl if test "$ac_cv_func_mmap_fixed_mapped" = no; then
+dnl Even if we have mmap, do not use if broken!
+dnl AC_DEFINE(ACE_LACKS_MMAP)
+dnl fi
+
+dnl Check if closedir() returns a meaningful value
+AC_FUNC_CLOSEDIR_VOID
+
+dnl Check for PWD functions
+AC_CHECK_FUNC([getpwnam],,)
+AC_CHECK_FUNC([setpwent],,)
+AC_CHECK_FUNC([endpwent],,)
+AC_CHECK_FUNC([getpwent],,)
+AC_CHECK_FUNC([getpwuid],,)
+
+if test "$ac_cv_func_getpwnam" != yes ||
+ test "$ac_cv_func_setpwent" != yes ||
+ test "$ac_cv_func_endpwent" != yes ||
+ test "$ac_cv_func_getpwent" != yes ||
+ test "$ac_cv_func_getpwuid" != yes; then
+ AC_DEFINE([ACE_LACKS_PWD_FUNCTIONS])
+else
+ dnl The password file related functions above are required for ACE's
+ dnl alternate implementation.
+
+ ACE_CONVERT_WARNINGS_TO_ERRORS([
+ dnl Check for functions necessary for ACE's alternate implementation
+ dnl of the now obsolete cuserid() function.
+ ACE_CACHE_CHECK([checking if ACE cuserid implementation should be used],
+ [ace_cv_lib_use_alt_cuserid],
+ [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+/* Undefine _XOPEN_SOURCE since it may make the cuserid() prototype
+ visible. ACE should not rely on such feature test macros. */
+#undef _XOPEN_SOURCE
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#else
+# error No unistd.h header. Need header where cuserid() is located.
+#endif /* ACE_LACKS_UNISTD_H */
+ ]],[[
+ char * foo = cuserid ((char *)0);
+ ]])],[
+ dnl If successful then use the system cuserid() implementation,
+ dnl despite the fact that ACE's implementation may be safer.
+ ace_cv_lib_use_alt_cuserid=no
+ ],[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#undef _XOPEN_SOURCE
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#else
+# error No unistd.h header. Need header where geteuid() is located.
+#endif
+ ]],
+ [[
+ uid_t foo = geteuid ();
+ ]])],
+ [
+ dnl All of the functions necessary for ACE's cuserid()
+ dnl implementation exist.
+ ace_cv_lib_use_alt_cuserid=yes
+ ],
+ [
+ dnl If we get here, we're hosed!
+ ace_cv_lib_use_alt_cuserid=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_ALT_CUSERID])
+ ],)
+ ])
+fi
+
+
+
+dnl Check for `strftime' in the `intl' library, for SCO UNIX
+AC_FUNC_STRFTIME
+
+case "$host_os" in
+ *win32*)
+ AC_CHECK_FUNC([CancelIO],
+ [AC_DEFINE([ACE_HAS_CANCEL_IO])],)
+
+ AC_CHECK_FUNC([SignalObjectAndWait],
+ [AC_DEFINE([ACE_HAS_SIGNAL_OBJECT_AND_WAIT])],)
+
+ AC_CHECK_FUNC([TryEnterCriticalSection],
+ [AC_DEFINE([ACE_HAS_WIN32_TRYLOCK])],)
+ ;;
+ *)
+ ;;
+esac
+
+AC_CHECK_FUNC([access],
+ ,
+ [AC_DEFINE([ACE_LACKS_ACCESS])])
+
+AC_CHECK_FUNC([bsearch],
+ ,
+ [AC_DEFINE([ACE_LACKS_BSEARCH])])
+
+AC_CHECK_FUNC([qsort],
+ ,
+ [AC_DEFINE([ACE_LACKS_QSORT])])
+
+dnl ACE uses execv, execvp and execve, so we don't bother to check
+dnl for the others (e.g. execl, execlp, execle)
+AC_CHECK_FUNCS([execv execvp execve],
+ ,
+ [AC_DEFINE([ACE_LACKS_EXEC])])
+
+AC_CHECK_FUNC([fcntl],
+ ,
+ [AC_DEFINE([ACE_LACKS_FCNTL])])
+
+AC_CHECK_FUNC([fsync],
+ ,
+ [AC_DEFINE([ACE_LACKS_FSYNC])])
+
+AC_CHECK_FUNC([getmsg],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#endif /* !ACE_LACKS_UNISTD_H */
+
+#ifdef ACE_HAS_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif /* ACE_HAS_SYS_IOCTL_H */
+
+#ifdef ACE_HAS_STREAMS
+# include <stropts.h>
+#endif /* ACE_HAS_STREAMS */
+
+int
+main ()
+{
+ int fds[2];
+
+ if (pipe (fds) != 0)
+ return -1;
+
+/*
+ * Verify that we can actually set a STREAM option that ACE uses.
+ * This is particularly necessary for platforms where compiling and
+ * linking succeed but fail at run-time due to a missing actual
+ * STREAMS implementation. For example, Linux/glibc requires a
+ * STREAMS patch/add-on.
+ */
+
+ int arg = RMSGN;
+
+ if (ioctl (fds[0], I_SRDOPT, (void *) arg) != 0)
+ return -1;
+
+ return 0;
+}
+ ]])],[
+ AC_DEFINE([ACE_HAS_STREAM_PIPES])
+ ],[],[
+ dnl action if cross-compiling
+ AC_DEFINE([ACE_HAS_STREAM_PIPES])
+ ])
+ ],)
+
+AC_CHECK_FUNC([gethostbyaddr],,)
+
+AC_CHECK_FUNC([difftime],
+ ,
+ [AC_DEFINE([ACE_LACKS_DIFFTIME])])
+
+dnl Check for 64 bit llseek() or lseek64()
+ACE_CHECK_LSEEK64
+
+AC_CHECK_FUNC([bind],
+ [
+ ACE_CACHE_CHECK([if bind() will select the port if it is zero],
+ [ace_cv_have_wildcard_bind],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <string.h> /* for memset() */
+
+ int main () {
+
+ int sockfd = socket(AF_INET, SOCK_STREAM, 0);
+
+ sockaddr_in serv_addr;
+
+ (void) memset ((void *) &serv_addr, 0, sizeof(serv_addr));
+
+ serv_addr.sin_family = AF_INET;
+ serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+ serv_addr.sin_port = 0;
+
+ return bind (sockfd, (struct sockaddr *) &serv_addr,
+ sizeof(serv_addr));
+ }
+ ]])],[
+ ace_cv_have_wildcard_bind=yes
+ ],[
+ ace_cv_have_wildcard_bind=no
+ ],[
+ dnl action if cross-compiling
+ ace_cv_have_wildcard_bind=yes
+ ])
+ ],,[AC_DEFINE([ACE_LACKS_WILDCARD_BIND])])
+ ],)
+
+AC_CHECK_FUNC([poll],
+ [
+ ACE_CACHE_CHECK([if poll is broken],
+ [ace_cv_poll_is_broken],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <poll.h>
+#include <time.h>
+
+#ifdef ACE_LACKS_SYSTIME_H
+# include <sys/time.h>
+#endif
+
+ int main () {
+
+ int timeout = 2000; /* 2000 milliseconds */
+ int timeout_arg = timeout;
+ /* poll() modifies timeout argument on some platforms */
+
+ int result = 0;
+
+ time_t *t = 0;
+
+ time_t time1 = time(t);
+
+ result = poll(0, 0, timeout_arg);
+
+ time_t time2 = time(t);
+ time_t diff = time2 - time1;
+
+ /* If (diff * 1000) < timeout then poll() is broken! */
+ if (result >= 0)
+ return (((diff * 1000) < timeout) ? 1 : 0);
+ else
+ return 1; /* We had a problem with poll() so we don't
+ know what really happened. */
+ }
+ ]])],[
+ ace_cv_poll_is_broken=no
+ ],[
+ ace_cv_poll_is_broken=yes
+ ],[
+ dnl action if cross-compiling
+ ace_cv_poll_is_broken=no
+ ])
+ ],[AC_DEFINE([ACE_POLL_IS_BROKEN])],)
+ ],)
+
+AC_CHECK_FUNC([gethrtime],
+ [
+ ACE_CHECK_TYPE([hrtime_t],[sys/time.h],[AC_DEFINE([ACE_HAS_HI_RES_TIMER])],)
+ ],)
+
+AC_CHECK_FUNC([pread],
+ [AC_CHECK_FUNC([pwrite],
+ [
+ AC_DEFINE([ACE_HAS_P_READ_WRITE])
+ dnl Check if _XOPEN_SOURCE=500 macro is needed to make the pread() and
+ dnl pwrite() prototypes visible.
+ ACE_CACHE_CHECK([for pread prototype],
+ [ace_cv_lib_has_pread_prototype],
+ [
+ ace_save_CPPFLAGS="$CPPFLAGS"
+ ace_no_xopen="-U_XOPEN_SOURCE"
+ CPPFLAGS="$CPPFLAGS $ace_no_xopen"
+ AC_EGREP_HEADER([[^_]+pread], [unistd.h],
+ [
+ ace_cv_lib_has_pread_prototype=yes
+ ],
+ [
+ ace_cv_lib_has_pread_prototype=no
+ ])
+ dnl Reset the compiler flags
+ CPPFLAGS="$ace_save_CPPFLAGS"
+ ],,[AC_DEFINE([ACE_LACKS_PREAD_PROTOTYPE])])
+ ],)],)
+
+AC_CHECK_FUNC([readv], , [AC_DEFINE([ACE_LACKS_READV])])
+
+AC_CHECK_FUNC([writev], , [AC_DEFINE([ACE_LACKS_WRITEV])])
+
+AC_CHECK_FUNC([set_t_errno], [AC_DEFINE([ACE_HAS_SET_T_ERRNO])],)
+
+AC_CHECK_FUNC([sigsuspend],
+ [AC_DEFINE([ACE_HAS_SIGSUSPEND])],)
+
+AC_CHECK_FUNC([sigtimedwait],
+ [AC_DEFINE([ACE_HAS_SIGTIMEDWAIT])],)
+
+AC_CHECK_FUNC([socketpair],
+ ,
+ [AC_DEFINE([ACE_LACKS_SOCKETPAIR])])
+
+AC_CHECK_FUNC([strcasecmp],
+ ,
+ [AC_DEFINE([ACE_LACKS_STRCASECMP])])
+
+AC_CHECK_FUNC([strdup],
+ ,
+ [AC_DEFINE([ACE_HAS_STRDUP_EMULATION])])
+
+AC_CHECK_FUNC([strrchr],
+ ,
+ [AC_DEFINE([ACE_LACKS_STRRCHR])])
+
+AC_CHECK_FUNC([strptime],
+ [
+ AC_DEFINE([ACE_HAS_STRPTIME])
+ dnl Check if _XOPEN_SOURCE macro is needed to make the strptime()
+ dnl prototype visible.
+ ACE_CACHE_CHECK([for strptime prototype],
+ [ace_cv_lib_has_strptime_prototype],
+ [
+ ace_save_CPPFLAGS="$CPPFLAGS"
+ ace_no_xopen="-U_XOPEN_SOURCE"
+ CPPFLAGS="$CPPFLAGS $ace_no_xopen"
+ AC_EGREP_HEADER([[^_]+strptime],[time.h],
+ [
+ ace_cv_lib_has_strptime_prototype=yes
+ ],
+ [
+ ace_cv_lib_has_strptime_prototype=no
+ ])
+ dnl Reset the compiler flags
+ CPPFLAGS="$ace_save_CPPFLAGS"
+ ],,[AC_DEFINE([ACE_LACKS_STRPTIME_PROTOTYPE])])
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_NATIVE_STRPTIME])
+ ])
+
+AC_CHECK_FUNC([memchr],
+ [AC_DEFINE([ACE_HAS_MEMCHR])],)
+
+if test "$ace_cv_type_wchar_t" = yes; then
+ AC_CHECK_FUNC([wcslen],
+ [AC_DEFINE([ACE_HAS_XPG4_MULTIBYTE_CHAR])],)
+fi
+
+AC_CHECK_FUNC([syscall],
+ ,
+ [AC_DEFINE([ACE_LACKS_SYSCALL])])
+
+AC_CHECK_FUNC([ualarm],
+ [AC_DEFINE([ACE_HAS_UALARM])],)
+
+AC_CHECK_FUNC([alarm],,)
+AC_CHECK_FUNC([signal],,)
+
+if test "$ac_cv_func_alarm" != yes &&
+ test "$ac_cv_func_signal" != yes; then
+ AC_DEFINE([ACE_LACKS_UNIX_SIGNALS])
+fi
+
+AC_CHECK_FUNC([fork],
+ ,
+ [AC_DEFINE([ACE_LACKS_FORK])])
+
+AC_CHECK_FUNC([getrlimit],
+ [
+ AC_CHECK_FUNC([setrlimit],
+ ,
+ [AC_DEFINE([ACE_LACKS_RLIMIT])])
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_RLIMIT])
+ ])
+
+AC_CHECK_FUNC([sysinfo],
+ [
+ if test "$ac_cv_header_sys_systeminfo_h" = yes; then
+ AC_DEFINE([ACE_HAS_SYSINFO])
+ fi
+ ],)
+
+AC_CHECK_FUNC([strerror],
+ [AC_DEFINE([ACE_HAS_STRERROR])],)
+
+AC_CHECK_FUNC([lstat],
+ ,
+ [AC_DEFINE([ACE_LACKS_LSTAT])])
+
+AC_CHECK_FUNC([readlink],
+ ,
+ [AC_DEFINE([ACE_LACKS_READLINK])])
+
+AC_CHECK_FUNC([rename],
+ ,
+ [AC_DEFINE([ACE_LACKS_RENAME])])
+
+AC_CHECK_FUNC([recvmsg],
+ ,
+ [AC_DEFINE([ACE_LACKS_RECVMSG])])
+
+AC_CHECK_FUNC([sendmsg],
+ ,
+ [AC_DEFINE([ACE_LACKS_SENDMSG])])
+
+if test "$ace_has_tli" = yes; then
+ AC_CHECK_FUNC([t_getname],
+ [AC_DEFINE([ACE_HAS_SVR4_TLI])],)
+fi
+
+AC_CHECK_FUNC([getrusage],
+ [AC_DEFINE([ACE_HAS_GETRUSAGE])],)
+
+AC_CHECK_FUNC([getpgid],
+ [
+ dnl Check if _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED macros are
+ dnl needed to make the getpgid() prototype visible.
+ ACE_CACHE_CHECK([for getpgid prototype],
+ [ace_cv_lib_has_getpgid_prototype],
+ [
+ ace_save_CPPFLAGS="$CPPFLAGS"
+ ace_no_xopen="-U_XOPEN_SOURCE -U_XOPEN_SOURCE_EXTENDED"
+ CPPFLAGS="$CPPFLAGS $ace_no_xopen"
+ AC_EGREP_HEADER([[^_]+getpgid], [unistd.h],
+ [
+ ace_cv_lib_has_getpgid_prototype=yes
+ ],
+ [
+ ace_cv_lib_has_getpgid_prototype=no
+ ])
+ dnl Reset the compiler flags
+ CPPFLAGS="$ace_save_CPPFLAGS"
+ ],, [AC_DEFINE([ACE_LACKS_GETPGID_PROTOTYPE])])
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_GETPGID])
+ ])
+
+AC_CHECK_FUNC([getppid],
+ ,
+ AC_DEFINE([ACE_LACKS_GETPPID]))
+
+AC_CHECK_FUNC([setregid],
+ [
+ dnl Check if _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED macros are
+ dnl needed to make the setregid() prototype visible.
+ ACE_CACHE_CHECK([for setregid prototype],
+ [ace_cv_lib_has_setregid_prototype],
+ [
+ ace_save_CPPFLAGS="$CPPFLAGS"
+ ace_no_xopen="-U_BSD_SOURCE -U_XOPEN_SOURCE -U_XOPEN_SOURCE_EXTENDED"
+ CPPFLAGS="$CPPFLAGS $ace_no_xopen"
+ AC_EGREP_HEADER([[^_]+setregid], [time.h],
+ [
+ ace_cv_lib_has_setregid_prototype=yes
+ ],
+ [
+ ace_cv_lib_has_setregid_prototype=no
+ ])
+ dnl Reset the compiler flags
+ CPPFLAGS="$ace_save_CPPFLAGS"
+ ],, [AC_DEFINE([ACE_LACKS_SETREGID_PROTOTYPE])])
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_SETREGID])
+ ])
+
+AC_CHECK_FUNC([setreuid],
+ [
+ dnl Check if _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED macros are
+ dnl needed to make the setreuid() prototype visible.
+ ACE_CACHE_CHECK([for setreuid prototype],
+ [ace_cv_lib_has_setreuid_prototype],
+ [
+ ace_save_CPPFLAGS="$CPPFLAGS"
+ ace_no_xopen="-U_BSD_SOURCE -U_XOPEN_SOURCE -U_XOPEN_SOURCE_EXTENDED"
+ CPPFLAGS="$CPPFLAGS $ace_no_xopen"
+ AC_EGREP_HEADER([[^_]+setreuid], [time.h],
+ [
+ ace_cv_lib_has_setreuid_prototype=yes
+ ],
+ [
+ ace_cv_lib_has_setreuid_prototype=no
+ ])
+ dnl Reset the compiler flags
+ CPPFLAGS="$ace_save_CPPFLAGS"
+ ],, [AC_DEFINE([ACE_LACKS_SETREUID_PROTOTYPE])])
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_SETREUID])
+ ])
+
+AC_CHECK_FUNC([getpagesize],
+ [AC_DEFINE([ACE_HAS_GETPAGESIZE])],
+ [AC_DEFINE([ACE_PAGE_SIZE], [4096])])
+
+AC_CHECK_FUNC([msync],
+ ,
+ [AC_DEFINE([ACE_LACKS_MSYNC])])
+
+AC_CHECK_FUNC([mprotect],
+ ,
+ [AC_DEFINE([ACE_LACKS_MPROTECT])])
+
+AC_CHECK_FUNC([mkfifo],
+ ,
+ [AC_DEFINE([ACE_LACKS_MKFIFO])])
+
+AC_CHECK_FUNC([mktemp],
+ ,
+ [AC_DEFINE([ACE_LACKS_MKTEMP])])
+
+AC_CHECK_FUNC([madvise],
+ ,
+ [AC_DEFINE([ACE_LACKS_MADVISE])])
+
+if test "$ac_cv_header_sys_priocntl_h" = yes; then
+ AC_CHECK_FUNC([priocntl],
+ [AC_DEFINE([ACE_HAS_PRIOCNTL])],)
+
+dnl Some platforms define priocntl as a macro!
+ if test "$ac_cv_func_priocntl" = no; then
+ ACE_CACHE_CHECK([for priocntl macro],
+ [ace_cv_lib_has_priocntl_macro],
+ [
+ AC_EGREP_CPP([ACE_PRIOCNTL_MACRO],
+ [
+#include <sys/priocntl.h>
+
+#if defined (priocntl)
+ ACE_PRIOCNTL_MACRO
+#endif
+ ],
+ [
+ ace_cv_lib_has_priocntl_macro=yes
+ ],
+ [
+ ace_cv_lib_has_priocntl_macro=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_PRIOCNTL])],)
+ fi dnl test "$ac_cv_func_priocntl" = no
+fi dnl test "$ac_cv_header_sys_priocntl_h" = yes
+
+dnl FIXME: How do we check for a working sbrk()? Do we need to?
+AC_CHECK_FUNC([sbrk],, [AC_DEFINE([ACE_LACKS_SBRK])])
+
+dnl Check for SYSV IPC functions
+AC_CHECK_FUNC([msgctl],,)
+
+AC_CHECK_FUNC([msgget],,)
+
+AC_CHECK_FUNC([msgrcv],,)
+
+AC_CHECK_FUNC([semctl],,)
+
+AC_CHECK_FUNC([semget],,)
+
+AC_CHECK_FUNC([semop],,)
+
+AC_CHECK_FUNC([shmat],,)
+
+AC_CHECK_FUNC([shmctl],,)
+
+AC_CHECK_FUNC([shmdt],,)
+
+AC_CHECK_FUNC([shmget],,)
+dnl End check for SYSV IPC functions
+
+AC_CHECK_FUNC([read_real_time],
+ [AC_DEFINE([ACE_HAS_AIX_HI_RES_TIMER])],)
+
+AC_CHECK_FUNC([shm_open],
+ [
+ AC_MSG_WARN([platform supports shm_open but shm_open support will not be])
+ AC_MSG_WARN([enabled since ACE currently supports it only on LynxOS])
+dnl AC_DEFINE([ACE_HAS_SHM_OPEN])
+ ],)
+
+AC_CHECK_FUNC([tempnam],
+ ,
+ [AC_DEFINE([ACE_LACKS_TEMPNAM])])
+
+AC_CHECK_FUNC([truncate],
+ ,
+ [AC_DEFINE([ACE_LACKS_TRUNCATE])])
+
+dnl Check for MIT pthreads APIs for timed send/recv operations
+AC_CHECK_FUNC([recv_timedwait],
+ [AC_DEFINE([ACE_HAS_RECV_TIMEDWAIT])],)
+
+AC_CHECK_FUNC([recvfrom_timedwait],
+ [AC_DEFINE([ACE_HAS_RECVFROM_TIMEDWAIT])],)
+
+AC_CHECK_FUNC([recvmsg_timedwait],
+ [AC_DEFINE([ACE_HAS_RECVMSG_TIMEDWAIT])],)
+
+AC_CHECK_FUNC([send_timedwait],
+ [AC_DEFINE([ACE_HAS_SEND_TIMEDWAIT])],)
+
+AC_CHECK_FUNC([sendto_timedwait],
+ [AC_DEFINE([ACE_HAS_SENDTO_TIMEDWAIT])],)
+
+AC_CHECK_FUNC([sendmsg_timedwait],
+ [AC_DEFINE([ACE_HAS_SENDMSG_TIMEDWAIT])],)
+
+AC_CHECK_FUNC([read_timedwait],
+ [AC_DEFINE([ACE_HAS_READ_TIMEDWAIT])],)
+
+AC_CHECK_FUNC([readv_timedwait],
+ [AC_DEFINE([ACE_HAS_READV_TIMEDWAIT])],)
+
+AC_CHECK_FUNC([write_timedwait],
+ [AC_DEFINE([ACE_HAS_WRITE_TIMEDWAIT])],)
+
+AC_CHECK_FUNC([writev_timedwait],
+ [AC_DEFINE([ACE_HAS_WRITEV_TIMEDWAIT])],)
+
+dnl Save the cache for debugging purposes
+AC_CACHE_SAVE
+
+dnl Check for POSIX Semaphore functions
+dnl We only check for a few of them since some platforms don't have these.
+AC_CHECK_FUNC([sem_init],,)
+AC_CHECK_FUNC([sem_destroy],,)
+
+dnl We only enable POSIX semaphores if we are not using UNIX International
+dnl threads.
+dnl Enabling POSIX semaphores on Solaris seems to cause problems for
+dnl ACE. (NOTE: This may no longer be true after the updates/fixes
+dnl I made. The fixes corrected broken code in ACE_OS::sema_init().
+dnl -Ossama)
+if test "$ac_cv_func_sem_init" = yes &&
+ test "$ac_cv_func_sem_destroy" = yes &&
+ test "$ace_cv_type_sem_t" = yes &&
+ test "$ace_has_sthreads" != yes; then
+
+dnl Only enable POSIX semaphore support if process shared semaphores
+dnl are supported. Presumably process shared semaphores are only
+dnl available if the _POSIX_THREAD_PROCESS_SHARED macro is defined by
+dnl the platform.
+ AC_EGREP_CPP([WE_HAVE_SHARED_POSIX_SEMAPHORES],
+ [
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+
+#ifndef _THREAD_SAFE
+#define _THREAD_SAFE
+#endif
+
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h> /* needed for _POSIX_THREAD_PROCESS_SHARED */
+#endif
+
+#include <pthread.h>
+#include <semaphore.h>
+
+#if defined (_POSIX_THREAD_PROCESS_SHARED)
+WE_HAVE_SHARED_POSIX_SEMAPHORES
+#endif
+ ],
+ [
+ AC_DEFINE([ACE_HAS_POSIX_SEM])
+
+ AC_CHECK_FUNC([sem_open],
+ [
+ dnl Check if it works! For example, in glibc 2.x sem_open exists
+ dnl but it appears to be a stub. However, it isn't listed as a
+ dnl stub in <gnu/stubs.h> so the configure script thinks it is
+ dnl implemented!
+ ACE_CACHE_CHECK([if sem_open works],
+ [ace_cv_sem_open_works],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <stddef.h> /* for definition of "NULL" */
+
+#include <semaphore.h>
+
+#ifndef SEM_FAILED
+# define SEM_FAILED ((sem_t *) -1)
+#endif
+
+int
+main ()
+{
+ sem_t *s = 0;
+
+ s = sem_open ("ace_semaphore_foo", O_CREAT | O_EXCL, 0600, 1);
+
+ if (s == SEM_FAILED)
+ return -1; /* FAILURE */
+
+ if (sem_close (s) != 0)
+ return -1; /* Something went wrong! */
+
+ return 0;
+}
+ ]])],[
+ ace_cv_sem_open_works=yes
+ ],[
+ ace_cv_sem_open_works=no
+ ],[
+ dnl action if cross-compiling
+ ace_cv_sem_open_works=yes
+ ])
+ ],, [AC_DEFINE([ACE_LACKS_NAMED_POSIX_SEM])])
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_NAMED_POSIX_SEM])
+ ])
+ ],)
+
+fi dnl check for POSIX Semaphore functions
+
+
+dnl The following tests are performed only when the user has enabled
+dnl support for threads.
+
+dnl NOTE: Make sure the thread library is in "LIBS"
+dnl (e.g.: LIBS="$LIBS -lpthread")
+dnl otherwise the below thread "CHECK_FUNCs"
+dnl will not work correctly.
+if test "$ace_user_enable_threads" = yes; then
+
+ if test "$ace_has_pthreads" = yes; then
+dnl Digital UNIX 4.0 "mangles" the following pthread functions:
+dnl pthread_attr_getguardsize_np
+dnl pthread_attr_getinheritsched
+dnl pthread_attr_getstacksize
+dnl pthread_attr_setguardsize_np
+dnl pthread_attr_setinheritsched
+dnl pthread_attr_setstacksize
+dnl pthread_cancel
+dnl pthread_cond_broadcast
+dnl pthread_cond_destroy
+dnl pthread_cond_init
+dnl pthread_cond_sig_preempt_int_np
+dnl pthread_cond_signal
+dnl pthread_cond_signal_int_np
+dnl pthread_cond_timedwait
+dnl pthread_cond_wait
+dnl pthread_create
+dnl pthread_delay_np
+dnl pthread_detach
+dnl pthread_equal
+dnl pthread_exit
+dnl pthread_get_expiration_np
+dnl pthread_getspecific
+dnl pthread_join
+dnl pthread_lock_global_np
+dnl pthread_mutex_destroy
+dnl pthread_mutex_init
+dnl pthread_mutex_lock
+dnl pthread_mutex_trylock
+dnl pthread_mutex_unlock
+dnl pthread_once
+dnl pthread_self
+dnl pthread_setspecific
+dnl pthread_testcancel
+dnl pthread_unlock_global_np
+dnl These functions have a double underscore "__" prepended to maintain
+dnl backwards compatibility with Pthread Draft 4 functions of the same
+dnl name.
+
+ AC_CHECK_FUNC([pthread_sigmask],
+ ,
+ [AC_DEFINE([ACE_LACKS_PTHREAD_SIGMASK])])
+
+ AC_CHECK_FUNC([pthread_key_create],
+ [AC_DEFINE([ACE_HAS_THREAD_SPECIFIC_STORAGE])],
+ [
+ AC_CHECK_FUNC([pthread_keycreate],
+ [AC_DEFINE(ACE_HAS_THREAD_SPECIFIC_STORAGE)],
+ [AC_DEFINE(ACE_HAS_TSS_EMULATION)])
+ ])
+
+ AC_CHECK_FUNC([pthread_condattr_setkind_np],
+ [AC_DEFINE([ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP])],)
+
+ AC_CHECK_FUNC([pthread_mutexattr_setkind_np],
+ [AC_DEFINE([ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP])],)
+
+ AC_CHECK_FUNC([pthread_condattr_setpshared],
+ ,
+ [AC_DEFINE([ACE_LACKS_CONDATTR_PSHARED])])
+
+ AC_CHECK_FUNC([pthread_attr_setstackaddr],
+ ,
+ [AC_DEFINE([ACE_LACKS_THREAD_STACK_ADDR])])
+
+ ACE_CHECK_FUNC([pthread_attr_setstacksize], [pthread.h],
+ ,
+ [AC_DEFINE([ACE_LACKS_THREAD_STACK_SIZE])])
+
+ ACE_CHECK_FUNC([pthread_cancel], [pthread.h],
+ [
+ dnl Make sure the prototype actually exists. Some platforms,
+ dnl such as FreeBSD 4, appear to have a missing prototype. If
+ dnl the prototype is missing, then don't use pthread_cancel.
+ dnl Creating a prototype for it in ACE is probably a bad idea.
+
+ ace_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $ACE_THR_CPPFLAGS"
+
+ AC_EGREP_HEADER([pthread_cancel], [pthread.h],,
+ [
+ AC_DEFINE([ACE_LACKS_PTHREAD_CANCEL])
+ ])
+
+ dnl Reset the preprocessor flags
+ CPPFLAGS="$ace_save_CPPFLAGS"
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_PTHREAD_CANCEL])
+ ])
+
+ AC_CHECK_FUNC([pthread_yield],
+ ,
+ [AC_DEFINE([ACE_LACKS_PTHREAD_YIELD])])
+
+ AC_CHECK_FUNC([pthread_thr_sigsetmask],
+ ,
+ [AC_DEFINE([ACE_LACKS_PTHREAD_THR_SIGSETMASK])])
+
+ AC_CHECK_FUNC([pthread_attr_setdetachstate],
+ ,
+ [AC_DEFINE([ACE_LACKS_SETDETACH])])
+
+ dnl ACE currently doesn't provide enough fine grained control over
+ dnl these functions so both must be present in order to prevent
+ dnl ACE_LACKS_SETSCHED from being defined.
+ AC_CHECK_FUNC([sched_setscheduler],
+ [
+ AC_CHECK_FUNC([pthread_attr_setschedpolicy],,
+ [AC_CHECK_FUNC([pthread_attr_setsched],,
+ [AC_DEFINE([ACE_LACKS_SETSCHED])])])
+ ],
+ [
+ AC_DEFINE([ACE_LACKS_SETSCHED])
+ ])
+
+ AC_CHECK_FUNC([pthread_attr_setscope],
+ ,
+ [AC_DEFINE([ACE_LACKS_THREAD_PROCESS_SCOPING])])
+
+ AC_CHECK_FUNC([pthread_mutexattr_setpshared],
+ ,
+ [AC_DEFINE([ACE_LACKS_MUTEXATTR_PSHARED])])
+
+dnl Check for POSIX Threads Draft 4 functions
+ AC_CHECK_FUNC([pthread_mutexattr_create],,)
+ AC_CHECK_FUNC([pthread_mutexattr_delete],,)
+ AC_CHECK_FUNC([pthread_condattr_delete],,)
+ AC_CHECK_FUNC([pthread_condattr_create],,)
+ AC_CHECK_FUNC([pthread_setprio],,)
+ AC_CHECK_FUNC([pthread_getprio],,)
+ AC_CHECK_FUNC([pthread_setcancel],,)
+ AC_CHECK_FUNC([pthread_setasynccancel],,)
+ AC_CHECK_FUNC([pthread_kill],,)
+dnl Check for POSIX Threads Draft 6 functions
+ AC_CHECK_FUNC([pthread_attr_setprio],,)
+ AC_CHECK_FUNC([pthread_attr_getprio],,)
+ AC_CHECK_FUNC([pthread_setintr],,)
+ AC_CHECK_FUNC([pthread_setintrtype],,)
+dnl Check for POSIX threads Draft 6, 7 and Standard common functions
+ AC_CHECK_FUNC([pthread_mutexattr_init],,)
+ AC_CHECK_FUNC([pthread_mutexattr_destroy],,)
+ AC_CHECK_FUNC([pthread_condattr_init],,)
+ AC_CHECK_FUNC([pthread_condattr_destroy],,)
+dnl Check for POSIX Threads Draft 7 and Draft Standard common functions
+ AC_CHECK_FUNC([pthread_setschedparam],,)
+ AC_CHECK_FUNC([pthread_getschedparam],,)
+ AC_CHECK_FUNC([pthread_setcancelstate],,)
+ AC_CHECK_FUNC([pthread_setcanceltype],,)
+dnl Check for POSIX Threads Draft Standard functions
+dnl sched_yield() is in the C library or perhaps in "-lposix4."
+dnl We need to add other library checks in this script's "check libraries"
+dnl section if it is in another library.
+dnl AC_CHECK_FUNC(sched_yield,,)
+dnl We already check for this during the library checks.
+
+dnl Check for Unix98 pthreads extensions
+ ACE_CACHE_CHECK([for struct pthread_rwlock_t],
+ [ace_cv_struct_pthread_rwlock_t],
+ [
+ dnl Since we are checking for siginfo_t in more than one header
+ dnl we can't use the ACE_CHECK_STRUCT macro so we have to do things
+ dnl manually.
+ ACE_TRY_COMPILE_STRUCT([pthread_rwlock_t], [pthread.h],
+ [
+ ace_cv_struct_pthread_rwlock_t=yes
+ ],
+ [
+ ACE_TRY_COMPILE_STRUCT([pthread_rwlock_t], [sys/types.h],
+ [
+ ace_cv_struct_pthread_rwlock_t=yes
+ ],
+ [
+ ace_cv_struct_pthread_rwlock_t=no
+ ])
+ ])
+ ],,)
+
+ ACE_CACHE_CHECK([for struct pthread_rwlockattr_t],
+ [ace_cv_struct_pthread_rwlockattr_t],
+ [
+ dnl Since we are checking for siginfo_t in more than one header
+ dnl we can't use the ACE_CHECK_STRUCT macro so we have to do things
+ dnl manually.
+ ACE_TRY_COMPILE_STRUCT([pthread_rwlockattr_t], [pthread.h],
+ [
+ ace_cv_struct_pthread_rwlockattr_t=yes
+ ],
+ [
+ ACE_TRY_COMPILE_STRUCT([pthread_rwlockattr_t], [sys/types.h],
+ [
+ ace_cv_struct_pthread_rwlockattr_t=yes
+ ],
+ [
+ ace_cv_struct_pthread_rwlockattr_t=no
+ ])
+ ])
+ ],,)
+
+ AC_CHECK_FUNC([pthread_continue],,)
+ AC_CHECK_FUNC([pthread_suspend],,)
+ AC_CHECK_FUNC([pthread_rwlock_init],,)
+ AC_CHECK_FUNC([pthread_rwlock_destroy],,)
+ AC_CHECK_FUNC([pthread_rwlock_rdlock],,)
+ AC_CHECK_FUNC([pthread_rwlock_wrlock],,)
+ AC_CHECK_FUNC([pthread_rwlock_unlock],,)
+ AC_CHECK_FUNC([pthread_rwlock_tryrdlock],,)
+ AC_CHECK_FUNC([pthread_rwlock_trywrlock],,)
+ AC_CHECK_FUNC([pthread_rwlockattr_init],,)
+ AC_CHECK_FUNC([pthread_rwlockattr_destroy],,)
+ AC_CHECK_FUNC([pthread_rwlockattr_setpshared],,)
+
+ if test "$ace_cv_struct_pthread_rwlock_t" = yes &&
+ test "$ace_cv_struct_pthread_rwlockattr_t" = yes &&
+ test "$ac_cv_func_pthread_continue" = yes &&
+ test "$ac_cv_func_pthread_continue" = yes &&
+ test "$ac_cv_func_pthread_suspend" = yes &&
+ test "$ac_cv_func_pthread_rwlock_init" = yes &&
+ test "$ac_cv_func_pthread_rwlock_destroy" = yes &&
+ test "$ac_cv_func_pthread_rwlock_rdlock" = yes &&
+ test "$ac_cv_func_pthread_rwlock_wrlock" = yes &&
+ test "$ac_cv_func_pthread_rwlock_unlock" = yes &&
+ test "$ac_cv_func_pthread_rwlock_tryrdlock" = yes &&
+ test "$ac_cv_func_pthread_rwlock_trywrlock" = yes &&
+ test "$ac_cv_func_pthread_rwlockattr_init" = yes &&
+ test "$ac_cv_func_pthread_rwlockattr_destroy" = yes &&
+ test "$ac_cv_func_pthread_rwlockattr_setpshared" = yes; then
+ AC_DEFINE([ACE_HAS_PTHREADS_UNIX98_EXT])
+ fi dnl Unix98 pthreads extensions
+
+dnl Check if platform has thread_self() rather than pthread_self()
+ ACE_CHECK_FUNC([pthread_self], [pthread.h],
+ ,
+ [
+ AC_CHECK_FUNC([thread_self],
+ [
+ AC_DEFINE([ACE_HAS_THREAD_SELF])
+ ],)
+ ])
+
+dnl Check if pthread.h declares an enum with PTHREAD_PROCESS_PRIVATE and
+dnl PTHREAD_PROCESS_SHARED valuesACE_CACHE_CHECK(for ctime() macro,
+ ACE_CACHE_CHECK([for PTHREAD_PROCESS_* enumeration in pthread.h],
+ [ace_cv_lib_pthread_process_enum],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+ ]], [[
+/* Undefine PTHREAD_PROCESS_SHARED in case some platforms #define it */
+#undef PTHREAD_PROCESS_SHARED
+int foo = PTHREAD_PROCESS_SHARED;
+ ]])],[
+ ace_cv_lib_pthread_process_enum=yes
+ ],[
+ ace_cv_lib_pthread_process_enum=no
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_PTHREAD_PROCESS_ENUM])
+ ],)
+
+dnl Check if pthread_create requires an extern "C" start routine
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+ACE_CACHE_CHECK([if pthread_create requires an extern \"C\" start routine],
+ [ace_cv_lib_pthread_c_func],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+
+void *ace_start_routine(void *);
+ ]], [[
+pthread_create(0, 0, ace_start_routine, 0);
+ ]])],[
+ ace_cv_lib_pthread_c_func=no
+ ],[
+ dnl Check if extern "C" start routine is required.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <pthread.h>
+
+extern "C" void *ace_start_routine(void *);
+ ]],
+ [[
+pthread_create(0, 0, ace_start_routine, 0);
+ ]])],
+ [
+ ace_cv_lib_pthread_c_func=yes
+ ],
+ [
+ ace_cv_lib_pthread_c_func=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_THR_C_FUNC])
+ ],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if pthread_key_create has a standard arg thread destructor
+ACE_CACHE_CHECK([if pthread_key_create has std arg thread destructor],
+ [ace_cv_lib_pthread_stdarg_dest],[
+ if test "$ac_cv_func_pthread_key_create" = yes; then
+ ace_pthread_key_create=pthread_key_create
+ else
+ ace_pthread_key_create=pthread_keycreate
+ fi
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+
+void ace_destructor(void *);
+ ]], [[
+${ace_pthread_key_create}(0, ace_destructor);
+ ]])],[
+ ace_cv_lib_pthread_stdarg_dest=no
+ ],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <pthread.h>
+
+void ace_destructor(...);
+ ]],
+ [[
+${ace_pthread_key_create}(0, ace_destructor);
+ ]])],
+ [
+ ace_cv_lib_pthread_stdarg_dest=yes
+ ],
+ [
+ ace_cv_lib_pthread_stdarg_dest=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_STDARG_THR_DEST])
+ ],)
+
+dnl Check if pthread_key_create requires an extern "C" start routine
+ACE_CONVERT_WARNINGS_TO_ERRORS([
+ACE_CACHE_CHECK([if pthread_key_create requires an extern \"C\" start routine],
+ [ace_cv_lib_pthread_c_dest],[
+ if test "$ac_cv_func_pthread_key_create" = yes; then
+ ace_pthread_key_create=pthread_key_create
+ else
+ ace_pthread_key_create=pthread_keycreate
+ fi
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+
+void ace_destructor(void *);
+ ]], [[
+${ace_pthread_key_create}(0, ace_destructor);
+ ]])],[
+ ace_cv_lib_pthread_c_dest=no
+ ],[
+ dnl Check if extern "C" start routine is required.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <pthread.h>
+
+extern "C" void ace_destructor(void *);
+ ]],
+ [[
+${ace_pthread_key_create}(0, ace_destructor);
+ ]])],
+ [
+ ace_cv_lib_pthread_c_dest=yes
+ ],
+ [
+ ace_cv_lib_pthread_c_dest=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_THR_C_DEST])
+ ],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+
+AC_CHECK_FUNC([sched_get_priority_min],,
+ [
+dnl Check if the PTHREAD_MIN_PRIORITY constant exists.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+ ]], [[
+ int p = (int) PTHREAD_MIN_PRIORITY;
+ ]])
+ ],
+ [
+ dnl Since we have PTHREAD_MIN_PRIORITY, denote that PX_PRIO_MIN
+ dnl should not be used.
+ ace_has_px_prio_min=no
+ ],
+ [
+ dnl PTHREAD_MIN_PRIORITY doesn't appear to be defined, so
+ dnl check if the platform defines PX_PRIO_MIN, instead.
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+ ]], [[
+ int p = (int) PX_PRIO_MIN;
+ ]])],
+ [
+ ace_has_px_prio_min=yes
+ ],
+ [
+ ace_has_px_prio_min=no
+ ])
+ ])
+ ])
+
+ if test "$ace_has_px_prio_min" = yes; then
+ AC_DEFINE([PTHREAD_MIN_PRIORITY],
+ [PX_PRIO_MIN],
+ [Minimum thread priority])
+ fi
+
+AC_CHECK_FUNC([sched_get_priority_max],,
+ [
+dnl Check if the PTHREAD_MAX_PRIORITY constant exists.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+ ]], [[
+ int p = (int) PTHREAD_MAX_PRIORITY;
+ ]])
+ ],
+ [
+ dnl Since we have PTHREAD_MAX_PRIORITY, denote that PX_PRIO_MAX
+ dnl should not be used.
+ ace_has_px_prio_max=no
+ ],
+ [
+ dnl PTHREAD_MAX_PRIORITY doesn't appear to be defined, so
+ dnl check if the platform defines PX_PRIO_MAX, instead.
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+ ]], [[
+ int p = (int) PX_PRIO_MAX;
+ ]])],
+ [
+ ace_has_px_prio_max=yes
+ ],
+ [
+ ace_has_px_prio_max=no
+ ])
+ ])
+ ])
+
+ if test "$ace_has_px_prio_max" = yes; then
+ AC_DEFINE([PTHREAD_MAX_PRIORITY],
+ [PX_PRIO_MAX],
+ [Maximum thread priority])
+ fi
+
+ fi dnl test "$ace_has_pthreads" = yes
+
+ if test "$ace_has_sthreads" = yes; then
+dnl Only check for these functions if we have the UNIX International
+dnl Threads library "thread."
+ AC_CHECK_FUNC([thr_keycreate],
+ [AC_DEFINE([ACE_HAS_THREAD_SPECIFIC_STORAGE])],
+ [AC_DEFINE([ACE_HAS_TSS_EMULATION])])
+
+ AC_CHECK_FUNC([thr_yield],
+ [AC_DEFINE([ACE_HAS_THR_YIELD])],)
+
+ AC_CHECK_FUNC([thr_keydelete],
+ [AC_DEFINE([ACE_HAS_THR_KEYDELETE])],)
+
+ AC_CHECK_FUNC([thr_min_stack],[],
+ [
+ AC_CHECK_FUNC([thr_minstack],
+ [AC_DEFINE([ACE_HAS_THR_MINSTACK])],)
+ ])
+
+ fi dnl test "$ace_has_sthreads" = yes
+
+fi dnl test "$ace_user_enable_threads" = yes
+
+dnl
+dnl By Eric:
+dnl ACE will define a sigwait function if we lie and say we don't have
+dnl one. Unfortunately, the ACE function may conflict with our
+dnl function, so we'll go ahead and turn this on, even if we are
+dnl ignoring threads.
+AC_CHECK_FUNC([sigwait],
+ [AC_DEFINE([ACE_HAS_SIGWAIT])],)
+
+
+dnl Check for reentrant functions
+if test "$ace_user_enable_reentrant_funcs" = yes; then
+ AC_CHECK_FUNC([rand_r],,)
+
+ AC_CHECK_FUNC([strtok_r],
+ [
+ dnl Check if _POSIX_SOURCE macro is needed to make the strtok_r()
+ dnl prototype visible.
+ ACE_CACHE_CHECK([for strtok_r prototype],
+ [ace_cv_lib_has_strtok_r_prototype],
+ [
+ ace_save_CPPFLAGS="$CPPFLAGS"
+ ace_no_posix="-U_POSIX_SOURCE $ACE_THR_CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $ace_no_posix"
+ AC_EGREP_HEADER([[^_]+strtok_r], [string.h],
+ [
+ ace_cv_lib_has_strtok_r_prototype=yes
+ ],
+ [
+ ace_cv_lib_has_strtok_r_prototype=no
+ ])
+ dnl Reset the preprocessor flags
+ CPPFLAGS="$ace_save_CPPFLAGS"
+ ],, [AC_DEFINE([ACE_LACKS_STRTOK_R_PROTOTYPE])])
+ ],)
+
+ AC_CHECK_FUNC([getpwnam_r],,[AC_DEFINE([ACE_LACKS_PWD_REENTRANT_FUNCTIONS])])
+
+ AC_CHECK_FUNC([ctime_r],,)
+
+ AC_CHECK_FUNC([localtime_r],,)
+
+ AC_CHECK_FUNC([gmtime_r],,)
+
+ AC_CHECK_FUNC([asctime_r],,)
+
+ AC_CHECK_FUNC([getprotobyname_r],,)
+
+ AC_CHECK_FUNC([getprotobynumber_r],,)
+
+ AC_CHECK_FUNC([gethostbyaddr_r],,)
+
+ AC_CHECK_FUNC([gethostbyname_r],,)
+
+ AC_CHECK_FUNC([getservbyname_r],,)
+fi dnl End checks for reentrant functions
+
+AC_CHECK_FUNC([readdir_r],
+ ,
+ [AC_DEFINE([ACE_LACKS_READDIR_R])])
+
+AC_CHECK_FUNC([seekdir],
+ ,
+ [AC_DEFINE([ACE_LACKS_SEEKDIR])])
+
+AC_CHECK_FUNC([telldir],
+ ,
+ [AC_DEFINE([ACE_LACKS_TELLDIR])])
+
+
+dnl
+dnl SECTION 11: checks for function characteristics
+dnl
+
+ACE_CONVERT_WARNINGS_TO_ERRORS([
+dnl Check if dlopen takes a char * arg instead of const char *
+ if test "$ace_has_svr4_dynamic_linking" = yes; then
+ ACE_CACHE_CHECK([if dlopen takes a char *],
+ [ace_cv_lib_charptr_dl],
+ [
+ dnl Check if it takes a const char *, first.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <dlfcn.h>
+ ]], [[
+ const char *filename = 0;
+ int flag = 0;
+ void *ptr = dlopen(filename, flag);
+ ]])],[
+ ace_cv_lib_charptr_dl=no
+ ],[
+ dnl Now check if it takes a non-const char *.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <dlfcn.h>
+ ]],
+ [[
+ char *filename = 0;
+ int flag = 0;
+ void *ptr = dlopen(filename, flag);
+ ]])],
+ [
+ ace_cv_lib_charptr_dl=yes
+ ],
+ [
+ ace_cv_lib_charptr_dl=no
+ ])
+ ])
+ ], [AC_DEFINE([ACE_HAS_CHARPTR_DL])],)
+ fi dnl test "$ace_has_svr4_dynamic_linking" = yes
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+ACE_CONVERT_WARNINGS_TO_ERRORS([
+dnl Check if "getby" functions use a non-const char * argument
+ if test "$ac_cv_func_gethostbyaddr" = yes; then
+ ACE_CACHE_CHECK([\"getby\" functions take a non-const char *],
+ [ace_cv_lib_nonconst_getby],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/socket.h>
+ ]], [[
+ char *addr = 0;
+ int len = 0;
+ int type = 0;
+ struct hostent *mystruct = 0;
+
+ mystruct = gethostbyaddr(name, len, type);
+ ]])],[
+ ace_cv_lib_nonconst_getby=yes
+ ],[
+ ace_cv_lib_nonconst_getby=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_NONCONST_GETBY])],)
+ fi dnl test "$ac_cv_func_gethostbyaddr" = yes
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if new throws exception upon failure
+if test "$ace_user_enable_exceptions" = yes; then
+ ACE_CACHE_CHECK([if new throws bad_alloc exception on failure],
+ [ace_cv_new_throws_bad_alloc_exception],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#if defined (ACE_HAS_NEW_NO_H)
+# include <new>
+#elif defined (ACE_HAS_NEW_H)
+# include <new.h>
+#endif
+
+#if defined (ACE_HAS_STDEXCEPT_NO_H)
+# include <stdexcept>
+#elif defined (ACE_HAS_EXCEPTION_H)
+# include <exception.h>
+#endif
+
+ int main(int, char *[]) {
+ while (1) {
+ try {
+ char *a = new char[1024*1024];
+ if (a == 0) {
+ return 1; /* new() does NOT throw exceptions */
+ }
+ }
+
+ catch (bad_alloc)
+ {
+ return 0; /* new() does throw exceptions */
+ }
+ };
+
+ return 1; /* ERROR: We shouldn't get this far! */
+ }
+ ]])],[
+ ace_cv_new_throws_bad_alloc_exception=yes
+ ],[
+ ace_cv_new_throws_bad_alloc_exception=no
+ ],[
+ ace_cv_new_throws_bad_alloc_exception=no
+ ])
+ ], [AC_DEFINE([ACE_NEW_THROWS_EXCEPTIONS])],)
+
+ if test "$ace_cv_new_throws_bad_alloc_exception" != yes; then
+ ACE_CACHE_CHECK([if new throws xalloc exception on failure],
+ [ace_cv_new_throws_xalloc_exception],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#if defined (ACE_HAS_NEW_NO_H)
+# include <new>
+#elif defined (ACE_HAS_NEW_H)
+# include <new.h>
+#endif
+
+#if defined (ACE_HAS_STDEXCEPT_NO_H)
+# include <stdexcept>
+#elif defined (ACE_HAS_EXCEPTION_H)
+# include <exception.h>
+#endif
+
+ int main(int, char *[]) {
+ while (1) {
+ try {
+ char *a = new char[1024*1024];
+ if (a == 0) {
+ return 1; /* new() does NOT throw exceptions */
+ }
+ }
+
+ catch (xalloc)
+ {
+ return 0; /* new() does throw exceptions */
+ }
+ };
+
+ return 1; /* ERROR: We shouldn't get this far! */
+ }
+ ]])],[
+ ace_cv_new_throws_xalloc_exception=yes
+ ],[
+ ace_cv_new_throws_xalloc_exception=no
+ ],[
+ ace_cv_new_throws_xalloc_exception=no
+ ])
+ ], [AC_DEFINE([ACE_NEW_THROWS_EXCEPTIONS])],)
+ fi dnl ace_cv_new_throws_bad_alloc_exceptions = no
+fi dnl $ace_user_enable_exceptions = yes
+
+ACE_CONVERT_WARNINGS_TO_ERRORS([
+dnl Check if putmsg takes a const struct strbuf *
+dnl If we have getmsg() we can be pretty sure that we have putmsg()
+ if test "$ac_cv_func_getmsg" = yes ||
+ test "$ac_cv_header_stropts_h" = yes; then
+ ACE_CACHE_CHECK([if putmsg takes a const struct strbuf*],
+ [ace_cv_lib_const_strbufptr],
+ [
+ dnl Check if it takes a const struct strbuf *, first.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stropts.h>
+ ]], [[
+ int result = 0;
+ int fd = 0;
+ const struct strbuf * ace_str = 0;
+ int flags = 0;
+
+ result = putmsg(fd, ace_str, ace_str, flags);
+ ]])],[
+ ace_cv_lib_const_strbufptr=yes
+ ],[
+ ace_cv_lib_const_strbufptr=no
+ ])
+ ],, [AC_DEFINE([ACE_LACKS_CONST_STRBUF_PTR])])
+ fi dnl "$ac_cv_func_getmsg" = yes || "$ac_cv_header_stropts_h" = yes
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if select takes int instead of fd_set
+ACE_CONVERT_WARNINGS_TO_ERRORS([
+ ACE_CACHE_CHECK([if select takes int instead of fd_set],
+ [ace_cv_lib_select_takes_int],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/time.h>
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef ACE_HAS_SELECT_H
+# include <sys/select.h>
+#endif
+ ]], [[
+ int n = 0;
+ fd_set* readfds = 0;
+ fd_set* writefds = 0;
+ fd_set* exceptfds = 0;
+ timeval* timeout = 0;
+ int result = 0;
+
+ result = select(n, readfds, writefds, exceptfds, timeout);
+ ]])],[
+ ace_cv_lib_select_takes_int=no
+ ],[
+dnl Now check if select will actually take int* arguments
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/time.h>
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef ACE_HAS_SELECT_H
+# include <sys/select.h>
+#endif
+ ]],
+ [[
+ int n = 0;
+ int* readfds = 0;
+ int* writefds = 0;
+ int* exceptfds = 0;
+ timeval* timeout = 0;
+ int result = 0;
+
+ result = select(n, readfds, writefds, exceptfds, timeout);
+ ]])],
+ [
+ ace_cv_lib_select_takes_int=yes
+ ],
+ [
+ ace_cv_lib_select_takes_int=no
+ dnl If we get here we don't know what select() takes.
+ ])
+ ])
+ ], [AC_DEFINE([ACE_SELECT_USES_INT])],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+
+dnl Check if setrlimit() takes an enum as 1st argument
+ACE_CHECK_SETRLIMIT_ENUM
+
+dnl This test fails (i.e. passes when it shouldn't) when compiling with
+dnl GCC/G++ since the compiler treats passing a const to a non-const
+dnl argument as a warning and not as an error since the const is
+dnl simply discarded. To correct this problem, we use "-Werror" which
+dnl converts all warnings to errors, whenever we are compiling with
+dnl G++.
+dnl -Ossama
+
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+dnl Check if setrlimit() takes a const pointer as 2nd argument
+ACE_CACHE_CHECK([if setrlimit() takes a const pointer as 2nd argument],
+ [ace_cv_lib_posix_setrlimit_const_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/resource.h>
+ ]], [[
+ const struct rlimit* rlp = 0;
+ setrlimit(RLIMIT_CPU, rlp);
+ ]])],[
+ ace_cv_lib_posix_setrlimit_const_2=yes
+ ],[
+ ace_cv_lib_posix_setrlimit_const_2=no
+ ])
+ ],, [AC_DEFINE([ACE_HAS_BROKEN_SETRLIMIT])])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if getrusage() takes an enum as 1st argument
+ACE_CHECK_GETRUSAGE_ENUM
+
+dnl TODO: This doesn't work.
+dnl The compiler in linux just issues a warning, and the test passes!!!
+dnl
+dnl FIXED by adding "-Werror" to compiler flags when using GNU C++
+dnl -Ossama
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+dnl Check if select takes a const fifth argument
+ACE_CACHE_CHECK([if select takes a const fifth argument],
+ [ace_cv_lib_posix_select_const_5],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/time.h>
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef ACE_HAS_SELECT_H
+# include <sys/select.h>
+#endif
+ ]], [[
+ int n = 0;
+ fd_set *readfds = 0;
+ fd_set *writefds = 0;
+ fd_set *exceptfds = 0;
+ const struct timeval* timeout = 0;
+ select(n, readfds, writefds, exceptfds, timeout);
+ ]])],[
+ ace_cv_lib_posix_select_const_5=yes
+ ],[
+ ace_cv_lib_posix_select_const_5=no
+ ])
+ ], , [AC_DEFINE([ACE_HAS_NONCONST_SELECT_TIMEVAL])])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Only run the following tests if the msghdr structure exists.
+if test "$ace_cv_struct_msghdr" = yes &&
+ test "$ac_cv_func_sendmsg" = yes; then
+ ACE_CONVERT_WARNINGS_TO_ERRORS(
+ [
+dnl Check if sendmsg takes a const 2nd argument
+ ACE_CACHE_CHECK([if sendmsg omits the const from the second argument],
+ [ace_cv_lib_broken_sendmsg],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]], [[
+ int s = 0;
+ const struct msghdr *msg = 0;
+ unsigned int flags = 0;
+
+ int result = 0;
+
+ result = (int) sendmsg(s, msg, flags);
+ ]])],[
+ ace_cv_lib_broken_sendmsg=no
+ ],[
+ ace_cv_lib_broken_sendmsg=yes
+ ])
+ ], [AC_DEFINE([ACE_HAS_BROKEN_SENDMSG])],)
+ ]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+fi dnl test "$ace_cv_struct_msghdr" = yes
+
+dnl Only run the following tests if the writev function exists
+if test "$ac_cv_header_sys_uio_h" = yes &&
+ test "$ac_cv_func_writev" = yes; then
+ ACE_CONVERT_WARNINGS_TO_ERRORS(
+ [
+dnl Check if writev omits the const from the iovec argument
+ ACE_CACHE_CHECK([if writev omits the const from the iovec argument],
+ [ace_cv_lib_broken_writev],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef ACE_HAS_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include <sys/uio.h>
+ ]], [[
+ int filedes = 0;
+ const struct iovec *vector = 0;
+ size_t count = 0;
+
+ int result = 0;
+
+ result = (int) writev(filedes, vector, count);
+ ]])],[
+ ace_cv_lib_broken_writev=no
+ ],[
+ ace_cv_lib_broken_writev=yes
+ ])
+ ], [AC_DEFINE([ACE_HAS_BROKEN_WRITEV])],)
+ ]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+fi dnl $ac_cv_header_sys_uio_h = yes && $ac_cv_func_writev = yes
+
+
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+ACE_CACHE_CHECK([for (struct sockaddr *) msg_name field in msghdr],
+ [ace_cv_lib_sockaddr_msg_name],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]], [[
+ msghdr ace_msghdr;
+ struct sockaddr *addr = 0;
+
+ /*
+ * Note that some platforms declare msg_name to be a void*,
+ * in which case this assignment will work.
+ * Should we _not_ define ACE_HAS_SOCKADDR_MSG_NAME in that
+ * case? I tend to think it is more appropriate to define
+ * ACE_HAS_SOCKADDR_MSG_NAME rather than cast addr to a char*,
+ * as is done in ACE when the macro is not defined.
+ * -Ossama
+ */
+ ace_msghdr.msg_name = (struct sockaddr *)addr;
+ ]])],[
+ ace_cv_lib_sockaddr_msg_name=yes
+ ],[
+ ace_cv_lib_sockaddr_msg_name=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_SOCKADDR_MSG_NAME])],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+ACE_CACHE_CHECK([if setsockopt() takes a void* fourth argument],
+ [ace_cv_lib_posix_setsockopt_voidp_4],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]], [[
+ int s = 0;
+ int level = 0;
+ int optname = 0;
+ void* optval = 0;
+
+#if defined (ACE_HAS_SOCKLEN_T)
+ socklen_t optlen = 0;
+#elif defined (ACE_HAS_SIZET_SOCKET_LEN)
+ size_t optlen = 0;
+#else
+ int optlen = 0;
+#endif
+
+ setsockopt (s, level, optname, optval, optlen);
+ ]])],[
+ ace_cv_lib_posix_setsockopt_voidp_4=yes
+ ],[
+ ace_cv_lib_posix_setsockopt_voidp_4=no
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_VOIDPTR_SOCKOPT])
+ ],
+ [
+ ACE_CACHE_CHECK([if setsockopt() takes a char* fourth argument],
+ [ace_cv_lib_posix_setsockopt_charp_4],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]], [[
+ int s = 0;
+ int level = 0;
+ int optname = 0;
+ char* optval = 0;
+
+#if defined (ACE_HAS_SOCKLEN_T)
+ socklen_t optlen = 0;
+#elif defined (ACE_HAS_SIZET_SOCKET_LEN)
+ size_t optlen = 0;
+#else
+ int optlen = 0;
+#endif
+
+ setsockopt (s, level, optname, optval, optlen);
+ ]])],[
+ ace_cv_lib_posix_setsockopt_charp_4=yes
+ ],[
+ ace_cv_lib_posix_setsockopt_charp_4=no
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_CHARPTR_SOCKOPT])
+ ],)
+ ])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+ACE_CACHE_CHECK([if mmap() takes a void* first argument],
+ [ace_cv_lib_posix_voidptr_mmap],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#endif
+#include <sys/mman.h>
+ ]], [[
+ void *start = 0;
+ size_t length = 0;
+ int prot = 0;
+ int flags = 0;
+ int fd = 0;
+ off_t offset = 0;
+
+ void *result = 0;
+
+ result = (void *)mmap(start, length, prot, flags, fd, offset);
+ ]])],[
+ ace_cv_lib_posix_voidptr_mmap=yes
+ ],[
+ ace_cv_lib_posix_voidptr_mmap=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_VOIDPTR_MMAP])],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if msync is broken, i.e. doesn't accept third "sync" argument.
+dnl This test should come after the test for checking if mmap takes a void*
+dnl argument since we need the ACE_MMAP_TYPE type for this test.
+if test "$ac_cv_func_msync" = yes; then
+ACE_CACHE_CHECK([if msync accepts a third \"sync\" argument],
+ [ace_cv_lib_broken_msync],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/mman.h>
+
+#if defined (ACE_HAS_VOIDPTR_MMAP)
+ /* Needed for some odd OS's (e.g., SGI). */
+ typedef void *ACE_MMAP_TYPE;
+#else
+ typedef char *ACE_MMAP_TYPE;
+#endif /* ACE_HAS_VOIDPTR_MMAP */
+ ]], [[
+ ACE_MMAP_TYPE start = 0;
+ size_t length = 0;
+ int flags = MS_SYNC;
+
+ int result;
+
+ result = msync(start, length, flags);
+ ]])],[
+ ace_cv_lib_broken_msync=no
+ ],[
+ dnl Now see if it works with just two arguments
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <sys/mman.h>
+
+#if defined (ACE_HAS_VOIDPTR_MMAP)
+ /* Needed for some odd OS's (e.g., SGI). */
+ typedef void *ACE_MMAP_TYPE;
+#else
+ typedef char *ACE_MMAP_TYPE;
+#endif /* ACE_HAS_VOIDPTR_MMAP */
+ ]],
+ [[
+ ACE_MMAP_TYPE start = 0;
+ size_t length = 0;
+
+ int result;
+
+ result = msync(start, length);
+ ]])],
+ [
+ ace_cv_lib_broken_msync=yes
+ ],
+ [
+ dnl If we get to this point then we don't know if msync is
+ dnl is broken or not.
+ ace_cv_lib_broken_msync=no
+ ])
+ ])
+ ], [AC_DEFINE([ACE_HAS_BROKEN_NETBSD_MSYNC])],)
+fi dnl test "$ac_cv_func_msync" = yes
+
+dnl Check if platform has iostream method ipfx()
+ACE_CACHE_CHECK([for iostream method ipfx()],
+ [ace_cv_feature_has_iostream_ipfx],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <iostream.h>
+ ]], [[
+ cin.ipfx();
+ ]])],[
+ ace_cv_feature_has_iostream_ipfx=yes
+ ],[
+ ace_cv_feature_has_iostream_ipfx=no
+ ])
+ ], , [AC_DEFINE([ACE_LACKS_IOSTREAM_FX])])
+
+dnl Check if platform has line-buffered streambufs
+ACE_CACHE_CHECK([for line-buffered streambufs],
+ [ace_cv_feature_has_linebuffered_streambuf],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <iostream.h>
+ ]], [[
+ cin.rdbuf()->linebuffered(1);
+ ]])],[
+ ace_cv_feature_has_linebuffered_streambuf=yes
+ ],[
+ ace_cv_feature_has_linebuffered_streambuf=no
+ ])
+ ], , [AC_DEFINE([ACE_LACKS_LINEBUFFERED_STREAMBUF])])
+
+dnl Check if platform has unbuffered streambufs
+ACE_CACHE_CHECK([for unbuffered streambufs],
+ [ace_cv_feature_has_unbuffered_streambuf],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <iostream.h>
+ ]], [[
+ cin.rdbuf()->unbuffered(1);
+ ]])],[
+ ace_cv_feature_has_unbuffered_streambuf=yes
+ ],[
+ ace_cv_feature_has_unbuffered_streambuf=no
+ ])
+ ], , [AC_DEFINE([ACE_LACKS_UNBUFFERED_STREAMBUF])])
+
+
+dnl Check if signal takes a void (*)(int) as second argument
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+ACE_CACHE_CHECK([if signal takes a void (*)(int) as second argument],
+ [ace_cv_lib_signal_vi1_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+ typedef void (*SA)(int);
+ void handler(int) { }
+ ]], [[
+ SA nn = handler;
+ signal(SIGINT, nn);
+ ]])],[
+ ace_cv_lib_signal_vi1_2=yes
+ ],[
+ dnl Check if extern "C" signal handler is required.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <signal.h>
+extern "C"
+ {
+ typedef void (*SA)(int);
+ void handler(int) { }
+ }
+ ]],
+ [[
+ SA nn = handler;
+ signal(SIGINT, nn);
+ ]])],
+ [
+ ace_cv_lib_signal_vi1_2=yes
+ ],
+ [
+ ace_cv_lib_signal_vi1_2=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_SIG_C_FUNC])
+ ],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if signal takes a void (*)(void) as second argument
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+ACE_CACHE_CHECK([if signal takes a void (*)(void) as second argument],
+ [ace_cv_lib_signal_vv1_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+ typedef void (*SA)(void);
+ void handler(void) { }
+ ]], [[
+ SA nn = handler;
+ signal(SIGINT, nn);
+ ]])],[
+ ace_cv_lib_signal_vv1_2=yes
+ ],[
+ dnl Check if extern "C" signal handler is required.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <signal.h>
+extern "C"
+ {
+ typedef void (*SA)(void);
+ void handler(void) { }
+ }
+ ]],
+ [[
+ SA nn = handler;
+ signal(SIGINT, nn);
+ ]])],
+ [
+ ace_cv_lib_signal_vv1_2=yes
+ ],
+ [
+ ace_cv_lib_signal_vv1_2=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_SIG_C_FUNC])
+ ])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if signal takes a void (*)(int, ...) as second argument
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+ACE_CACHE_CHECK([if signal takes a void (*)(int, ...) as second argument],
+ [ace_cv_lib_signal_vi1a2_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+ typedef void (*SA)(int, ...);
+ void handler(int, ...) { }
+ ]], [[
+ SA nn = handler;
+ signal(SIGINT, nn);
+ ]])],[
+ ace_cv_lib_signal_vi1a2_2=yes
+ ],[
+ dnl Check if extern "C" signal handler is required.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <signal.h>
+extern "C"
+ {
+ typedef void (*SA)(int, ...);
+ void handler(int, ...) { }
+ }
+ ]],
+ [[
+ SA nn = handler;
+ signal(SIGINT, nn);
+ ]])],
+ [
+ ace_cv_lib_signal_vi1a2_2=yes
+ ],
+ [
+ ace_cv_lib_signal_vi1a2_2=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_SIG_C_FUNC])
+ ],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if signal takes a void (*)(...) as second argument
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+ACE_CACHE_CHECK([if signal takes a void (*)(...) as second argument],
+ [ace_cv_lib_signal_va1_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+ typedef void (*SA)(...);
+ void handler(...) { }
+ ]], [[
+ SA nn = handler;
+ signal(SIGINT, nn);
+ ]])],[
+ ace_cv_lib_signal_va1_2=yes
+ ],[
+ dnl Check if extern "C" signal handler is required.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <signal.h>
+extern "C"
+ {
+ typedef void (*SA)(...);
+ void handler(...) { }
+ }
+ ]],
+ [[
+ SA nn = handler;
+ signal(SIGINT, nn);
+ ]])],
+ [
+ ace_cv_lib_signal_va1_2=yes
+ ],
+ [
+ ace_cv_lib_signal_va1_2=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_SIG_C_FUNC])
+ ],)
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if signal returns a void (*)(int)
+AC_CACHE_CHECK([if signal returns a void (*)(int)],
+ [ace_cv_lib_signal_vi1_ret],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+
+typedef void (*SA)(int);
+void foo(SA nn) { }
+ ]], [[
+SA nn = SIG_DFL;
+nn = signal(SIGINT, 0);
+foo(nn);
+ ]])],[
+ ace_cv_lib_signal_vi1_ret=yes
+ ],[
+ ace_cv_lib_signal_vi1_ret=no
+ ])
+ ])
+
+dnl Check if signal returns a void (*)(void)
+AC_CACHE_CHECK([if signal returns a void (*)(void)],
+ [ace_cv_lib_signal_vv1_ret],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+
+typedef void (*SA)(void);
+void foo(SA nn) { }
+ ]], [[
+SA nn = SIG_DFL;
+nn = signal(SIGINT, 0);
+foo(nn);
+ ]])],[
+ ace_cv_lib_signal_vv1_ret=yes
+ ],[
+ ace_cv_lib_signal_vv1_ret=no
+ ])
+ ])
+
+dnl Check if signal returns a void (*)(int, ...)
+AC_CACHE_CHECK([if signal returns a void (*)(int, ...)],
+ [ace_cv_lib_signal_vi1a2_ret],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+
+typedef void (*SA)(int, ...);
+ ]], [[
+ SA oo = signal(SIGINT, 0);
+ ]])],[
+ ace_cv_lib_signal_vi1a2_ret=yes
+ ],[
+ ace_cv_lib_signal_vi1a2_ret=no
+ ])
+ ])
+
+dnl Check if signal returns a void (*)(...)
+AC_CACHE_CHECK([if signal returns a void (*)(...)],
+ [ace_cv_lib_signal_va1_ret],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+
+typedef void (*SA)(...);
+ ]], [[
+ SA oo = signal(SIGINT, 0);
+ ]])],[
+ ace_cv_lib_signal_va1_ret=yes
+ ],[
+ ace_cv_lib_signal_va1_ret=no
+ ])
+ ])
+
+if test "$ace_cv_struct_sigaction" = yes; then
+dnl Check if struct sigaction takes a void (*)(int) handler
+ AC_CACHE_CHECK([if struct sigaction takes a void (*)(int) handler],
+ [ace_cv_lib_struct_sigaction_vi1_handler],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+ typedef void (*SA)(int);
+ void foo(struct sigaction* sa, SA nn) { }
+ ]], [[
+ struct sigaction sa;
+ SA nn = SIG_DFL;
+ sa.sa_handler = nn;
+ foo(&sa, nn);
+ ]])],[
+ ace_cv_lib_struct_sigaction_vi1_handler=yes
+ ],[
+ ace_cv_lib_struct_sigaction_vi1_handler=no
+ ])
+ ])
+
+dnl Check if struct sigaction takes a void (*)(void) handler
+ AC_CACHE_CHECK([if struct sigaction takes a void (*)(void) handler],
+ [ace_cv_lib_struct_sigaction_vv1_handler],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+ typedef void (*SA)(void);
+ void foo(struct sigaction* sa, SA nn) { }
+ ]], [[
+ struct sigaction sa;
+ SA nn = SIG_DFL;
+ sa.sa_handler = nn;
+ foo(&sa, nn);
+ ]])],[
+ ace_cv_lib_struct_sigaction_vv1_handler=yes
+ ],[
+ ace_cv_lib_struct_sigaction_vv1_handler=no
+ ])
+ ])
+
+dnl Check if struct sigaction takes a void (*)(int, ...) handler
+ AC_CACHE_CHECK([if struct sigaction takes a void (*)(int, ...) handler],
+ [ace_cv_lib_struct_sigaction_vi1a2_handler],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+ typedef void (*SA)(int, ...);
+ void foo(struct sigaction* sa, SA nn) { }
+ ]], [[
+ struct sigaction sa;
+ SA nn = SIG_DFL;
+ sa.sa_handler = nn;
+ foo(&sa, nn);
+ ]])],[
+ ace_cv_lib_struct_sigaction_vi1a2_handler=yes
+ ],[
+ ace_cv_lib_struct_sigaction_vi1a2_handler=no
+ ])
+ ])
+
+dnl Check if struct sigaction takes a void (*)(...) handler
+ AC_CACHE_CHECK([if struct sigaction takes a void (*)(...) handler],
+ [ace_cv_lib_struct_sigaction_va1_handler],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+ typedef void (*SA)(...);
+ void foo(struct sigaction* sa, SA nn) { }
+ ]], [[
+ struct sigaction sa;
+ SA nn = SIG_DFL;
+ sa.sa_handler = nn;
+ foo(&sa, nn);
+ ]])],[
+ ace_cv_lib_struct_sigaction_va1_handler=yes
+ ],[
+ ace_cv_lib_struct_sigaction_va1_handler=no
+ ])
+ ])
+fi dnl test "$ace_cv_struct_sigaction" = yes
+
+dnl TODO: This doesn't work.
+dnl The linux compiler issues a warning regarding the invalid void*
+dnl conversion.
+dnl
+dnl FIXED by adding "-Werror" to compiler flags when using GNU C++
+dnl -Ossama
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+dnl Check if msgsnd() takes a struct msgbuf* second argument
+ACE_CACHE_CHECK([if msgsnd() takes a struct msgbuf* second argument],
+ [ace_cv_lib_posix_msgsnd_msgbufp_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+# include <sys/ipc.h>
+#ifndef ACE_LACKS_SYSV_MSG_H
+# include <sys/msg.h>
+#endif
+ ]], [[
+ int msqid = 0;
+ struct msgbuf* msgp = 0;
+ int msgsz = 0;
+ int msgflg = 0;
+ msgsnd(msqid, msgp, msgsz, msgflg);
+ ]])],[
+ ace_cv_lib_posix_msgsnd_msgbufp_2=yes
+ ],[
+ ace_cv_lib_posix_msgsnd_msgbufp_2=no
+ ])
+ ],
+ [
+ dnl "ACTIONS-IF-SUCCESSFUL" handled later in configure.in
+ ],
+ [
+ dnl Check if msgsnd() takes a const void* second argument
+ ACE_CACHE_CHECK([if msgsnd() takes a const void* second argument],
+ [ace_cv_lib_posix_msgsnd_cvoidp_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+# include <sys/ipc.h>
+#ifndef ACE_LACKS_SYSV_MSG_H
+# include <sys/msg.h>
+#endif
+ ]], [[
+ int msqid = 0;
+ const void* msgp = 0;
+ int msgsz = 0;
+ int msgflg = 0;
+ msgsnd(msqid, msgp, msgsz, msgflg);
+ ]])],[
+ ace_cv_lib_posix_msgsnd_cvoidp_2=yes
+ ],[
+ ace_cv_lib_posix_msgsnd_cvoidp_2=no
+ ])
+ ],
+ [
+ dnl Do nothing if msgsnd takes a const void* second argument
+ ],
+ [
+ dnl If we get this far we presumably have a non-const void* second param
+ AC_DEFINE([ACE_HAS_NONCONST_MSGSND])
+ ])
+ ])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl TODO: This doesn't work.
+dnl The linux compiler issues a warning regarding the invalid void*
+dnl conversion.
+dnl
+dnl FIXED by adding "-Werror" to compiler flags when using GNU C++
+dnl -Ossama
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+dnl Check if msgrcv() takes a void* second argument
+AC_CACHE_CHECK([if msgrcv() takes a void* second argument],
+ [ace_cv_lib_posix_msgrcv_voidp_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+# include <sys/ipc.h>
+#ifndef ACE_LACKS_SYSV_MSG_H
+# include <sys/msg.h>
+#endif
+ ]], [[
+ int msqid = 0;
+ void* msgp = 0;
+ int msgsz = 0;
+ long msgtyp = 0;
+ int msgflg = 0;
+ msgrcv(msqid, msgp, msgsz, msgtyp, msgflg);
+ ]])],[
+ ace_cv_lib_posix_msgrcv_voidp_2=yes
+ ],[
+ ace_cv_lib_posix_msgrcv_voidp_2=no
+ ])
+ ])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl TODO: This doesn't work.
+dnl The linux compiler issues a warning regarding the invalid void*
+dnl conversion.
+dnl
+dnl FIXED by adding "-Werror" to compiler flags when using GNU C++
+dnl -Ossama
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+dnl Check if shmat() takes a void* second argument
+AC_CACHE_CHECK([if shmat() takes a void* second argument],
+ [ace_cv_lib_posix_shmat_voidp_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+# include <sys/ipc.h>
+# include <sys/shm.h>
+ ]], [[
+ int shmid = 0;
+ void* shmaddr = 0;
+ int shmflg = 0;
+ shmat(shmid, shmaddr, shmflg);
+ ]])],[
+ ace_cv_lib_posix_shmat_voidp_2=yes
+ ],[
+ ace_cv_lib_posix_shmat_voidp_2=no
+ ])
+ ])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl TODO: This doesn't work.
+dnl The linux compiler issues a warning regarding the invalid void*
+dnl conversion.
+dnl
+dnl FIXED by adding "-Werror" to compiler flags when using GNU C++
+dnl -Ossama
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+dnl Check if sigaction() takes a const* second argument
+AC_CACHE_CHECK([if sigaction() takes a const* second argument],
+ [ace_cv_lib_posix_sigaction_constp_2],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h>
+ ]], [[
+ int signum = 0;
+ const struct sigaction* act = 0;
+ struct sigaction* oldact = 0;
+ sigaction(signum, act, oldact);
+ ]])],[
+ ace_cv_lib_posix_sigaction_constp_2=yes
+ ],[
+ ace_cv_lib_posix_sigaction_constp_2=no
+ ])
+ ])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+dnl Check if the wait() system call takes a (union wait *) rather than int *
+ACE_CACHE_CHECK([if wait() takes a (union wait *) rather than int *],
+ [ace_cv_lib_wait_takes_union_wait_ptr],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/wait.h>
+ ]], [[
+ int* status = 0;
+ int result = 0;
+ result=wait(status);
+ ]])],[
+ ace_cv_lib_wait_takes_union_wait_ptr=no
+ ],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <sys/wait.h>
+ ]],
+ [[
+ union wait* status = 0;
+ int result = 0;
+ result=wait(status);
+ ]])],
+ [
+ ace_cv_lib_wait_takes_union_wait_ptr=yes
+ ],
+ [
+dnl If we get here then we're screwed! We can't use int* or union wait*.
+dnl It is very unlikely that we will ever get this far. For the sake
+dnl of setting some result, we'll assume that we can actually use int*.
+ ace_cv_lib_wait_takes_union_wait_ptr=no
+ AC_MSG_WARN([wait() doesn't seem to take either int* or union wait*])
+ AC_MSG_WARN([as an argument. Going to assume that int* will work.])
+ ])
+ ])
+ ], [AC_DEFINE([ACE_HAS_UNION_WAIT])],)
+
+dnl We need to use the ACE_CONVERT_WARNINGS_TO_ERRORS() macro since
+dnl passing a void * just caused implicit conversion warnings when
+dnl using GNU C++, for example.
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+dnl Check for SVR4 style gettimeofday()
+AC_CACHE_CHECK([if gettimeofday() takes a void * second argument],
+ [ace_cv_lib_voidptr_gettimeofday],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/time.h>
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#endif
+ ]], [[
+ struct timeval *tv = 0;
+ void *tzp = 0;
+
+ gettimeofday(tv, tzp);
+ ]])],[
+ ace_cv_lib_voidptr_gettimeofday=yes
+ ],[
+ ace_cv_lib_voidptr_gettimeofday=no
+ ])
+ ])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+
+if test "$ace_cv_lib_voidptr_gettimeofday" = no; then
+ACE_CONVERT_WARNINGS_TO_ERRORS(
+[
+dnl Check for old OSF1 style gettimeofday()
+ AC_CACHE_CHECK([if gettimeofday() takes a timezone * second argument],
+ [ace_cv_lib_timezone_gettimeofday],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/time.h>
+#ifndef ACE_LACKS_UNISTD_H
+# include <unistd.h>
+#endif
+ ]], [[
+ struct timeval *tv = 0;
+ struct timezone *tzp = 0;
+
+ gettimeofday(tv, tzp);
+ ]])],[
+ ace_cv_lib_timezone_gettimeofday=yes
+ ],[
+ ace_cv_lib_timezone_gettimeofday=no
+ ])
+ ])
+]) dnl ACE_CONVERT_WARNINGS_TO_ERRORS
+fi dnl test "$ace_cv_lib_voidptr_gettimeofday" = no
+
+dnl Check for gettimeofday() protoype
+if test "$ace_cv_lib_voidptr_gettimeofday" = yes ||
+ test "$ace_cv_lib_timezone_gettimeofday" = yes; then
+ ACE_CACHE_CHECK([for gettimeofday() protoype],
+ [ace_cv_lib_has_gettimeofday_prototype],
+ [
+ AC_EGREP_CPP([gettimeofday],
+ [
+#include <time.h>
+
+#ifdef ACE_LACKS_SYSTIME_H
+# include <sys/time.h>
+#endif
+ ],
+ [
+dnl We have a gettimeofday prototype
+ ace_cv_lib_has_gettimeofday_prototype=yes
+ ],
+ [
+dnl We don't have a gettimeofday prototype
+ ace_cv_lib_has_gettimeofday_prototype=no
+ ])
+ ],
+ [
+ if test "$ace_cv_lib_voidptr_gettimeofday" = yes; then
+ AC_DEFINE([ACE_HAS_SUNOS4_GETTIMEOFDAY])
+ else
+ AC_DEFINE([ACE_HAS_TIMEZONE_GETTIMEOFDAY])
+ fi
+ ],
+ [
+ if test "$ace_cv_lib_voidptr_gettimeofday" = yes; then
+ AC_DEFINE([ACE_HAS_SVR4_GETTIMEOFDAY])
+ else
+ AC_DEFINE([ACE_HAS_OSF1_GETTIMEOFDAY])
+ fi
+ ])
+fi dnl Check for gettimeofday() protoype
+
+
+dnl Check if ctime_r() takes two arguments
+if test "$ac_cv_func_ctime_r" = yes; then
+ ACE_CACHE_CHECK([if ctime_r() takes two arguments],
+ [ace_cv_lib_posix_ctime_r_2_params],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef _REENTRANT
+# define _REENTRANT
+#endif
+
+#include <time.h>
+
+#if defined(ACE_LACKS_SYSTIME_H)
+# include <sys/time.h>
+#endif
+ ]], [[
+ const time_t *t = 0;
+ char *buf;
+ ctime_r(t, buf);
+ ]])],[
+ ace_cv_lib_posix_ctime_r_2_params=yes
+ ],[
+ ace_cv_lib_posix_ctime_r_2_params=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R])],)
+fi dnl test "$ac_cv_func_ctime_r" = yes
+
+
+dnl
+dnl SECTION 12: checks for type characteristics
+dnl
+
+dnl struct msghdr stuff
+dnl Only run the following tests if the msghdr structure exists.
+if test "$ace_cv_struct_msghdr" = yes; then
+
+ ACE_CACHE_CHECK([if struct msghdr has a msg_accrights member],
+ [ace_cv_lib_posix_struct_msghdr_has_msg_accrights],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]], [[
+ msghdr mh;
+ mh.msg_accrights = 0;
+ ]])],[
+ ace_cv_lib_posix_struct_msghdr_has_msg_accrights=yes
+ ],[
+ ace_cv_lib_posix_struct_msghdr_has_msg_accrights=no
+ ])
+ ])
+
+ ACE_CACHE_CHECK([if struct msghdr has a msg_accrightslen member],
+ [ace_cv_lib_posix_struct_msghdr_has_msg_accrightslen],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]], [[
+ msghdr mh;
+ mh.msg_accrightslen = 0;
+ ]])],[
+ ace_cv_lib_posix_struct_msghdr_has_msg_accrightslen=yes
+ ],[
+ ace_cv_lib_posix_struct_msghdr_has_msg_accrightslen=no
+ ])
+ ])
+
+dnl Check for 4.4 BSD style struct msghdr members
+dnl The following test should only be run if the above two testsfail.
+ if test "$ace_cv_lib_posix_struct_msghdr_has_msg_accrights" = no &&
+ test "$ace_cv_lib_posix_struct_msghdr_has_msg_accrightslen" = no; then
+ AC_DEFINE([ACE_LACKS_MSG_ACCRIGHTS])
+ ACE_CACHE_CHECK([for 4.4 BSD style struct msghdr],
+ [ace_cv_lib_4_4bsd_msghdr],[
+ AC_EGREP_HEADER([msg_control], [sys/socket.h],
+ [
+ ace_cv_lib_4_4bsd_msghdr=yes
+ ],
+ [
+ ace_cv_lib_4_4bsd_msghdr=no
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_HAS_4_4BSD_SENDMSG_RECVMSG])
+ ],
+ [
+ AC_MSG_WARN([No supported msghdr structure was found. ACE may not compile or function properly.])
+ ])
+ fi
+
+dnl Now check if CMSG_DATA is defined if and only if we have 4.4 BSD
+dnl style struct msghdr members. If CMSG_DATA isn't defined, then
+dnl we try to figure out what it should be defined to.
+ if test "$ace_cv_lib_4_4bsd_msghdr" = yes; then
+ ACE_CACHE_CHECK([if CMSG_DATA is defined],
+ [ace_cv_lib_cmsg_data],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+#include <sys/un.h> /* @@ Is this header necessary? */
+ ]],
+ [[
+ cmsghdr ace_cmsg;
+ void * c = CMSG_DATA (&ace_cmsg);
+ ]])],
+ [
+ ace_cv_lib_cmsg_data=yes
+ ],
+ [
+ ace_cv_lib_cmsg_data=no
+dnl Now check which type of CMSG_DATA #define we need.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+#include <sys/un.h>
+ ]], [[
+ /* This is sloppy. Oh well. */
+ unsigned char ace_cmsg_data[0];
+
+ cmsghdr ace_cmsg;
+ ace_cmsg.cmsg_data = ace_cmsg_data;
+ ]])],,[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+#include <sys/un.h>
+ ]],
+ [[
+ /* This is sloppy. Oh well. */
+ unsigned char ace_cmsg_data[0];
+
+ cmsghdr ace_cmsg;
+ ace_cmsg.__cmsg_data = ace_cmsg_data;
+ ]])],
+ [
+ AC_MSG_ERROR([cmsgmdr member '__cmsg_data[0]' not supported by ACE's CMSG_DATA macro])
+ ],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+#include <sys/un.h>
+ ]],
+ [[
+ cmsghdr ace_cmsg;
+ ]])],
+ [
+ AC_CACHE_VAL([ace_cv_lib_cmsg_data_member],
+ [ace_cv_lib_cmsg_data_member=no])
+ ],
+ [
+ AC_MSG_ERROR([No supported cmsghdr structure exists. ACE cannot be built without one.])
+ ])
+ ])
+ ])
+ ])
+ ], ,
+ [
+ AC_DEFINE([ACE_LACKS_CMSG_DATA_MACRO])
+ if test "$ace_cv_lib_cmsg_data_member"=no; then
+ AC_DEFINE([ACE_LACKS_CMSG_DATA_MEMBER])
+ fi
+
+ ])
+ fi dnl test "$ace_cv_lib_4_4bsd_msghdr" = yes
+
+fi dnl End struct msghdr_stuff
+
+dnl
+dnl SECTION 13: checks for system services
+dnl
+
+dnl Do not run this test if we are using a cross-compiler.
+if test "$cross_compiling" != yes; then
+ AC_SYS_RESTARTABLE_SYSCALLS
+ if test "$ac_cv_sys_restartable_syscalls" = yes; then
+ AC_DEFINE([ACE_HAS_SIGNAL_SAFE_OS_CALLS])
+ fi
+fi
+
+dnl Check if platform defines ctime() as a macro
+ACE_CACHE_CHECK([for ctime() macro],
+ [ace_cv_feature_have_ctime_macro],
+ [
+ AC_EGREP_CPP([ACE_CTIME_MACRO],
+ [
+#include <time.h>
+
+#if defined(ACE_LACKS_SYSTIME_H)
+# include <sys/time.h>
+#endif
+
+#if defined (ctime)
+ ACE_CTIME_MACRO
+#endif
+ ],
+ [
+ ace_cv_feature_have_ctime_macro=yes
+ ],
+ [
+ ace_cv_feature_have_ctime_macro=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_BROKEN_CTIME])],)
+
+dnl Check if platform defines ctime_r, asctime_r, rand_r or getpwnam_r
+dnl as macros.
+ACE_CACHE_CHECK([for reentrant function macros],
+ [ace_cv_feature_has_broken_r_routines],
+ [
+ AC_EGREP_CPP([ACE_R_MACROS],
+ [
+#ifndef _REENTRANT
+# define _REENTRANT
+#endif
+
+#include <time.h>
+
+#if defined(ACE_LACKS_SYSTIME_H)
+# include <sys/time.h>
+#endif
+
+#if defined (HAVE_PWD_H)
+# include <pwd.h>
+#endif
+
+#if defined (ctime_r) || \
+ defined (asctime_r) || \
+ defined (rand_r) || \
+ defined (getpwnam_r)
+ ACE_R_MACROS
+#endif
+ ],
+ [
+ ace_cv_feature_has_broken_r_routines=yes
+ ],
+ [
+ ace_cv_feature_has_broken_r_routines=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_BROKEN_R_ROUTINES])],)
+
+dnl Check if platform defines sig{empty,fill,add,del}set as macros
+ACE_CACHE_CHECK([for sig{empty fill add del}set macros],
+ [ace_cv_feature_have_sig_macros],
+ [
+ AC_EGREP_CPP([ACE_SIG_MACROS],
+ [
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <signal.h>
+
+#if defined (sigemptyset) && \
+ defined (sigfillset) && \
+ defined (sigaddset) && \
+ defined (sigdelset) && \
+ defined (sigismember)
+ ACE_SIG_MACROS
+#endif
+ ],
+ [
+ ace_cv_feature_have_sig_macros=yes
+ ],
+ [
+ ace_cv_feature_have_sig_macros=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_SIG_MACROS])],)
+
+dnl Check for open() mode masks
+ACE_CACHE_CHECK([for open() mode masks],
+ [ace_cv_feature_have_open_mode_masks],[
+ AC_EGREP_CPP([ACE_OPEN_MODE_MASKS_EXIST],
+ [
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/* These are ORed so that ACE will not redefine any of them if any of
+ them exist. */
+#if defined (S_IRWXU) || \
+ defined (S_IRUSR) || \
+ defined (S_IWUSR) || \
+ defined (S_IXUSR) || \
+ defined (S_IRWXG) || \
+ defined (S_IRGRP) || \
+ defined (S_IWGRP) || \
+ defined (S_IXGRP) || \
+ defined (S_IRWXO) || \
+ defined (S_IROTH) || \
+ defined (S_IWOTH) || \
+ defined (S_IXOTH)
+ ACE_OPEN_MODE_MASKS_EXIST
+#endif
+ ],
+ [
+ ace_cv_feature_have_open_mode_masks=yes
+ ],
+ [
+ ace_cv_feature_have_open_mode_masks=no
+ ])
+ ], , [AC_DEFINE([ACE_LACKS_MODE_MASKS])])
+
+
+dnl Check if platform supports POSIX O_NONBLOCK semantics
+ACE_CACHE_CHECK([for POSIX O_NONBLOCK semantics],
+ [ace_cv_feature_posix_o_nonblock],[
+ AC_EGREP_CPP([ACE_POSIX_O_NONBLOCK],
+ [
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#if defined (O_NONBLOCK)
+ ACE_POSIX_O_NONBLOCK
+#endif
+ ],
+ [
+ ace_cv_feature_posix_o_nonblock=yes
+ ],
+ [
+ ace_cv_feature_posix_o_nonblock=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_POSIX_NONBLOCK])],)
+
+dnl Check for MAP_FAILED constant
+ACE_CACHE_CHECK([for MAP_FAILED constant],
+ [ace_cv_lib_have_map_failed],[
+ dnl We need the square brackets around "ACEMAPFAILED.+[0-9]" to
+ dnl prevent the character class "[0-9]" from becoming "0-9" due to
+ dnl M4 quoting.
+ AC_EGREP_CPP([ACEMAPFAILED.+[0-9]],
+ [
+#include <sys/mman.h>
+ ACEMAPFAILED MAP_FAILED
+ ],
+ [
+ ace_cv_lib_have_map_failed=yes
+ ],
+ [
+ ace_cv_lib_have_map_failed=no
+ ])
+ ],
+ [
+ dnl Check if platform defines MAP_FAILED as a long constant
+ ACE_CACHE_CHECK([if MAP_FAILED is a long constant],
+ [ace_cv_feature_long_map_failed],[
+ dnl We need the square brackets around "ACEMAPFAILED.+[0-9]L" to
+ dnl prevent the character class "[0-9]" from becoming "0-9" due to
+ dnl M4 quoting.
+ AC_EGREP_CPP([ACEMAPFAILED.+[0-9]L],
+ [
+#include <sys/mman.h>
+ ACEMAPFAILED MAP_FAILED
+ ],
+ [
+ ace_cv_feature_long_map_failed=yes
+ ],
+ [
+ ace_cv_feature_long_map_failed=no
+ ])
+ ], [AC_DEFINE([ACE_HAS_LONG_MAP_FAILED])],
+ [
+ dnl Check if MAP_FAILED is _not_ cast to void *
+ ACE_CACHE_CHECK([if MAP_FAILED is not cast to void *],
+ [ace_cv_have_broken_map_failed],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/mman.h>
+ ]], [[
+ void * foo = MAP_FAILED;
+ ]])],[
+ ace_cv_have_broken_map_failed=no
+ ],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <sys/mman.h>
+ ]],
+ [[
+ void * foo = (void *) MAP_FAILED;
+ ]])],
+ [
+ ace_cv_have_broken_map_failed=yes
+ ],
+ [
+ dnl If we get here then we have no idea what is wrong!
+ ace_cv_have_broken_map_failed=no
+ ])
+ ])
+ ], [AC_DEFINE([ACE_HAS_BROKEN_MAP_FAILED])],)
+ ])
+ ],)
+
+dnl Check if platform supports TCP_NODELAY support
+ACE_CACHE_CHECK([for TCP_NODELAY support],
+ [ace_cv_feature_tcp_nodelay],[
+ AC_EGREP_CPP([ACE_TCPNODELAY],
+ [
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <netinet/tcp.h>
+
+#if defined (TCP_NODELAY)
+ ACE_TCPNODELAY
+#endif
+ ],
+ [
+ ace_cv_feature_tcp_nodelay=yes
+ ],
+ [
+ ace_cv_feature_tcp_nodelay=no
+ ])
+ ], , [AC_DEFINE([ACE_LACKS_TCP_NODELAY])])
+
+dnl Check if platform supports SO_SNDBUF/SO_RCVBUF socket options
+ACE_CACHE_CHECK([for SO_SNDBUF/SO_RCVBUF socket options],
+ [ace_cv_feature_so_sndbuf_rcvbuf],[
+ AC_EGREP_CPP([ACE_SO_BUF],
+ [
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+
+#if defined (SO_SNDBUF) && \
+ defined (SO_RCVBUF)
+ ACE_SO_BUF
+#endif
+ ],
+ [
+ ace_cv_feature_so_sndbuf_rcvbuf=yes
+ ],
+ [
+ ace_cv_feature_so_sndbuf_rcvbuf=no
+ ])
+ ], , [AC_DEFINE([ACE_LACKS_SOCKET_BUFSIZ])])
+
+dnl TODO: We only check for ACE_HAS_AUTOMATIC_INIT_FINI on platforms that
+dnl have SVR4 dynamic linking since ACE doesn't support it otherwise.
+if test "$ac_cv_header_dlfcn_h" = yes &&
+ test "$ace_has_svr4_dynamic_linking" = yes; then
+dnl Check if platform calls init/fini automatically
+ ACE_CACHE_CHECK([for automatic init/fini calls],
+ [ace_cv_feature_auto_init_fini],[
+ ace_cv_feature_auto_init_fini=yes
+ # TODO: We know how to check for this, but we need to:
+ #
+ # 1. Compile one file.
+ # 2. Compile and link another file.
+ # 3. Run file in point (2); it returns what we need.
+ #
+ # How do we do all that?
+ ], [AC_DEFINE([ACE_HAS_AUTOMATIC_INIT_FINI])],)
+fi dnl test "$ac_cv_header_dlfcn_h" = yes &&
+ dnl "$ace_has_svr4_dynamic_linking" = yes
+
+dnl Check for recursive thread exit semantics
+if test "$ace_user_enable_threads" = yes; then
+ ACE_CACHE_CHECK([for recursive thread exit semantics],
+ [ace_cv_feature_recursive_thr_exit],[
+ ace_cv_feature_recursive_thr_exit=yes
+ # TODO: How do we check for recursive thread exit semantics
+ ], [AC_DEFINE([ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS])],)
+fi
+
+dnl Check for UNIX domain sockets
+ACE_CACHE_CHECK([for UNIX domain sockets],
+ [ace_cv_feature_unix_sockets],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/un.h>
+ ]], [[
+ sockaddr_un su;
+ ]])],[
+ ace_cv_feature_unix_sockets=yes
+ ],[
+ ace_cv_feature_unix_sockets=no
+ ])
+ ], , [AC_DEFINE([ACE_LACKS_UNIX_DOMAIN_SOCKETS])])
+
+dnl Check for ACE_Handle_Set optimized for select()
+ACE_CACHE_CHECK([for ACE_Handle_Set optimized for select()],
+ [ace_cv_feature_handle_set_optimized_for_select],[
+ ace_cv_feature_handle_set_optimized_for_select=yes
+ # TODO: We know how to check this. We need to:
+ #
+ # 1. Compile and link a file.
+ # 2. Run nm on that file.
+ #
+ # How do we do that?
+ ], [AC_DEFINE([ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT])],)
+
+dnl Even we if we don't have IP multicasting, we still need to define
+dnl "ACE_HAS_IP_MULTICAST" since struct ip_mreq gets redefined by ACE.
+dnl What do we do about this problem?
+dnl -Ossama
+dnl Check for IP multicast support
+ACE_CACHE_CHECK([for IP multicast support],
+ [ace_cv_feature_ip_multicast],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <netinet/in.h>
+ ]], [[
+ ip_mreq im;
+ ]])],[
+ ace_cv_feature_ip_multicast=yes
+ ],[
+dnl Some platforms define ip_mreq in <sys/netinet/in.h>.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/netinet/in.h>
+ ]],
+ [[
+ ip_mreq im;
+ ]])],
+ [
+ ace_cv_feature_ip_multicast=yes
+ ],
+ [
+ ace_cv_feature_ip_multicast=no
+ ])
+ ])
+ ], [AC_DEFINE([ACE_HAS_IP_MULTICAST])],)
+
+ACE_CACHE_CHECK([if running on an Alpha],
+ [ace_cv_feature_alpha],[
+ case "$host" in
+ alpha*)
+ ace_cv_feature_alpha=yes
+ ;;
+ *)
+ ace_cv_feature_alpha=no
+ ;;
+ esac
+ ],
+ [
+ case "$host" in
+ *linux*)
+ dnl We only define ACE_HAS_ALPHA_TIMER if we are running Linux
+ dnl on an Alpha and are using GNU C++!
+ if test -n "$GXX"; then
+ AC_DEFINE([ACE_HAS_ALPHA_TIMER])
+ fi
+ ;;
+ esac
+ ],)
+
+ACE_CACHE_CHECK([if running on a Power PC],
+ [ace_cv_feature_powerpc],[
+ case "$host" in
+ powerpc*)
+ ace_cv_feature_powerpc=yes
+ ;;
+ *)
+ ace_cv_feature_powerpc=no
+ ;;
+ esac
+ ],
+ [
+ case "$host" in
+ *aix*)
+ dnl We don't do anything for AIX since AIX already has a
+ dnl hi-res timer function!
+ ;;
+ *)
+ dnl Only define ACE_HAS_POWERPC_TIMER when using GNU C++!
+ if test -n "$GXX"; then
+ AC_DEFINE([ACE_HAS_POWERPC_TIMER])
+ fi
+ ;;
+ esac
+ ],)
+
+ACE_CACHE_CHECK([if running on a Pentium(tm) processor],
+ [ace_cv_feature_pentium],[
+ case "$host" in
+ i386-* | i486-* |i586-* | i686-*)
+dnl If we do have a pentium, than define ACE_HAS_PENTIUM and add
+dnl gethrtime.cpp to the source list, but only if we're using GNU C++
+dnl since gethrtime.cpp uses assembler code specific to that compiler.
+ if test -n "$GXX"; then
+ ace_cv_feature_pentium=yes
+ else
+ ace_cv_feature_pentium=no
+ fi
+ ;;
+ *)
+ ace_cv_feature_pentium=no
+ ;;
+ esac
+ ],
+ [
+ AC_DEFINE([ACE_HAS_PENTIUM])
+ ],)
+dnl AM_CONDITIONAL(ACE_ON_PENTIUM, test X$ace_cv_feature_pentium = Xyes)
+
+
+dnl
+dnl SECTION 14: checks for aggregated features
+dnl TODO: Little by little, get rid of these...
+dnl
+
+
+dnl Macro ACE_HAS_REENTRANT_FUNCTIONS means the following functions
+dnl are usable:
+dnl
+dnl rand_r
+dnl strtok_r
+dnl getpwnam_r (if we don't have, define ACE_LACKS_PWD_REENTRANT_FUNCTIONS)
+dnl ctime_r
+dnl localtime_r
+dnl gmtime_r
+dnl asctime_r
+dnl * getprotobyname_r
+dnl * getprotobynumber_r
+dnl * gethostbyaddr_r
+dnl * gethostbyname_r
+dnl * getservbyname_r
+dnl
+dnl Those marked with '*' are NOT usable if
+dnl ACE_LACKS_NETDB_REENTRANT_FUNCTIONS) is defined.
+dnl
+dnl The time has come to create feature macros for each of these...
+dnl With the separate feature macros, we will define (for now)
+dnl ACE_HAS_REENTRANT_FUNCTIONS only when all of those WITHOUHT a '*'
+dnl are defined. Also, if any of those with '*' are missing, we will
+dnl define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS.
+
+dnl Don't bother with reentrant functions if they are disabled by the user.
+if test "$ace_user_enable_reentrant_funcs" = yes &&
+ test "$ac_cv_func_rand_r" = yes &&
+ test "$ac_cv_func_strtok_r" = yes &&
+ test "$ac_cv_func_ctime_r" = yes &&
+ test "$ac_cv_func_localtime_r" = yes &&
+ test "$ac_cv_func_gmtime_r" = yes &&
+ test "$ac_cv_func_asctime_r" = yes; then
+ AC_DEFINE([ACE_HAS_REENTRANT_FUNCTIONS])
+fi
+
+dnl Don't bother with reentrant functions if they are disabled by the user.
+if test "$ace_user_enable_reentrant_funcs" = no ||
+ test "$ac_cv_func_getprotobyname_r" = no ||
+ test "$ac_cv_func_getprotobynumber_r" = no ||
+ test "$ac_cv_func_gethostbyaddr_r" = no ||
+ test "$ac_cv_func_gethostbyname_r" = no ||
+ test "$ac_cv_func_getservbyname_r" = no; then
+ AC_DEFINE([ACE_LACKS_NETDB_REENTRANT_FUNCTIONS])
+fi
+
+dnl FIXME!!!
+dnl The following is a kludge until the netdb reentrant function
+dnl number of arguments is handled.
+case "$host" in
+ *linux*) AC_DEFINE([ACE_LACKS_NETDB_REENTRANT_FUNCTIONS]);;
+ *) ;;
+esac
+
+
+dnl Macro ACE_LACKS_SOME_POSIX_PROTOTYPES implies any of the following
+dnl features:
+dnl
+dnl ! ACE_HAS_MSGSND_MSGBUFP_2
+dnl ! ACE_LACKS_MSGRCV_VOIDP_2
+dnl ! ACE_LACKS_SHMAT_VOIDP_2
+dnl ! ACE_LACKS_SIGACTION_CONSTP_2
+dnl
+dnl So, for now, we define it if any of those were autoconf'ed.
+
+if test "$ace_cv_lib_posix_msgsnd_msgbufp_2" = yes ||
+ test "$ace_cv_lib_posix_msgrcv_voidp_2" != yes ||
+ test "$ace_cv_lib_posix_shmat_voidp_2" != yes ||
+ test "$ace_cv_lib_posix_sigaction_constp_2" != yes; then
+ AC_DEFINE([ACE_LACKS_SOME_POSIX_PROTOTYPES])
+fi
+
+if test "$ac_cv_func_msgctl" = yes &&
+ test "$ac_cv_func_msgget" = yes &&
+ test "$ac_cv_func_msgrcv" = yes &&
+ test "$ac_cv_func_semctl" = yes &&
+ test "$ac_cv_func_semget" = yes &&
+ test "$ac_cv_func_semop" = yes &&
+ test "$ac_cv_func_shmat" = yes &&
+ test "$ac_cv_func_shmctl" = yes &&
+ test "$ac_cv_func_shmdt" = yes &&
+ test "$ac_cv_func_shmget" = yes; then
+ AC_DEFINE([ACE_HAS_SYSV_IPC])
+fi
+
+if test "$ac_cv_func_shmat" != yes ||
+ test "$ac_cv_func_shmctl" != yes ||
+ test "$ac_cv_func_shmdt" != yes ||
+ test "$ac_cv_func_shmget" != yes; then
+ AC_DEFINE([ACE_LACKS_SYSV_SHMEM])
+fi
+
+dnl Check for what POSIX threads draft we have
+AC_MSG_CHECKING([which POSIX thread library was found])
+
+ace_has_pthreads=no
+
+dnl Check if we have Pthreads Draft 4
+dnl if test "$ac_cv_func_pthread_delay_np" = yes &&
+if test "$ac_cv_func_pthread_mutexattr_create" = yes &&
+dnl test "$ac_cv_func_pthread_mutexattr_setkind_np" = yes &&
+ test "$ac_cv_func_pthread_mutexattr_delete" = yes &&
+ test "$ac_cv_func_pthread_condattr_delete" = yes &&
+ test "$ac_cv_func_pthread_condattr_create" = yes &&
+ test "$ac_cv_func_pthread_setprio" = yes &&
+ test "$ac_cv_func_pthread_getprio" = yes &&
+dnl test "$ac_cv_func_pthread_getspecific" = yes &&
+ test "$ac_cv_func_pthread_setcancel" = yes &&
+ test "$ac_cv_func_pthread_setasynccancel" = yes &&
+ test "$ac_cv_func_pthread_kill" = yes; then
+ ace_has_pthreads=yes
+ AC_MSG_RESULT([POSIX Threads Draft 4])
+ AC_DEFINE([ACE_HAS_PTHREADS_DRAFT4])
+dnl Check if we have Pthreads Draft 6
+elif test "$ac_cv_func_pthread_mutexattr_init" = yes &&
+ test "$ac_cv_func_pthread_mutexattr_destroy" = yes &&
+ test "$ac_cv_func_pthread_condattr_destroy" = yes &&
+ test "$ac_cv_func_pthread_condattr_init" = yes &&
+ test "$ac_cv_func_pthread_attr_setprio" = yes &&
+ test "$ac_cv_func_pthread_attr_getprio" = yes &&
+ test "$ac_cv_func_pthread_setintr" = yes &&
+ test "$ac_cv_func_pthread_setintrtype" = yes; then
+ ace_has_pthreads=yes
+ AC_MSG_RESULT([POSIX Threads Draft 6])
+ AC_DEFINE([ACE_HAS_PTHREADS_DRAFT6])
+dnl Check if we have Pthreads Draft 7
+elif test "$ac_cv_func_pthread_mutexattr_init" = yes &&
+ test "$ac_cv_func_pthread_mutexattr_destroy" = yes &&
+ test "$ac_cv_func_pthread_condattr_destroy" = yes &&
+ test "$ac_cv_func_pthread_condattr_init" = yes &&
+ test "$ac_cv_func_pthread_setschedparam" = yes &&
+ test "$ac_cv_func_pthread_getschedparam" = yes &&
+ test "$ac_cv_func_pthread_setcancelstate" = yes &&
+ test "$ac_cv_func_pthread_setcanceltype" = yes &&
+ test "$ace_has_sched_yield" != yes; then
+ ace_has_pthreads=yes
+ AC_MSG_RESULT([POSIX Threads Draft 7])
+ AC_DEFINE([ACE_HAS_PTHREADS_DRAFT7])
+dnl Check if we have Pthreads Draft Standard
+elif test "$ac_cv_func_pthread_mutexattr_init" = yes &&
+ test "$ac_cv_func_pthread_mutexattr_destroy" = yes &&
+ test "$ac_cv_func_pthread_condattr_destroy" = yes &&
+ test "$ac_cv_func_pthread_condattr_init" = yes &&
+ test "$ac_cv_func_pthread_setschedparam" = yes &&
+ test "$ac_cv_func_pthread_getschedparam" = yes &&
+ test "$ac_cv_func_pthread_setcancelstate" = yes &&
+ test "$ac_cv_func_pthread_setcanceltype" = yes &&
+ test "$ace_has_sched_yield" = yes; then
+ ace_has_pthreads=yes
+ AC_MSG_RESULT([POSIX Threads Draft Standard])
+ AC_DEFINE([ACE_HAS_PTHREADS_STD])
+else
+ ace_has_pthreads=no
+ AC_MSG_RESULT([none])
+fi dnl PTHREAD DRAFT CHECKS
+
+dnl Check if we have UNIX International threads
+AC_MSG_CHECKING([if a UNIX International thread library was found])
+if test "$ace_has_sthreads" = yes; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
+if test "$ace_user_enable_threads" != yes ||
+ test "$ace_has_pthreads" != yes &&
+ test "$ace_has_sthreads" != yes; then
+ dnl We don't have a usable thread library!
+ ace_user_enable_threads=no
+ dnl Make sure _REENTRANT and _THREAD_SAFE are not in the
+ dnl preprocessor flags since thread support is being disabled.
+ dnl Removal of these flags is only performed if the configure script
+ dnl added them.
+ if test -n "$ACE_THR_CPPFLAGS"; then
+changequote(, )dnl
+ CPPFLAGS=`eval "echo $CPPFLAGS | sed -e 's/$ACE_THR_CPPFLAGS//' -e 's/-D_THREAD_SAFE\(=[0-9]*\)\?//'"`
+changequote([, ])dnl
+ fi
+
+ AC_MSG_WARN([It appears that you do NOT have any usable thread libraries])
+ AC_MSG_WARN([or thread support was explicitly disabled.])
+ AC_MSG_WARN([Disabling thread support.])
+ dnl ACE uses different versions of readdir_r depending on the thread
+ dnl library being used, i.e. on the ACE_HAS_*THREADS* macros. Since
+ dnl it doesn't seem like a good idea to define any ACE_HAS_*THREADS*
+ dnl macro if ACE won't be supporting threads, define ACE_LACKS_READDIR_R
+ dnl regardless if readdir_r() exists.
+ if test "$ac_cv_func_readdir_r" = yes; then
+ AC_MSG_WARN([Disabling support for readdir_r() since thread support])
+ AC_MSG_WARN([is being disabled.])
+ AC_DEFINE([ACE_LACKS_READDIR_R])
+ fi dnl test "$ac_cv_func_readdir_r" = yes
+fi dnl
+
+if test "$ace_user_enable_threads" = yes; then
+dnl If we get this far then we have threads.
+dnl FIXME: The "_POSIX" macros may need to be defined _before_ the checks for
+dnl reentrant functions! However, we don't want to define them if
+dnl the UNIX International threads library was detected.
+ AC_DEFINE([ACE_HAS_THREADS])
+ AC_DEFINE([ACE_MT_SAFE])
+ ACE_CPPFLAGS="$ACE_CPPFLAGS $ACE_THR_CPPFLAGS"
+ if test "$ace_has_pthreads" = yes &&
+ test "$ace_has_sthreads" != yes; then
+ AC_DEFINE([_POSIX_THREADS])
+ AC_DEFINE([_POSIX_THREAD_SAFE_FUNCTIONS])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ fi dnl test "$ace_has_pthreads" = yes
+
+ if test "$ace_has_pthreads" = yes; then
+
+ dnl Check if OS requires non-null status pointer for ::pthread_join ()
+ dnl
+ dnl This test must be performed after the POSIX threads implementation
+ dnl that the platform supports has been determined.
+ ACE_CACHE_CHECK([for pthread_join null status pointer support],
+ [ace_cv_have_null_status_pthread_join],[
+ AC_EGREP_CPP([WE_HAVE_PTHREADS_D4],
+ [
+#if defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREADS_DRAFT4)
+/* This test is only valid for Pthreads Draft 4 */
+WE_HAVE_PTHREADS_D4
+#endif
+ ],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+
+#include <pthread.h>
+
+/* _THREAD_SAFE is defined in <pthread.h> on some platforms. */
+#ifndef _THREAD_SAFE
+#define _THREAD_SAFE
+#endif
+
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C"
+#endif
+void *
+nothing (void *unused)
+{
+ return (void *) 34;
+};
+
+int
+main ()
+{
+ pthread_attr_t attr;
+ pthread_t id;
+ void *status;
+ int retval = 0;
+
+ /* ----- */
+ /* We return 0 on error for these calls since we only want to
+ return an error status if pthread_join fails. If these calls
+ fail then we've got other problems! */
+ if (pthread_attr_create (&attr) != 0) return 0 /*1*/;
+
+ if (pthread_create (&id, attr, nothing, 0) != 0) return 0 /*2*/;
+
+ if (pthread_attr_delete (&attr) != 0) return /*3*/;
+ /* ----- */
+
+ /* With a second (status) arg of 0, LynxOS 3.0.0 pthread_join ()
+ will fail with errno 14 (address fault detected). */
+ if (pthread_join (id, 0) == -1) {
+ fprintf (stderr, "%s: %d; ", __FILE__, __LINE__);
+ perror ("pthread_join");
+ retval = 1;
+ }
+
+ if (pthread_join (id, &status) == -1) {
+ fprintf (stderr, "%s: %d; ", __FILE__, __LINE__);
+ perror ("pthread_join");
+ retval = 2;
+ }
+
+ return retval;
+}
+ ]])],[
+ ace_cv_have_null_status_pthread_join=yes
+ ],[
+ ace_cv_have_null_status_pthread_join=no
+ ],[
+ dnl If we are cross-compiling let's hope that
+ dnl that we have a working null status pointer
+ dnl for pthread_join.
+ ace_cv_have_null_status_pthread_join=yes
+ ])
+ ],
+ [
+ ace_cv_have_null_status_pthread_join=yes
+ ])
+ ], , [AC_DEFINE([ACE_LACKS_NULL_PTHREAD_STATUS])])
+
+ dnl Check if platform needs to #include <sched.h> to get thread
+ dnl scheduling defs.
+ ACE_CACHE_CHECK([if sched.h is needed for thread scheduling definitions],
+ [ace_cv_needs_sched_h],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef ACE_HAS_STHREADS
+#include <thread.h>
+#endif
+
+#ifdef ACE_HAS_PTHREADS
+#include <pthread.h>
+#endif
+ ]], [[
+int foo = SCHED_OTHER;
+ ]])],[
+ ace_cv_needs_sched_h=no
+ ],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifdef ACE_HAS_STHREADS
+#include <thread.h>
+#endif
+
+#ifdef ACE_HAS_PTHREADS
+#include <pthread.h>
+#endif
+
+#include <sched.h>
+ ]],
+ [[
+int foo = SCHED_OTHER;
+ ]])],
+ [
+ ace_cv_needs_sched_h=yes
+ ],
+ [
+ dnl We're hosed if we get here!
+ ace_cv_needs_sched_h=no
+ ])
+ ])
+ ],
+ [
+ AC_DEFINE([ACE_NEEDS_SCHED_H])
+ ],)
+
+ dnl Check if platform only supports SCHED_OTHER scheduling policy
+ dnl
+ dnl This test must be performed after the POSIX threads implementation
+ dnl that the platform supports has been determined.
+ ACE_CACHE_CHECK([if SCHED_OTHER is only scheduling policy],
+ [ace_cv_feature_only_have_sched_other],
+ [
+ AC_EGREP_CPP([WE_ONLY_HAVE_SCHED_OTHER],
+ [
+#ifdef ACE_HAS_STHREADS
+# include <thread.h>
+#endif
+
+#ifdef ACE_HAS_PTHREADS
+# include <pthread.h>
+#endif
+
+#if defined (ACE_NEEDS_SCHED_H)
+# include <sched.h>
+#endif
+
+ /* These are ORed so that ACE will not redefine
+ any of them if any of them exist. */
+#if !defined (SCHED_FIFO) && \
+ !defined (SCHED_RR) && \
+ defined (SCHED_OTHER)
+ WE_ONLY_HAVE_SCHED_OTHER
+#endif
+ ],
+ [
+ ace_cv_feature_only_have_sched_other=yes
+ ],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+
+#include <pthread.h>
+
+/* _THREAD_SAFE is defined in <pthread.h> on some platforms. */
+#ifndef _THREAD_SAFE
+#define _THREAD_SAFE
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+int main ()
+{
+ pthread_attr_t ace_attr;
+
+#if defined (ACE_HAS_PTHREADS_DRAFT4)
+ if (pthread_attr_create (&ace_attr) != 0)
+#else
+ if (pthread_attr_init (&ace_attr) != 0)
+#endif
+ {
+ perror ("pthread_attr_init");
+ return 0; /* Return "successfully" since only the policy call
+ will return with an error for this test. */
+ }
+
+#if defined (ACE_HAS_PTHREADS_DRAFT4)
+ if (pthread_attr_setsched (&ace_attr, SCHED_FIFO) != 0)
+#else
+ if (pthread_attr_setschedpolicy (&ace_attr, SCHED_FIFO) != 0)
+#endif
+ {
+ perror ("pthread_attr_setschedpolicy");
+ return -1;
+ }
+
+#if defined (ACE_HAS_PTHREADS_DRAFT4)
+ if (pthread_attr_delete (&ace_attr) != 0)
+#else
+ if (pthread_attr_destroy (&ace_attr) != 0)
+#endif
+ {
+ perror ("pthread_attr_destroy");
+ return 0; /* Return "successfully" since only the policy call
+ will return with an error for this test. */
+ }
+
+ return 0;
+}
+ ]])],[
+ ace_cv_feature_only_have_sched_other=no
+ ],[
+ ace_cv_feature_only_have_sched_other=yes
+ ],[
+ dnl We only get here if polices other than SCHED_OTHER
+ dnl were found in the headers and we are cross-compiling.
+ dnl
+ dnl If we are cross-compiling let's hope that the
+ dnl scheduling policies found in the headers
+ dnl besides SCHED_OTHER (e.g. SCHED_FIFO, SCHED_RR)
+ dnl are supported.
+ ace_cv_feature_only_have_sched_other=no
+ ])
+ ])
+ ], [AC_DEFINE([ACE_HAS_ONLY_SCHED_OTHER])],)
+ fi dnl test "$ace_has_pthreads" = yes
+fi dnl test "$ace_user_enable_threads" = yes
+
+
+if test "$ac_cv_header_libc_h" != yes ||
+ test "$ac_cv_header_osfcn_h" != yes; then
+ AC_DEFINE([ACE_HAS_CPLUSPLUS_HEADERS])
+fi
+
+
+
+if test "$ace_cv_lib_signal_vi1_2" = yes &&
+ test "$ace_cv_lib_signal_vi1_ret" = yes &&
+ test "$ace_cv_lib_struct_sigaction_vi1_handler" = yes; then
+ AC_DEFINE([ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES])
+elif test "$ace_cv_lib_signal_vi1_2" != yes &&
+ test "$ace_cv_lib_signal_vv1_2" != yes &&
+ test "$ace_cv_lib_signal_vi1a2_2" != yes &&
+ test "$ace_cv_lib_signal_va1_2" = yes &&
+ test "$ace_cv_lib_signal_vi1_ret" != yes &&
+ test "$ace_cv_lib_signal_vv1_ret" != yes &&
+ test "$ace_cv_lib_signal_vi1a2_ret" != yes &&
+ test "$ace_cv_lib_signal_va1_ret" = yes &&
+ test "$ace_cv_lib_struct_sigaction_vi1_handler" != yes &&
+ test "$ace_cv_lib_struct_sigaction_vv1_handler" != yes &&
+ test "$ace_cv_lib_struct_sigaction_vi1a2_handler" != yes &&
+ test "$ace_cv_lib_struct_sigaction_va1_handler" = yes; then
+ AC_DEFINE([ACE_HAS_LYNXOS_SIGNALS])
+ AC_DEFINE([ACE_HAS_TANDEM_SIGNALS])
+ AC_DEFINE([ACE_HAS_IRIX_53_SIGNALS])
+ AC_DEFINE([ACE_HAS_SUNOS4_SIGNAL_T])
+elif test "$ace_cv_lib_signal_vi1a2_2" = yes &&
+ test "$ace_cv_lib_signal_vi1a2_ret" = yes &&
+ test "$ace_cv_lib_struct_sigaction_vi1a2_handler" = yes; then
+ AC_DEFINE([ACE_HAS_SPARCWORKS_401_SIGNALS])
+elif test "$ace_cv_lib_signal_vi1_2" = yes &&
+ test "$ace_cv_lib_signal_vi1_ret" = yes &&
+ test "$ace_cv_lib_struct_sigaction_vi1_handler" != yes; then
+ AC_DEFINE([ACE_HAS_SVR4_SIGNAL_T])
+elif test "$ace_cv_lib_signal_vi1_2" = yes &&
+ test "$ace_cv_lib_signal_vv1_ret" = yes &&
+ test "$ace_cv_lib_struct_sigaction_vv1_handler" = yes; then
+ AC_DEFINE([ACE_HAS_SVR4_SIGNAL_T])
+elif test "$ace_cv_lib_signal_vi1_2" = yes &&
+ test "$ace_cv_lib_signal_vi1_ret" != yes &&
+ test "$ace_cv_lib_signal_vv1_ret" != yes &&
+ test "$ace_cv_lib_signal_vi1a2_ret" != yes &&
+ test "$ace_cv_lib_signal_va1_ret" = yes &&
+ test "$ace_cv_lib_struct_sigaction_vi1_handler" != yes &&
+ test "$ace_cv_lib_struct_sigaction_vv1_handler" != yes &&
+ test "$ace_cv_lib_struct_sigaction_vi1a2_handler" != yes &&
+ test "$ace_cv_lib_struct_sigaction_va1_handler" = yes; then
+ AC_DEFINE([ACE_HAS_UNIXWARE_SVR4_SIGNAL_T])
+fi dnl ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
+
+dnl
+dnl SECTION 15: Final checks
+dnl
+
+dnl Set known platform specific flags
+ACE_SET_PLATFORM_MACROS
+
+dnl Make final substitutions and defines
+if test "$ace_u_long_long_typedef_set" = yes; then
+ AC_DEFINE_UNQUOTED([ACE_UINT64_TYPEDEF], [$ACE_UINT64])
+fi
+
+dnl Combine package set flags with user's flags.
+dnl User's flags go after package flags to allow user to override
+dnl package defaults.
+dnl X_CFLAGS comes from AC_PATH_XTRA. It may include, for example,
+dnl additional include file paths or macros that need to be defined
+dnl in order for X11 related files to be compiled properly.
+if test "$ace_user_enable_optimize"; then
+ dnl We want OCXXFLAGS to be on the end, so we use CXXFLAGS,
+ dnl not ACE_CXXFLAGS!
+ CXXFLAGS="$CXXFLAGS $OCXXFLAGS"
+ CFLAGS="$CFLAGS $OCFLAGS"
+fi
+CXXFLAGS="$ACE_CXXFLAGS $X_CFLAGS $CXXFLAGS"
+CFLAGS="$ACE_CFLAGS $X_CFLAGS $CFLAGS"
+CPPFLAGS="$ACE_CPPFLAGS $CPPFLAGS"
+LDFLAGS="$ACE_LDFLAGS $LDFLAGS"
+
+dnl The following tests should be performed _after_ the bulk of the
+dnl ACE macros have been defined.
+
+dnl Flush the cache so that it is easier to debug the configure script
+dnl if the following integrity check fails.
+AC_CACHE_SAVE
+
+dnl Verify the integrity of the current configuration.
+ACE_CACHE_CHECK([if generated ACE configuration is usable],
+ [ace_cv_configuration_is_usable],
+ [
+ dnl We want an empty ace/config.h to prevent multiple defines
+ dnl with Autoconf's confdefs.h
+ ACE_USE_TEMP_FILE([ace/config.h],
+ [
+ dnl Now run the compilation test
+ ACE_TRY_COMPILE([-I. -I${srcdir}],
+ [
+#if defined(ACE_UINT64_TYPEDEF)
+ typedef ACE_UINT64_TYPEDEF ACE_UINT64;
+#endif /* ACE_UINT64_TYPEDEF */
+
+#include "ace/OS.cpp"
+ ],
+ [
+ ACE_Time_Value t = ACE_OS::gettimeofday ();
+ t++;
+ ],
+ [
+ ace_cv_configuration_is_usable=yes
+ ],
+ [
+ ace_cv_configuration_is_usable=no
+ ])
+ ])
+ ],
+ [
+ dnl Looks good! Do nothing.
+ dnl It appears that ace/OS.cpp compiled. If it didn't compile then
+ dnl there would be no chance that the rest of ACE would compile.
+ ],
+ [
+ AC_MSG_ERROR(
+ [
+The generated configuration appears to be unusable. Please verify
+that your system path and environment variables are correct. If they
+appear to be correct then please send the maintainer of this configure
+script $ACE_CONFIGURE_MAINTAINER the *COMPRESSED* 'config.log' file
+and the following information:
+
+ ACE 'configure' Script Information
+ ==================================
+ [RCS] translit([$Id$], [$\"])
+
+
+ ACE Version: $ACE_VERSION
+ C++ Compiler: $CXX
+ C++ Preprocessor: $CXXCPP
+ C++ Flags: $CXXFLAGS
+ Preprocessor Flags: $CPPFLAGS
+ Linker: $LD
+ Linker Flags: $LDFLAGS
+ Libraries: $LIBS
+ System type information:
+ Build: $build Host: $host
+
+In the meantime, please use the stock ACE build procedure detailed in
+the file 'ACE-INSTALL.html'.
+ ])
+ ])
+
+dnl Check for ACE_IOStream support
+ACE_CACHE_CHECK([for ACE_IOStream support],
+ [ace_cv_feature_ace_iostream],
+ [
+ dnl We want an empty ace/config.h to prevent multiple defines
+ dnl with Autoconf's confdefs.h
+ ACE_USE_TEMP_FILE([ace/config.h],
+ [
+ dnl Now run the compilation test
+ ACE_TRY_COMPILE([-I. -I${srcdir}],
+ [
+#if defined(ACE_UINT64_TYPEDEF)
+ typedef ACE_UINT64_TYPEDEF ACE_UINT64;
+#endif /* ACE_UINT64_TYPEDEF */
+
+#include "ace/IOStream.cpp"
+ ],
+ [
+ int a=0; a += 1;
+ ],
+ [
+ ace_cv_feature_ace_iostream=yes
+ ],
+ [
+ ace_cv_feature_ace_iostream=no
+ ])
+ ])
+ ], , [AC_DEFINE([ACE_LACKS_ACE_IOSTREAM])])
+
+dnl Check if ACE needs minimum iostream header inclusion
+ACE_CACHE_CHECK([if ACE needs minimum iostream header inclusion],
+ [ace_cv_lib_minimum_iostream],
+ [
+ dnl We want an empty ace/config.h to prevent multiple defines
+ dnl with Autoconf's confdefs.h
+ ACE_USE_TEMP_FILE([ace/config.h],
+ [
+ dnl Now run the compilation test
+ ACE_TRY_COMPILE([-I. -I${srcdir}],
+ [
+#if defined(ACE_UINT64_TYPEDEF)
+ typedef ACE_UINT64_TYPEDEF ACE_UINT64;
+#endif /* ACE_UINT64_TYPEDEF */
+
+#include "ace/OS.cpp"
+ ],
+ [
+ int a=0; a += 1;
+ ],
+ [
+ ace_cv_lib_minimum_iostream=no
+ ],
+ [
+ dnl Now check if ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION makes
+ dnl compilation work!
+ ACE_TRY_COMPILE([-I. -I${srcdir}],
+ [
+#if defined(ACE_UINT64_TYPEDEF)
+ typedef ACE_UINT64_TYPEDEF ACE_UINT64;
+#endif /* ACE_UINT64_TYPEDEF */
+
+#define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION
+#include "ace/OS.cpp"
+ ],
+ [
+ int a=0; a += 1;
+ ],
+ [
+ ace_cv_lib_minimum_iostream=yes
+ ],
+ [
+ dnl If we get here, then we have no idea what is wrong!
+ ace_cv_lib_minimum_iostream=no
+ ])
+ ])
+ ])
+ ], [AC_DEFINE([ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION])],)
+
+dnl @@ I don't think that this test is correct. The only way I could
+dnl get ACE_Addr::sap_any to work was to explicitly cast it to the
+dnl a constant reference of the derived type.
+dnl -Ossama
+dnl Check if compiler can't handle the static ACE_Addr::sap_any construct
+ACE_CACHE_CHECK([for ACE_addr::sap_any support],
+ [ace_cv_lib_sap_any_support],
+ [
+ dnl We want an empty ace/config.h to prevent multiple defines
+ dnl with Autoconf's confdefs.h
+ ACE_USE_TEMP_FILE([ace/config.h],
+ [
+ dnl Now run the compilation test
+ ACE_TRY_COMPILE([-I. -I${srcdir}],
+ [
+#if defined(ACE_UINT64_TYPEDEF)
+ typedef ACE_UINT64_TYPEDEF ACE_UINT64;
+#endif /* ACE_UINT64_TYPEDEF */
+
+#include "ace/FILE_Addr.h"
+ ],
+ [
+ ACE_FILE_Addr ace_file ((const ACE_FILE_Addr &) ACE_Addr::sap_any);
+ ],
+ [
+ ace_cv_lib_sap_any_support=yes
+ ],
+ [
+ dnl Now check if ACE_HAS_BROKEN_SAP_ANY makes
+ dnl compilation work!
+ ACE_TRY_COMPILE([-I. -I${srcdir}],
+ [
+#if defined(ACE_UINT64_TYPEDEF)
+ typedef ACE_UINT64_TYPEDEF ACE_UINT64;
+#endif /* ACE_UINT64_TYPEDEF */
+
+#define ACE_HAS_BROKEN_SAP_ANY
+#include "ace/FILE_Addr.h"
+ ],
+ [
+ ACE_FILE_Addr ace_file ((const ACE_FILE_Addr &) ACE_Addr::sap_any);
+ ],
+ [
+ ace_cv_lib_sap_any_support=no
+ ],
+ [
+ dnl If we get here, then we have no idea what is wrong!
+ ace_cv_lib_sap_any_support=yes
+ ])
+ ])
+ ])
+ ],, [AC_DEFINE([ACE_HAS_BROKEN_SAP_ANY])])
+
+dnl Check if ACE needs conversion to pass ACE_TTY_IO to DEV_Connector
+ACE_CACHE_CHECK([if ACE needs conversion to pass ACE_TTY_IO to DEV_Connector],
+ [ace_cv_lib_need_dev_io_conv],
+ [
+ dnl We want an empty ace/config.h to prevent multiple defines
+ dnl with Autoconf's confdefs.h
+ ACE_USE_TEMP_FILE([ace/config.h],
+ [
+ dnl Now run the compilation test
+ ACE_TRY_COMPILE([-I. -I${srcdir}],
+ [
+#if defined(ACE_UINT64_TYPEDEF)
+ typedef ACE_UINT64_TYPEDEF ACE_UINT64;
+#endif /* ACE_UINT64_TYPEDEF */
+
+#include "ace/OS.cpp"
+ ],
+ [
+ int a=0; a += 1;
+ ],
+ [
+ ace_cv_lib_need_dev_io_conv=no
+ ],
+ [
+ dnl Now check if ACE_NEEDS_DEV_IO_CONVERSION makes
+ dnl compilation work!
+ ACE_TRY_COMPILE([-I. -I${srcdir}],
+ [
+#if defined(ACE_UINT64_TYPEDEF)
+ typedef ACE_UINT64_TYPEDEF ACE_UINT64;
+#endif /* ACE_UINT64_TYPEDEF */
+
+#define ACE_NEEDS_DEV_IO_CONVERSION
+#include "ace/DEV_Connector.cpp"
+ ],
+ [
+ int a=0; a += 1;
+ ],
+ [
+ ace_cv_lib_need_dev_io_conv=yes
+ ],
+ [
+ dnl If we get here, then we have no idea what is wrong!
+ ace_cv_lib_need_dev_io_conv=no
+ ])
+ ])
+ ])
+ ], [AC_DEFINE([ACE_NEEDS_DEV_IO_CONVERSION])],)
+
+dnl End ACE macro tests!
+
+dnl Substitute whatever X libraries ACE needs, if any.
+AC_SUBST([ACE_XLIBS])
+
+dnl Prepend purify and quantify command lines if purify and quantify are
+dnl enabled. Otherwise, PURELINK and PRELINK will just be "blank."
+LD="$PURELINK $PRELINK $LD"
+dnl LDFLAGS="$ACE_LDFLAGS $LDFLAGS"
+
+dnl AC_SUBST(LDFLAGS)
+dnl AC_SUBST(LIBOBJS)
+
+dnl These definitions are expanded in the makefile and ace-config
+if test "$no_x" != yes; then
+ ACE_LIBDIR="${X_LIBS} -L\${libdir}"
+else
+ ACE_LIBDIR='-L${libdir}'
+fi
+ACE_LIBS="${X_PRE_LIBS} ${ACE_XLIBS} ${X_EXTRA_LIBS} ${LIBS}"
+ACE_INCLUDEDIR='-I${includedir}'
+
+AC_SUBST([ACE_LIBDIR])
+AC_SUBST([ACE_LIBS])
+AC_SUBST([ACE_INCLUDEDIR])
+
+dnl These definitions are expanded in the makefile and ace-config
+#TAO_LIBDIR='-L${libdir}'
+#TAO_LIBS="-lACE ${LIBS}"
+#TAO_INCLUDEDIR='-I${includedir}'
+#
+#AC_SUBST([TAO_LIBDIR])
+#AC_SUBST([TAO_LIBS])
+#AC_SUBST([TAO_INCLUDEDIR])
+
+dnl Force CXXFLAGS to be substituted in Makefiles that don't "need" them.
+AC_SUBST([CXXFLAGS])
+
+dnl
+dnl SECTION 16: AC_CONFIG_FILES([FILE...])
+dnl
+dnl
+dnl We can finally create all the files listed here; Makefile is
+dnl created from Makefile.in, etc. Top-level Makefiles should be
+dnl created first.
+
+dnl Makefile
+dnl ace/Makefile
+dnl apps/Makefile
+dnl apps/gperf/Makefile
+dnl apps/gperf/src/Makefile
+dnl man/Makefile
+dnl man/man3/Makefile
+dnl netsvcs/Makefile
+dnl netsvcs/clients/Makefile
+dnl netsvcs/clients/Logger/Makefile
+dnl netsvcs/clients/Naming/Makefile
+dnl netsvcs/clients/Naming/Client/Makefile
+dnl netsvcs/clients/Naming/Dump_Restore/Makefile
+dnl netsvcs/clients/Tokens/Makefile
+dnl netsvcs/clients/Tokens/collection/Makefile
+dnl netsvcs/clients/Tokens/deadlock/Makefile
+dnl netsvcs/clients/Tokens/invariant/Makefile
+dnl netsvcs/clients/Tokens/manual/Makefile
+dnl netsvcs/clients/Tokens/mutex/Makefile
+dnl netsvcs/clients/Tokens/rw_lock/Makefile
+dnl netsvcs/lib/Makefile
+dnl netsvcs/servers/Makefile
+dnl tests/Makefile
+
+AC_CONFIG_FILES([
+ ace-config
+ ace-config.1
+ aceConf.sh
+])
+
+AC_CONFIG_COMMANDS([default],[
+ echo ""
+ echo "Configuration of ACE is now complete."
+ echo ""
+ ],[])
+AC_OUTPUT
+
+
+
+dnl Configure the TAO directory if it exists.
+dnl if test -d $srcdir/TAO; then
+dnl AC_CONFIG_SUBDIRS([TAO])
+dnl fi
diff --git a/m4/ace.m4 b/m4/ace.m4
index 0393c191863..8af78f8dcd6 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,61 @@ 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)
+dnl 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([tao],
+# AC_HELP_STRING([--with-tao],[build TAO (the ACE ORB) [[yes]]]),
# [
# case "${withval}" in
# yes)
@@ -264,7 +261,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 +269,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 +299,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 +313,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)
@@ -353,25 +350,29 @@ changequote([, ])dnl
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 -n "$GXX"; 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 +382,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 +426,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 +449,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 +460,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 +480,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,23 +509,21 @@ 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)
@@ -534,14 +533,14 @@ changequote([, ])dnl
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,10 +548,8 @@ 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)
@@ -565,13 +562,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..17d20df732e 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
@@ -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,7 +394,7 @@ 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 |
@@ -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])
@@ -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"
@@ -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"
@@ -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..ff0de2416f7 100644
--- a/m4/compiler.m4
+++ b/m4/compiler.m4
@@ -25,14 +25,15 @@ 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])
@@ -43,8 +44,8 @@ changequote(, )dnl
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
@@ -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__
],
@@ -276,11 +277,11 @@ changequote([, ])dnl
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
@@ -308,9 +309,9 @@ changequote([, ])dnl
dnl Additional flags
if test -n "$GXX"; 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
diff --git a/m4/config_h.m4 b/m4/config_h.m4
new file mode 100644
index 00000000000..2dc0b8cbc27
--- /dev/null
+++ b/m4/config_h.m4
@@ -0,0 +1,1415 @@
+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 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_THREADS],
+[
+#ifndef _POSIX_THREADS
+# undef _POSIX_THREADS
+#endif
+])
+
+AH_VERBATIM([_POSIX_THREAD_SAFE_FUNCTIONS],
+[#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
+# undef _POSIX_THREAD_SAFE_FUNCTIONS
+#endif
+])
+
+AH_VERBATIM([_POSIX_PTHREAD_SEMANTICS],
+[/* Some platforms need _POSIX_PTHREAD_SEMANTICS to make some functions work */
+#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],[])
+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],[])
+AH_TEMPLATE([ACE_HAS_NEW_H],[])
+AH_TEMPLATE([ACE_HAS_STDEXCEPT_NO_H],[])
+AH_TEMPLATE([ACE_HAS_EXCEPTION_H],[])
+
+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],[])
+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],[])
+AH_TEMPLATE([HPUX_10],[])
+AH_TEMPLATE([HPUX_11],[])
+AH_TEMPLATE([_HPUX_SOURCE],[])
+AH_TEMPLATE([ACE_HAS_BROKEN_HPUX_TEMPLATES],
+[Earlier versions of HP/UX C++ are damned...])
+
+dnl Irix specific configuration parameters
+AH_TEMPLATE([IRIX5],[])
+AH_TEMPLATE([IRIX6],[])
+AH_TEMPLATE([_BSD_TYPES],[])
+AH_TEMPLATE([_SGI_MP_SOURCE],[])
+AH_TEMPLATE([_MODERN_C_],[])
+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],[])
+
+dnl OSF/1 and Digital Unix specific configuration parameters
+AH_TEMPLATE([DEC_CXX],[])
+AH_TEMPLATE([DIGITAL_UNIX],[])
+
+dnl pSOS specific configuration parameters
+AH_TEMPLATE([ACE_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],[])
+AH_TEMPLATE([UNIXWARE_2_0],[])
+AH_TEMPLATE([UNIXWARE_2_1],[])
+
+dnl VXWorks specific configuration parameters
+AH_TEMPLATE([VXWORKS],[])
+
+dnl Win32 specific configuration parameters
+AH_TEMPLATE([ACE_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],[])
+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],[])
+AH_TEMPLATE([ACE_USE_RCSID],[])
+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],[])
+AH_TEMPLATE([ACE_SIZEOF_SHORT],[])
+AH_TEMPLATE([ACE_SIZEOF_INT],[])
+AH_TEMPLATE([ACE_SIZEOF_LONG],[])
+AH_TEMPLATE([ACE_SIZEOF_LONG_LONG],[])
+AH_TEMPLATE([ACE_SIZEOF_VOID_P],[])
+AH_TEMPLATE([ACE_SIZEOF_FLOAT],[])
+AH_TEMPLATE([ACE_SIZEOF_DOUBLE],[])
+AH_TEMPLATE([ACE_SIZEOF_LONG_DOUBLE],[])
+
+
+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.
+*/
+#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_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_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_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_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_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_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_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..54373dc1ef0 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)
+ AC_DEFINE([IRIX5])
if test -z "$GXX"; 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"
diff --git a/m4/subsets.m4 b/m4/subsets.m4
index 0b241612f7c..66409ecf477 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,8 @@ 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-other],
+ AC_HELP_STRING([--enable-lib-other],[build ACE_Other library]),
[
case "${enableval}" in
yes)
@@ -327,10 +326,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
@@ -368,69 +367,69 @@ if test $ace_user_enable_lib_full = 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!
dnl Set which ACE subsets to build
-AM_CONDITIONAL(BUILD_OS_FILES,
- test X$ace_user_enable_lib_os = Xyes)
+dnl AM_CONDITIONAL(BUILD_OS_FILES,
+dnl test X$ace_user_enable_lib_os = Xyes)
-AM_CONDITIONAL(BUILD_UTILS_FILES,
- test X$ace_user_enable_lib_utils = Xyes)
+dnl AM_CONDITIONAL(BUILD_UTILS_FILES,
+dnl test X$ace_user_enable_lib_utils = Xyes)
-AM_CONDITIONAL(BUILD_LOGGING_FILES,
- test X$ace_user_enable_lib_logging = Xyes)
+dnl AM_CONDITIONAL(BUILD_LOGGING_FILES,
+dnl test X$ace_user_enable_lib_logging = Xyes)
-AM_CONDITIONAL(BUILD_THREADS_FILES,
- test X$ace_user_enable_lib_threads = Xyes)
+dnl AM_CONDITIONAL(BUILD_THREADS_FILES,
+dnl test X$ace_user_enable_lib_threads = Xyes)
-AM_CONDITIONAL(BUILD_DEMUX_FILES,
- test X$ace_user_enable_lib_demux = Xyes)
+dnl AM_CONDITIONAL(BUILD_DEMUX_FILES,
+dnl test X$ace_user_enable_lib_demux = Xyes)
-AM_CONDITIONAL(BUILD_CONNECTION_FILES,
- test X$ace_user_enable_lib_connection = Xyes)
+dnl AM_CONDITIONAL(BUILD_CONNECTION_FILES,
+dnl test X$ace_user_enable_lib_connection = Xyes)
-AM_CONDITIONAL(BUILD_SOCKETS_FILES,
- test X$ace_user_enable_lib_sockets = Xyes)
+dnl AM_CONDITIONAL(BUILD_SOCKETS_FILES,
+dnl test X$ace_user_enable_lib_sockets = Xyes)
-AM_CONDITIONAL(BUILD_IPC_FILES,
- test X$ace_user_enable_lib_ipc = Xyes)
+dnl AM_CONDITIONAL(BUILD_IPC_FILES,
+dnl test X$ace_user_enable_lib_ipc = Xyes)
-AM_CONDITIONAL(BUILD_SVCCONF_FILES,
- test X$ace_user_enable_lib_svcconf = Xyes)
+dnl AM_CONDITIONAL(BUILD_SVCCONF_FILES,
+dnl test X$ace_user_enable_lib_svcconf = Xyes)
-AM_CONDITIONAL(BUILD_STREAMS_FILES,
- test X$ace_user_enable_lib_streams = Xyes)
+dnl AM_CONDITIONAL(BUILD_STREAMS_FILES,
+dnl test X$ace_user_enable_lib_streams = Xyes)
-AM_CONDITIONAL(BUILD_MEMORY_FILES,
- test X$ace_user_enable_lib_memory = Xyes)
+dnl AM_CONDITIONAL(BUILD_MEMORY_FILES,
+dnl test X$ace_user_enable_lib_memory = Xyes)
-AM_CONDITIONAL(BUILD_TIMER_FILES,
- test X$ace_user_enable_lib_timer = Xyes)
+dnl AM_CONDITIONAL(BUILD_TIMER_FILES,
+dnl test X$ace_user_enable_lib_timer = Xyes)
-AM_CONDITIONAL(BUILD_TOKEN_FILES,
- test X$ace_user_enable_lib_token = Xyes)
+dnl AM_CONDITIONAL(BUILD_TOKEN_FILES,
+dnl test X$ace_user_enable_lib_token = Xyes)
-AM_CONDITIONAL(BUILD_OTHER_FILES,
- test X$ace_user_enable_lib_other = Xyes)
+dnl AM_CONDITIONAL(BUILD_OTHER_FILES,
+dnl test X$ace_user_enable_lib_other = Xyes)
-AM_CONDITIONAL(BUILD_FULL_LIBRARY,
- test X$ace_user_enable_lib_full = Xyes)
+dnl AM_CONDITIONAL(BUILD_FULL_LIBRARY,
+dnl test X$ace_user_enable_lib_full = Xyes)
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 +439,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 +449,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 +459,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 +470,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 +482,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 +492,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 +503,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 +516,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 +528,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 +538,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 +548,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
@@ -570,7 +569,7 @@ AC_DEFUN(ACE_CREATE_LIBACE_TOKEN,
dnl Set the component dependencies for the libACE_Utils 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 +590,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
@@ -611,7 +610,7 @@ AC_DEFUN(ACE_CREATE_ALL_COMPONENTS,
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
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"
])
])