Index: guile-1.4/ltconfig
diff -c guile-1.4/ltconfig:1.1.1.1 guile-1.4/ltconfig:1.4
*** guile-1.4/ltconfig:1.1.1.1	Mon Aug 28 17:04:38 2000
--- guile-1.4/ltconfig	Sun Mar  4 15:38:24 2001
***************
*** 1,7 ****
  #! /bin/sh
  
  # ltconfig - Create a system-specific libtool.
! # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This file is free software; you can redistribute it and/or modify it
--- 1,7 ----
  #! /bin/sh
  
  # ltconfig - Create a system-specific libtool.
! # Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This file is free software; you can redistribute it and/or modify it
***************
*** 169,176 ****
  # Constants:
  PROGRAM=ltconfig
  PACKAGE=libtool
! VERSION=1.3.5
! TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  rm="rm -f"
--- 169,176 ----
  # Constants:
  PROGRAM=ltconfig
  PACKAGE=libtool
! VERSION=1.3.5a
! TIMESTAMP=" (1.385.2.236 2000/10/30 23:25:09)"
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  rm="rm -f"
***************
*** 372,378 ****
  if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
  if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
  
! if test -n "$cache_file" && test -r "$cache_file"; then
    echo "loading cache $cache_file within ltconfig"
    . $cache_file
  fi
--- 372,378 ----
  if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
  if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
  
! if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then
    echo "loading cache $cache_file within ltconfig"
    . $cache_file
  fi
***************
*** 623,648 ****
  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
!   ac_cv_exeext="no"
!   $rm conftest*
!   echo 'main () { return 0; }' > conftest.c
!   echo "$progname:629: checking for executable suffix" >& 5
!   if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
!     # Append any warnings to the config.log.
!     cat conftest.err 1>&5
! 
!     for ac_file in conftest.*; do
!       case $ac_file in
!       *.c | *.err | *.$objext ) ;;
!       *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
!       esac
!     done
!   else
!     cat conftest.err 1>&5
!     echo "$progname: failed program was:" >&5
!     cat conftest.c >&5
!   fi
!   $rm conftest*
  fi
  if test "X$ac_cv_exeext" = Xno; then
    exeext=""
--- 623,655 ----
  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
!   case "$host_os" in
!   cygwin* | mingw* | os2*)
!     ac_cv_exeext=.exe
!     ;;
!   *)
!     ac_cv_exeext="no"
!     $rm conftest*
!     echo 'main () { return 0; }' > conftest.c
!     echo "$progname:634: checking for executable suffix" >& 5
!     if { (eval echo $progname:635: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
!       # Append any warnings to the config.log.
!       cat conftest.err 1>&5
! 
!       for ac_file in conftest.*; do
!         case $ac_file in
!         *.c | *.err | *.$objext ) ;;
!         *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
!         esac
!       done
!     else
!       cat conftest.err 1>&5
!       echo "$progname: failed program was:" >&5
!       cat conftest.c >&5
!     fi
!     $rm conftest*
!     ;;
!   esac
  fi
  if test "X$ac_cv_exeext" = Xno; then
    exeext=""
***************
*** 696,704 ****
  else
    # PORTME Check for PIC flags for the system compiler.
    case "$host_os" in
!   aix3* | aix4*)
      # All AIX code is PIC.
!     link_static_flag='-bnso -bI:/lib/syscalls.exp'
      ;;
  
    hpux9* | hpux10* | hpux11*)
--- 703,716 ----
  else
    # PORTME Check for PIC flags for the system compiler.
    case "$host_os" in
!   aix3* | aix4* | aix5*)
      # All AIX code is PIC.
!     if test "$host_cpu" = ia64; then
!       # AIX 5 now supports IA64 processor
!       link_static_flag='-Bstatic'
!     else
!       link_static_flag='-bnso -bI:/lib/syscalls.exp'
!     fi
      ;;
  
    hpux9* | hpux10* | hpux11*)
***************
*** 773,780 ****
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $pic_flag -DPIC"
!   echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
!   if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
      # Append any warnings to the config.log.
      cat conftest.err 1>&5
      
--- 785,792 ----
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $pic_flag -DPIC"
!   echo "$progname:788: checking if $compiler PIC flag $pic_flag works" >&5
!   if { (eval echo $progname:789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
      # Append any warnings to the config.log.
      cat conftest.err 1>&5
      
***************
*** 826,833 ****
  chmod -w .
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -o out/conftest2.o"
! echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
! if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  
    # The compiler can only warn and ignore the option if not recognized
    # So say no if there are warnings
--- 838,845 ----
  chmod -w .
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -o out/conftest2.o"
! echo "$progname:841: checking if $compiler supports -c -o file.o" >&5
! if { (eval echo $progname:842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  
    # The compiler can only warn and ignore the option if not recognized
    # So say no if there are warnings
***************
*** 859,866 ****
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -c -o conftest.lo"
!   echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
! if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
--- 871,878 ----
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -c -o conftest.lo"
!   echo "$progname:874: checking if $compiler supports -c -o file.lo" >&5
! if { (eval echo $progname:875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
***************
*** 911,918 ****
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
!   echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
!   if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
--- 923,930 ----
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
!   echo "$progname:926: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
!   if { (eval echo $progname:927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
***************
*** 955,962 ****
  echo 'main(){return(0);}' > conftest.c
  save_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LDFLAGS $link_static_flag"
! echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
! if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    echo "$ac_t$link_static_flag" 1>&6
  else
    echo "$ac_t"none 1>&6
--- 967,974 ----
  echo 'main(){return(0);}' > conftest.c
  save_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LDFLAGS $link_static_flag"
! echo "$progname:970: checking if $compiler static flag $link_static_flag works" >&5
! if { (eval echo $progname:971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    echo "$ac_t$link_static_flag" 1>&6
  else
    echo "$ac_t"none 1>&6
***************
*** 988,994 ****
    if test "$with_gcc" = yes; then
      # Check if gcc -print-prog-name=ld gives a path.
      echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
!     echo "$progname:991: checking for ld used by GCC" >&5
      ac_prog=`($CC -print-prog-name=ld) 2>&5`
      case "$ac_prog" in
      # Accept absolute paths.
--- 1000,1006 ----
    if test "$with_gcc" = yes; then
      # Check if gcc -print-prog-name=ld gives a path.
      echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
!     echo "$progname:1003: checking for ld used by GCC" >&5
      ac_prog=`($CC -print-prog-name=ld) 2>&5`
      case "$ac_prog" in
      # Accept absolute paths.
***************
*** 1012,1021 ****
      esac
    elif test "$with_gnu_ld" = yes; then
      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
!     echo "$progname:1015: checking for GNU ld" >&5
    else
      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
!     echo "$progname:1018: checking for non-GNU ld" >&5
    fi
  
    if test -z "$LD"; then
--- 1024,1033 ----
      esac
    elif test "$with_gnu_ld" = yes; then
      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
!     echo "$progname:1027: checking for GNU ld" >&5
    else
      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
!     echo "$progname:1030: checking for non-GNU ld" >&5
    fi
  
    if test -z "$LD"; then
***************
*** 1115,1122 ****
  
    # See if GNU ld supports shared libraries.
    case "$host_os" in
!   aix3* | aix4*)
      # On AIX, the GNU linker is very broken
      ld_shlibs=no
      cat <<EOF 1>&2
  
--- 1127,1135 ----
  
    # See if GNU ld supports shared libraries.
    case "$host_os" in
!   aix3* | aix4* | aix5*)
      # On AIX, the GNU linker is very broken
+     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
      ld_shlibs=no
      cat <<EOF 1>&2
  
***************
*** 1194,1204 ****
  
    netbsd*)
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
        archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-     else
-       archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
-       # can we support soname and/or expsyms with a.out? -oliva
      fi
      ;;
  
--- 1207,1217 ----
  
    netbsd*)
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
+       wlarc=
+     else
        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
        archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
      fi
      ;;
  
***************
*** 1276,1313 ****
      fi
      ;;
  
!   aix4*)
!     hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
      hardcode_libdir_separator=':'
      if test "$with_gcc" = yes; then
        collect2name=`${CC} -print-prog-name=collect2`
        if test -f "$collect2name" && \
! 	 strings "$collect2name" | grep resolve_lib_name >/dev/null
        then
! 	# We have reworked collect2
! 	hardcode_direct=yes
        else
! 	# We have old collect2
! 	hardcode_direct=unsupported
! 	# It fails to find uninstalled libraries when the uninstalled
! 	# path is not listed in the libpath.  Setting hardcode_minus_L
! 	# to unsupported forces relinking
! 	hardcode_minus_L=yes
! 	hardcode_libdir_flag_spec='-L$libdir'
! 	hardcode_libdir_separator=
        fi
        shared_flag='-shared'
      else
!       shared_flag='${wl}-bM:SRE'
        hardcode_direct=yes
      fi
!     allow_undefined_flag=' ${wl}-berok'
!     archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
!     archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
!     case "$host_os" in aix4.[01]|aix4.[01].*)
!       # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
!       always_export_symbols=yes ;;
!     esac
     ;;
  
    amigaos*)
--- 1289,1365 ----
      fi
      ;;
  
!   aix4* | aix5*)
      hardcode_libdir_separator=':'
      if test "$with_gcc" = yes; then
        collect2name=`${CC} -print-prog-name=collect2`
        if test -f "$collect2name" && \
!         strings "$collect2name" | grep resolve_lib_name >/dev/null
        then
!         # We have reworked collect2
!         hardcode_direct=yes
        else
!         # We have old collect2
!         hardcode_direct=unsupported
!         # It fails to find uninstalled libraries when the uninstalled
!         # path is not listed in the libpath.  Setting hardcode_minus_L
!         # to unsupported forces relinking
!         hardcode_minus_L=yes
!         hardcode_libdir_flag_spec='-L$libdir'
!         hardcode_libdir_separator=
        fi
        shared_flag='-shared'
      else
!       if test "$host_cpu" = ia64; then
!         shared_flag='${wl}-G'
!       else
!         shared_flag='${wl}-bM:SRE'
!       fi
        hardcode_direct=yes
      fi
! 
!     if test "$host_cpu" = ia64; then
!       # On IA64, the linker does run time linking by default, so we don't
!       # have to do anything special.
!       aix_use_runtimelinking=no
!       exp_sym_flag='-Bexport'
!       no_entry_flag=""
!     else
!       # Test if we are trying to use run time linking, or normal AIX style linking.
!       # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
!       aix_use_runtimelinking=no
!       for ld_flag in $LDFLAGS; do
!         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
!           aix_use_runtimelinking=yes
!           break
!         fi
!       done
!       exp_sym_flag='-bexport'
!       no_entry_flag='${wl}-bnoentry'
!     fi
!     # It seems that -bexpall can do strange things, so it is better to
!     # generate a list of symbols to export.
!     always_export_symbols=yes
!     hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
!     if test "$aix_use_runtimelinking" = yes; then
!       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
!       allow_undefined_flag=' -Wl,-G'
!       archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${allow_undefined_flag} $no_entry_flag '"\${wl}$exp_sym_flag:\$export_symbols"
!     else
!       if test "$host_cpu" = ia64; then
!         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
!         allow_undefined_flag="-z nodefs"
!         archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname ${wl}-h$soname $libobjs $deplibs $linkopts ${wl}${allow_undefined_flag} $no_entry_flag '"\${wl}$exp_sym_flag:\$export_symbols"
!       else
!         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
!         # Warning - without using the other run time loading flags, -berok will
!         #           link without error, but may produce a broken library.
!         allow_undefined_flag="-berok"
!         # This is a bit strange, but is similar to how AIX traditionally builds
!         # it's shared libraries.
!         archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}${allow_undefined_flag} $no_entry_flag '"\${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
!       fi
!     fi
     ;;
  
    amigaos*)
***************
*** 1435,1442 ****
      else
        allow_undefined_flag=' -expect_unresolved \*'
        archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
      fi
!     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      hardcode_libdir_separator=:
      ;;
    rhapsody*)
--- 1487,1497 ----
      else
        allow_undefined_flag=' -expect_unresolved \*'
        archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
      fi
! #Both c and cxx compiler support -rpath directly 
!     hardcode_libdir_flag_spec='-rpath $libdir'
      hardcode_libdir_separator=:
      ;;
    rhapsody*)
***************
*** 1565,1571 ****
  	# Check to see if the nm accepts a BSD-compat flag.
  	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
  	#   nm: unknown option "B" ignored
! 	if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  	  NM="$ac_dir/nm -B"
  	  break
  	elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
--- 1620,1627 ----
  	# Check to see if the nm accepts a BSD-compat flag.
  	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
  	#   nm: unknown option "B" ignored
! 	# Tru64's nm complains that /dev/null is an invalid object file
! 	if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
  	  NM="$ac_dir/nm -B"
  	  break
  	elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
***************
*** 1650,1660 ****
  main(){nm_test_var='a';nm_test_func();return(0);}
  EOF
  
!   echo "$progname:1653: checking if global_symbol_pipe works" >&5
!   if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
      # Now try to grab the symbols.
      nlist=conftest.nm
!     if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  
        # Try sorting and uniquifying the output.
        if sort "$nlist" | uniq > "$nlist"T; then
--- 1706,1716 ----
  main(){nm_test_var='a';nm_test_func();return(0);}
  EOF
  
!   echo "$progname:1709: checking if global_symbol_pipe works" >&5
!   if { (eval echo $progname:1710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
      # Now try to grab the symbols.
      nlist=conftest.nm
!     if { echo "$progname:1713: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  
        # Try sorting and uniquifying the output.
        if sort "$nlist" | uniq > "$nlist"T; then
***************
*** 1706,1712 ****
  	  save_CFLAGS="$CFLAGS"
  	  LIBS="conftstm.$objext"
  	  CFLAGS="$CFLAGS$no_builtin_flag"
! 	  if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  	    pipe_works=yes
  	  else
  	    echo "$progname: failed program was:" >&5
--- 1762,1768 ----
  	  save_CFLAGS="$CFLAGS"
  	  LIBS="conftstm.$objext"
  	  CFLAGS="$CFLAGS$no_builtin_flag"
! 	  if { (eval echo $progname:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  	    pipe_works=yes
  	  else
  	    echo "$progname: failed program was:" >&5
***************
*** 1818,1833 ****
    soname_spec='${libname}${release}.so$major'
    ;;
  
! aix4*)
    version_type=linux
!   # AIX has no versioning support, so currently we can not hardcode correct
    # soname into executable. Probably we can add versioning support to
    # collect2, so additional links can be useful in future.
    # We preserve .a as extension for shared libraries though AIX4.2
    # and later linker supports .so
!   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
!   shlibpath_var=LIBPATH
!   deplibs_check_method=pass_all
    ;;
  
  amigaos*)
--- 1874,1905 ----
    soname_spec='${libname}${release}.so$major'
    ;;
  
! aix4* | aix5*)
    version_type=linux
!   if test "$host_cpu" = ia64; then
!     # AIX 5 supports IA64
!     library_names_spec='${libname}${release}.so$major  ${libname}${release}.so$versuffix ${libname}.so'
!     shlibpath_var=LD_LIBRARY_PATH
!     soname_spec='${libname}${release}.so$major'
!   else
!   # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
    # soname into executable. Probably we can add versioning support to
    # collect2, so additional links can be useful in future.
    # We preserve .a as extension for shared libraries though AIX4.2
    # and later linker supports .so
!     if test "$aix_use_runtimelinking" = yes; then
!       # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
!       # lib<name>.a to let people know that these are not typical AIX shared libraries.
!       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
!     else
!       # We preserve .a as extension for shared libraries though AIX4.2
!       # and later when we are not doing run time linking.
!       library_names_spec='${libname}${release}.a $libname.a'
!       soname_spec='${libname}${release}.so$major'
!     fi
!     shlibpath_var=LIBPATH
!     deplibs_check_method=pass_all
!   fi
    ;;
  
  amigaos*)
***************
*** 1906,1915 ****
    esac
    shlibpath_var=LD_LIBRARY_PATH
    case "$host_os" in
!   freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
      shlibpath_overrides_runpath=yes
      ;;
!   *) # from 3.2 on
      shlibpath_overrides_runpath=no
      ;;
    esac
--- 1978,1987 ----
    esac
    shlibpath_var=LD_LIBRARY_PATH
    case "$host_os" in
!   freebsd2*)
      shlibpath_overrides_runpath=yes
      ;;
!   *)
      shlibpath_overrides_runpath=no
      ;;
    esac
***************
*** 1951,1958 ****
    version_type=irix
    need_lib_prefix=no
    need_version=no
!   soname_spec='${libname}${release}.so.$major'
!   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
    case "$host_os" in
    irix5*)
      libsuff= shlibsuff=
--- 2023,2030 ----
    version_type=irix
    need_lib_prefix=no
    need_version=no
!   soname_spec='${libname}${release}.so$major'
!   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
    case "$host_os" in
    irix5*)
      libsuff= shlibsuff=
***************
*** 1994,2008 ****
    shlibpath_overrides_runpath=no
    deplibs_check_method=pass_all
  
!   if test -f /lib/ld.so.1; then
!     dynamic_linker='GNU ld.so'
!   else
!     # Only the GNU ld.so supports shared libraries on MkLinux.
!     case "$host_cpu" in
!     powerpc*) dynamic_linker=no ;;
!     *) dynamic_linker='Linux ld.so' ;;
!     esac
!   fi
    ;;
  
  netbsd*)
--- 2066,2078 ----
    shlibpath_overrides_runpath=no
    deplibs_check_method=pass_all
  
!   # We used to test for /lib/ld.so.1 and disable shared libraries on
!   # powerpc, because MkLinux only supported shared libraries with the
!   # GNU dynamic linker.  Since this was broken with cross compilers,
!   # most powerpc-linux boxes support dynamic linking these days and
!   # people can always --disable-shared, the test was removed, and we
!   # assume the GNU/Linux dynamic linker is in use.
!   dynamic_linker='GNU/Linux ld.so'
    ;;
  
  netbsd*)
***************
*** 2012,2017 ****
--- 2082,2090 ----
      finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
      dynamic_linker='NetBSD (a.out) ld.so'
    else
+     deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+     file_magic_cmd=/usr/bin/file
+     file_magic_test_file=`echo /usr/lib/libc.so*`
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
      soname_spec='${libname}${release}.so$major'
      dynamic_linker='NetBSD ld.elf_so'
***************
*** 2204,2210 ****
    fi
    ;;
  
! aix4*)
    test "$enable_shared" = yes && enable_static=no
    ;;
  esac
--- 2277,2283 ----
    fi
    ;;
  
! aix4* | aix5*)
    test "$enable_shared" = yes && enable_static=no
    ;;
  esac
***************
*** 2225,2230 ****
--- 2298,2308 ----
    enable_fast_install=needless
  fi
  
+ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+ if test "$with_gcc" = yes; then
+   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+ fi
+ 
  echo $ac_n "checking for objdir... $ac_c" 1>&6
  rm -f .libs 2>/dev/null
  mkdir .libs 2>/dev/null
***************
*** 2245,2251 ****
  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
    lt_cv_dlopen=no lt_cv_dlopen_libs=
  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
! echo "$progname:2248: checking for dlopen in -ldl" >&5
  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2323,2329 ----
  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
    lt_cv_dlopen=no lt_cv_dlopen_libs=
  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
! echo "$progname:2325: checking for dlopen in -ldl" >&5
  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2253,2259 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2256 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
--- 2331,2337 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2333 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
***************
*** 2266,2272 ****
  dlopen()
  ; return 0; }
  EOF
! if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2344,2350 ----
  dlopen()
  ; return 0; }
  EOF
! if { (eval echo $progname:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2285,2296 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dlopen""... $ac_c" 1>&6
! echo "$progname:2288: checking for dlopen" >&5
  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2293 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char dlopen(); below.  */
  #include <assert.h>
--- 2363,2374 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dlopen""... $ac_c" 1>&6
! echo "$progname:2365: checking for dlopen" >&5
  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2370 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char dlopen(); below.  */
  #include <assert.h>
***************
*** 2315,2321 ****
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_dlopen=yes"
  else
--- 2393,2399 ----
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_dlopen=yes"
  else
***************
*** 2331,2338 ****
    lt_cv_dlopen="dlopen"
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
! echo "$progname:2335: checking for dld_link in -ldld" >&5
  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2409,2455 ----
    lt_cv_dlopen="dlopen"
  else
    echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
+ echo "$progname:2412: checking for dlopen in -lsvld" >&5
+ if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lsvld  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 2419 "ltconfig"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ char dlopen();
+ 
+ int main() {
+ dlopen()
+ ; return 0; }
+ EOF
+ if { (eval echo $progname:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_lib_svld_dlopen=yes
+ else
+   echo "$progname: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   ac_cv_lib_svld_dlopen=no
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
+   echo "$ac_t""yes" 1>&6
+   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+ else
+   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
! echo "$progname:2451: checking for dld_link in -ldld" >&5
  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2340,2346 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2343 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
--- 2457,2463 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2459 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
***************
*** 2353,2359 ****
  dld_link()
  ; return 0; }
  EOF
! if { (eval echo $progname:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2470,2476 ----
  dld_link()
  ; return 0; }
  EOF
! if { (eval echo $progname:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2372,2383 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
! echo "$progname:2375: checking for shl_load" >&5
  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2380 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char shl_load(); below.  */
  #include <assert.h>
--- 2489,2500 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
! echo "$progname:2491: checking for shl_load" >&5
  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2496 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char shl_load(); below.  */
  #include <assert.h>
***************
*** 2402,2408 ****
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_shl_load=yes"
  else
--- 2519,2525 ----
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_shl_load=yes"
  else
***************
*** 2420,2426 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "$progname:2423: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2537,2543 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "$progname:2539: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2428,2434 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2431 "ltconfig"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 2545,2551 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2547 "ltconfig"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 2442,2448 ****
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo $progname:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2559,2565 ----
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo $progname:2561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2476,2483 ****
--- 2593,2604 ----
  
  fi
  
+ fi
+ 
    if test "x$lt_cv_dlopen" != xno; then
      enable_dlopen=yes
+   else
+     enable_dlopen=no
    fi
  
    case "$lt_cv_dlopen" in
***************
*** 2485,2501 ****
  for ac_hdr in dlfcn.h; do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "$progname:2488: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2493 "ltconfig"
  #include <$ac_hdr>
  int fnord = 0;
  EOF
  ac_try="$ac_compile >/dev/null 2>conftest.out"
! { (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2606,2622 ----
  for ac_hdr in dlfcn.h; do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "$progname:2608: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2613 "ltconfig"
  #include <$ac_hdr>
  int fnord = 0;
  EOF
  ac_try="$ac_compile >/dev/null 2>conftest.out"
! { (eval echo $progname:2618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2523,2529 ****
      LIBS="$lt_cv_dlopen_libs $LIBS"
  
    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2526: checking whether a program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2644,2650 ----
      LIBS="$lt_cv_dlopen_libs $LIBS"
  
    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2646: checking whether a program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2531,2537 ****
      lt_cv_dlopen_self=cross
    else
      cat > conftest.c <<EOF
! #line 2534 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
--- 2652,2658 ----
      lt_cv_dlopen_self=cross
    else
      cat > conftest.c <<EOF
! #line 2654 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
***************
*** 2577,2583 ****
  	       if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self=yes
  else
--- 2698,2704 ----
  	       if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self=yes
  else
***************
*** 2596,2602 ****
    if test "$lt_cv_dlopen_self" = yes; then
      LDFLAGS="$LDFLAGS $link_static_flag"
    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self_static+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2717,2723 ----
    if test "$lt_cv_dlopen_self" = yes; then
      LDFLAGS="$LDFLAGS $link_static_flag"
    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2719: checking whether a statically linked program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self_static+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2604,2610 ****
      lt_cv_dlopen_self_static=cross
    else
      cat > conftest.c <<EOF
! #line 2607 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
--- 2725,2731 ----
      lt_cv_dlopen_self_static=cross
    else
      cat > conftest.c <<EOF
! #line 2727 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
***************
*** 2650,2656 ****
      if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self_static=yes
  else
--- 2771,2777 ----
      if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self_static=yes
  else
***************
*** 2996,3001 ****
--- 3117,3126 ----
  # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  # the resulting binary.
  hardcode_shlibpath_var=$hardcode_shlibpath_var
+ 
+ # Variables whose values should be saved in libtool wrapper scripts and
+ # restored at relink time.
+ variables_saved_for_relink="$variables_saved_for_relink"
  
  # Compile-time system search path for libraries
  sys_lib_search_path_spec=$sys_lib_search_path_spec
Index: guile-1.4/ltmain.sh
diff -c guile-1.4/ltmain.sh:1.1.1.1 guile-1.4/ltmain.sh:1.2
*** guile-1.4/ltmain.sh:1.1.1.1	Mon Aug 28 17:04:38 2000
--- guile-1.4/ltmain.sh	Sun Mar  4 15:38:24 2001
***************
*** 1,7 ****
  # ltmain.sh - Provide generalized library-building support services.
  # NOTE: Changing this file will not affect anything until you rerun ltconfig.
  #
! # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This program is free software; you can redistribute it and/or modify
--- 1,7 ----
  # ltmain.sh - Provide generalized library-building support services.
  # NOTE: Changing this file will not affect anything until you rerun ltconfig.
  #
! # Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This program is free software; you can redistribute it and/or modify
***************
*** 54,61 ****
  # Constants.
  PROGRAM=ltmain.sh
  PACKAGE=libtool
! VERSION=1.3.5
! TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
  
  default_mode=
  help="Try \`$progname --help' for more information."
--- 54,61 ----
  # Constants.
  PROGRAM=ltmain.sh
  PACKAGE=libtool
! VERSION=1.3.5a
! TIMESTAMP=" (1.385.2.236 2000/10/30 23:25:09)"
  
  default_mode=
  help="Try \`$progname --help' for more information."
***************
*** 390,396 ****
      # Calculate the filename of the output object if compiler does
      # not support -o with -c
      if test "$compiler_c_o" = no; then
!       output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
        lockfile="$output_obj.lock"
        removelist="$removelist $output_obj $lockfile"
        trap "$run $rm $removelist; exit 1" 1 2 15
--- 390,396 ----
      # Calculate the filename of the output object if compiler does
      # not support -o with -c
      if test "$compiler_c_o" = no; then
!       output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
        lockfile="$output_obj.lock"
        removelist="$removelist $output_obj $lockfile"
        trap "$run $rm $removelist; exit 1" 1 2 15
***************
*** 402,408 ****
      # Lock this critical section if it is needed
      # We use this script file to make the link, it avoids creating a new file
      if test "$need_locks" = yes; then
!       until ln "$0" "$lockfile" 2>/dev/null; do
  	$show "Waiting for $lockfile to be removed"
  	sleep 2
        done
--- 402,408 ----
      # Lock this critical section if it is needed
      # We use this script file to make the link, it avoids creating a new file
      if test "$need_locks" = yes; then
!       until $run ln "$0" "$lockfile" 2>/dev/null; do
  	$show "Waiting for $lockfile to be removed"
  	sleep 2
        done
***************
*** 612,618 ****
  
      # Unlock the critical section if it was locked
      if test "$need_locks" != no; then
!       $rm "$lockfile"
      fi
  
      exit 0
--- 612,618 ----
  
      # Unlock the critical section if it was locked
      if test "$need_locks" != no; then
!       $run $rm "$lockfile"
      fi
  
      exit 0
***************
*** 1136,1146 ****
  	;;
  
        -static)
! 	# If we have no pic_flag, then this is the same as -all-static.
! 	if test -z "$pic_flag" && test -n "$link_static_flag"; then
! 	  compile_command="$compile_command $link_static_flag"
! 	  finalize_command="$finalize_command $link_static_flag"
! 	fi
  	continue
  	;;
  
--- 1136,1146 ----
  	;;
  
        -static)
!         # The effects of -static are defined in a previous loop.
! 	# We used to do the same as -all-static on platforms that
! 	# didn't have a PIC flag, but the assumption that the effects
! 	# would be equivalent was wrong.  It would break on at least
! 	# Digital Unix and AIX.
  	continue
  	;;
  
***************
*** 1302,1307 ****
--- 1302,1310 ----
  	  # are required to link).
  	  if test -n "$old_library"; then
  	    dlprefiles="$dlprefiles $dir/$old_library"
+ 	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+ 	  elif test -n "$dlname"; then
+ 	    dlprefiles="$dlprefiles $dir/$dlname"
  	  else
  	    dlprefiles="$dlprefiles $dir/$linklib"
  	  fi
***************
*** 1697,1703 ****
  
  	irix)
  	  major=`expr $current - $age + 1`
- 	  versuffix="$major.$revision"
  	  verstring="sgi$major.$revision"
  
  	  # Add in all the interfaces that we are compatible with.
--- 1700,1705 ----
***************
*** 1707,1712 ****
--- 1709,1718 ----
  	    loop=`expr $loop - 1`
  	    verstring="sgi$major.$iface:$verstring"
  	  done
+ 
+ 	  # Before this point, $major must not contain `.'.
+ 	  major=.$major
+ 	  versuffix="$major.$revision"
  	  ;;
  
  	linux)
***************
*** 2763,2768 ****
--- 2769,2786 ----
  
        # Quote the relink command for shipping.
        if test -n "$relink_command"; then
+ 	# Preserve any variables that may affect compiler behavior
+ 	for var in $variables_saved_for_relink; do
+ 	  if eval test -z \"\${$var+set}\"; then
+ 	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ 	  elif eval var_value=\$$var; test -z "$var_value"; then
+ 	    relink_command="$var=; export $var; $relink_command"
+ 	  else
+ 	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ 	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ 	  fi
+ 	done
+ 	relink_command="cd `pwd`; $relink_command"
  	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
        fi
  
***************
*** 3140,3146 ****
  
      # There may be an optional sh(1) argument at the beginning of
      # install_prog (especially on Windows NT).
!     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
        # Aesthetically quote it.
        arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
        case "$arg" in
--- 3158,3166 ----
  
      # There may be an optional sh(1) argument at the beginning of
      # install_prog (especially on Windows NT).
!     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
!        # Allow the use of GNU shtool's install command.
!        $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
        # Aesthetically quote it.
        arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
        case "$arg" in
