Index: configure =================================================================== --- configure (revision 177536) +++ configure (working copy) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 173130 . +# From configure.ac Revision: 177162 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for asterisk 1.6. # @@ -17180,7 +17180,61 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext +{ echo "$as_me:$LINENO: checking for POSIX-compliant pthread initialization" >&5 +echo $ECHO_N "checking for POSIX-compliant pthread initialization... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +pthread_once_t foo = PTHREAD_ONCE_INIT; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_PTHREAD_ONCE_INIT 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking for compiler 'attribute pure' support" >&5 echo $ECHO_N "checking for compiler 'attribute pure' support... $ECHO_C" >&6; } saved_CFLAGS="$CFLAGS" Index: configure.ac =================================================================== --- configure.ac (revision 177536) +++ configure.ac (working copy) @@ -476,6 +476,15 @@ AC_MSG_RESULT(no) ) +AC_MSG_CHECKING(for POSIX-compliant pthread initialization) +AC_LINK_IFELSE( +AC_LANG_PROGRAM([#include ], + [pthread_once_t foo = PTHREAD_ONCE_INIT;]), +AC_MSG_RESULT(yes) +AC_DEFINE([HAVE_POSIX_PTHREAD_ONCE_INIT], 1, [Define to 1 if your pthread implementation initializes pthread_once_t POSIXly.]), +AC_MSG_RESULT(no) +) + AST_GCC_ATTRIBUTE(pure) AST_GCC_ATTRIBUTE(malloc) AST_GCC_ATTRIBUTE(const) Index: include/asterisk/autoconfig.h.in =================================================================== --- include/asterisk/autoconfig.h.in (revision 177536) +++ include/asterisk/autoconfig.h.in (working copy) @@ -629,6 +629,10 @@ /* Define to indicate the ${PORTAUDIO_DESCRIP} library version */ #undef HAVE_PORTAUDIO_VERSION +/* Define to 1 if your pthread implementation initializes pthread_once_t + POSIXly. */ +#undef HAVE_POSIX_PTHREAD_ONCE_INIT + /* Define this to indicate the ${POW_DESCRIP} library */ #undef HAVE_POW