$NetBSD: patch-ad,v 1.32 2007/10/07 12:31:59 joerg Exp $ --- libltdl/configure.orig 2007-10-05 18:47:59.000000000 +0200 +++ libltdl/configure @@ -630,11 +630,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. @@ -4393,6 +4393,10 @@ interix[3-9]*) lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; +interix3*) + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; @@ -4423,7 +4427,7 @@ newos6*) ;; nto-qnx*) - lt_cv_deplibs_check_method=unknown + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|S\.a)$' ;; openbsd*) @@ -6095,12 +6099,7 @@ else fi - - -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=cpp +ac_ext=cpp 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' @@ -6326,8 +6325,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 - ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' @@ -7329,7 +7326,10 @@ for cc_temp in $compiler""; do *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# Return the actual command name, not our pkgsrc wrapper name because several +# decisions are made only based on compiler names +new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null` || new_cc_temp="$cc_temp" +cc_basename=`$echo "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -7632,9 +7632,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='' ;; interix[3-9]*) @@ -7668,6 +7670,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' ;; @@ -7822,6 +7829,10 @@ echo $ECHO_N "checking for $compiler opt lt_prog_compiler_static='-Bstatic' ;; + nto-qnx*) + lt_prog_compiler_pic='-fPIC' + ;; + *) lt_prog_compiler_can_build_shared=no ;; @@ -8058,7 +8069,10 @@ echo $ECHO_N "checking whether the $comp *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# Return the actual command name, not our pkgsrc wrapper name because several +# decisions are made only based on compiler names +new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null` || new_cc_temp="$cc_temp" +cc_basename=`$echo "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -8227,6 +8241,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' @@ -8292,6 +8317,11 @@ _LT_EOF hardcode_shlibpath_var=no ;; + nto-qnx*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -8759,6 +8789,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' @@ -8984,6 +9029,13 @@ if test -z "$aix_libpath"; then aix_libp hardcode_shlibpath_var=no ;; + nto-qnx*) + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + *) ld_shlibs=no ;; @@ -9200,6 +9252,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' @@ -9298,7 +9351,7 @@ freebsd1*) dynamic_linker=no ;; -freebsd* | dragonfly*) +freebsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -9312,7 +9365,7 @@ freebsd* | dragonfly*) 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}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' need_version=no need_lib_prefix=no ;; @@ -9342,6 +9395,16 @@ freebsd* | dragonfly*) esac ;; +dragonfly*) + version_type=linux # XXX tv this should be =linux; current selection has problems + need_version=no + need_lib_prefix=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + gnu*) version_type=linux need_lib_prefix=no @@ -9410,15 +9473,22 @@ interix[3-9]*) hardcode_into_libs=yes ;; +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 @@ -9483,11 +9553,11 @@ linux* | k*bsd*-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 @@ -9512,13 +9582,14 @@ nto-qnx*) need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + dynamic_linker='QNX libc.so' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) - version_type=sunos + version_type=linux sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. @@ -9526,7 +9597,7 @@ openbsd*) openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 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 @@ -11096,9 +11167,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=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -11203,7 +11272,10 @@ for cc_temp in $compiler""; do *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# Return the actual command name, not our pkgsrc wrapper name because several +# decisions are made only based on compiler names +new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null` || new_cc_temp="$cc_temp" +cc_basename=`$echo "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the @@ -11866,6 +11938,16 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; + 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*) @@ -12019,14 +12101,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 @@ -12339,6 +12436,11 @@ if test -z "$aix_libpath"; then aix_libp # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; + nto-qnx*) + 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' + ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -12449,6 +12551,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 @@ -12554,9 +12671,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 @@ -12582,6 +12701,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' ;; @@ -12660,6 +12783,8 @@ echo $ECHO_N "checking for $compiler opt # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; + interix3*) + ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) @@ -12799,6 +12924,8 @@ echo $ECHO_N "checking for $compiler opt ;; vxworks*) ;; + nto-qnx*) + ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; @@ -13171,6 +13298,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' @@ -13268,7 +13396,7 @@ freebsd1*) dynamic_linker=no ;; -freebsd* | dragonfly*) +freebsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -13282,7 +13410,7 @@ freebsd* | dragonfly*) 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}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' need_version=no need_lib_prefix=no ;; @@ -13312,6 +13440,16 @@ freebsd* | dragonfly*) esac ;; +dragonfly*) + version_type=linux # XXX tv this should be =linux; current selection has problems + need_version=no + need_lib_prefix=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + gnu*) version_type=linux need_lib_prefix=no @@ -13380,15 +13518,22 @@ interix[3-9]*) hardcode_into_libs=yes ;; +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 @@ -13453,11 +13598,11 @@ linux* | k*bsd*-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 @@ -13482,13 +13627,14 @@ nto-qnx*) need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + dynamic_linker='QNX libc.so' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) - version_type=sunos + version_type=linux sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. @@ -13496,7 +13642,7 @@ openbsd*) openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 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 @@ -14194,7 +14340,10 @@ for cc_temp in $compiler""; do *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# Return the actual command name, not our pkgsrc wrapper name because several +# decisions are made only based on compiler names +new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null` || new_cc_temp="$cc_temp" +cc_basename=`$echo "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 @@ -14275,9 +14424,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='' ;; interix[3-9]*) @@ -14311,6 +14462,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' ;; @@ -14465,6 +14621,10 @@ echo $ECHO_N "checking for $compiler opt lt_prog_compiler_static_F77='-Bstatic' ;; + nto-qnx*) + lt_prog_compiler_pic_F77='-fPIC' + ;; + *) lt_prog_compiler_can_build_shared_F77=no ;; @@ -14701,7 +14861,10 @@ echo $ECHO_N "checking whether the $comp *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# Return the actual command name, not our pkgsrc wrapper name because several +# decisions are made only based on compiler names +new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null` || new_cc_temp="$cc_temp" +cc_basename=`$echo "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -14870,6 +15033,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' @@ -14935,6 +15109,11 @@ _LT_EOF hardcode_shlibpath_var_F77=no ;; + nto-qnx*) + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -15382,6 +15561,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' @@ -15607,6 +15801,13 @@ if test -z "$aix_libpath"; then aix_libp hardcode_shlibpath_var_F77=no ;; + nto-qnx*) + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + *) ld_shlibs_F77=no ;; @@ -15772,6 +15973,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' @@ -15869,7 +16071,7 @@ freebsd1*) dynamic_linker=no ;; -freebsd* | dragonfly*) +freebsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -15883,7 +16085,7 @@ freebsd* | dragonfly*) 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}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' need_version=no need_lib_prefix=no ;; @@ -15913,6 +16115,16 @@ freebsd* | dragonfly*) esac ;; +dragonfly*) + version_type=linux # XXX tv this should be =linux; current selection has problems + need_version=no + need_lib_prefix=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + gnu*) version_type=linux need_lib_prefix=no @@ -15981,15 +16193,22 @@ interix[3-9]*) hardcode_into_libs=yes ;; +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 @@ -16054,11 +16273,11 @@ linux* | k*bsd*-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 @@ -16083,13 +16302,14 @@ nto-qnx*) need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + dynamic_linker='QNX libc.so' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) - version_type=sunos + version_type=linux sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. @@ -16097,7 +16317,7 @@ openbsd*) openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 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 @@ -16755,7 +16975,10 @@ for cc_temp in $compiler""; do *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# Return the actual command name, not our pkgsrc wrapper name because several +# decisions are made only based on compiler names +new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null` || new_cc_temp="$cc_temp" +cc_basename=`$echo "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. @@ -16860,9 +17083,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='' ;; interix[3-9]*) @@ -16896,6 +17121,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' ;; @@ -17050,6 +17280,10 @@ echo $ECHO_N "checking for $compiler opt lt_prog_compiler_static_GCJ='-Bstatic' ;; + nto-qnx*) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + *) lt_prog_compiler_can_build_shared_GCJ=no ;; @@ -17286,7 +17520,10 @@ echo $ECHO_N "checking whether the $comp *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# Return the actual command name, not our pkgsrc wrapper name because several +# decisions are made only based on compiler names +new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null` || new_cc_temp="$cc_temp" +cc_basename=`$echo "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) @@ -17455,6 +17692,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' @@ -17520,6 +17768,11 @@ _LT_EOF hardcode_shlibpath_var_GCJ=no ;; + nto-qnx*) + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' @@ -17987,6 +18240,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' @@ -18212,6 +18480,13 @@ if test -z "$aix_libpath"; then aix_libp hardcode_shlibpath_var_GCJ=no ;; + nto-qnx*) + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + *) ld_shlibs_GCJ=no ;; @@ -18377,6 +18652,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' @@ -18474,7 +18750,7 @@ freebsd1*) dynamic_linker=no ;; -freebsd* | dragonfly*) +freebsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -18488,7 +18764,7 @@ freebsd* | dragonfly*) 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}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' need_version=no need_lib_prefix=no ;; @@ -18518,6 +18794,16 @@ freebsd* | dragonfly*) esac ;; +dragonfly*) + version_type=linux # XXX tv this should be =linux; current selection has problems + need_version=no + need_lib_prefix=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + gnu*) version_type=linux need_lib_prefix=no @@ -18586,15 +18872,22 @@ interix[3-9]*) hardcode_into_libs=yes ;; +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 @@ -18659,11 +18952,11 @@ linux* | k*bsd*-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 @@ -18688,13 +18981,14 @@ nto-qnx*) need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + dynamic_linker='QNX libc.so' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) - version_type=sunos + version_type=linux sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. @@ -18702,7 +18996,7 @@ openbsd*) openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 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 @@ -19359,7 +19653,10 @@ for cc_temp in $compiler""; do *) break;; esac done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +# Return the actual command name, not our pkgsrc wrapper name because several +# decisions are made only based on compiler names +new_cc_temp=`$cc_temp --wrappee-name 2>/dev/null` || new_cc_temp="$cc_temp" +cc_basename=`$echo "X$new_cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes