$OpenBSD: patch-dist_configure,v 1.9 2007/10/26 14:06:02 steven Exp $ --- dist/configure.orig Fri Aug 10 17:47:40 2007 +++ dist/configure Sat Sep 15 16:44:27 2007 @@ -849,7 +849,9 @@ MAKEFILE_CC MAKEFILE_CCLINK MAKEFILE_CXX MAKEFILE_CXXLINK -MAKEFILE_SOLINK +MAKEFILE_dbLINK +MAKEFILE_dbtclLINK +MAKEFILE_dbjavaLINK MAKEFILE_XSOLINK OSDIR POSTLINK @@ -13323,6 +13325,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib: fi output_verbose_link_cmd='echo' ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; osf3*) case $cc_basename in KCC*) @@ -21167,13 +21183,15 @@ echo "${ECHO_T}$JMODSUFFIX" >&6; } -INSTALLER="\$(LIBTOOL) --mode=install cp -p" +INSTALLER="\$(LIBTOOL) --mode=install \${BSD_INSTALL_PROGRAM} -p" MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${MAKEFILE_CC}" -MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -avoid-version" +MAKEFILE_dbLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} \${libdb_la_LDFLAGS}" +MAKEFILE_dbtclLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} \${libdb_tcl_la_LDFLAGS}" +MAKEFILE_dbjavaLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} \${libdb_java_la_LDFLAGS}" MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK}" MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${MAKEFILE_CXX}" -MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version" +MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} \${libdb_cxx_la_LDFLAGS}" MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}" LIBTOOL="\$(SHELL) ./libtool" @@ -21224,9 +21242,6 @@ else o=".lo" fi INSTALL_LIBS="$DEFAULT_LIB" -if test "$enable_static" = "yes"; then - INSTALL_LIBS="$INSTALL_LIBS \$(libdb)" -fi # Optional C++ API. if test "$db_cv_cxx" = "yes"; then @@ -21237,9 +21252,6 @@ if test "$db_cv_cxx" = "yes"; then DEFAULT_LIB_CXX="\$(libxso_target)" fi INSTALL_LIBS="$INSTALL_LIBS $DEFAULT_LIB_CXX" - if test "$enable_static" = "yes"; then - INSTALL_LIBS="$INSTALL_LIBS \$(libcxx)" - fi fi # Optional Java API. @@ -21360,13 +21372,22 @@ cat << \EOF > $JAVA_TEST public class Test { } EOF -if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' +if { ac_try='$JAVAC -source 1.3 -target 1.3 $JAVACFLAGS $JAVA_TEST' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } >/dev/null 2>&1; then + JAVACFLAGS="-source 1.3 -target 1.3 $JAVACFLAGS" ac_cv_prog_javac_works=yes +elif { ac_try='$JAVAC -target 1.3 $JAVACFLAGS $JAVA_TEST' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null 2>&1; then + JAVACFLAGS="-target 1.3 $JAVACFLAGS" + ac_cv_prog_javac_works=yes else { { echo "$as_me:$LINENO: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 echo "$as_me: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} @@ -21938,6 +21959,7 @@ if test "$_JTOPDIR" != "/usr"; then aix*) _JNI_INC_SUBDIRS="aix";; bsdi*) _JNI_INC_SUBDIRS="bsdos";; freebsd*) _JNI_INC_SUBDIRS="freebsd";; + openbsd*) _JNI_INC_SUBDIRS="openbsd";; hp*) _JNI_INC_SUBDIRS="hp-ux";; linux*) _JNI_INC_SUBDIRS="linux genunix";; osf*) _JNI_INC_SUBDIRS="alpha";; @@ -30504,7 +30526,7 @@ int main () { - #if (defined(i386) || defined(__i386__)) && defined(__GNUC__) + #if (defined(i386) || defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__) exit(0); #else FAIL TO COMPILE/LINK @@ -35352,7 +35374,7 @@ fi # Optional utilities. if test "$db_cv_dump185" = "yes"; then - ADDITIONAL_PROGS="db_dump185 $ADDITIONAL_PROGS" + ADDITIONAL_PROGS="db4_dump185 $ADDITIONAL_PROGS" fi # You can disable pieces of functionality to save space. @@ -36224,7 +36246,9 @@ MAKEFILE_CC!$MAKEFILE_CC$ac_delim MAKEFILE_CCLINK!$MAKEFILE_CCLINK$ac_delim MAKEFILE_CXX!$MAKEFILE_CXX$ac_delim MAKEFILE_CXXLINK!$MAKEFILE_CXXLINK$ac_delim -MAKEFILE_SOLINK!$MAKEFILE_SOLINK$ac_delim +MAKEFILE_dbLINK!$MAKEFILE_dbLINK$ac_delim +MAKEFILE_dbtclLINK!$MAKEFILE_dbtclLINK$ac_delim +MAKEFILE_dbjavaLINK!$MAKEFILE_dbjavaLINK$ac_delim MAKEFILE_XSOLINK!$MAKEFILE_XSOLINK$ac_delim OSDIR!$OSDIR$ac_delim POSTLINK!$POSTLINK$ac_delim @@ -36244,7 +36268,7 @@ DB_VERSION_PATCH!$DB_VERSION_PATCH$ac_delim DB_VERSION_STRING!$DB_VERSION_STRING$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 99; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5