Add support for autoconf 2.6.2 and newer.

This commit is contained in:
derex 2008-10-17 15:26:41 +03:00
parent 3ba1599a78
commit 366fe7fde9
7 changed files with 176 additions and 342 deletions

View file

@ -1,4 +1,4 @@
dnl $Id: configure.ac 82573 2008-08-08 18:13:53Z jtc $
dnl $Id: configure.ac 82832 2008-09-25 17:38:39Z jtc $
dnl An autoconf script to automatically configure ACE.
dnl Process this file with autoconf to produce a configure script.
@ -19,7 +19,7 @@ AC_INIT([ACE],
[ace-bugs@cs.wustl.edu],
[ace])
AC_REVISION([$Id: configure.ac 82573 2008-08-08 18:13:53Z jtc $])
AC_REVISION([$Id: configure.ac 82832 2008-09-25 17:38:39Z jtc $])
AC_COPYRIGHT([ACE(TM), TAO(TM), CIAO(TM), and CoSMIC(TM) (henceforth
referred to as "DOC software") are copyrighted by Douglas C.
@ -505,8 +505,6 @@ AC_CHECK_HEADER([dlfcn.h],
ACE_CHECK_LACKS_HEADERS(inttypes.h malloc.h memory.h stdint.h)
ACE_CHECK_HAS_HEADERS(bytesex.h)
AC_CHECK_HEADER([sys/msg.h],
[
ACE_CACHE_CHECK([if _KERNEL is needed for msg prototypes],
@ -592,6 +590,8 @@ AC_CHECK_HEADER([sys/procfs.h],
ACE_CHECK_LACKS_HEADERS(arpa/inet.h)
ACE_CHECK_HAS_HEADERS(bytesex.h)
ACE_CHECK_HAS_HEADERS(byteswap.h)
ACE_CHECK_LACKS_HEADERS(dirent.h)
@ -686,10 +686,6 @@ ACE_CHECK_LACKS_HEADERS(sys/sysctl.h, [], [],
#endif
])
ACE_CHECK_HAS_HEADERS(sys/sysinfo.h)
ACE_CHECK_HAS_HEADERS(sys/systeminfo.h)
ACE_CHECK_LACKS_HEADERS(sys/time.h)
ACE_CHECK_LACKS_HEADERS(sys/uio.h)
@ -706,8 +702,6 @@ ACE_CHECK_LACKS_HEADERS(termio.h termios.h)
ACE_CHECK_LACKS_HEADERS(wctype.h)
AC_CHECK_HEADER([sys/systeminfo.h],[],[])
AC_CHECK_TYPE([struct termio],
[AC_DEFINE([ACE_HAS_TERMIO], 1,
[Define to 1 if system supports SysV tty API.])],
@ -1104,7 +1098,10 @@ AC_CHECK_TYPE([key_t],
[Define to 1 if the system lacks the type `key_t'.])],
[#include <sys/types.h>])
ACE_CHECK_TYPE([sem_t],[semaphore.h],,)
AC_CHECK_TYPE([sem_t],
[],
[],
[#include <semaphore.h>])
AC_CHECK_TYPE([pri_t],
[],
@ -1260,62 +1257,68 @@ dnl SECTION 7: checks for structures
dnl TODO: Check whether these structures can be defined somewhere else.
ACE_CHECK_STRUCT([dirent],[dirent.h],,[AC_DEFINE([ACE_LACKS_STRUCT_DIR])])
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])],)
AC_CHECK_TYPE([struct dirent],
[],
[AC_DEFINE([ACE_LACKS_STRUCT_DIR], 1,
[Define to 1 if the system lacks the type `struct dirent'.])],
[#include <dirent.h>])
AC_CHECK_TYPE([struct flock],
[],
[AC_DEFINE([ACE_LACKS_FILELOCKS], 1,
[Define to 1 if the system lacks the type `struct flock'.])],
[#include <fcntl.h>])
AC_CHECK_TYPE([rwlock_t],
[],
[AC_DEFINE([ACE_LACKS_RWLOCK_T], 1,
[Define to 1 if the system lacks the type `rwlock_t'.])],
[#include <synch.h>])
AC_CHECK_TYPE([struct strbuf],
[AC_DEFINE([ACE_HAS_STRBUF_T], 1,
[Define to 1 if the system has the type `struct strbuf'.])],
[],
[#include <stropts.h>])
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])],)
AC_CHECK_TYPE([prusage_t],
[AC_DEFINE([ACE_HAS_PRUSAGE_T], 1,
[Define to 1 if the system has the type `prusage_t'.])],
[],
[#include <sys/procfs.h>])
;;
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([[
AC_CHECK_TYPE([struct strrecvfd],
[],
[AC_DEFINE([ACE_LACKS_STRRECVFD], 1,
[Define to 1 if the system lacks the type `struct strrecvfd'.])],
[#include <stropts.h>])
AC_CHECK_TYPE([struct sigaction],
[],
[AC_DEFINE([ACE_LACKS_SIGACTION], 1,
[Define to 1 if the system lacks the type `struct sigaction'.])],
[#include <signal.h>])
AC_CHECK_TYPE([sigset_t],
[],
[AC_DEFINE([ACE_LACKS_SIGSET], 1,
[Define to 1 if the system lacks the type `sigset_t'.])],
[#include <signal.h>])
AC_CHECK_TYPE([struct utsname],
[],
[AC_DEFINE([ACE_LACKS_UTSNAME_T], 1,
[Define to 1 if the system lacks the type `struct utsname'.])],
[#include <sys/utsname.h>])
AC_CHECK_TYPE([struct sembuf],
[],
[AC_DEFINE([ACE_LACKS_SEMBUF_T], 1,
[Define to 1 if the system lacks the type `struct sembuf'.])],
[
#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])])
#include <sys/sem.h>])
dnl Thanks to Konstantinos Margaritis <kmargar@cc.uoa.gr> for pointing out
dnl that struct siginfo_t may also be defined in signal.h
@ -1516,26 +1519,6 @@ ACE_CACHE_CHECK([for limited struct rusage],
])
],[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
AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
[AC_DEFINE([ACE_HAS_SOCKADDR_IN_SIN_LEN], 1,
@ -2253,31 +2236,6 @@ if test "$ace_cv_lib_auto_ptr_class" = yes; then
],,[AC_DEFINE([ACE_AUTO_PTR_LACKS_RESET])])
fi dnl test $ace_cv_lib_auto_ptr_class=yes
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],[
@ -3076,9 +3034,9 @@ case "$host_os" in
esac
ACE_CHECK_HAS_FUNCS(_InterlockedIncrement _InterlockedDecrement _InterlockedExchangeAdd)
if test "$ac_cv_func__InterlockedIncrement" == yes &&
test "$ac_cv_func__InterlockedDecrement" == yes &&
test "$ac_cv_func__InterlockedExchangeAdd" == yes; then
if test "$ac_cv_func__InterlockedIncrement" = yes &&
test "$ac_cv_func__InterlockedDecrement" = yes &&
test "$ac_cv_func__InterlockedExchangeAdd" = yes; then
AC_DEFINE([ACE_HAS_INTRINSIC_INTERLOCKED])
fi
@ -3484,12 +3442,7 @@ ACE_CHECK_LACKS_FUNCS(sysconf)
ACE_CHECK_HAS_FUNCS(sysctl)
AC_CHECK_FUNC([sysinfo],
[
if test "$ac_cv_header_sys_systeminfo_h" = yes; then
AC_DEFINE([ACE_HAS_SYSINFO])
fi
],)
ACE_CHECK_FUNC_SYSINFO
ACE_CHECK_LACKS_FUNCS(system)
@ -3594,10 +3547,14 @@ main ()
;;
esac
AC_CHECK_FUNC([gethrtime],
[
ACE_CHECK_TYPE([hrtime_t],[sys/time.h],[AC_DEFINE([ACE_HAS_HI_RES_TIMER])],)
],)
AC_CHECK_FUNC([gethrtime])
if test $ac_cv_func_gethrtime = "yes"; then
AC_CHECK_TYPE([hrtime_t],
[AC_DEFINE([ACE_HAS_HI_RES_TIMER], 1,
[Define to 1 if system has SunOS high resolution timer.])],
[],
[#include <sys/time.h>])
fi
AC_CHECK_FUNC([pread],
[AC_CHECK_FUNC([pwrite],
@ -3632,7 +3589,7 @@ ACE_CHECK_HAS_FUNCS(sigsuspend sigtimedwait)
ACE_CHECK_LACKS_FUNCS(socketpair)
AC_CHECK_FUNC(strptime)
if test "$ac_cv_func_strptime" == yes; then
if test "$ac_cv_func_strptime" = yes; then
dnl strptime() is available, but its prototype is not always visible to
dnl the compiler. Check if _XOPEN_SOURCE macro is needed to make the
dnl strptime() prototype visible.
@ -3886,7 +3843,7 @@ AC_SEARCH_LIBS([sem_destroy],rt,[ace_cv_func_sem_destroy=yes],,)
if test "$ace_cv_func_sem_init" = yes &&
test "$ace_cv_func_sem_destroy" = yes &&
test "$ace_cv_type_sem_t" = yes; then
test "$ac_cv_type_sem_t" = yes; then
dnl Only enable POSIX semaphore support if process shared semaphores
dnl are supported. Presumably process shared semaphores are only
@ -4118,8 +4075,9 @@ dnl name.
dnl Can't use ACE_CHECK_LACKS_FUNCS because the macro doesn't match the
dnl tested function name.
AC_CHECK_FUNC([pthread_condattr_setpshared],
,
[AC_DEFINE([ACE_LACKS_CONDATTR_PSHARED])])
[],
[AC_DEFINE([ACE_LACKS_CONDATTR_PSHARED], 1,
[Define to 1 if system lacks pthread_condattr_setpshared()])])
dnl ACE_CHECK_LACKS_FUNCS(pthread_attr_setstack)
dnl Can't use ACE_CHECK_LACKS_FUNCS because the lower-down AC macros build
@ -4196,12 +4154,13 @@ dnl name.
])
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])])
[],
[AC_DEFINE([ACE_LACKS_MUTEXATTR_PSHARED], 1,
[Define to 1 if system lacks pthread_mutexattr_setpshared().])])
dnl Check for POSIX Threads Draft 4 functions
AC_CHECK_FUNC([pthread_mutexattr_create],,)
@ -4236,47 +4195,23 @@ 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 pthread_rwlock_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
])
])
],,)
AC_CHECK_TYPE([pthread_rwlock_t],
[],
[],
[
#ifndef ACE_LACKS_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <pthread.h>])
ACE_CACHE_CHECK([for struct pthread_rwlockattr_t],
[ace_cv_struct_pthread_rwlockattr_t],
[
dnl Since we are checking for pthread_rwlockattr_t in more than one
dnl header, we can't use the ACE_CHECK_STRUCT macro so we have to do
dnl things 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_TYPE([pthread_rwlockattr_t],
[],
[],
[
#ifndef ACE_LACKS_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <pthread.h>])
ACE_CHECK_HAS_FUNCS(pthread_continue pthread_continue_np pthread_resume_np pthread_suspend pthread_suspend_np)
ACE_CHECK_HAS_FUNCS(pthread_getconcurrency pthread_setconcurrency)
@ -4395,11 +4330,12 @@ fi dnl test "$ac_cv_type_cpu_set_t" = yes
AC_CHECK_FUNC([pthread_rwlockattr_init],,)
AC_CHECK_FUNC([pthread_rwlockattr_destroy],,)
AC_CHECK_FUNC([pthread_rwlockattr_setpshared],
,
[AC_DEFINE([ACE_LACKS_RWLOCKATTR_PSHARED])])
[],
[AC_DEFINE([ACE_LACKS_RWLOCKATTR_PSHARED], 1,
[Define to 1 if system lacks pthread_rwlockattr_setpshared().])])
if test "$ace_cv_struct_pthread_rwlock_t" = yes &&
test "$ace_cv_struct_pthread_rwlockattr_t" = yes &&
if test "$ac_cv_type_pthread_rwlock_t" = yes &&
test "$ac_cv_type_pthread_rwlockattr_t" = 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 &&
@ -5630,7 +5566,7 @@ typedef void (*SA)(...);
])
])
if test "$ace_cv_struct_sigaction" = yes; then
if test "$ac_cv_type_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],[
@ -5706,7 +5642,7 @@ dnl Check if struct sigaction takes a void (*)(...) handler
ace_cv_lib_struct_sigaction_va1_handler=no
])
])
fi dnl test "$ace_cv_struct_sigaction" = yes
fi dnl test "$ac_cv_type_struct_sigaction" = yes
dnl TODO: This doesn't work.
dnl The linux compiler issues a warning regarding the invalid void*
@ -7327,7 +7263,7 @@ and the following information:
ACE 'configure' Script Information
==================================
[RCS] translit([$Id: configure.ac 82573 2008-08-08 18:13:53Z jtc $], [$"])
[RCS] translit([$Id: configure.ac 82832 2008-09-25 17:38:39Z jtc $], [$"])
ACE Version: ACE_VERSION

View file

@ -20,12 +20,12 @@ AS_VAR_POPDEF([ac_var])dnl
#-----------------------------------------------------------------------------
AC_DEFUN([ACE_CHECK_HAS_DEFINES],
[AC_FOREACH([ACE_Def], [$1],
[AH_TEMPLATE(AS_TR_CPP(ACE_HAS_[]ACE_Def),
[AH_TEMPLATE(AS_TR_CPP([ACE_HAS_]ACE_Def),
[Define to 1 if platform has ]ACE_Def[().])])dnl
for ace_def in $1
do
ACE_CHECK_DEFINE($ace_def,
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_HAS_$ace_def])]) $2],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_HAS_$ace_def])) $2],
[$3],
[$4])dnl
done
@ -36,13 +36,13 @@ done
#-----------------------------------------------------------------------------
AC_DEFUN([ACE_CHECK_LACKS_DEFINES],
[AC_FOREACH([ACE_Def], [$1],
[AH_TEMPLATE(AS_TR_CPP(ACE_LACKS_[]ACE_Def),
[AH_TEMPLATE(AS_TR_CPP([ACE_LACKS_]ACE_Def),
[Define to 1 if platform lacks ]ACE_Def[().])])dnl
for ace_def in $1
do
ACE_CHECK_DEFINE($ace_def,
[$2],
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_LACKS_$ace_def])]) $3],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_LACKS_$ace_def])) $3],
[$4])dnl
done
])

View file

@ -146,3 +146,38 @@ if test "$ac_cv_func_wcsdup" = no; then
fi
fi
])
# ACE_CHECK_SYSINFO
#
# SVR4 and Linux have completely independent implementations of the
# sysinfo() system / library call.
#
# The SVR4 signature is:
# #include <sys/systeminfo.h>
# long sysinfo (int command, char *buf, long count)
#
# While the Linux signature is:
# #include <sys/sysinfo.h>
# int sysinfo (struct sysinfo* info);
#
# SVR4 (or at least Solaris) also has a sys/sysinfo.h header, so that
# cannot be used to distinguish between the two varients. As far as I
# know, Linux does not have a sys/systeminfo.h header, so that can.
#
# ACE uses the ACE_HAS_SYSV_SYSINFO feature test macro for the first
# and ACE_HAS_LINUX_SYSINFO for the second.
#
AC_DEFUN([ACE_CHECK_FUNC_SYSINFO],[
ACE_CHECK_HAS_HEADERS(sys/sysinfo.h sys/systeminfo.h)
AC_CHECK_FUNC(sysinfo)
if test "$ac_cv_func_sysinfo" = yes; then
if test "$ac_cv_header_sys_systeminfo_h" = yes; then
AC_DEFINE([ACE_HAS_SYSV_SYSINFO], 1,
[Define to 1 if system has SysV version of sysinfo().])
elif test "$ac_cv_header_sys_sysinfo_h" = yes; then
AC_DEFINE([ACE_HAS_LINUX_SYSINFO], 1,
[Define to 1 if system has Linux version of sysinfo().])
fi
fi
])

View file

@ -2,12 +2,12 @@
#---------------------------------------------------------------------------
AC_DEFUN([ACE_CHECK_HAS_FUNCS],
[AC_FOREACH([ACE_Func], [$1],
[AH_TEMPLATE(AS_TR_CPP(ACE_HAS_[]ACE_Func),
[AH_TEMPLATE(AS_TR_CPP([ACE_HAS_]ACE_Func),
[Define to 1 if platform has ]ACE_Func[().])])dnl
for ace_func in $1
do
AC_CHECK_FUNC($ace_func,
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_HAS_$ace_func])]) $2],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_HAS_$ace_func])) $2],
[$3])dnl
done
])
@ -16,12 +16,12 @@ done
#-----------------------------------------------------------------------------
AC_DEFUN([ACE_CHECK_LACKS_FUNCS],
[AC_FOREACH([ACE_Func], [$1],
[AH_TEMPLATE(AS_TR_CPP(ACE_LACKS_[]ACE_Func),
[AH_TEMPLATE(AS_TR_CPP([ACE_LACKS_]ACE_Func),
[Define to 1 if platform lacks ]ACE_Func[().])])dnl
for ace_func in $1
do
AC_CHECK_FUNC($ace_func,
[$2],
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_LACKS_$ace_func])]) $3])dnl
[AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_LACKS_$ace_func])) $3])dnl
done
])

View file

@ -5,12 +5,12 @@
#-----------------------------------------------------------------------------
AC_DEFUN([ACE_CHECK_HAS_HEADERS],
[AC_FOREACH([ACE_Header], [$1],
[AH_TEMPLATE(AS_TR_CPP(ACE_HAS_[]ACE_Header),
[AH_TEMPLATE(AS_TR_CPP([ACE_HAS_]ACE_Header),
[Define to 1 if platform has the <]ACE_Header[> header file.])])dnl
for ace_header in $1
do
AC_CHECK_HEADER($ace_header,
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_HAS_$ace_header])]) $2],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_HAS_$ace_header])) $2],
[$3],
[$4])dnl
done
@ -23,13 +23,13 @@ done
#-----------------------------------------------------------------------------
AC_DEFUN([ACE_CHECK_LACKS_HEADERS],
[AC_FOREACH([ACE_Header], [$1],
[AH_TEMPLATE(AS_TR_CPP(ACE_LACKS_[]ACE_Header),
[AH_TEMPLATE(AS_TR_CPP([ACE_LACKS_]ACE_Header),
[Define to 1 if platform lacks the <]ACE_Header[> header file.])])dnl
for ace_header in $1
do
AC_CHECK_HEADER($ace_header,
[$2],
[AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_LACKS_$ace_header])]) $3],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_LACKS_$ace_header])) $3],
[$4])dnl
done
])

View file

@ -1,5 +1,5 @@
dnl -------------------------------------------------------------------------
dnl $Id: acinclude.m4 80826 2008-03-04 14:51:23Z wotte $
dnl $Id: acinclude.m4 82832 2008-09-25 17:38:39Z jtc $
dnl
dnl ACE M4 include file which contains general M4 macros
dnl to be used by the ACE configure script.
@ -201,101 +201,8 @@ dnl checks for header files
dnl checks for typedefs
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_REQUIRE([AC_PROG_CXX])
dnl AC_REQUIRE([AC_PROG_CXXCPP])
dnl AC_LANG([C++])
dnl AC_REQUIRE([AC_LANG])
ACE_CACHE_CHECK([for $1 in $2], [ace_cv_type_$1],
[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <$2>
]], [[
$1 ace_$1;
]])],[
ace_cv_type_$1=yes
],[
ace_cv_type_$1=no
])
],[$3],[$4])
])
dnl checks for structures
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_REQUIRE([AC_PROG_CXX])
dnl AC_REQUIRE([AC_PROG_CXXCPP])
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_%'`
ACE_CACHE_CHECK([for struct $1 in $2], [ace_cv_struct_$1],
[
ACE_TRY_COMPILE_STRUCT([$1], [$2],
[
ace_cv_struct_$1=yes
],
[
ace_cv_struct_$1=no
])
], $3, $4)
])
dnl Check for specific struct in given header file by compiling a test
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_REQUIRE([AC_PROG_CXX])
dnl AC_REQUIRE([AC_PROG_CXXCPP])
dnl AC_LANG([C++])
dnl AC_REQUIRE([AC_LANG])
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_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[
#include <$2>
]],
[[
$1 ace_$1;
]])],
[
$3
],
[
$4
])
])
])
dnl checks for variables
dnl checks for compiler characteristics
@ -492,6 +399,22 @@ dnl Check for 64 bit llseek() or lseek64()
dnl Usage: ACE_CHECK_LSEEK64
AC_DEFUN([ACE_CHECK_LSEEK64],
[
AH_TEMPLATE([ACE_HAS_LSEEK64],
[Platform supports lseek64(). This should not be defined if
ACE_HAS_LLSEEK is defined.])
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_HAS_LLSEEK],
[Platform supports llseek(). This should not be defined if
ACE_HAS_LSEEK64 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.])
AC_CHECK_FUNC([lseek64],
[
AC_DEFINE([ACE_HAS_LSEEK64])

View file

@ -1,5 +1,5 @@
dnl -------------------------------------------------------------------------
dnl $Id: config_h.m4 82277 2008-07-09 17:45:59Z jtc $
dnl $Id: config_h.m4 82833 2008-09-25 18:28:53Z jtc $
dnl
dnl config_h.m4
dnl
@ -7,6 +7,13 @@ 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 Please try to avoid adding new autoheader templates to this
dnl file, as they get included in both ACE and TAO config.h.in
dnl files, even though the cooresponding feature tests are only
dnl included in the ACE configure script. Put the autoheader
dnl template in a AC_DEFUN used for the feature test, or use the
dnl AC_DEFINE macro's third argument.
dnl
dnl -------------------------------------------------------------------------
dnl Copyright (C) 2002, 2003 Ossama Othman
@ -335,17 +342,6 @@ AH_TEMPLATE([ACE_HAS_GPERF],
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_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])
@ -473,8 +469,6 @@ AH_TEMPLATE([ACE_HAS_PROC_FS],
[Platform supports the /proc file system and defines tid_t
in <sys/procfs.h>])
AH_TEMPLATE([ACE_HAS_PRUSAGE_T],[Platform supports the prusage_t struct])
AH_TEMPLATE([ACE_HAS_PTHREADS_UNIX98_EXT],
[Platform has the UNIX98 extensions to Pthreads (rwlocks)])
@ -568,8 +562,6 @@ 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_STREAMS],[Platform supports STREAMS])
AH_TEMPLATE([ACE_HAS_STREAM_PIPES],[Platform supports STREAM pipes])
@ -598,9 +590,6 @@ AH_TEMPLATE([ACE_HAS_SVR4_SIGNAL_T],
AH_TEMPLATE([ACE_HAS_SVR4_TLI],
[Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff).])
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)])
@ -717,10 +706,6 @@ 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)])
@ -732,8 +717,6 @@ 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_GETSERVBYNAME],
[Platforms lacks getservbyname() (e.g., VxWorks and Chorus).])
@ -758,9 +741,6 @@ AH_TEMPLATE([ACE_LACKS_MODE_MASKS],
AH_TEMPLATE([ACE_LACKS_MSG_ACCRIGHTS],
[Platform defines ACE_HAS_MSG, but lacks msg_accrights{len}.])
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 ()])
@ -770,19 +750,10 @@ AH_TEMPLATE([ACE_HAS_MUTEX_TIMEOUTS],
AH_TEMPLATE([ACE_LACKS_NAMED_POSIX_SEM],
[Platform lacks named POSIX semaphores (e.g., Chorus)])
AH_TEMPLATE([ACE_LACKS_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_RWLOCKATTR_PSHARED],
[Platform lacks pthread_rwlockattr_setpshared().])
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 *).])
@ -797,39 +768,21 @@ AH_TEMPLATE([ACE_LACKS_PWD_FUNCTIONS],
AH_TEMPLATE([ACE_LACKS_PWD_REENTRANT_FUNCTIONS],
[Platform lacks getpwnam_r() methods (e.g., SGI 6.2).])
AH_TEMPLATE([ACE_LACKS_RWLOCK_T],[Platform lacks readers/writer locks.])
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_STRUCT_DIR],
[Platform lacks dirent structure.])
AH_TEMPLATE([ACE_LACKS_SYS_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_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)])
@ -839,8 +792,6 @@ AH_TEMPLATE([ACE_LACKS_SOCKET_BUFSIZ],
AH_TEMPLATE([ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES],
[Compiler doesn't support static data member templates])
AH_TEMPLATE([ACE_LACKS_STRRECVFD],[Platform doesn't define struct strrecvfd.])
AH_TEMPLATE([ACE_LACKS_T_ERRNO],[Header files lack t_errno for TLI])
AH_TEMPLATE([ACE_LACKS_TCP_NODELAY],[OS does not support TCP_NODELAY])
@ -854,14 +805,6 @@ AH_TEMPLATE([ACE_LACKS_TIMESPEC_T],
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])
@ -881,9 +824,6 @@ AH_TEMPLATE([ACE_LACKS_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_MAIN],
[Renames "main (int, char *[])", for platforms such as g++/VxWorks
that don't allow main. Requires the use of