diff options
author | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-09-25 13:59:27 +0000 |
---|---|---|
committer | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-09-25 13:59:27 +0000 |
commit | b5cc855e08b3127dab39fc8343c1acb2eeebb210 (patch) | |
tree | b16de7a9a8d37a183e10ed8ff5d4ddb1fd7667cb /ACE | |
parent | 3cb985d6d9dd64ce506f54558427947f771e6c3c (diff) | |
download | ATCD-b5cc855e08b3127dab39fc8343c1acb2eeebb210.tar.gz |
ChangeLogTag: Thu Sep 25 13:58:48 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com>
Diffstat (limited to 'ACE')
-rw-r--r-- | ACE/ChangeLog | 26 | ||||
-rw-r--r-- | ACE/configure.ac | 124 | ||||
-rw-r--r-- | ACE/m4/acinclude.m4 | 67 | ||||
-rw-r--r-- | ACE/m4/config_h.m4 | 13 |
4 files changed, 76 insertions, 154 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 13fee799491..79906a3602c 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,28 @@ +Thu Sep 25 13:58:48 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com> + + * m4/acinclude.m4: + + Remove ACE_CHECK_STRUCT and ACE_TRY_COMPILE_STRUCT autoconf + macros. All use has been replaced by the standard autoconf + AC_CHECK_TYPE macro. + + * configure.ac: + * m4/config_h.m4: + + Replace use of ACE_CHECK_STRUCT with AC_CHECK_TYPE, and the use + of AH_TEMPLATE with AC_DEFINE with a third argument for the + ACE_HAS_PRUSAGE_T, ACE_LACKS_STRRECVFD, ACE_LACKS_SIGACTION, + ACE_LACKS_SIGSET, and ACE_LACKS_UTSNAME_T feature tests. + + Replace use of ACE_TRY_COMPILE_STRUCT with AC_CHECK_TYPE in + internal feature tests (no feature test macros are defined) + for pthread_rwlock_t and pthread_rwlockattr_t. + + Remove duplicate ACE_LACKS_SI_ADDR feature test. + + Replace use of "test xxx == yyy" with "test xxx = yyy", the + former is a GNU extension. + Thu Sep 25 11:49:45 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com> * m4/acinclude.m4: @@ -6,6 +31,7 @@ Thu Sep 25 11:49:45 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com> replaced by the standard autoconf AC_CHECK_TYPE macro. * configure.ac: + * m4/config_h.m4: Replace use of ACE_CHECK_TYPE with AC_CHECK_TYPE and the use of AH_TEMPLATE with AC_DEFINE with a third argument for the diff --git a/ACE/configure.ac b/ACE/configure.ac index 90789c9a233..850a277380c 100644 --- a/ACE/configure.ac +++ b/ACE/configure.ac @@ -1282,13 +1282,33 @@ case "$host" in 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])]) +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>]) ACE_CACHE_CHECK([for struct sembuf],[ace_cv_struct_sembuf], [ @@ -1529,26 +1549,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, @@ -3089,9 +3089,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 @@ -3603,7 +3603,7 @@ main () esac AC_CHECK_FUNC([gethrtime]) -if $ac_cv_func_gethrtime = "yes"; then +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.])], @@ -3644,7 +3644,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. @@ -4248,47 +4248,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) @@ -4410,8 +4386,8 @@ fi dnl test "$ac_cv_type_cpu_set_t" = yes , [AC_DEFINE([ACE_LACKS_RWLOCKATTR_PSHARED])]) - 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 && @@ -5642,7 +5618,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],[ @@ -5718,7 +5694,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* diff --git a/ACE/m4/acinclude.m4 b/ACE/m4/acinclude.m4 index 7e6c2f10193..dd48e29f686 100644 --- a/ACE/m4/acinclude.m4 +++ b/ACE/m4/acinclude.m4 @@ -203,73 +203,6 @@ dnl checks for typedefs 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 diff --git a/ACE/m4/config_h.m4 b/ACE/m4/config_h.m4 index 584c05a0381..3ba72da6ac0 100644 --- a/ACE/m4/config_h.m4 +++ b/ACE/m4/config_h.m4 @@ -470,8 +470,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)]) @@ -796,15 +794,9 @@ AH_TEMPLATE([ACE_LACKS_SETDETACH], 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_SYS_MSG_H], [Platform lacks sys/msg.h (e.g., Chorus and VxWorks)]) @@ -824,8 +816,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]) @@ -866,9 +856,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 |