summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/sntp/m4/ntp_libevent.m4
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/sntp/m4/ntp_libevent.m4')
-rw-r--r--contrib/ntp/sntp/m4/ntp_libevent.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/ntp/sntp/m4/ntp_libevent.m4 b/contrib/ntp/sntp/m4/ntp_libevent.m4
index 54174f0..895360e 100644
--- a/contrib/ntp/sntp/m4/ntp_libevent.m4
+++ b/contrib/ntp/sntp/m4/ntp_libevent.m4
@@ -64,6 +64,7 @@ AC_REQUIRE([NTP_ENABLE_LOCAL_LIBEVENT])dnl
ntp_libevent_min_version=m4_default([$1], [2.0.9])
ntp_libevent_tearoff=m4_default([$2], [libevent])
+AC_SUBST([CFLAGS_LIBEVENT])
AC_SUBST([CPPFLAGS_LIBEVENT])
AC_SUBST([LDADD_LIBEVENT])
@@ -78,6 +79,7 @@ case "$ntp_use_local_libevent" in
then
ntp_use_local_libevent=no
AC_MSG_NOTICE([Using the installed libevent])
+ CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
# HMS: I hope the following is accurate.
# We don't need -levent, we only need -levent_core.
@@ -106,6 +108,9 @@ case "$ntp_use_local_libevent" in
AC_MSG_RESULT([yes])
else
ntp_use_local_libevent=yes
+ # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
+ # is "pthreads"?
+ CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
AC_MSG_RESULT([no])
fi
;;
@@ -129,6 +134,22 @@ case "$ntp_use_local_libevent" in
esac
esac
+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"])
]) dnl NTP_LIBEVENT_CHECK_NOBUILD
OpenPOWER on IntegriCloud