Thu 16 Jun 2011 05:46:32 PM UTC, comment #6:
Here is the patch for the latest suggestion:
--- ax_pthread.m4.old 2011-06-16 19:31:18.549809899 +0200
+++ ax_pthread.m4 2011-06-16 19:44:01.933810275 +0200
@@ -33,6 +33,9 @@
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
+# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+# PTHREAD_PRIO_INHERIT symbol is defined when compiling with PTHREAD_CFLAGS.
+#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
@@ -78,7 +81,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 13
+#serial 14
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
@@ -266,6 +269,8 @@
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
[ax_cv_PTHREAD_PRIO_INHERIT=no])
])
+ AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
+ AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
|
Thu 16 Jun 2011 03:40:57 PM UTC, comment #4:
Uhm, yes. In my configure.ac it is used like this:
AX_PTHREAD
AS_IF([test "$ax_cv_PTHREAD_PRIO_INHERIT" = "yes"],
AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
I guess it makes sense to include that snippet directly into AX_PTHREAD.
|