summaryrefslogtreecommitdiff
path: root/devel/apr0/files/patch-apr_threads.m4
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2004-01-24 03:36:43 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2004-01-24 03:36:43 +0000
commitfc9cc5d066807eec1f29ca8c3d20358d161de21b (patch)
tree75c3d30c0480b80062f2e41dab456e159354b83b /devel/apr0/files/patch-apr_threads.m4
parentChange the references to -STABLE and -CURRENT to 4.X and 5.X respectively (diff)
Correct pthread detection.
Submitted by: Craig Rodrigues <rodrigc@crodrigues.org> (maintainer) Tested by: kuriyama (on 4-stable and 5-current)
Notes
Notes: svn path=/head/; revision=98938
Diffstat (limited to 'devel/apr0/files/patch-apr_threads.m4')
-rw-r--r--devel/apr0/files/patch-apr_threads.m440
1 files changed, 40 insertions, 0 deletions
diff --git a/devel/apr0/files/patch-apr_threads.m4 b/devel/apr0/files/patch-apr_threads.m4
new file mode 100644
index 000000000000..bda6cbb72f4e
--- /dev/null
+++ b/devel/apr0/files/patch-apr_threads.m4
@@ -0,0 +1,40 @@
+--- apr-0.9.4/build/apr_threads.m4.orig Sun Nov 16 08:42:33 2003
++++ apr-0.9.4/build/apr_threads.m4 Fri Jan 23 12:25:00 2004
+@@ -110,6 +110,7 @@
+
+ AC_CACHE_CHECK([for CFLAGS needed for pthreads], [apr_cv_pthreads_cflags],
+ [apr_ptc_cflags=$CFLAGS
++ if test "x$ac_cv_pthreads_cflags" = "x"; then
+ for flag in none -kthread -pthread -pthreads -mthreads -Kthread -threads; do
+ CFLAGS=$apr_ptc_cflags
+ test "x$flag" != "xnone" && CFLAGS="$CFLAGS $flag"
+@@ -118,6 +119,11 @@
+ break
+ ])
+ done
++ else
++ if test "$ac_cv_pthreads_cflags" != "none"; then
++ apr_cv_pthreads_cflags="$ac_cv_pthreads_cflags"
++ fi
++ fi
+ CFLAGS=$apr_ptc_cflags
+ ])
+
+@@ -136,6 +142,7 @@
+
+ AC_CACHE_CHECK([for LIBS needed for pthreads], [apr_cv_pthreads_lib], [
+ apr_ptc_libs=$LIBS
++ if test "x$ac_cv_pthreads_lib" = "x"; then
+ for lib in -lpthread -lpthreads -lc_r; do
+ LIBS="$apr_ptc_libs $lib"
+ APR_PTHREADS_TRY_RUN([
+@@ -143,6 +150,9 @@
+ break
+ ])
+ done
++ else
++ test "x$ac_cv_pthreads_lib" != "xnone" && apr_cv_pthreads_lib="-l$ac_cv_pthreads_lib"
++ fi
+ LIBS=$apr_ptc_libs
+ ])
+