$NetBSD: patch-ab,v 1.7 2008/05/01 23:41:21 wiz Exp $ --- ../dist/configure.orig 2001-07-13 01:34:11.000000000 +0000 +++ ../dist/configure @@ -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 + egcs*) CXXFLAGS="-fexceptions $CXXFLAGS";; 1.*|2.[01234567].*|*-1.*|*-2.[01234567].*) CXXFLAGS="-fhandle-exceptions $CXXFLAGS";; *) @@ -8439,7 +8442,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtoo # Prevent multiple expansion LIBTOOL="\$(SHELL) ./libtool" -SOSUFFIX=`sed -e '/^library_names_spec=/!d' -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/' ./libtool` +SOSUFFIX=`./libtool --config | sed -e '/^library_names_spec=/!d' -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/'` SOFLAGS="-rpath \$(libdir)" SAVE_CC="${MAKEFILE_CC}" @@ -8449,7 +8452,7 @@ MAKEFILE_CXX="\$(LIBTOOL) --mode=compile MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${SAVE_CC}" MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${SAVE_CXX}" -SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC} -avoid-version" +SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC}" INSTALLER="\$(LIBTOOL) --mode=install cp" # Configure for shared libraries, static libraries, or both. If both are @@ -8728,7 +8731,7 @@ echo "${ECHO_T}$JAVACABS" >&6 done JTOPDIR=`echo "$JAVACABS" | sed -e 's://*:/:g' -e 's:/[^/]*$::'` case "$host_os" in - darwin*) JTOPDIR=`echo "$JTOPDIR" | sed -e s:/[^/]*$::'` + darwin*) JTOPDIR=`echo "$JTOPDIR" | sed -e 's:/[^/]*$::'` JNIHEADERDIR="$JTOPDIR/Headers";; *) JNIHEADERDIR="$JTOPDIR/include";; esac @@ -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" 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