From: Harlan Stenn Date: Tue, 4 Mar 2014 09:36:37 +0000 (-0800) Subject: [Bug 2572] cross-compiling fails for --with-yielding-select X-Git-Tag: NTP_4_2_7P430~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b57fdeb0635d4b831813c54e04d9cc89f6a0725;p=thirdparty%2Fntp.git [Bug 2572] cross-compiling fails for --with-yielding-select bk: 53159ea5_Gqu0ZcNymzXd7cA-IsBvw --- diff --git a/ChangeLog b/ChangeLog index 7b9b8276c..51f591ee5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ * Upgrade to libevent-2.1.3-alpha-dev. +* [Bug 2572] cross-compiling fails for --with-yielding-select. (4.2.7p429) 2014/03/03 Released by Harlan Stenn * CID 1165098: Remove logically dead code from refclock_true.c. * CID 1189401: Use INSIST() instead of a belt-and-suspenders pointer check. diff --git a/sntp/libevent/configure.ac b/sntp/libevent/configure.ac index 2073b4ecc..e96d7024f 100644 --- a/sntp/libevent/configure.ac +++ b/sntp/libevent/configure.ac @@ -722,17 +722,23 @@ AC_TRY_COMPILE([], # check if we can compile with pthreads have_pthreads=no if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then - ACX_PTHREAD([ - AC_DEFINE(HAVE_PTHREADS, 1, - [Define if we have pthreads on this system]) - have_pthreads=yes]) - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - AC_CHECK_SIZEOF(pthread_t, , - [AC_INCLUDES_DEFAULT() - #include ] - ) + OL_THREAD_CHECK([ + have_pthreads=yes + PTHREAD_LIBS="$LTHREAD_LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + AC_CHECK_SIZEOF( + [pthread_t], + [], + [ + AC_INCLUDES_DEFAULT() + #include + ] + ) + ]) fi -AM_CONDITIONAL(PTHREADS, [test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"]) +AC_SUBST([PTHREAD_LIBS]) +AC_SUBST([PTHREAD_CFLAGS]) +AM_CONDITIONAL([PTHREADS], [test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"]) # check if we should compile locking into the library if test x$enable_thread_support = xno; then diff --git a/sntp/libevent/m4/openldap-thread-check.m4 b/sntp/libevent/m4/openldap-thread-check.m4 index e36b4af26..6a3afc6de 100644 --- a/sntp/libevent/m4/openldap-thread-check.m4 +++ b/sntp/libevent/m4/openldap-thread-check.m4 @@ -76,7 +76,9 @@ fi dnl ---------------------------------------------------------------- dnl Threads? ol_link_threads=no -ol_with_yielding_select=${ol_with_yielding_select:-auto} +dnl ol_with_yielding_select=${ol_with_yielding_select:-auto} +OL_ARG_WITH(yielding-select,[ --with-yielding-select with yielding select], + auto, [auto yes no manual] ) case $ol_with_threads in auto | yes | nt) @@ -388,7 +390,7 @@ int main(argc, argv) }]])],[ol_cv_pthread_select_yields=no],[ol_cv_pthread_select_yields=yes],[ol_cv_pthread_select_yields=cross])]) if test $ol_cv_pthread_select_yields = cross ; then - AC_MSG_ERROR([crossing compiling: use --with-yielding_select=yes|no|manual]) + AC_MSG_ERROR([crossing compiling: use --with-yielding-select=yes|no|manual]) fi if test $ol_cv_pthread_select_yields = yes ; then