$NetBSD: patch-ab,v 1.47 2004/12/18 17:42:24 grant Exp $ --- configure.orig 2004-09-19 22:22:04.000000000 +1000 +++ configure @@ -322,11 +322,11 @@ else if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + if test "X`(print -r - '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. - echo='print -r' + echo='print -r -' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. @@ -4534,6 +4534,10 @@ hpux10.20* | hpux11*) esac ;; +interix3*) + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; @@ -5690,12 +5694,7 @@ fi done - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc +ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -5925,8 +5924,6 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -fi - @@ -6909,9 +6906,11 @@ echo $ECHO_N "checking for $compiler opt ;; darwin* | rhapsody*) - # PIC is the default on this platform + # PIC is the default on this platform, and static linking of + # binaries generally doesn't work # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' + lt_prog_compiler_static='' ;; msdosdjgpp*) @@ -6940,6 +6939,11 @@ echo $ECHO_N "checking for $compiler opt esac ;; + interix3*) + # Interix 3.0-3.5 -fPIC option generates borked code. + # (Instead, shlibs are relocated at runtime.) + ;; + *) lt_prog_compiler_pic='-fPIC' ;; @@ -7325,6 +7329,17 @@ EOF fi ;; + interix3*) + # Oy, what a hack. + # Because shlibs are not compiled -fPIC due to broken code, we must + # choose an --image-base. Otherwise, 0x10000000 will be chosen for + # all libraries, leading to runtime relocations -- slow and very + # memory consuming. To do this, we pick a random 256KB-aligned + # start address between 0x50000000 and 0x6ffc0000 at link time. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + archive_expsym_cmds='sed s,^,_, $export_symbols >$output_objdir/$soname.exp && $CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file $wl$output_objdir/$soname.exp ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' @@ -7717,7 +7732,7 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -7832,6 +7847,21 @@ if test -z "$aix_libpath"; then aix_libp fi ;; + interix3*) + # Oy, what a hack. + # Because shlibs are not compiled -fPIC due to broken code, we must + # choose an --image-base. Otherwise, 0x10000000 will be chosen for + # all libraries, leading to runtime relocations -- slow and very + # memory consuming. To do this, we pick a random 256KB-aligned + # start address between 0x50000000 and 0x6ffc0000 at link time. + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + archive_expsym_cmds='sed s,^,_, $export_symbols >$output_objdir/$soname.exp && $CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file $wl$output_objdir/$soname ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + export_dynamic_flag_spec='${wl}-E' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-h,$libdir' + hardcode_shlibpath_var=no + ;; + irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' @@ -8223,6 +8253,7 @@ beos*) bsdi[45]*) version_type=linux 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' @@ -8337,16 +8368,17 @@ kfreebsd*-gnu) ;; freebsd*) + version_type=linux 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}' + case $objformat in + elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + 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' + *) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' need_version=yes ;; esac @@ -8422,15 +8454,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + 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=irix ;; esac need_lib_prefix=no need_version=no @@ -8507,11 +8546,11 @@ knetbsd*-gnu) ;; netbsd*) - version_type=sunos + version_type=linux need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else @@ -8542,10 +8581,10 @@ nto-qnx*) ;; openbsd*) - version_type=sunos + version_type=linux need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then @@ -10105,9 +10144,7 @@ echo "$as_me: error: tag name \"$tagname case $tagname in CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then + if test -n "$CXX" && test "X$CXX" != "Xno"; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -10659,7 +10696,7 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -10817,6 +10854,16 @@ if test -z "$aix_libpath"; then aix_libp ;; esac ;; + interix3*) + # Oy, what a hack. + # Because shlibs are not compiled -fPIC due to broken code, we must + # choose an --image-base. Otherwise, 0x10000000 will be chosen for + # all libraries, leading to runtime relocations -- slow and very + # memory consuming. To do this, we pick a random 256KB-aligned + # start address between 0x50000000 and 0x6ffc0000 at link time. + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + archive_expsym_cmds_CXX='sed s,^,_, $export_symbols >$output_objdir/$soname.exp && $CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file $wl$output_objdir/$soname ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + ;; irix5* | irix6*) case $cc_basename in CC) @@ -10934,14 +10981,29 @@ if test -z "$aix_libpath"; then aix_libp ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + # a.out is quite broken and goes directly to ld 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 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + elif $CC -dumpspecs | grep -- '-lgcc -lc -lgcc' >/dev/null; then + # Workaround some broken pre-1.5 ELF toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + else + # Modern ELF works sanely as-is + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + output_verbose_link_cmd='echo' fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken @@ -11324,6 +11386,21 @@ 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 + ;; + interix3*) + # Interix installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + esac + # Clean up. rm -f a.out a.exe else @@ -11371,9 +11448,11 @@ echo $ECHO_N "checking for $compiler opt lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) - # PIC is the default on this platform + # PIC is the default on this platform, and static linking of + # binaries generally doesn't work # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' + lt_prog_compiler_static_CXX='' ;; *djgpp*) # DJGPP does not support shared libraries at all @@ -11395,6 +11474,10 @@ echo $ECHO_N "checking for $compiler opt ;; esac ;; + interix3*) + # Interix 3.0-3.5 -fPIC option generates borked code. + # (Instead, shlibs are relocated at runtime.) + ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; @@ -11469,6 +11552,8 @@ echo $ECHO_N "checking for $compiler opt ;; esac ;; + interix3*) + ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC) @@ -11939,6 +12024,7 @@ beos*) bsdi[45]*) version_type=linux 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' @@ -12053,16 +12139,17 @@ kfreebsd*-gnu) ;; freebsd*) + version_type=linux 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}' + case $objformat in + elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + 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' + *) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' need_version=yes ;; esac @@ -12138,15 +12225,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + 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=irix ;; esac need_lib_prefix=no need_version=no @@ -12223,11 +12317,11 @@ knetbsd*-gnu) ;; netbsd*) - version_type=sunos + version_type=linux need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else @@ -12258,10 +12352,10 @@ nto-qnx*) ;; openbsd*) - version_type=sunos + version_type=linux need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then @@ -13805,9 +13899,11 @@ echo $ECHO_N "checking for $compiler opt ;; darwin* | rhapsody*) - # PIC is the default on this platform + # PIC is the default on this platform, and static linking of + # binaries generally doesn't work # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' + lt_prog_compiler_static_F77='' ;; msdosdjgpp*) @@ -13836,6 +13932,11 @@ echo $ECHO_N "checking for $compiler opt esac ;; + interix3*) + # Interix 3.0-3.5 -fPIC option generates borked code. + # (Instead, shlibs are relocated at runtime.) + ;; + *) lt_prog_compiler_pic_F77='-fPIC' ;; @@ -14221,6 +14322,17 @@ EOF fi ;; + interix3*) + # Oy, what a hack. + # Because shlibs are not compiled -fPIC due to broken code, we must + # choose an --image-base. Otherwise, 0x10000000 will be chosen for + # all libraries, leading to runtime relocations -- slow and very + # memory consuming. To do this, we pick a random 256KB-aligned + # start address between 0x50000000 and 0x6ffc0000 at link time. + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + archive_expsym_cmds_F77='sed s,^,_, $export_symbols >$output_objdir/$soname.exp && $CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file $wl$output_objdir/$soname.exp ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' @@ -14593,7 +14705,7 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -14708,6 +14820,21 @@ if test -z "$aix_libpath"; then aix_libp fi ;; + interix3*) + # Oy, what a hack. + # Because shlibs are not compiled -fPIC due to broken code, we must + # choose an --image-base. Otherwise, 0x10000000 will be chosen for + # all libraries, leading to runtime relocations -- slow and very + # memory consuming. To do this, we pick a random 256KB-aligned + # start address between 0x50000000 and 0x6ffc0000 at link time. + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + archive_expsym_cmds_F77='sed s,^,_, $export_symbols >$output_objdir/$soname.exp && $CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file $wl$output_objdir/$soname ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + export_dynamic_flag_spec_F77='${wl}-E' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-h,$libdir' + hardcode_shlibpath_var_F77=no + ;; + irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' @@ -15099,6 +15226,7 @@ beos*) bsdi[45]*) version_type=linux 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' @@ -15213,16 +15341,17 @@ kfreebsd*-gnu) ;; freebsd*) + version_type=linux 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}' + case $objformat in + elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + 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' + *) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' need_version=yes ;; esac @@ -15298,15 +15427,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + 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=irix ;; esac need_lib_prefix=no need_version=no @@ -15383,11 +15519,11 @@ knetbsd*-gnu) ;; netbsd*) - version_type=sunos + version_type=linux need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else @@ -15418,10 +15554,10 @@ nto-qnx*) ;; openbsd*) - version_type=sunos + version_type=linux need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then @@ -16147,9 +16283,11 @@ echo $ECHO_N "checking for $compiler opt ;; darwin* | rhapsody*) - # PIC is the default on this platform + # PIC is the default on this platform, and static linking of + # binaries generally doesn't work # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' + lt_prog_compiler_static_GCJ='' ;; msdosdjgpp*) @@ -16178,6 +16316,11 @@ echo $ECHO_N "checking for $compiler opt esac ;; + interix3*) + # Interix 3.0-3.5 -fPIC option generates borked code. + # (Instead, shlibs are relocated at runtime.) + ;; + *) lt_prog_compiler_pic_GCJ='-fPIC' ;; @@ -16563,6 +16706,17 @@ EOF fi ;; + interix3*) + # Oy, what a hack. + # Because shlibs are not compiled -fPIC due to broken code, we must + # choose an --image-base. Otherwise, 0x10000000 will be chosen for + # all libraries, leading to runtime relocations -- slow and very + # memory consuming. To do this, we pick a random 256KB-aligned + # start address between 0x50000000 and 0x6ffc0000 at link time. + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + archive_expsym_cmds_GCJ='sed s,^,_, $export_symbols >$output_objdir/$soname.exp && $CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file $wl$output_objdir/$soname.exp ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' @@ -16955,7 +17109,7 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -17070,6 +17224,21 @@ if test -z "$aix_libpath"; then aix_libp fi ;; + interix3*) + # Oy, what a hack. + # Because shlibs are not compiled -fPIC due to broken code, we must + # choose an --image-base. Otherwise, 0x10000000 will be chosen for + # all libraries, leading to runtime relocations -- slow and very + # memory consuming. To do this, we pick a random 256KB-aligned + # start address between 0x50000000 and 0x6ffc0000 at link time. + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + archive_expsym_cmds_GCJ='sed s,^,_, $export_symbols >$output_objdir/$soname.exp && $CC -shared $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file $wl$output_objdir/$soname ${wl}--image-base,$(($RANDOM %4096/2*262144+1342177280)) -o $lib' + export_dynamic_flag_spec_GCJ='${wl}-E' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-h,$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' @@ -17461,6 +17630,7 @@ beos*) bsdi[45]*) version_type=linux 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' @@ -17575,16 +17745,17 @@ kfreebsd*-gnu) ;; freebsd*) + version_type=linux 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}' + case $objformat in + elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + 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' + *) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' need_version=yes ;; esac @@ -17660,15 +17831,22 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + 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=irix ;; esac need_lib_prefix=no need_version=no @@ -17745,11 +17923,11 @@ knetbsd*-gnu) ;; netbsd*) - version_type=sunos + version_type=linux need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else @@ -17780,10 +17958,10 @@ nto-qnx*) ;; openbsd*) - version_type=sunos + version_type=linux need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix2' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then