]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2572] cross-compiling fails for --with-yielding-select
authorHarlan Stenn <stenn@ntp.org>
Tue, 4 Mar 2014 09:36:37 +0000 (01:36 -0800)
committerHarlan Stenn <stenn@ntp.org>
Tue, 4 Mar 2014 09:36:37 +0000 (01:36 -0800)
bk: 53159ea5_Gqu0ZcNymzXd7cA-IsBvw

ChangeLog
sntp/libevent/configure.ac
sntp/libevent/m4/openldap-thread-check.m4

index 7b9b8276cb3a8414bee21de64f7dfbad50b767a2..51f591ee5750e116eeb69a179086ee69b38dfde7 100644 (file)
--- 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 <stenn@ntp.org>
 * CID 1165098: Remove logically dead code from refclock_true.c.
 * CID 1189401: Use INSIST() instead of a belt-and-suspenders pointer check.
index 2073b4ecc8297a5e33f4729764b6e87f9b8775fc..e96d7024fa730f47e67e520962ee845ce3088164 100644 (file)
@@ -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 <pthread.h> ]
-  )
+    OL_THREAD_CHECK([
+       have_pthreads=yes
+       PTHREAD_LIBS="$LTHREAD_LIBS"
+       CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+       AC_CHECK_SIZEOF(
+           [pthread_t],
+           [],
+           [
+               AC_INCLUDES_DEFAULT()
+               #include <pthread.h>
+           ]
+       )
+    ])
 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
index e36b4af26651d06b6407e6c50a5e78b772f52a99..6a3afc6de4e0179489c707d4d70e6c6c1c7ad76a 100644 (file)
@@ -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