* Autoconf cleanup. Harlan Stenn.
* Unit test dist cleanup. Harlan Stenn.
* Cleanup various test Makefile.am files. Harlan Stenn.
+* Pthread autoconf macro cleanup. Harlan Stenn.
---
(4.2.8p3) 2015/06/29 Released by Harlan Stenn <stenn@ntp.org>
# HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
# is "pthreads"?
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
- case "$CFLAGS_LIBEVENT" in
- '') CFLAGS_LIBEVENT="-pthreads"
- ;;
- esac
AC_MSG_RESULT([no])
fi
;;
esac
esac
-AC_ARG_ENABLE(
- [cflags-libevent],
- [AC_HELP_STRING(
- [--enable-cflags-libevent=-pthread],
- [CFLAGS value to build with pthreads]
- )],
- [CFLAGS_LIBEVENT=$enableval],
- [# See above about LIBISC_PTHREADS_NOTHREADS
- case "$CFLAGS_LIBEVENT" in
- '') CFLAGS_LIBEVENT="-pthread" ;;
- *) ;;
- esac]
-)
-AC_MSG_NOTICE([LIBISC_PTHREADS_NOTHREADS is <$LIBISC_PTHREADS_NOTHREADS>])
-AC_MSG_NOTICE([CFLAGS_LIBEVENT is <$CFLAGS_LIBEVENT>])
+dnl AC_ARG_ENABLE(
+dnl [cflags-libevent],
+dnl [AC_HELP_STRING(
+dnl [--enable-cflags-libevent=-pthread],
+dnl [CFLAGS value to build with pthreads]
+dnl )],
+dnl [CFLAGS_LIBEVENT=$enableval],
+dnl [# See above about LIBISC_PTHREADS_NOTHREADS
+dnl case "$CFLAGS_LIBEVENT" in
+dnl '') CFLAGS_LIBEVENT="-pthread" ;;
+dnl *) ;;
+dnl esac]
+dnl )
+dnl AC_MSG_NOTICE([LIBISC_PTHREADS_NOTHREADS is <$LIBISC_PTHREADS_NOTHREADS>])
+dnl AC_MSG_NOTICE([CFLAGS_LIBEVENT is <$CFLAGS_LIBEVENT>])
AM_CONDITIONAL([BUILD_LIBEVENT], [test "x$ntp_use_local_libevent" = "xyes"])
)
have_pthreads=no
case "$enable_thread_support" in
- yes)
+ no) ;;
+ *)
ol_found_pthreads=no
OL_THREAD_CHECK([ol_found_pthreads=yes])
case "$ol_found_pthreads" in
# thread cancellation fails to load libgcc_s with dlopen().
# We have to pass this all as linker options to avoid argument
# reordering by libtool.
+ # HMS: The fix below seems to break a number of test programs,
+ # as it means pthread_once() can't be found.
case "$GCC$with_gnu_ld" in
- yesyes)
+ Xyesyes)
AC_CHECK_LIB([gcc_s], [exit],
[PTHREAD_LIBS="$LTHREAD_LIBS -Wl,--no-as-needed,-lgcc_s,--as-needed"])
;;
OL_PTHREAD_TRY([-lpthreads],[ol_cv_pthread_lib_lpthreads])
+AC_MSG_NOTICE([ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>])
+
if test $ol_link_threads != no ; then
LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
esac
AC_LANG_RESTORE
+
+AC_SUBST(BUILD_THREAD)
+AC_SUBST(LTHREAD_LIBS)
+
])