$NetBSD: patch-ab,v 1.30 2004/02/05 20:14:06 skrll Exp $ --- configure.orig 2004-01-25 12:36:38.000000000 +0000 +++ configure @@ -4424,10 +4424,13 @@ beos*) lt_cv_deplibs_check_method=pass_all ;; -bsdi4*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so +# Versions of BSD/OS prior to 4.0 did no have real dynamic linking +bsdi1*|bsdi2*|bsdi3*) + dynamic_linker=no + ;; + +bsdi*) + lt_cv_deplibs_check_method=pass_all ;; cygwin*) @@ -8135,9 +8138,10 @@ beos*) shlibpath_var=LIBRARY_PATH ;; -bsdi4*) - version_type=linux +bsdi*) + version_type=sunox need_version=no + need_lib_prefix=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' @@ -8253,15 +8257,15 @@ kfreebsd*-gnu) freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + case $objformat in + elf*) + soname_spec='${libname}${release}${shared_ext}$major' need_version=no need_lib_prefix=no ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + *) need_version=yes ;; esac @@ -8340,12 +8344,7 @@ hpux9* | hpux10* | hpux11*) irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; + *) version_type=sunos ;; esac need_lib_prefix=no need_version=no @@ -8381,7 +8380,7 @@ linux*oldld* | linux*aout* | linux*coff* # This must be Linux ELF. linux*) - version_type=linux + version_type=sunos need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -8505,7 +8504,7 @@ sco3.2v5*) ;; solaris*) - version_type=linux + version_type=sunos need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10854,6 +10853,13 @@ if test -z "$aix_libpath"; then aix_libp if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= + # Determine if we need to override the c++rt0 that is + # picked up by analysing output_verbose_link_cmds + if test -f ${PREFIX}/lib/c++rt0/c++rt0.o.PIC; then + cpprt0_file="${PREFIX}/lib/c++rt0/c++rt0.o.PIC" + else + cpprt0_file= + fi hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no @@ -11226,6 +11232,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c esac done + case "$host_os" in + netbsd*) + if test -n "$cpprt0_file"; then + predep_objects_CXX=`eval echo $predep_objects_CXX | sed -e 's:/usr/lib/c++rt0.o:$cpprt0_file:'` + fi + ;; + esac + # Clean up. rm -f a.out a.exe else