summaryrefslogtreecommitdiff
path: root/databases/db3/patches/patch-ab
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2005-12-02 19:39:23 +0000
committerjoerg <joerg@pkgsrc.org>2005-12-02 19:39:23 +0000
commit1cebc7c9478c1940473cbbb05aeef38d57c6dd7a (patch)
tree764bacdfdd56b1abc500c3876846fca9cf0fb297 /databases/db3/patches/patch-ab
parent255f1d085f333bd016eb10a63f13367fa11b68fd (diff)
downloadpkgsrc-1cebc7c9478c1940473cbbb05aeef38d57c6dd7a.tar.gz
Add case for DragonFly and modify -lpthread detection to check for
-pthread as well. This can be simplified once PTHREAD_* on NetBSD is fixed.
Diffstat (limited to 'databases/db3/patches/patch-ab')
-rw-r--r--databases/db3/patches/patch-ab84
1 files changed, 78 insertions, 6 deletions
diff --git a/databases/db3/patches/patch-ab b/databases/db3/patches/patch-ab
index dbc71529a26..bde4d18c885 100644
--- a/databases/db3/patches/patch-ab
+++ b/databases/db3/patches/patch-ab
@@ -1,8 +1,17 @@
-$NetBSD: patch-ab,v 1.5 2004/04/07 15:13:06 jmmv Exp $
+$NetBSD: patch-ab,v 1.6 2005/12/02 19:39:23 joerg Exp $
--- ../dist/configure.orig 2001-07-13 03:34:11.000000000 +0200
+++ ../dist/configure 2004-04-07 17:02:25.000000000 +0200
-@@ -4329,6 +4329,7 @@
+@@ -2819,6 +2819,8 @@ bsdi*) optimize_def="-O2";;
+ freebsd*) optimize_def="-O2"
+ CPPFLAGS="-D_THREAD_SAFE $CPPFLAGS"
+ LIBS="-pthread";;
++dragonfly*)optimize_def="-O2"
++ LIBS="-pthread";;
+ hpux*) CPPFLAGS="-D_REENTRANT $CPPFLAGS";;
+ irix*) optimize_def="-O2"
+ CPPFLAGS="-D_SGI_MP_SOURCE $CPPFLAGS";;
+@@ -4329,6 +4331,7 @@ fi
if test "$GXX" = "yes"; then
CXXVERSION=`${MAKEFILE_CXX} --version`
case ${CXXVERSION} in
@@ -10,7 +19,7 @@ $NetBSD: patch-ab,v 1.5 2004/04/07 15:13:06 jmmv Exp $
1.*|2.[01234567].*|*-1.*|*-2.[01234567].*)
CXXFLAGS="-fhandle-exceptions $CXXFLAGS";;
*)
-@@ -8439,7 +8440,7 @@
+@@ -8439,7 +8442,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtoo
# Prevent multiple expansion
LIBTOOL="\$(SHELL) ./libtool"
@@ -19,7 +28,7 @@ $NetBSD: patch-ab,v 1.5 2004/04/07 15:13:06 jmmv Exp $
SOFLAGS="-rpath \$(libdir)"
SAVE_CC="${MAKEFILE_CC}"
-@@ -8449,7 +8450,7 @@
+@@ -8449,7 +8452,7 @@ MAKEFILE_CXX="\$(LIBTOOL) --mode=compile
MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${SAVE_CC}"
MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${SAVE_CXX}"
@@ -28,11 +37,74 @@ $NetBSD: patch-ab,v 1.5 2004/04/07 15:13:06 jmmv Exp $
INSTALLER="\$(LIBTOOL) --mode=install cp"
# Configure for shared libraries, static libraries, or both. If both are
-@@ -9165,6 +9166,7 @@
+@@ -9165,6 +9168,7 @@ if test "${ac_cv_lib_pthread_pthread_cre
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
-+LIBSO_LIBS="-lpthread $LIBSO_LIBS"
++LIBSO_LIBS="-lpthread"
cat >conftest.$ac_ext <<_ACEOF
#line 9169 "configure"
#include "confdefs.h"
+@@ -9211,6 +9215,62 @@ if test $ac_cv_lib_pthread_pthread_creat
+ TEST_LIBS="-lpthread $TEST_LIBS"
+ fi
+
++if test $ac_cv_lib_pthread_pthread_create != yes; then
++echo "$as_me:9161: checking for pthread_create in -pthread" >&5
++echo $ECHO_N "checking for pthread_create in -pthread... $ECHO_C" >&6
++if test "${ac_cv_pthread_pthread_create+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-pthread $LIBS"
++LIBSO_LIBS="-pthread"
++cat >conftest.$ac_ext <<_ACEOF
++#line 9169 "configure"
++#include "confdefs.h"
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char pthread_create ();
++int
++main ()
++{
++pthread_create ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:9188: \"$ac_link\"") >&5
++ (eval $ac_link) 2>&5
++ ac_status=$?
++ echo "$as_me:9191: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:9194: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:9197: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_pthread_pthread_create=yes
++else
++ echo "$as_me: failed program was:" >&5
++cat conftest.$ac_ext >&5
++ac_cv_pthread_pthread_create=no
++fi
++rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++echo "$as_me:9208: result: $ac_cv_pthread_pthread_create" >&5
++echo "${ECHO_T}$ac_cv_pthread_pthread_create" >&6
++if test $ac_cv_pthread_pthread_create = yes; then
++ TEST_LIBS="-pthread $TEST_LIBS"
++fi
++fi
++
+ # Checks for system/compiler characteristics.
+ echo "$as_me:9215: checking whether byte ordering is bigendian" >&5
+ echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6