[113871] trunk/base
cal at macports.org
cal at macports.org
Sun Nov 24 14:27:12 PST 2013
Revision: 113871
https://trac.macports.org/changeset/113871
Author: cal at macports.org
Date: 2013-11-24 14:27:12 -0800 (Sun, 24 Nov 2013)
Log Message:
-----------
configure.ac: Check for tracemode in a more generic fashion in an attempt to deal with #41524
Modified Paths:
--------------
trunk/base/aclocal.m4
trunk/base/configure.ac
Modified: trunk/base/aclocal.m4
===================================================================
--- trunk/base/aclocal.m4 2013-11-24 22:15:00 UTC (rev 113870)
+++ trunk/base/aclocal.m4 2013-11-24 22:27:12 UTC (rev 113871)
@@ -1176,3 +1176,57 @@
AC_SUBST(OS_PLATFORM)
AC_SUBST(OS_MAJOR)
])
+
+#------------------------------------------------------------------------
+# MP_TRACEMODE_SUPPORT --
+#
+# Check whether trace mode is supported on this platform
+#
+# Arguments:
+# none.
+#
+# Requires:
+# OS_PLATOFRM and OS_MAJOR from MP_TCL_PLATFORM.
+#
+# Depends:
+# none.
+#
+# Results:
+# Defines the TRACEMODE_SUPPORT substitution and the
+# HAVE_TRACEMODE_SUPPORT macro.
+#
+#------------------------------------------------------------------------
+AC_DEFUN([MP_TRACEMODE_SUPPORT],[
+ AC_REQUIRE([MP_TCL_PLATFORM])
+
+ AC_CHECK_FUNCS([kqueue kevent])
+
+ AC_MSG_CHECKING([whether trace mode is supported on this platform])
+ if test x"${OS_PLATFORM}" != "xdarwin"; then
+ AC_MSG_RESULT([not darwin, no])
+ TRACEMODE_SUPPORT=0
+ elif test x"${ac_cv_func_kqueue}" != "xyes"; then
+ AC_MSG_RESULT([kqueue() not available, no])
+ TRACEMODE_SUPPORT=0
+ elif test x"${ac_cv_func_kevent}" != "xyes"; then
+ AC_MSG_RESULT([kevent() not available, no])
+ TRACEMODE_SUPPORT=0
+ else
+ AC_EGREP_CPP(yes_have_ev_receipt, [
+ #include <sys/types.h>
+ #include <sys/event.h>
+ #include <sys/time.h>
+ #ifdef EV_RECEIPT
+ yes_have_ev_receipt
+ #endif
+ ],[
+ AC_MSG_RESULT([yes])
+ TRACEMODE_SUPPORT=1
+ ],[
+ AC_MSG_RESULT([EV_RECEIPT not available, no])
+ TRACEMODE_SUPPORT=0
+ ])
+ fi
+ AC_SUBST(TRACEMODE_SUPPORT)
+ AC_DEFINE_UNQUOTED([HAVE_TRACEMODE_SUPPORT], [$TRACEMODE_SUPPORT], [Platform supports tracemode.])
+])
Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac 2013-11-24 22:15:00 UTC (rev 113870)
+++ trunk/base/configure.ac 2013-11-24 22:27:12 UTC (rev 113871)
@@ -307,6 +307,9 @@
AC_DEFINE([sqlite3_prepare_v2], [sqlite3_prepare], [define sqlite3_prepare to sqlite_prepare_v2 if the latter is not available])
fi
+# check whether trace mode is supported on this platform
+MP_TRACEMODE_SUPPORT
+
# Determine if we need to install some bundled packages
OUR_INCLUDED_PACKAGES=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131124/7f3967b8/attachment.html>
More information about the macports-changes
mailing list