summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/sntp/m4/ntp_libevent.m4
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-03 09:45:44 -0200
committerRenato Botelho <renato@netgate.com>2015-11-03 09:45:44 -0200
commitc7275b999acdea9746ff095cf10188b4a3d09b7a (patch)
treea95eeaad8a2157ed3641d93c98bdc108bcd728d4 /contrib/ntp/sntp/m4/ntp_libevent.m4
parent2b0a9fbf7a64ff2e54d03cebd5bc2d787026eaf8 (diff)
parentfe49fc6e1c94b6c41d1d3844ca219a76da3c70dc (diff)
downloadFreeBSD-src-c7275b999acdea9746ff095cf10188b4a3d09b7a.zip
FreeBSD-src-c7275b999acdea9746ff095cf10188b4a3d09b7a.tar.gz
Merge branch 'stable/10' into devel
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