New libtool: 1.0e.
authorJim Blandy <jimb@red-bean.com>
Wed, 22 Oct 1997 20:58:02 +0000 (20:58 +0000)
committerJim Blandy <jimb@red-bean.com>
Wed, 22 Oct 1997 20:58:02 +0000 (20:58 +0000)
* ltconfig, ltmain.sh, config.sub, config.guess: Updated.
* configure, aclocal.m4: Regenerated.

aclocal.m4
config.guess
config.sub
configure
ltconfig
ltmain.sh

index a0bbab6..c42a31f 100644 (file)
@@ -252,7 +252,7 @@ done<<>>dnl>>)
 changequote([,]))])
 
 
-# serial 12 AM_PROG_LIBTOOL
+# serial 15 AM_PROG_LIBTOOL
 AC_DEFUN(AM_PROG_LIBTOOL,
 [AC_REQUIRE([AC_CANONICAL_HOST])
 AC_REQUIRE([AC_PROG_RANLIB])
@@ -262,7 +262,7 @@ AC_REQUIRE([AM_PROG_NM])
 AC_REQUIRE([AC_PROG_LN_S])
 
 # Always use our own libtool.
-LIBTOOL='$(top_builddir)/libtool'
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 AC_SUBST(LIBTOOL)
 
 dnl Allow the --disable-shared flag to stop us from building shared libs.
@@ -334,7 +334,9 @@ if test "$ac_cv_prog_gcc" = yes; then
   ac_prog=`($CC -print-prog-name=ld) 2>&5`
   case "$ac_prog" in
   # Accept absolute paths.
-  /*) ;;
+  /*)
+    test -z "$LD" && LD="$ac_prog"
+    ;;
   "")
     # If it fails, then pretend we aren't using GCC.
     ac_prog=ld
@@ -350,12 +352,7 @@ else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
 AC_CACHE_VAL(ac_cv_path_LD,
-[LD=${LD-$ac_prog}
-case "$LD" in
-  /*)
-  ac_cv_path_LD="$LD" # Let the user override the test with a path.
-  ;;
-  *)
+[if test -z "$LD"; then
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
   for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
@@ -372,8 +369,9 @@ case "$LD" in
     fi
   done
   IFS="$ac_save_ifs"
-  ;;
-esac])
+else
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
 LD="$ac_cv_path_LD"
 if test -n "$LD"; then
   AC_MSG_RESULT($LD)
@@ -405,7 +403,7 @@ AC_CACHE_VAL(ac_cv_path_NM,
   ;;
 *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in /usr/ucb:$PATH:/bin; do
+  for ac_dir in /usr/ucb $PATH /bin; do
     test -z "$ac_dir" && dir=.
     if test -f $ac_dir/nm; then
       # Check to see if the nm accepts a BSD-compat flag.
index ea44a2a..413ed41 100755 (executable)
@@ -52,11 +52,53 @@ trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     alpha:OSF1:*:*)
+       if test $UNAME_RELEASE = "V4.0"; then
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+       fi
        # A Vn.n version is a released version.
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
+       cat <<EOF >dummy.s
+       .globl main
+       .ent main
+main:
+       .frame \$30,0,\$26,0
+       .prologue 0
+       .long 0x47e03d80 # implver $0
+       lda \$2,259
+       .long 0x47e20c21 # amask $2,$1
+       srl \$1,8,\$2
+       sll \$2,2,\$2
+       sll \$0,3,\$0
+       addl \$1,\$0,\$0
+       addl \$2,\$0,\$0
+       ret \$31,(\$26),1
+       .end main
+EOF
+       ${CC-cc} dummy.s -o dummy 2>/dev/null
+       if test "$?" = 0 ; then
+               ./dummy
+               case "$?" in
+                       7)
+                               UNAME_MACHINE="alpha"
+                               ;;
+                       15)
+                               UNAME_MACHINE="alphaev5"
+                               ;;
+                       14)
+                               UNAME_MACHINE="alphaev56"
+                               ;;
+                       10)
+                               UNAME_MACHINE="alphapca56"
+                               ;;
+                       16)
+                               UNAME_MACHINE="alphaev6"
+                               ;;
+               esac
+       fi
+       rm -f dummy.s dummy
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
        exit 0 ;;
     21064:Windows_NT:50:3)
        echo alpha-dec-winnt3.5
@@ -91,6 +133,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit 0;;
+    arm32:NetBSD:*:*)
+       echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+       exit 0 ;;
     SR2?01:HI-UX/MPP:*:*)
        echo hppa1.1-hitachi-hiuxmpp
        exit 0;;
@@ -129,6 +174,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun3*:SunOS:*:*)
        echo m68k-sun-sunos${UNAME_RELEASE}
        exit 0 ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit 0 ;;
     aushp:SunOS:*:*)
        echo sparc-auspex-sunos${UNAME_RELEASE}
        exit 0 ;;
@@ -423,6 +480,9 @@ EOF
     i*:CYGWIN*:*)
        echo i386-pc-cygwin32
        exit 0 ;;
+    i*:MINGW*:*)
+       echo i386-pc-mingw32
+       exit 0 ;;
     p*:CYGWIN*:*)
        echo powerpcle-unknown-cygwin32
        exit 0 ;;
@@ -436,27 +496,73 @@ EOF
        # The BFD linker knows what the default object file format is, so
        # first see if it will tell us.
        ld_help_string=`ld --help 2>&1`
-       if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
-         echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
-         echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
-         echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
-         echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
-         echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
-         echo "powerpc-unknown-linux-gnu" ; exit 0
-       elif test "${UNAME_MACHINE}" = "alpha" ; then
-         echo alpha-unknown-linux-gnu ; exit 0
-       elif test "${UNAME_MACHINE}" = "sparc" ; then
-         echo sparc-unknown-linux-gnu ; exit 0
+       ld_supported_emulations=`echo $ld_help_string \
+                        | sed -ne '/supported emulations:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported emulations: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_emulations" in
+         i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
+         i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
+         sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+         m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+         elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
+       esac
+
+       if test "${UNAME_MACHINE}" = "alpha" ; then
+               sed 's/^        //'  <<EOF >dummy.s
+               .globl main
+               .ent main
+       main:
+               .frame \$30,0,\$26,0
+               .prologue 0
+               .long 0x47e03d80 # implver $0
+               lda \$2,259
+               .long 0x47e20c21 # amask $2,$1
+               srl \$1,8,\$2
+               sll \$2,2,\$2
+               sll \$0,3,\$0
+               addl \$1,\$0,\$0
+               addl \$2,\$0,\$0
+               ret \$31,(\$26),1
+               .end main
+EOF
+               LIBC=""
+               ${CC-cc} dummy.s -o dummy 2>/dev/null
+               if test "$?" = 0 ; then
+                       ./dummy
+                       case "$?" in
+                       7)
+                               UNAME_MACHINE="alpha"
+                               ;;
+                       15)
+                               UNAME_MACHINE="alphaev5"
+                               ;;
+                       14)
+                               UNAME_MACHINE="alphaev56"
+                               ;;
+                       10)
+                               UNAME_MACHINE="alphapca56"
+                               ;;
+                       16)
+                               UNAME_MACHINE="alphaev6"
+                               ;;
+                       esac    
+
+                       objdump --private-headers dummy | \
+                         grep ld.so.1 > /dev/null
+                       if test "$?" = 0 ; then
+                               LIBC="libc1"
+                       fi
+               fi      
+               rm -f dummy.s dummy
+               echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
        elif test "${UNAME_MACHINE}" = "mips" ; then
          cat >dummy.c <<EOF
 main(argc, argv)
-int argc;
-char *argv[];
+     int argc;
+     char *argv[];
 {
 #ifdef __MIPSEB__
   printf ("%s-unknown-linux-gnu\n", argv[1]);
@@ -470,20 +576,41 @@ EOF
          ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
          rm -f dummy.c dummy
        else
-         # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
-         # useful --help.  Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
-         test ! -d /usr/lib/ldscripts/. \
-           && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+         # Either a pre-BFD a.out linker (linux-gnuoldld)
+         # or one that does not give us useful --help.
+         # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+         # If ld does not provide *any* "supported emulations:"
+         # that means it is gnuoldld.
+         echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+         test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+         case "${UNAME_MACHINE}" in
+         i?86)
+           VENDOR=pc;
+           ;;
+         *)
+           VENDOR=unknown;
+           ;;
+         esac
          # Determine whether the default compiler is a.out or elf
          cat >dummy.c <<EOF
+#include <features.h>
 main(argc, argv)
-int argc;
-char *argv[];
+     int argc;
+     char *argv[];
 {
 #ifdef __ELF__
-  printf ("%s-pc-linux-gnu\n", argv[1]);
+# ifdef __GLIBC__
+#  if __GLIBC__ >= 2
+    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+#  else
+    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+#  endif
+# else
+   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
 #else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
+  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
 #endif
   return 0;
 }
@@ -496,6 +623,14 @@ EOF
     i?86:DYNIX/ptx:4*:*)
        echo i386-sequent-sysv4
        exit 0 ;;
+    i?86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit 0 ;;
     i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
                echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
@@ -517,6 +652,11 @@ EOF
                echo ${UNAME_MACHINE}-pc-sysv32
        fi
        exit 0 ;;
+    pc:*:*:*)
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit 0 ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
        exit 0 ;;
@@ -592,6 +732,9 @@ EOF
     mc68*:A/UX:*:*)
        echo m68k-apple-aux${UNAME_RELEASE}
        exit 0 ;;
+    news*:NEWS-OS:*:6*)
+       echo mips-sony-newsos6
+       exit 0 ;;
     R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
        if [ -d /usr/nec ]; then
                echo mips-nec-sysv${UNAME_RELEASE}
index 0131946..213a6d4 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+#   Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 # can handle that machine.  It does not imply ALL GNU software can.
@@ -149,13 +149,14 @@ esac
 case $basic_machine in
        # Recognize the basic CPU types without company name.
        # Some are omitted here because they have special meanings below.
-       tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arm \
-               | arme[lb] | pyramid | mn10300 \
+       tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+               | arme[lb] | pyramid | mn10200 | mn10300 \
                | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
-               | alpha | we32k | ns16k | clipper | i370 | sh \
-               | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
-               | pdp11 | mips64el | mips64orion | mips64orionel \
-               | sparc | sparclet | sparclite | sparc64)
+               | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
+               | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
+               | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
+               | mipstx39 | mipstx39el \
+               | sparc | sparclet | sparclite | sparc64 | v850)
                basic_machine=$basic_machine-unknown
                ;;
        # We use `pc' rather than `unknown'
@@ -171,13 +172,17 @@ case $basic_machine in
                ;;
        # Recognize the basic CPU types with company name.
        vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
-             | m88k-* | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
-             | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
-             | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
-             | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
-             | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
-             | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
-             | mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
+             | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+             | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+             | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
+             | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
+             | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
+             | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+             | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+             | sparc64-* | mips64-* | mipsel-* \
+             | mips64el-* | mips64orion-* | mips64orionel-*  \
+             | mipstx39-* | mipstx39el-* \
+             | f301-*)
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
@@ -204,9 +209,9 @@ case $basic_machine in
        amiga | amiga-*)
                basic_machine=m68k-cbm
                ;;
-       amigados)
+       amigaos | amigados)
                basic_machine=m68k-cbm
-               os=-amigados
+               os=-amigaos
                ;;
        amigaunix | amix)
                basic_machine=m68k-cbm
@@ -391,11 +396,11 @@ case $basic_machine in
                ;;
        mipsel*-linux*)
                basic_machine=mipsel-unknown
-               os=-linux
+               os=-linux-gnu
                ;;
        mips*-linux*)
                basic_machine=mips-unknown
-               os=-linux
+               os=-linux-gnu
                ;;
        mips3*-*)
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
@@ -566,6 +571,12 @@ case $basic_machine in
                basic_machine=i386-sequent
                os=-dynix
                ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
        tower | tower-32)
                basic_machine=m68k-ncr
                ;;
@@ -585,7 +596,7 @@ case $basic_machine in
                basic_machine=vax-dec
                os=-vms
                ;;
-       vpp*|vx|vx-*)
+       vpp*|vx|vx-*)
                basic_machine=f301-fujitsu
                ;;
        vxworks960)
@@ -615,7 +626,7 @@ case $basic_machine in
 # Here we handle the default manufacturer of certain CPU types.  It is in
 # some cases the only manufacturer, in others, it is the most popular.
        mips)
-               if [ x$os = x-linux ]; then
+               if [ x$os = x-linux-gnu ]; then
                        basic_machine=mips-unknown
                else
                        basic_machine=mips-mips
@@ -680,9 +691,12 @@ case $os in
        -solaris)
                os=-solaris2
                ;;
-       -unixware* | svr4*)
+       -svr4*)
                os=-sysv4
                ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
        -gnu/linux*)
                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
                ;;
@@ -693,7 +707,8 @@ case $os in
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
@@ -701,7 +716,7 @@ case $os in
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -linux-gnu* | -uxpv*)
+             | -mingw32* | -linux-gnu* | -uxpv*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -linux*)
@@ -827,7 +842,7 @@ case $basic_machine in
                os=-sysv
                ;;
        *-cbm)
-               os=-amigados
+               os=-amigaos
                ;;
        *-dg)
                os=-dgux
index 805bee6..44860a7 100755 (executable)
--- a/configure
+++ b/configure
@@ -1140,7 +1140,9 @@ echo "configure:1140: checking for ld used by GCC" >&5
   ac_prog=`($CC -print-prog-name=ld) 2>&5`
   case "$ac_prog" in
   # Accept absolute paths.
-  /*) ;;
+  /*)
+    test -z "$LD" && LD="$ac_prog"
+    ;;
   "")
     # If it fails, then pretend we aren't using GCC.
     ac_prog=ld
@@ -1152,20 +1154,15 @@ echo "configure:1140: checking for ld used by GCC" >&5
   esac
 elif test "$with_gnu_ld" = yes; then
   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1156: checking for GNU ld" >&5
+echo "configure:1158: checking for GNU ld" >&5
 else
   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1159: checking for non-GNU ld" >&5
+echo "configure:1161: checking for non-GNU ld" >&5
 fi
 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  LD=${LD-$ac_prog}
-case "$LD" in
-  /*)
-  ac_cv_path_LD="$LD" # Let the user override the test with a path.
-  ;;
-  *)
+  if test -z "$LD"; then
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
   for ac_dir in $PATH; do
     test -z "$ac_dir" && ac_dir=.
@@ -1182,8 +1179,9 @@ case "$LD" in
     fi
   done
   IFS="$ac_save_ifs"
-  ;;
-esac
+else
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
 fi
 
 LD="$ac_cv_path_LD"
@@ -1195,7 +1193,7 @@ fi
 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
 
 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1199: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1197: checking if the linker ($LD) is GNU ld" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1211,7 +1209,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
 
 
 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1215: checking for BSD-compatible nm" >&5
+echo "configure:1213: checking for BSD-compatible nm" >&5
 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1221,7 +1219,7 @@ else
   ;;
 *)
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in /usr/ucb:$PATH:/bin; do
+  for ac_dir in /usr/ucb $PATH /bin; do
     test -z "$ac_dir" && dir=.
     if test -f $ac_dir/nm; then
       # Check to see if the nm accepts a BSD-compat flag.
@@ -1246,7 +1244,7 @@ echo "$ac_t""$NM" 1>&6
 
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1250: checking whether ln -s works" >&5
+echo "configure:1248: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1274,7 +1272,7 @@ fi
 
 
 # Always use our own libtool.
-LIBTOOL='$(top_builddir)/libtool'
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 # Check whether --enable-shared or --disable-shared was given.
@@ -1338,9 +1336,9 @@ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
 
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1342: checking for AIX" >&5
+echo "configure:1340: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 1344 "configure"
+#line 1342 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -1362,7 +1360,7 @@ rm -f conftest*
 
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1366: checking for POSIXized ISC" >&5
+echo "configure:1364: checking for POSIXized ISC" >&5
 if test -d /etc/conf/kconfig.d &&
   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
@@ -1384,17 +1382,17 @@ fi
 
 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1388: checking for minix/config.h" >&5
+echo "configure:1386: checking for minix/config.h" >&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 1393 "configure"
+#line 1391 "configure"
 #include "confdefs.h"
 #include <minix/config.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1433,12 +1431,12 @@ fi
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1437: checking for working const" >&5
+echo "configure:1435: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1442 "configure"
+#line 1440 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1487,7 +1485,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1509,12 +1507,12 @@ fi
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1513: checking for ANSI C header files" >&5
+echo "configure:1511: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1518 "configure"
+#line 1516 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1522,7 +1520,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1539,7 +1537,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1543 "configure"
+#line 1541 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1557,7 +1555,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1561 "configure"
+#line 1559 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1578,7 +1576,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1582 "configure"
+#line 1580 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1589,7 +1587,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1617,12 +1615,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1621: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1619: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1626 "configure"
+#line 1624 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1630,7 +1628,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1655,7 +1653,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1659: checking for opendir in -ldir" >&5
+echo "configure:1657: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1663,7 +1661,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1667 "configure"
+#line 1665 "configure"
 #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
@@ -1674,7 +1672,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1696,7 +1694,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1700: checking for opendir in -lx" >&5
+echo "configure:1698: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1704,7 +1702,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1708 "configure"
+#line 1706 "configure"
 #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
@@ -1715,7 +1713,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1738,12 +1736,12 @@ fi
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1742: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1740: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1747 "configure"
+#line 1745 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1752,7 +1750,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1773,12 +1771,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1777: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1775: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1782 "configure"
+#line 1780 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1794,7 +1792,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1818,17 +1816,17 @@ for ac_hdr in libc.h limits.h malloc.h memory.h string.h regex.h rxposix.h rx/rx
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1822: checking for $ac_hdr" >&5
+echo "configure:1820: 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 1827 "configure"
+#line 1825 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1859,17 +1857,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1863: checking for $ac_hdr" >&5
+echo "configure:1861: 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 1868 "configure"
+#line 1866 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1896,7 +1894,7 @@ fi
 done
 
     echo $ac_n "checking "whether libc.h and unistd.h can be included together"""... $ac_c" 1>&6
-echo "configure:1900: checking "whether libc.h and unistd.h can be included together"" >&5
+echo "configure:1898: checking "whether libc.h and unistd.h can be included together"" >&5
 if eval "test \"`echo '$''{'guile_cv_header_libc_with_unistd'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1907,7 +1905,7 @@ else
           guile_cv_header_libc_with_unistd="yes"
         else
           cat > conftest.$ac_ext <<EOF
-#line 1911 "configure"
+#line 1909 "configure"
 #include "confdefs.h"
 
 #             include <libc.h>
@@ -1917,7 +1915,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   guile_cv_header_libc_with_unistd=yes
 else
@@ -1944,12 +1942,12 @@ EOF
 
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1948: checking for uid_t in sys/types.h" >&5
+echo "configure:1946: checking for uid_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1953 "configure"
+#line 1951 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -1978,7 +1976,7 @@ EOF
 fi
 
 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:1982: checking type of array argument to getgroups" >&5
+echo "configure:1980: checking type of array argument to getgroups" >&5
 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1986,7 +1984,7 @@ else
   ac_cv_type_getgroups=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 1990 "configure"
+#line 1988 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Rendell for this test.  */
@@ -2011,7 +2009,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
     ac_cv_type_getgroups=gid_t
 else
@@ -2025,7 +2023,7 @@ fi
 
 if test $ac_cv_type_getgroups = cross; then
         cat > conftest.$ac_ext <<EOF
-#line 2029 "configure"
+#line 2027 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 EOF
@@ -2049,12 +2047,12 @@ EOF
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2053: checking return type of signal handlers" >&5
+echo "configure:2051: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2058 "configure"
+#line 2056 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2071,7 +2069,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2090,12 +2088,12 @@ EOF
 
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:2094: checking for mode_t" >&5
+echo "configure:2092: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2099 "configure"
+#line 2097 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2124,7 +2122,7 @@ fi
 
 
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:2128: checking for main in -lm" >&5
+echo "configure:2126: checking for main in -lm" >&5
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2132,14 +2130,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2136 "configure"
+#line 2134 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2167,12 +2165,12 @@ else
 fi
 
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:2171: checking for gethostbyname" >&5
+echo "configure:2169: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2176 "configure"
+#line 2174 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -2195,7 +2193,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -2216,7 +2214,7 @@ fi
 
 if test $ac_cv_func_gethostbyname = no; then
     echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2220: checking for gethostbyname in -lnsl" >&5
+echo "configure:2218: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2224,7 +2222,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2228 "configure"
+#line 2226 "configure"
 #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
@@ -2235,7 +2233,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:2239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2264,12 +2262,12 @@ fi
 
 fi
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:2268: checking for connect" >&5
+echo "configure:2266: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2273 "configure"
+#line 2271 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -2292,7 +2290,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -2313,7 +2311,7 @@ fi
 
 if test $ac_cv_func_connect = no; then
     echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2317: checking for connect in -lsocket" >&5
+echo "configure:2315: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2321,7 +2319,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2325 "configure"
+#line 2323 "configure"
 #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
@@ -2332,7 +2330,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2366,7 +2364,7 @@ fi
 if test "$enable_dynamic_linking" = "yes"; then
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2370: checking for dlopen in -ldl" >&5
+echo "configure:2368: 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
@@ -2374,7 +2372,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2378 "configure"
+#line 2376 "configure"
 #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
@@ -2385,7 +2383,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2419,7 +2417,7 @@ EOF
 
 else
 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:2423: checking for dld_link in -ldld" >&5
+echo "configure:2421: 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
@@ -2427,7 +2425,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2431 "configure"
+#line 2429 "configure"
 #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
@@ -2438,7 +2436,7 @@ int main() {
 dld_link()
 ; return 0; }
 EOF
-if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2474,12 +2472,12 @@ else
 for ac_func in shl_load
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2478: checking for $ac_func" >&5
+echo "configure:2476: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2483 "configure"
+#line 2481 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2502,7 +2500,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2535,12 +2533,12 @@ else
 for ac_func in dlopen
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2539: checking for $ac_func" >&5
+echo "configure:2537: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2544 "configure"
+#line 2542 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2563,7 +2561,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2603,12 +2601,12 @@ fi
 for ac_func in ctermid ftime getcwd geteuid gethostent gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2607: checking for $ac_func" >&5
+echo "configure:2605: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2612 "configure"
+#line 2610 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2631,7 +2629,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2659,17 +2657,17 @@ done
 
 ac_safe=`echo "sys/un.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/un.h""... $ac_c" 1>&6
-echo "configure:2663: checking for sys/un.h" >&5
+echo "configure:2661: checking for sys/un.h" >&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 2668 "configure"
+#line 2666 "configure"
 #include "confdefs.h"
 #include <sys/un.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2700,12 +2698,12 @@ fi
 for ac_func in socketpair getgroups setpwent pause tzset
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2704: checking for $ac_func" >&5
+echo "configure:2702: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2709 "configure"
+#line 2707 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2728,7 +2726,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2759,12 +2757,12 @@ done
 for ac_func in sethostent endhostent getnetent setnetent endnetent getprotoent endprotoent getservent endservent getnetbyaddr getnetbyname inet_lnaof inet_makeaddr inet_netof
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2763: checking for $ac_func" >&5
+echo "configure:2761: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2768 "configure"
+#line 2766 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2787,7 +2785,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2814,20 +2812,20 @@ done
 
 
 echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
-echo "configure:2818: checking for restartable system calls" >&5
+echo "configure:2816: checking for restartable system calls" >&5
 if eval "test \"`echo '$''{'scm_cv_restarts'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test $ac_cv_func_sigaction = yes; then
                cat > conftest.$ac_ext <<EOF
-#line 2824 "configure"
+#line 2822 "configure"
 #include "confdefs.h"
 #include <signal.h>
 int main() {
 int a = SA_RESTART
 ; return 0; }
 EOF
-if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   scm_cv_restarts=yes
 else
@@ -2854,12 +2852,12 @@ if test "$ac_cv_header_regex_h" = yes ||
    test "$ac_cv_header_rxposix_h" = yes ||
    test "$ac_cv_header_rx_rxposix_h" = yes; then
   echo $ac_n "checking for regcomp""... $ac_c" 1>&6
-echo "configure:2858: checking for regcomp" >&5
+echo "configure:2856: checking for regcomp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_regcomp_norx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2863 "configure"
+#line 2861 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char regcomp(); below.  */
@@ -2882,7 +2880,7 @@ regcomp();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_regcomp_norx=yes"
 else
@@ -2900,7 +2898,7 @@ if eval "test \"`echo '$ac_cv_func_'regcomp'_'norx`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for main in -lrx""... $ac_c" 1>&6
-echo "configure:2904: checking for main in -lrx" >&5
+echo "configure:2902: checking for main in -lrx" >&5
 ac_lib_var=`echo rx'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2908,14 +2906,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lrx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2912 "configure"
+#line 2910 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2943,12 +2941,12 @@ else
 fi
 
    echo $ac_n "checking for regcomp""... $ac_c" 1>&6
-echo "configure:2947: checking for regcomp" >&5
+echo "configure:2945: checking for regcomp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_regcomp_rx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2952 "configure"
+#line 2950 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char regcomp(); below.  */
@@ -2971,7 +2969,7 @@ regcomp();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_regcomp_rx=yes"
 else
@@ -3005,12 +3003,12 @@ fi
 for ac_func in inet_aton putenv strerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3009: checking for $ac_func" >&5
+echo "configure:3007: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3014 "configure"
+#line 3012 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3033,7 +3031,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3066,19 +3064,19 @@ done
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3070: checking for working alloca.h" >&5
+echo "configure:3068: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3075 "configure"
+#line 3073 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -3099,12 +3097,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3103: checking for alloca" >&5
+echo "configure:3101: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3108 "configure"
+#line 3106 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -3127,7 +3125,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -3159,12 +3157,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3163: checking whether alloca needs Cray hooks" >&5
+echo "configure:3161: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3168 "configure"
+#line 3166 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -3189,12 +3187,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3193: checking for $ac_func" >&5
+echo "configure:3191: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3198 "configure"
+#line 3196 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3217,7 +3215,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3244,7 +3242,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3248: checking stack direction for C alloca" >&5
+echo "configure:3246: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3252,7 +3250,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 3256 "configure"
+#line 3254 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -3271,7 +3269,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -3295,12 +3293,12 @@ fi
 if test "$ALLOCA" = "alloca.o"; then LIBOBJS="alloca.o $LIBOBJS"; fi
 
 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:3299: checking for st_rdev in struct stat" >&5
+echo "configure:3297: checking for st_rdev in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3304 "configure"
+#line 3302 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -3308,7 +3306,7 @@ int main() {
 struct stat s; s.st_rdev;
 ; return 0; }
 EOF
-if { (eval echo configure:3312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_rdev=yes
 else
@@ -3329,12 +3327,12 @@ EOF
 fi
 
 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:3333: checking for st_blksize in struct stat" >&5
+echo "configure:3331: checking for st_blksize in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3338 "configure"
+#line 3336 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -3342,7 +3340,7 @@ int main() {
 struct stat s; s.st_blksize;
 ; return 0; }
 EOF
-if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_blksize=yes
 else
@@ -3366,12 +3364,12 @@ fi
 # We could use AC_STRUCT_ST_BLOCKS here, but that adds fileblocks.o to
 # LIBOBJS, which we don't need.  This seems more direct. 
 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:3370: checking for st_blocks in struct stat" >&5
+echo "configure:3368: checking for st_blocks in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3375 "configure"
+#line 3373 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -3379,7 +3377,7 @@ int main() {
 struct stat s; s.st_blocks;
 ; return 0; }
 EOF
-if { (eval echo configure:3383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_blocks=yes
 else
@@ -3400,12 +3398,12 @@ EOF
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:3404: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:3402: checking whether struct tm is in sys/time.h or time.h" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3409 "configure"
+#line 3407 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -3413,7 +3411,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -3434,12 +3432,12 @@ EOF
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3438: checking for tm_zone in struct tm" >&5
+echo "configure:3436: checking for tm_zone in struct tm" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3443 "configure"
+#line 3441 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -3447,7 +3445,7 @@ int main() {
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:3451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -3467,12 +3465,12 @@ EOF
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3471: checking for tzname" >&5
+echo "configure:3469: checking for tzname" >&5
 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3476 "configure"
+#line 3474 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -3482,7 +3480,7 @@ int main() {
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -3505,12 +3503,12 @@ fi
 
 
   echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6
-echo "configure:3509: checking whether we need POSIX to get struct utimbuf" >&5
+echo "configure:3507: checking whether we need POSIX to get struct utimbuf" >&5
 if eval "test \"`echo '$''{'guile_cv_struct_utimbuf_needs_posix'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3514 "configure"
+#line 3512 "configure"
 #include "confdefs.h"
 
 #ifdef __EMX__
@@ -3522,7 +3520,7 @@ struct utime blah;
 
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3555,13 +3553,13 @@ if test "$cross_compiling" = yes; then
   echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2
 else
   cat > conftest.$ac_ext <<EOF
-#line 3559 "configure"
+#line 3557 "configure"
 #include "confdefs.h"
 aux (l) unsigned long l;
             { int x; exit (l >= ((unsigned long)&x)); }
           main () { int q; aux((unsigned long)&q); }
 EOF
-if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   cat >> confdefs.h <<\EOF
 #define SCM_STACK_GROWS_UP 1
@@ -3584,11 +3582,11 @@ EOF
           echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2
 else
   cat > conftest.$ac_ext <<EOF
-#line 3588 "configure"
+#line 3586 "configure"
 #include "confdefs.h"
 main () { exit (sizeof(float) != sizeof(long)); }
 EOF
-if { (eval echo configure:3592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   cat >> confdefs.h <<\EOF
 #define SCM_SINGLES 1
@@ -3603,12 +3601,12 @@ fi
 
 
 echo $ac_n "checking for struct linger""... $ac_c" 1>&6
-echo "configure:3607: checking for struct linger" >&5
+echo "configure:3605: checking for struct linger" >&5
 if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3612 "configure"
+#line 3610 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -3617,7 +3615,7 @@ int main() {
 struct linger lgr;  lgr.l_linger = 100
 ; return 0; }
 EOF
-if { (eval echo configure:3621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   scm_cv_struct_linger="yes"
 else
@@ -3644,19 +3642,19 @@ fi
 #--------------------------------------------------------------------
 
 echo $ac_n "checking how to set a stream file descriptor""... $ac_c" 1>&6
-echo "configure:3648: checking how to set a stream file descriptor" >&5
+echo "configure:3646: checking how to set a stream file descriptor" >&5
 if eval "test \"`echo '$''{'scm_cv_fd_setter'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3653 "configure"
+#line 3651 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 stdout->_file = 1
 ; return 0; }
 EOF
-if { (eval echo configure:3660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   scm_cv_fd_setter="_file"
 else
@@ -3664,14 +3662,14 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 3668 "configure"
+#line 3666 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 stdout->_fileno = 1
 ; return 0; }
 EOF
-if { (eval echo configure:3675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   scm_cv_fd_setter="_fileno"
 else
@@ -3709,19 +3707,19 @@ fi
 #--------------------------------------------------------------------
 
 echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6
-echo "configure:3713: checking how to get buffer char count from FILE structure" >&5
+echo "configure:3711: checking how to get buffer char count from FILE structure" >&5
 if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3718 "configure"
+#line 3716 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 FILE *f = stdin; f->_cnt = 0
 ; return 0; }
 EOF
-if { (eval echo configure:3725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   scm_cv_struct_file_count="_cnt"
 else
@@ -3729,14 +3727,14 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 3733 "configure"
+#line 3731 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 FILE *f = stdin; f->_r = 0
 ; return 0; }
 EOF
-if { (eval echo configure:3740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   scm_cv_struct_file_count="_r"
 else
@@ -3744,14 +3742,14 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 3748 "configure"
+#line 3746 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 FILE *f = stdin; f->readCount = 0
 ; return 0; }
 EOF
-if { (eval echo configure:3755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   scm_cv_struct_file_count="readCount"
 else
@@ -3778,14 +3776,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_gptr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3782 "configure"
+#line 3780 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 FILE *f = stdin; f->_gptr = f->egptr;
 ; return 0; }
 EOF
-if { (eval echo configure:3789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   scm_cv_struct_file_gptr=1
 else
@@ -3808,14 +3806,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_readptr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3812 "configure"
+#line 3810 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;
 ; return 0; }
 EOF
-if { (eval echo configure:3819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   scm_cv_struct_file_readptr=1
 else
@@ -3845,7 +3843,7 @@ fi
 
 
 echo $ac_n "checking "threads package type"""... $ac_c" 1>&6
-echo "configure:3849: checking "threads package type"" >&5
+echo "configure:3847: checking "threads package type"" >&5
 if eval "test \"`echo '$''{'cy_cv_threads_package'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3904,7 +3902,7 @@ if test "$use_threads" != no; then
     LDFLAGS="-L$use_threads/lib"
     LIBS="-lgthreads -lmalloc"
     cat > conftest.$ac_ext <<EOF
-#line 3908 "configure"
+#line 3906 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
@@ -3913,7 +3911,7 @@ pthread_equal(NULL,NULL);
 
 ; return 0; }
 EOF
-if { (eval echo configure:3917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   threads_package=FSU
 else
@@ -3925,7 +3923,7 @@ rm -f conftest*
   if test "$threads_package" = unknown; then
     LIBS="-lpthread"
     cat > conftest.$ac_ext <<EOF
-#line 3929 "configure"
+#line 3927 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
@@ -3934,7 +3932,7 @@ pthread_equal(NULL,NULL);
 
 ; return 0; }
 EOF
-if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   threads_package=MIT
 else
@@ -3946,7 +3944,7 @@ rm -f conftest*
   if test "$threads_package" = unknown; then
     LIBS="-lpthreads"
     cat > conftest.$ac_ext <<EOF
-#line 3950 "configure"
+#line 3948 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 int main() {
@@ -3955,7 +3953,7 @@ pthread_equal(NULL,NULL);
 
 ; return 0; }
 EOF
-if { (eval echo configure:3959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   threads_package=PCthreads
 else
@@ -4035,7 +4033,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4039: checking for $ac_word" >&5
+echo "configure:4037: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4094,7 +4092,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:4098: checking host system type" >&5
+echo "configure:4096: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
index 8279c0f..a01d033 100755 (executable)
--- a/ltconfig
+++ b/ltconfig
@@ -32,7 +32,7 @@ progname=`echo "$0" | sed 's%^.*/%%'`
 # Constants:
 PROGRAM=ltconfig
 PACKAGE=libtool
-VERSION=1.0c
+VERSION=1.0e
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
 rm="rm -f"
@@ -41,7 +41,18 @@ help="Try \`$progname --help' for more information."
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([\\"$]\)/\\\1/g'
+sed_quote_subst='s/\([\\"$\\\\]\)/\\\1/g'
+
+# Same as above, but don't quote variable references.
+double_quote_subst='s/\([\\"\\\\]\)/\\\1/g'
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "${COLLECT_NAMES+set}" != set; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
 
 # Global variables:
 can_build_shared=yes
@@ -252,7 +263,10 @@ if test "$verify_host" = yes; then
     fi ;;
   esac
   host=`$ac_config_sub $host_alias`
-  echo "$ac_t""$host" 1>&6
+  echo "$ac_t$host" 1>&6
+
+  # Make sure the host verified.
+  test -z "$host" && exit 1
 
 elif test -z "$host"; then
   echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
@@ -295,7 +309,7 @@ if test "${RANLIB+set}" != "set"; then
   done
   IFS="$save_ifs"
 
-  echo $ac_t "$result" 1>&6
+  echo "$ac_t$result" 1>&6
 fi
 
 if test -n "$RANLIB"; then
@@ -320,9 +334,9 @@ if test "$with_gcc" != yes || test -z "$CC"; then
     IFS="$save_ifs"
 
     if test -n "$CC"; then
-      echo "$ac_t""$CC" 1>&6
+      echo "$ac_t$CC" 1>&6
     else
-      echo "$ac_t""no" 1>&6
+      echo "$ac_t"no 1>&6
     fi
   fi
 
@@ -359,9 +373,9 @@ if test "$with_gcc" != yes || test -z "$CC"; then
     fi
 
     if test -n "$CC"; then
-      echo "$ac_t""$CC" 1>&6
+      echo "$ac_t$CC" 1>&6
     else
-      echo "$ac_t""no" 1>&6
+      echo "$ac_t"no 1>&6
     fi
 
     if test -z "$CC"; then
@@ -373,7 +387,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
   # Now see if the compiler is really GCC.
   with_gcc=no
   echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
-  echo "$progname:376: checking whether we are using GNU C" >&5
+  echo "$progname:390: checking whether we are using GNU C" >&5
 
   $rm conftest.c
   cat > conftest.c <<EOF
@@ -381,11 +395,11 @@ if test "$with_gcc" != yes || test -z "$CC"; then
   yes;
 #endif
 EOF
-  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     with_gcc=yes
   fi
   $rm conftest.c
-  echo $ac_t "$with_gcc" 1>&6
+  echo "$ac_t$with_gcc" 1>&6
 fi
 
 # Allow CC to be a program name with arguments.
@@ -407,7 +421,7 @@ if test "$with_gcc" = yes; then
   no_builtin_flag=' -fno-builtin'
 
   case "$host_os" in
-  irix5* | irix6*)
+  aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
     # PIC is the default for these OSes.
     pic_flag=
     ;;
@@ -419,7 +433,7 @@ else
   # PORTME Check for PIC flags for the system compiler.
   case "$host_os" in
   aix3* | aix4*)
-    # FIXME All rs/6000 code is PIC, but is there any non-rs/6000 AIX platform?
+    # All AIX code is PIC.
     link_static_flag='-bnso -bI:/lib/syscalls.exp'
     ;;
 
@@ -436,8 +450,12 @@ else
     pic_flag=
     ;;
 
+  os2*)
+    # We can build DLLs from non-PIC.
+    ;;
+
   osf3* | osf4*)
-    # FIXME - pic_flag is probably required for hppa*-osf* and i860-osf*
+    # All OSF/1 code is PIC.
     wl='-Wl,'
     link_static_flag='-non_shared'
     ;;
@@ -460,22 +478,19 @@ else
     wl='-Qoption ld '
     ;;
 
+  uts4*)
+    pic_flag='-pic'
+    link_static_flag='-Bstatic'
+    ;;
+
   *)
     can_build_shared=no
     ;;
   esac
 fi
 
-case "$host_cpu" in
-alpha | rs6000 | powerpc | powerpcle)
-  # Yippee! All RS/6000 and PowerPC code is position-independent.
-  # Apparently, so is DEC alpha!
-  pic_flag=
-  ;;
-esac
-
 if test -n "$pic_flag"; then
-  echo $ac_t "$pic_flag" 1>&6
+  echo "$ac_t$pic_flag" 1>&6
 
   # Check to make sure the pic_flag actually works.
   echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
@@ -483,19 +498,19 @@ if test -n "$pic_flag"; then
   echo > conftest.c
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $pic_flag -DPIC"
-  echo "$progname:486: checking if $compiler PIC flag $pic_flag works" >&5
-  if { (eval echo $progname:487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
+  echo "$progname:501: checking if $compiler PIC flag $pic_flag works" >&5
+  if { (eval echo $progname:502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
     # Append any errors to the config.log.
     cat conftest.err 1>&5
 
     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
     # reports no error.  So, we need to grep stderr for (Bundled).
     if grep '(Bundled)' conftest.err >/dev/null; then
-      echo $ac_t no 1>&6
+      echo "$ac_t"no 1>&6
       can_build_shared=no
       pic_flag=
     else
-      echo $ac_t yes 1>&6
+      echo "$ac_t"yes 1>&6
       pic_flag=" $pic_flag"
     fi
   else
@@ -503,12 +518,12 @@ if test -n "$pic_flag"; then
     cat conftest.err 1>&5
     can_build_shared=no
     pic_flag=
-    echo $ac_t no 1>&6
+    echo "$ac_t"no 1>&6
   fi
   CFLAGS="$save_CFLAGS"
   $rm conftest*
 else
-  echo $ac_t none 1>&6
+  echo "$ac_t"none 1>&6
 fi
 
 # Check for any special shared library compilation flags.
@@ -526,11 +541,11 @@ $rm conftest*
 echo 'main(){return(0);}' > conftest.c
 save_LDFLAGS="$LDFLAGS"
 LDFLAGS="$LDFLAGS $link_static_flag"
-echo "$progname:529: checking if $compiler static flag $link_static_flag works" >&5
-if { (eval echo $progname:530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  echo $ac_t "$link_static_flag" 1>&6
+echo "$progname:544: checking if $compiler static flag $link_static_flag works" >&5
+if { (eval echo $progname:545: \"$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
+  echo "$ac_t"none 1>&6
   link_static_flag=
 fi
 LDFLAGS="$save_LDFLAGS"
@@ -554,18 +569,18 @@ if test -z "$LN_S"; then
 fi
 
 # Make sure LD is an absolute path.
-case "$LD" in
-/*) ;;
-*)
+if test -z "$LD"; then
   ac_prog=ld
   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:564: checking for ld used by GCC" >&5
+    echo "$progname:577: checking for ld used by GCC" >&5
     ac_prog=`($CC -print-prog-name=ld) 2>&5`
     case "$ac_prog" in
     # Accept absolute paths.
-    /*) ;;
+    /*)
+      test -z "$LD" && LD="$ac_prog"
+      ;;
     "")
       # If it fails, then pretend we aren't using GCC.
       ac_prog=ld
@@ -577,17 +592,13 @@ case "$LD" in
     esac
   elif test "$with_gnu_ld" = yes; then
     echo $ac_n "checking for GNU ld... $ac_c" 1>&6
-    echo "$progname:580: checking for GNU ld" >&5
+    echo "$progname:595: checking for GNU ld" >&5
   else
     echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-    echo "$progname:583: checking for non-GNU ld" >&5
+    echo "$progname:598: checking for non-GNU ld" >&5
   fi
-  LD=${LD-$ac_prog}
-  case "$LD" in
-  /*)
-    ac_cv_path_LD="$LD" # Let the user override the test with a path.
-    ;;
-  *)
+
+  if test -z "$LD"; then
     IFS="${IFS=        }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
     for ac_dir in $PATH; do
       test -z "$ac_dir" && ac_dir=.
@@ -604,11 +615,19 @@ case "$LD" in
       fi
     done
     IFS="$ac_save_ifs"
-    ;;
-  esac
-  echo $ac_t "$with_gnu_ld" 1>&6
-  ;;
-esac
+  fi
+
+  if test -n "$LD"; then
+    echo "$ac_t$LD" 1>&6
+  else
+    echo "$ac_t"no 1>&6
+  fi
+
+  if test -z "$LD"; then
+    echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
+    exit 1
+  fi
+fi
 
 # Check to see if it really is or isn't GNU ld.
 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
@@ -618,13 +637,14 @@ if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
 else
   with_gnu_ld=no
 fi
-echo $ac_t "$with_gnu_ld" 1>&6
+echo "$ac_t$with_gnu_ld" 1>&6
 
 # See if the linker supports building shared libraries.
 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
 
 allow_undefined_flag=
 archive_cmds=
+old_archive_from_new_cmds=
 export_dynamic_flag_spec=
 hardcode_libdir_flag_spec=
 hardcode_libdir_separator=
@@ -666,7 +686,7 @@ else
   case "$host_os" in
   aix3*)
     allow_undefined_flag=unsupported
-    archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '"'s/.* //'"' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE -lc$deplibs;$AR cru $lib $objdir/$soname'
+    archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '"'s/.* //'"' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE$deplibs;$AR cru $lib $objdir/$soname'
     # Note: this linker hardcodes the directories in LIBPATH if there
     # are no directories specified by -L.
     hardcode_minus_L=yes
@@ -727,7 +747,7 @@ else
     ;;
 
   irix5* | irix6*)
-    archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
+    archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     ;;
 
@@ -739,9 +759,24 @@ else
     hardcode_shlibpath_var=no
     ;;
 
-  osf3* | osf4*)
+  os2*)
+    # FIXME: unsure of OS/2 hardcoding properties
+    hardcode_direct=yes
+    allow_undefined_flag=unsupported
+    archive_cmds='echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;echo DATA >> $objdir/$libname.def;echo " SINGLE NONSHARED" >> $objdir/$libname.def;echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def$deplibs'
+    old_archive_from_new_cmds='emximp -o $libname.a $objdir/$libname.def'
+    ;;
+
+  osf3*)
     allow_undefined_flag=' -expect_unresolved'
-    archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
+    archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator=:
+    ;;
+
+  osf4*)
+    allow_undefined_flag=' -expect_unresolved \*'
+    archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     hardcode_libdir_separator=:
     ;;
@@ -765,13 +800,21 @@ else
     hardcode_shlibpath_var=no
     ;;
 
+   uts4*)
+     archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
+     hardcode_libdir_flag_spec='-L$libdir'
+     hardcode_direct=no
+     hardcode_minus_L=no
+     hardcode_shlibpath_var=no
+     ;;
+
   *)
     ld_shlibs=no
     can_build_shared=no
     ;;
   esac
 fi
-echo $ac_t "$ld_shlibs" 1>&6
+echo "$ac_t$ld_shlibs" 1>&6
 
 if test -z "$NM"; then
   echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
@@ -779,7 +822,7 @@ if test -z "$NM"; then
   /*) ;; # Let the user override the test with a path.
   *)
     IFS="${IFS=        }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-    for ac_dir in /usr/ucb:$PATH:/bin; do
+    for ac_dir in /usr/ucb $PATH /bin; do
       test -z "$ac_dir" && dir=.
       if test -f $ac_dir/nm; then
         # Check to see if the nm accepts a BSD-compat flag.
@@ -827,14 +870,11 @@ esac
 
 # If we're using GNU nm, then use its standard symbol codes.
 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[ABCDGISTU]'
+  symcode='[ABCDGISTUW]'
 fi
 
-# Delete symbols that are not valid C identifiers.
-global_symbol_pipe="sed -e '/^.* $symcode $sympat$/!d'"
-
 # Write the raw and C identifiers.
-global_symbol_pipe="$global_symbol_pipe -e 's/^.* $symcode $sympat$/$symxfrm/'"
+global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
 
 # Check to see that the pipe works correctly.
 pipe_works=no
@@ -845,18 +885,18 @@ void nm_test_func(){}
 main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
-echo "$progname:848: checking if global_symbol_pipe works" >&5
-if { (eval echo $progname:849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
+echo "$progname:888: checking if global_symbol_pipe works" >&5
+if { (eval echo $progname:889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
   # Now try to grab the symbols.
   nlist=conftest.nm
-  if { echo "$progname:852: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+  if { echo "$progname:892: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
 
     # Try sorting and uniquifying the output.
     if sort "$nlist" | uniq > "$nlist"T; then
       mv -f "$nlist"T "$nlist"
       wcout=`wc "$nlist" 2>/dev/null`
       count=`echo "$wcout" | sed 's/^[         ]*\([0-9][0-9]*\).*$/\1/'`
-      test "$wcout" = "$count" && count=-1
+      (test "$count" -ge 0) 2>/dev/null || count=-1
     else
       rm -f "$nlist"T
       count=-1
@@ -865,8 +905,14 @@ if { (eval echo $progname:849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }
     # Make sure that we snagged all the symbols we need.
     if egrep ' nm_test_var$' "$nlist" >/dev/null; then
       if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+       cat <<EOF > conftest.c
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
         # Now generate the symbol file.
-        sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" > conftest.c
+        sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
 
        cat <<EOF >> conftest.c
 #if defined (__STDC__) && __STDC__
@@ -890,6 +936,10 @@ EOF
         cat <<\EOF >> conftest.c
   {0},
 };
+
+#ifdef __cplusplus
+}
+#endif
 EOF
         # Now try linking the two files.
         mv conftest.o conftestm.o
@@ -897,19 +947,21 @@ EOF
        save_CFLAGS="$CFLAGS"
         LIBS='conftestm.o'
        CFLAGS="$CFLAGS$no_builtin_flag"
-        if { (eval echo $progname:900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+        if { (eval echo $progname:950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
           pipe_works=yes
         else
           echo "$progname: failed program was:" >&5
           cat conftest.c >&5
         fi
         LIBS="$save_LIBS"
+      else
+        echo "cannot find nm_test_func in $nlist" >&5
       fi
     else
-      echo "cannot find nm_test_func in $nlist" >&5
+      echo "cannot find nm_test_var in $nlist" >&5
     fi
   else
-    echo "cannot find nm_test_var in $nlist" >&5
+    echo "cannot run $global_symbol_pipe" >&5
   fi
 else
   echo "$progname: failed program was:" >&5
@@ -947,7 +999,7 @@ else
   # We can only hardcode existing directories.
   hardcode_action=relink
 fi
-echo $ac_t "$hardcode_action" 1>&6
+echo "$ac_t$hardcode_action" 1>&6
 test "$hardcode_action" = unsupported && can_build_shared=no
 
 
@@ -956,7 +1008,7 @@ reload_cmds='$LD$reload_flag -o $output$reload_objs'
 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
 # PORTME Some linker may need a different reload flag.
 reload_flag='-r'
-echo $ac_t "$reload_flag"
+echo "$ac_t$reload_flag"
 test -n "$reload_flag" && reload_flag=" $reload_flag"
 
 # PORTME Fill in your ld.so characteristics
@@ -1042,6 +1094,12 @@ netbsd* | openbsd*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
+os2*)
+  version_type=none
+  library_names_spec='$libname.dll'
+  dynamic_linker='OS/2 ld.exe'
+  ;;
+
 osf3* | osf4*)
   version_type=osf
   soname_spec='$libname.so'
@@ -1070,11 +1128,18 @@ sunos4*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
+uts4*)
+  version_type=linux
+  library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
+  soname_spec='$libname.so.$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
 *)
   dynamic_linker=no
   ;;
 esac
-echo "$ac_t""$dynamic_linker"
+echo "$ac_t$dynamic_linker"
 test "$dynamic_linker" = no && can_build_shared=no
 
 # FIXME need to add library stripping features
@@ -1085,18 +1150,18 @@ old_striplib=
 
 #echo $ac_n "checking for static library strip program... $ac_c" 1>&6
 #if test -n "$old_striplib"; then
-#  echo $ac_t "$old_striplib" 1>&6
+#  echo "$ac_t$old_striplib" 1>&6
 #else
-#  echo $ac_t none 1>&6
+#  echo "$ac_t"none 1>&6
 #fi
 
 #if test "$can_build_shared" = yes; then
 #  echo $ac_n "checking for shared library strip program... $ac_c" 1>&6
 #
 #  if test -n "$striplib"; then
-#    echo $ac_t "$striplib" 1>&6
+#    echo "$ac_t$striplib" 1>&6
 #  else
-#    echo $ac_t none 1>&6
+#    echo "$ac_t"none 1>&6
 #  fi
 #fi
 
@@ -1106,7 +1171,8 @@ echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
 test "$can_build_shared" = "no" && enable_shared=no
 
-# On AIX, shared libraries and static libraries use the same namespace.
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
 case "$host_os" in
 aix*)
   test "$enable_shared" = yes && enable_static=no
@@ -1117,23 +1183,46 @@ aix*)
   ;;
 esac
 
-echo "$ac_t""$enable_shared" 1>&6
+echo "$ac_t$enable_shared" 1>&6
 
 # Make sure either enable_shared or enable_static is yes.
 test "$enable_shared" = yes || enable_static=yes
 
 echo "checking whether to build static libraries... $enable_static" 1>&6
 
+echo $ac_n "checking for objdir... $ac_c" 1>&6
+rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+echo "$ac_t$objdir" 1>&6
+
 # Now quote all the things that may contain metacharacters.
 for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
   old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
   link_static_flag no_builtin_flag export_dynamic_flag_spec \
   profile_flag_pattern library_names_spec soname_spec RANLIB \
-  old_archive_cmds old_postinstall_cmds archive_cmds postinstall_cmds \
-  allow_undefined_flag finish_cmds global_symbol_pipe striplib old_striplib \
+  old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+  archive_cmds postinstall_cmds \
+  allow_undefined_flag finish_cmds global_symbol_pipe \
+  striplib old_striplib \
   hardcode_libdir_flag_spec hardcode_libdir_separator; do
 
-  eval "$var=\`echo \"\$$var\" | sed \"\$sed_quote_subst\"\`"
+  case "$var" in
+  reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+  old_postinstall_cmds | archive_cmds | postinstall_cmds | finish_cmds)
+    # Double-quote double-evaled strings.
+    eval "$var=\`echo \"\$$var\" | sed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
+    ;;
+  *)
+    eval "$var=\`echo \"\$$var\" | sed \"\$sed_quote_subst\"\`"
+    ;;
+  esac
 done
 
 ofile=libtool
@@ -1159,6 +1248,9 @@ cat <<EOF > $ofile
 # The version of $progname that generated this script.
 LTCONFIG_VERSION="$VERSION"
 
+# Shell to use when invoking shell scripts.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
 # Whether or not to build libtool libraries.
 build_libtool_libs=$enable_shared
 
@@ -1184,6 +1276,9 @@ LN_S="$LN_S"
 # A BSD-compatible nm program.
 NM="$NM"
 
+# The name of the directory that contains temporary libtool files.
+objdir="$objdir"
+
 # How to create reloadable object files.
 reload_flag="$reload_flag"
 reload_cmds="$reload_cmds"
@@ -1221,6 +1316,9 @@ RANLIB="$RANLIB"
 old_archive_cmds="$old_archive_cmds"
 old_postinstall_cmds="$old_postinstall_cmds"
 
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds="$old_archive_from_new_cmds"
+
 # Commands used to build and install a shared archive.
 archive_cmds="$archive_cmds"
 postinstall_cmds="$postinstall_cmds"
@@ -1231,7 +1329,7 @@ allow_undefined_flag="$allow_undefined_flag"
 # Commands used to finish a libtool library installation in a directory.
 finish_cmds="$finish_cmds"
 
-# Take the output of nm and produce a listing of raw symbols and C names
+# Take the output of nm and produce a listing of raw symbols and C names.
 global_symbol_pipe="$global_symbol_pipe"
 
 # How to strip a library file.
index 0ab17a8..82daf2b 100644 (file)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -55,19 +55,18 @@ progname=`$echo "$0" | sed 's%^.*/%%'`
 # Constants.
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION=1.0c
+VERSION=1.0e
 
 default_mode=
 help="Try \`$progname --help' for more information."
 magic="%%%MAGIC variable%%%"
 mkdir="mkdir"
 mv="mv -f"
-objdir=_libs
 rm="rm -f"
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([\\"$]\)/\\\1/g'
+sed_quote_subst='s/\([\\"$\\\\]\)/\\\1/g'
 
 # NLS nuisances.
 # Only set LANG and LC_ALL to C if already set.
@@ -89,6 +88,14 @@ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
   exit 1
 fi
 
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "${COLLECT_NAMES+set}" != set; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+
 # Global variables.
 mode=$default_mode
 nonopt=
@@ -194,7 +201,7 @@ if test -z "$show_help"; then
   # Infer the operation mode.
   if test -z "$mode"; then
     case "$nonopt" in
-    *cc)
+    *cc | *++)
       mode=link
       for arg
       do
@@ -440,7 +447,7 @@ if test -z "$show_help"; then
           esac
           ;;
         rpath)
-         rpath="$rpath $arg"
+          rpath="$rpath $arg"
          prev=
          continue
          ;;
@@ -481,7 +488,11 @@ if test -z "$show_help"; then
       -export-dynamic)
         if test "$export_dynamic" != yes; then
           export_dynamic=yes
-         arg=`eval \\$echo "$export_dynamic_flag_spec"`
+         if test -n "$export_dynamic_flag_spec"; then
+           arg=`eval \\$echo "$export_dynamic_flag_spec"`
+         else
+           arg=
+         fi
 
           # Add the symbol object into the linking commands.
          compile_command="$compile_command @SYMFILE@"
@@ -493,6 +504,7 @@ if test -z "$show_help"; then
         dir=`$echo "$arg" | sed 's%^-L\(.*\)$%\1%'`
         case "$dir" in
         /*)
+         # Add the corresponding hardcode_libdir_flag, if it is not identical.
           ;;
         *)
           $echo "$progname: \`-L$dir' cannot specify a relative directory" 1>&2
@@ -512,7 +524,11 @@ if test -z "$show_help"; then
         ;;
 
       -static)
-       # We already handled this flag above.
+       # 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
        ;;
 
@@ -568,7 +584,7 @@ if test -z "$show_help"; then
         old_library=
 
         # Check to see that this really is a libtool archive.
-        if egrep "^# Generated by ltmain.sh" $arg >/dev/null 2>&1; then :
+        if egrep '^# Generated by ltmain.sh' $arg >/dev/null 2>&1; then :
         else
           $echo "$progname: \`$arg' is not a valid libtool archive" 1>&2
           exit 1
@@ -635,12 +651,12 @@ if test -z "$show_help"; then
           if test -n "$shlibpath_var"; then
             # Make sure the rpath contains only unique directories.
             case "$temp_rpath " in
-            "* $dir *") ;;
+            *" $dir "*) ;;
             *) temp_rpath="$temp_rpath $dir" ;;
             esac
           fi
 
-         # FIXME: This is the magic to use -rpath.
+         # This is the magic to use -rpath.
           if test -n "$hardcode_libdir_flag_spec"; then
             if test -n "$hardcode_libdir_separator"; then
               if test -z "$hardcode_libdirs"; then
@@ -648,8 +664,14 @@ if test -z "$show_help"; then
                 hardcode_libdirs="$libdir"
                 libdir="@HARDCODE_LIBDIRS@"
               else
-                # Just accumulate the libdirs.
-                hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                # Just accumulate the unique libdirs.
+               case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+               *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+                 ;;
+               *)
+                 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                 ;;
+               esac
                 libdir=
               fi
             fi
@@ -663,7 +685,7 @@ if test -z "$show_help"; then
           elif test "$hardcode_runpath_var" = yes; then
             # Do the same for the permanent run path.
             case "$perm_rpath " in
-            "* $libdir *") ;;
+            *" $libdir "*) ;;
             *) perm_rpath="$perm_rpath $libdir" ;;
             esac
           fi
@@ -744,10 +766,16 @@ if test -z "$show_help"; then
        continue
         ;;
 
+      # Some other compiler argument.
       *)
-        $echo "$progname: unknown file suffix for \`$arg'" 1>&2
-        $echo "$help" 1>&2
-        exit 1
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "$arg" | sed "$sed_quote_subst"`
+       case "$arg" in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*)
+         arg="\"$arg\""
+         ;;
+       esac
         ;;
       esac
 
@@ -798,6 +826,9 @@ if test -z "$show_help"; then
         exit 1
       fi
 
+      # Add libc to deplibs on all systems.
+      deplibs="$deplibs -lc"
+
       if test -n "$dlfiles$dlprefiles"; then
         $echo "$progname: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2
         # Nullify the symbol file.
@@ -1079,8 +1110,14 @@ if test -z "$show_help"; then
                 hardcode_libdirs="$libdir"
                 libdir="@HARDCODE_LIBDIRS@"
               else
-                # Just accumulate the libdirs.
-                hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                # Just accumulate the unique libdirs.
+               case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+               *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+                 ;;
+               *)
+                 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                 ;;
+               esac
                 libdir=
               fi
             fi
@@ -1093,7 +1130,7 @@ if test -z "$show_help"; then
             fi
           elif test "$hardcode_runpath_var" = yes; then
             case "$perm_rpath " in
-            "* $libdir *") ;;
+            *" $libdir "*) ;;
             *) perm_rpath="$perm_rpath $libdir" ;;
             esac
           fi
@@ -1112,51 +1149,78 @@ if test -z "$show_help"; then
         finalize_command=`$echo "$finalize_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
       fi
 
-      if test "$export_dynamic" = yes && test -n "$global_symbol_pipe" && test -n "$NM"; then
+      if test "$export_dynamic" = yes; then
         # Add our own program objects to the preloaded list.
         dlprefiles=`$echo "$objs$dlprefiles " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
 
         # Discover the nlist of each of the dlfiles.
-        dlsyms="$objdir/${output}S.c"
+       if test -n "$NM" && test -n "$global_symbol_pipe"; then
+         dlsyms="${output}S.c"
+       else
+         NM=
+         global_symbol_pipe=
+         dlsyms=
+       fi
+
         nlist="$objdir/${output}.nm"
 
-        $run rm -f "$nlist" "$nlist"T
+       if test -d $objdir; then
+         $show "rm -f $nlist ${nlist}T"
+         $run rm -f "$nlist" "${nlist}T"
+       else
+         $show "$mkdir $objdir"
+         $run $mkdir $objdir || exit $?
+       fi
+
         for arg in $dlprefiles; do
-          $echo "extracting global symbols from \`$arg'"
-          $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+         if test -n "$NM"; then
+           $show "extracting global C symbols from \`$arg'"
+           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+         fi
         done
 
-        # Parse the name list into a C file.
-        $echo "creating $dlsyms"
+        # Parse the name list into a source file.
+        $show "creating $objdir/$dlsyms"
         if test -z "$run"; then
+         # Make sure we at least have an empty file.
+         test -f "$nlist" || : > "$nlist"
+
          # Try sorting and uniquifying the output.
          if sort "$nlist" | uniq > "$nlist"T; then
            mv -f "$nlist"T "$nlist"
            wcout=`wc "$nlist" 2>/dev/null`
            count=`$echo "$wcout" | sed 's/^[   ]*\([0-9][0-9]*\).*$/\1/'`
-           test "$wcout" = "$count" && count=-1
+           (test "$count" -ge 0) 2>/dev/null || count=-1
          else
            rm -f "$nlist"T
            count=-1
          fi
 
-          cat <<EOF > "$dlsyms"
+         case "$dlsyms" in
+         "") ;;
+         *.c)
+           cat <<EOF > "$objdir/$dlsyms"
 /* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */
 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION */
 
-/* Prevent the only kind of circular reference mistakes we can make. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
 #define dld_preloaded_symbol_count some_other_symbol
 #define dld_preloaded_symbols some_other_symbol
 
 /* External symbol declarations for the compiler. */
 EOF
-          if test -f "$nlist"; then
-            sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$dlsyms"
-          else
-            $echo "/* NONE */" >> "$dlsyms"
-          fi
+           if test -f "$nlist"; then
+             sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms"
+           else
+             $echo '/* NONE */' >> "$objdir/$dlsyms"
+EOF
+           fi
 
-          cat <<EOF >> "$dlsyms"
+           cat <<EOF >> "$objdir/$dlsyms"
 
 #undef dld_preloaded_symbol_count
 #undef dld_preloaded_symbols
@@ -1179,20 +1243,30 @@ dld_preloaded_symbols[] =
 {
 EOF
 
-          if test -f "$nlist"; then
-            sed 's/^\(.*\) \(.*\)$/  {"\1", \&\2},/' < "$nlist" >> "$dlsyms"
-          fi
+           if test -f "$nlist"; then
+             sed 's/^\(.*\) \(.*\)$/  {"\1", \&\2},/' < "$nlist" >> "$objdir/$dlsyms"
+           fi
 
-          cat <<\EOF >> "$dlsyms"
+           cat <<\EOF >> "$objdir/$dlsyms"
   {0},
 };
+
+#ifdef __cplusplus
+}
+#endif
 EOF
+           ;;
+
+         *)
+           echo "$progname: unknown suffix for \`$dlsyms'" 1>&2
+           exit 1
+           ;;
+         esac
         fi
-        $run rm -f "$nlist" "$nlist"T
 
         # Now compile the dynamic symbol file.
-        $show "(cd $objdir && $CC -c$no_builtin_flag \"${output}S.c\")"
-        $run eval '(cd $objdir && $CC -c$no_builtin_flag "${output}S.c")' || exit $?
+        $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")"
+        $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $?
 
         # Transform the symbol file into the correct name.
         compile_command=`$echo "$compile_command" | sed "s%@SYMFILE@%$objdir/${output}S.o%"`
@@ -1282,7 +1356,7 @@ EOF
       $run eval "$compile_command" || exit $?
 
       # Now create the wrapper script.
-      $echo "creating $output"
+      $show "creating $output"
 
       # Quote the finalize command for shipping.
       finalize_command=`$echo "$finalize_command" | sed "$sed_quote_subst"`
@@ -1321,6 +1395,23 @@ else
   thisdir=\`\$echo "\$file" | sed 's%/[^/]*$%%'\`
   test "x\$thisdir" = "x\$file" && thisdir=.
 
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld "\$file" | sed -n 's/.*-> //p'\`
+  while test -n "\$file"; do
+    destdir=\`\$echo "\$file" | sed 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test "x\$destdir" != "x\$file"; then
+      case "\$destdir" in
+      /*) thisdir="\$destdir" ;;
+      *) thisdir="\$thisdir/\$destdir" ;;
+      esac
+    fi
+
+    file=\`\$echo "\$file" | sed 's%^.*/%%'\`
+    file=\`ls -ld "\$thisdir/\$file" | sed -n 's/.*-> //p'\`
+  done
+
   # Try to get the absolute directory name.
   absdir=\`cd "\$thisdir" && pwd\`
   test -n "\$absdir" && thisdir="\$absdir"
@@ -1328,14 +1419,6 @@ else
   progdir="\$thisdir/$objdir"
   program='$output'
 
-  # If the \$file dir failed (maybe due to symlink), try a hardcoded dir.
-  oprogdir="\$progdir"
-  if test -f "\$progdir/\$program"; then :
-  else
-    thisdir='`pwd`'
-    progdir="\$thisdir/$objdir"
-  fi
-
   if test -f "\$progdir/\$program"; then
 EOF
 
@@ -1376,7 +1459,7 @@ EOF
     fi
   else
     # The program doesn't exist.
-    \$echo "\$0: error: neither \$oprogdir/\$program nor \$progdir/\$program exists" 1>&2
+    \$echo "\$0: error: \$progdir/\$program does not exist" 1>&2
     \$echo "This script is just a wrapper for \$program." 1>&2
     \$echo "See the $PACKAGE documentation for more information." 1>&2
     exit 1
@@ -1407,7 +1490,11 @@ EOF
       fi
 
       # Do each command in the archive commands.
-      cmds=`eval \\$echo \"$old_archive_cmds\"`
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=`eval \\$echo \"$old_archive_from_new_cmds\"`
+      else
+       cmds=`eval \\$echo \"$old_archive_cmds\"`
+      fi
       IFS="${IFS=      }"; save_ifs="$IFS"; IFS=';'
       for cmd in $cmds; do
         IFS="$save_ifs"
@@ -1423,7 +1510,7 @@ EOF
       old_library=
       test "$build_old_libs" = yes && old_library="$libname.a"
 
-      $echo "creating $output"
+      $show "creating $output"
 
       # Only create the output if not a dry run.
       if test -z "$run"; then
@@ -1463,15 +1550,33 @@ EOF
   install)
     progname="$progname: install"
 
-    # The first argument is the name of the installation program.
+    # There may be an optional /bin/sh argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL"; then
+      # Aesthetically quote it.
+      arg=`$echo "$nonopt" | sed "$sed_quote_subst"`
+      case "$arg" in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
+       arg="\"$arg\""
+       ;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
     # Aesthetically quote it.
-    arg=`$echo "$nonopt" | sed "$sed_quote_subst"`
+    arg=`$echo "$arg" | sed "$sed_quote_subst"`
     case "$arg" in
     *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \      ]*|*]*)
       arg="\"$arg\""
       ;;
     esac
-    install_prog="$arg"
+    install_prog="$install_prog$arg"
 
     # We need to accept at least all the BSD install flags.
     dest=
@@ -1599,7 +1704,7 @@ EOF
 
       *.la)
         # Check to see that this really is a libtool archive.
-        if egrep "^# Generated by ltmain.sh" $file >/dev/null 2>&1; then :
+        if egrep '^# Generated by ltmain.sh' $file >/dev/null 2>&1; then :
         else
           $echo "$progname: \`$file' is not a valid libtool archive" 1>&2
           $echo "$help" 1>&2
@@ -1617,13 +1722,13 @@ EOF
         # Add the libdir to current_libdirs if it is the destination.
         if test "X$destdir" = "X$libdir"; then
           case "$current_libdirs " in
-          "* $libdir *") ;;
+          *" $libdir "*) ;;
           *) current_libdirs="$current_libdirs $libdir" ;;
           esac
         else
           # Note the libdir as a future libdir.
           case "$future_libdirs " in
-          "* $libdir *") ;;
+          *" $libdir "*) ;;
           *) future_libdirs="$future_libdirs $libdir" ;;
           esac
         fi
@@ -1845,7 +1950,7 @@ EOF
     if test -n "$current_libdirs"; then
       # Maybe just do a dry run.
       test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec $0 --finish$current_libdirs
+      exec $SHELL $0 --finish$current_libdirs
       exit 1
     fi
 
@@ -1909,7 +2014,7 @@ EOF
       case "$file" in
       *.la)
         # Check to see that this really is a libtool archive.
-        if egrep "^# Generated by ltmain.sh" $file >/dev/null 2>&1; then :
+        if egrep '^# Generated by ltmain.sh' $file >/dev/null 2>&1; then :
         else
           $echo "$progname: \`$lib' is not a valid libtool archive" 1>&2
           $echo "$help" 1>&2
@@ -2044,7 +2149,7 @@ EOF
       case "$name" in
       *.la)
         # Possibly a libtool archive, so verify it.
-        if egrep "^# Generated by ltmain.sh" $file >/dev/null 2>&1; then
+        if egrep '^# Generated by ltmain.sh' $file >/dev/null 2>&1; then
           . $dir/$name
 
           # Delete the libtool libraries and symlinks.