Index: libungif-4.1.0b1/config.guess
diff -c libungif-4.1.0b1/config.guess:1.1.1.1 libungif-4.1.0b1/config.guess:1.2
*** libungif-4.1.0b1/config.guess:1.1.1.1	Mon Jun 12 16:57:32 2000
--- libungif-4.1.0b1/config.guess	Fri Oct 13 16:34:51 2000
***************
*** 396,401 ****
--- 396,414 ----
  	fi
  	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  	exit 0 ;;
+     *:AIX:*:5)
+ 	case "`lsattr -El proc0 -a type -F value`" in
+ 		PowerPC*) IBM_ARCH=powerpc
+ 		          IBM_CPU=ibm ;;
+ 		Itanium)  IBM_ARCH=ia64 
+ 		          IBM_CPU=intel ;;
+ 		POWER*)   IBM_ARCH=power
+ 		          IBM_CPU=ibm ;;
+ 		*)        IBM_ARCH=powerpc
+ 		          IBM_CPU=ibm ;;
+ 	esac
+ 	echo ${IBM_ARCH}-${IBM_CPU}-aix${UNAME_VERSION}.${UNAME_RELEASE}
+ 	exit 0 ;;
      *:AIX:*:*)
  	echo rs6000-ibm-aix
  	exit 0 ;;
Index: libungif-4.1.0b1/config.sub
diff -c libungif-4.1.0b1/config.sub:1.1.1.1 libungif-4.1.0b1/config.sub:1.2
*** libungif-4.1.0b1/config.sub:1.1.1.1	Mon Jun 12 16:57:32 2000
--- libungif-4.1.0b1/config.sub	Fri Oct 13 16:35:06 2000
***************
*** 424,429 ****
--- 424,432 ----
  		basic_machine=hppa1.1-hp
  		os=-proelf
  		;;
+ 	ia64*)
+ 		basic_machine=ia64-intel
+ 		;;
  	i370-ibm* | ibm*)
  		basic_machine=i370-ibm
  		os=-mvs
Index: libungif-4.1.0b1/ltconfig
diff -c libungif-4.1.0b1/ltconfig:1.1.1.1 libungif-4.1.0b1/ltconfig:1.4
*** libungif-4.1.0b1/ltconfig:1.1.1.1	Mon Jun 12 16:57:32 2000
--- libungif-4.1.0b1/ltconfig	Sun Mar 18 14:51:42 2001
***************
*** 1,7 ****
  #! /bin/sh
  
  # ltconfig - Create a system-specific libtool.
! # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This file is free software; you can redistribute it and/or modify it
--- 1,7 ----
  #! /bin/sh
  
  # ltconfig - Create a system-specific libtool.
! # Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This file is free software; you can redistribute it and/or modify it
***************
*** 53,59 ****
  
  # Find the correct PATH separator.  Usually this is `:', but
  # DJGPP uses `;' like DOS.
! if test "X${PATH_SEPARATOR+set}" != "Xset"; then
    UNAME=${UNAME-`uname 2>/dev/null`}
    case X$UNAME in
      *-DOS) PATH_SEPARATOR=';' ;;
--- 53,59 ----
  
  # Find the correct PATH separator.  Usually this is `:', but
  # DJGPP uses `;' like DOS.
! if test "X${PATH_SEPARATOR+set}" != Xset; then
    UNAME=${UNAME-`uname 2>/dev/null`}
    case X$UNAME in
      *-DOS) PATH_SEPARATOR=';' ;;
***************
*** 63,71 ****
  
  # The HP-UX ksh and POSIX shell print the target directory to stdout
  # if CDPATH is set.
! if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
  
! if test "X${echo_test_string+set}" != "Xset"; then
    # find a string as large as possible, as long as the shell can cope with it
    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
--- 63,71 ----
  
  # The HP-UX ksh and POSIX shell print the target directory to stdout
  # if CDPATH is set.
! if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  
! if test "X${echo_test_string+set}" != Xset; then
    # find a string as large as possible, as long as the shell can cope with it
    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
***************
*** 169,178 ****
  # Constants:
  PROGRAM=ltconfig
  PACKAGE=libtool
! VERSION=1.3.3
! TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
! 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"
  
  help="Try \`$progname --help' for more information."
--- 169,178 ----
  # Constants:
  PROGRAM=ltconfig
  PACKAGE=libtool
! VERSION=1.3.5a
! TIMESTAMP=" (1.385.2.236 2000/10/30 23:25:09)"
! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  rm="rm -f"
  
  help="Try \`$progname --help' for more information."
***************
*** 369,378 ****
  # Only set LANG and LC_ALL to C if already set.
  # These must not be set unconditionally because not all systems understand
  # e.g. LANG=C (notably SCO).
! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
! if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  
! if test -n "$cache_file" && test -r "$cache_file"; then
    echo "loading cache $cache_file within ltconfig"
    . $cache_file
  fi
--- 369,378 ----
  # Only set LANG and LC_ALL to C if already set.
  # These must not be set unconditionally because not all systems understand
  # e.g. LANG=C (notably SCO).
! if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
! if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
  
! if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then
    echo "loading cache $cache_file within ltconfig"
    . $cache_file
  fi
***************
*** 462,468 ****
    # 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
--- 462,468 ----
    # 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 "X${COLLECT_NAMES+set}" != Xset; then
      COLLECT_NAMES=
      export COLLECT_NAMES
    fi
***************
*** 623,648 ****
  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
!   ac_cv_exeext="no"
!   $rm conftest*
!   echo 'main () { return 0; }' > conftest.c
!   echo "$progname:629: checking for executable suffix" >& 5
!   if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
!     # Append any warnings to the config.log.
!     cat conftest.err 1>&5
! 
!     for ac_file in conftest.*; do
!       case $ac_file in
!       *.c | *.err | *.$objext ) ;;
!       *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
!       esac
!     done
!   else
!     cat conftest.err 1>&5
!     echo "$progname: failed program was:" >&5
!     cat conftest.c >&5
!   fi
!   $rm conftest*
  fi
  if test "X$ac_cv_exeext" = Xno; then
    exeext=""
--- 623,655 ----
  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
!   case "$host_os" in
!   cygwin* | mingw* | os2*)
!     ac_cv_exeext=.exe
!     ;;
!   *)
!     ac_cv_exeext="no"
!     $rm conftest*
!     echo 'main () { return 0; }' > conftest.c
!     echo "$progname:634: checking for executable suffix" >& 5
!     if { (eval echo $progname:635: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
!       # Append any warnings to the config.log.
!       cat conftest.err 1>&5
! 
!       for ac_file in conftest.*; do
!         case $ac_file in
!         *.c | *.err | *.$objext ) ;;
!         *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
!         esac
!       done
!     else
!       cat conftest.err 1>&5
!       echo "$progname: failed program was:" >&5
!       cat conftest.c >&5
!     fi
!     $rm conftest*
!     ;;
!   esac
  fi
  if test "X$ac_cv_exeext" = Xno; then
    exeext=""
***************
*** 663,669 ****
    link_static_flag='-static'
  
    case "$host_os" in
!   beos* | irix5* | irix6* | osf3* | osf4*)
      # PIC is the default for these OSes.
      ;;
    aix*)
--- 670,676 ----
    link_static_flag='-static'
  
    case "$host_os" in
!   beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;
    aix*)
***************
*** 696,704 ****
  else
    # PORTME Check for PIC flags for the system compiler.
    case "$host_os" in
!   aix3* | aix4*)
      # All AIX code is PIC.
!     link_static_flag='-bnso -bI:/lib/syscalls.exp'
      ;;
  
    hpux9* | hpux10* | hpux11*)
--- 703,716 ----
  else
    # PORTME Check for PIC flags for the system compiler.
    case "$host_os" in
!   aix3* | aix4* | aix5*)
      # All AIX code is PIC.
!     if test "$host_cpu" = ia64; then
!       # AIX 5 now supports IA64 processor
!       link_static_flag='-Bstatic'
!     else
!       link_static_flag='-bnso -bI:/lib/syscalls.exp'
!     fi
      ;;
  
    hpux9* | hpux10* | hpux11*)
***************
*** 718,724 ****
      # We can build DLLs from non-PIC.
      ;;
  
!   osf3* | osf4*)
      # All OSF/1 code is PIC.
      wl='-Wl,'
      link_static_flag='-non_shared'
--- 730,736 ----
      # We can build DLLs from non-PIC.
      ;;
  
!   osf3* | osf4* | osf5*)
      # All OSF/1 code is PIC.
      wl='-Wl,'
      link_static_flag='-non_shared'
***************
*** 773,780 ****
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $pic_flag -DPIC"
!   echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
!   if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
      # Append any warnings to the config.log.
      cat conftest.err 1>&5
      
--- 785,792 ----
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $pic_flag -DPIC"
!   echo "$progname:788: checking if $compiler PIC flag $pic_flag works" >&5
!   if { (eval echo $progname:789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
      # Append any warnings to the config.log.
      cat conftest.err 1>&5
      
***************
*** 826,833 ****
  chmod -w .
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -o out/conftest2.o"
! echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
! if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  
    # The compiler can only warn and ignore the option if not recognized
    # So say no if there are warnings
--- 838,845 ----
  chmod -w .
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -o out/conftest2.o"
! echo "$progname:841: checking if $compiler supports -c -o file.o" >&5
! if { (eval echo $progname:842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  
    # The compiler can only warn and ignore the option if not recognized
    # So say no if there are warnings
***************
*** 859,866 ****
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -c -o conftest.lo"
!   echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
! if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
--- 871,878 ----
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -c -o conftest.lo"
!   echo "$progname:874: checking if $compiler supports -c -o file.lo" >&5
! if { (eval echo $progname:875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
***************
*** 911,918 ****
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
!   echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
!   if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
--- 923,930 ----
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
!   echo "$progname:926: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
!   if { (eval echo $progname:927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
***************
*** 955,962 ****
  echo 'main(){return(0);}' > conftest.c
  save_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LDFLAGS $link_static_flag"
! echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
! if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    echo "$ac_t$link_static_flag" 1>&6
  else
    echo "$ac_t"none 1>&6
--- 967,974 ----
  echo 'main(){return(0);}' > conftest.c
  save_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LDFLAGS $link_static_flag"
! echo "$progname:970: checking if $compiler static flag $link_static_flag works" >&5
! if { (eval echo $progname:971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    echo "$ac_t$link_static_flag" 1>&6
  else
    echo "$ac_t"none 1>&6
***************
*** 988,994 ****
    if test "$with_gcc" = yes; then
      # Check if gcc -print-prog-name=ld gives a path.
      echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
!     echo "$progname:991: checking for ld used by GCC" >&5
      ac_prog=`($CC -print-prog-name=ld) 2>&5`
      case "$ac_prog" in
      # Accept absolute paths.
--- 1000,1006 ----
    if test "$with_gcc" = yes; then
      # Check if gcc -print-prog-name=ld gives a path.
      echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
!     echo "$progname:1003: checking for ld used by GCC" >&5
      ac_prog=`($CC -print-prog-name=ld) 2>&5`
      case "$ac_prog" in
      # Accept absolute paths.
***************
*** 1012,1021 ****
      esac
    elif test "$with_gnu_ld" = yes; then
      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
!     echo "$progname:1015: checking for GNU ld" >&5
    else
      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
!     echo "$progname:1018: checking for non-GNU ld" >&5
    fi
  
    if test -z "$LD"; then
--- 1024,1033 ----
      esac
    elif test "$with_gnu_ld" = yes; then
      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
!     echo "$progname:1027: checking for GNU ld" >&5
    else
      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
!     echo "$progname:1030: checking for non-GNU ld" >&5
    fi
  
    if test -z "$LD"; then
***************
*** 1115,1122 ****
  
    # See if GNU ld supports shared libraries.
    case "$host_os" in
!   aix3* | aix4*)
      # On AIX, the GNU linker is very broken
      ld_shlibs=no
      cat <<EOF 1>&2
  
--- 1127,1135 ----
  
    # See if GNU ld supports shared libraries.
    case "$host_os" in
!   aix3* | aix4* | aix5*)
      # On AIX, the GNU linker is very broken
+     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
      ld_shlibs=no
      cat <<EOF 1>&2
  
***************
*** 1164,1178 ****
      # Extract the symbol export list from an `--export-all' def file,
      # then regenerate the def file from the symbol export list, so that
      # the compiled dll only exports the symbol export list.
      export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
        test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
        $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs $convenience~
!       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
  
      archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
        _lt_hint=1;
!       for symbol in `cat $export_symbols`; do
! 	echo "	\$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
  	_lt_hint=`expr 1 + \$_lt_hint`;
        done~
        test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
--- 1177,1197 ----
      # Extract the symbol export list from an `--export-all' def file,
      # then regenerate the def file from the symbol export list, so that
      # the compiled dll only exports the symbol export list.
+     # Be careful not to strip the DATA tag left by newer dlltools.
      export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
        test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
        $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs $convenience~
!       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols'
  
+     # If DATA tags from a recent dlltool are present, honour them!
      archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
        _lt_hint=1;
!       cat $export_symbols | while read symbol; do
!         set dummy \$symbol;
!         case \$# in
!           2) echo "	\$2 @ \$_lt_hint ; " >> $objdir/$soname-def;;
!           *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;;
!         esac;
  	_lt_hint=`expr 1 + \$_lt_hint`;
        done~
        test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
***************
*** 1187,1202 ****
      ;;
  
    netbsd*)
!     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
        archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-     else
-       archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
-       # can we support soname and/or expsyms with a.out? -oliva
      fi
      ;;
  
!   solaris*)
      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
        ld_shlibs=no
        cat <<EOF 1>&2
--- 1206,1221 ----
      ;;
  
    netbsd*)
!     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
!       archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
!       wlarc=
!     else
        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
        archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
      fi
      ;;
  
!   solaris* | sysv5*)
      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
        ld_shlibs=no
        cat <<EOF 1>&2
***************
*** 1244,1250 ****
        whole_archive_flag_spec=
        ;;
      *)
!       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
        ;;
      esac
    fi
--- 1263,1274 ----
        whole_archive_flag_spec=
        ;;
      *)
!       # ancient GNU ld didn't support --whole-archive et. al.
!       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
!         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
!       else
!         whole_archive_flag_spec=
!       fi
        ;;
      esac
    fi
***************
*** 1265,1302 ****
      fi
      ;;
  
!   aix4*)
!     hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
      hardcode_libdir_separator=':'
      if test "$with_gcc" = yes; then
        collect2name=`${CC} -print-prog-name=collect2`
        if test -f "$collect2name" && \
! 	 strings "$collect2name" | grep resolve_lib_name >/dev/null
        then
! 	# We have reworked collect2
! 	hardcode_direct=yes
        else
! 	# We have old collect2
! 	hardcode_direct=unsupported
! 	# It fails to find uninstalled libraries when the uninstalled
! 	# path is not listed in the libpath.  Setting hardcode_minus_L
! 	# to unsupported forces relinking
! 	hardcode_minus_L=yes
! 	hardcode_libdir_flag_spec='-L$libdir'
! 	hardcode_libdir_separator=
        fi
        shared_flag='-shared'
      else
!       shared_flag='${wl}-bM:SRE'
        hardcode_direct=yes
      fi
!     allow_undefined_flag=' ${wl}-berok'
!     archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
!     archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
!     case "$host_os" in aix4.[01]|aix4.[01].*)
!       # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
!       always_export_symbols=yes ;;
!     esac
     ;;
  
    amigaos*)
--- 1289,1365 ----
      fi
      ;;
  
!   aix4* | aix5*)
      hardcode_libdir_separator=':'
      if test "$with_gcc" = yes; then
        collect2name=`${CC} -print-prog-name=collect2`
        if test -f "$collect2name" && \
!         strings "$collect2name" | grep resolve_lib_name >/dev/null
        then
!         # We have reworked collect2
!         hardcode_direct=yes
        else
!         # We have old collect2
!         hardcode_direct=unsupported
!         # It fails to find uninstalled libraries when the uninstalled
!         # path is not listed in the libpath.  Setting hardcode_minus_L
!         # to unsupported forces relinking
!         hardcode_minus_L=yes
!         hardcode_libdir_flag_spec='-L$libdir'
!         hardcode_libdir_separator=
        fi
        shared_flag='-shared'
      else
!       if test "$host_cpu" = ia64; then
!         shared_flag='${wl}-G'
!       else
!         shared_flag='${wl}-bM:SRE'
!       fi
        hardcode_direct=yes
      fi
! 
!     if test "$host_cpu" = ia64; then
!       # On IA64, the linker does run time linking by default, so we don't
!       # have to do anything special.
!       aix_use_runtimelinking=no
!       exp_sym_flag='-Bexport'
!       no_entry_flag=""
!     else
!       # Test if we are trying to use run time linking, or normal AIX style linking.
!       # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
!       aix_use_runtimelinking=no
!       for ld_flag in $LDFLAGS; do
!         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
!           aix_use_runtimelinking=yes
!           break
!         fi
!       done
!       exp_sym_flag='-bexport'
!       no_entry_flag='${wl}-bnoentry'
!     fi
!     # It seems that -bexpall can do strange things, so it is better to
!     # generate a list of symbols to export.
!     always_export_symbols=yes
!     hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
!     if test "$aix_use_runtimelinking" = yes; then
!       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
!       allow_undefined_flag=' -Wl,-G'
!       archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${allow_undefined_flag} $no_entry_flag '"\${wl}$exp_sym_flag:\$export_symbols"
!     else
!       if test "$host_cpu" = ia64; then
!         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
!         allow_undefined_flag="-z nodefs"
!         archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname ${wl}-h$soname $libobjs $deplibs $linkopts ${wl}${allow_undefined_flag} $no_entry_flag '"\${wl}$exp_sym_flag:\$export_symbols"
!       else
!         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
!         # Warning - without using the other run time loading flags, -berok will
!         #           link without error, but may produce a broken library.
!         allow_undefined_flag="-berok"
!         # This is a bit strange, but is similar to how AIX traditionally builds
!         # it's shared libraries.
!         archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}${allow_undefined_flag} $no_entry_flag '"\${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
!       fi
!     fi
     ;;
  
    amigaos*)
***************
*** 1405,1411 ****
      old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
      ;;
  
!   osf3* | osf4*)
      if test "$with_gcc" = yes; then
        allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
        archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
--- 1468,1474 ----
      old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
      ;;
  
!   osf3*)
      if test "$with_gcc" = yes; then
        allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
        archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
***************
*** 1417,1422 ****
--- 1480,1506 ----
      hardcode_libdir_separator=:
      ;;
  
+   osf4* | osf5*)  # As osf3* with the addition of the -msym flag
+     if test "$with_gcc" = yes; then
+       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+     else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+     fi
+ #Both c and cxx compiler support -rpath directly 
+     hardcode_libdir_flag_spec='-rpath $libdir'
+     hardcode_libdir_separator=:
+     ;;
+   rhapsody*)
+     archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts'
+     hardcode_libdir_flags_spec='-L$libdir'
+     hardcode_direct=yes
+     hardcode_shlibpath_var=no
+     ;;
+                                        
    sco3.2v5*)
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
      hardcode_shlibpath_var=no
***************
*** 1449,1455 ****
      ;;
  
    sysv4)
!     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
      runpath_var='LD_RUN_PATH'
      hardcode_shlibpath_var=no
      hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
--- 1533,1545 ----
      ;;
  
    sysv4)
!     if test "x$host_vendor" = xsequent; then
!       # Use $CC to link under sequent, because it throws in some extra .o 
!       # files that make .init and .fini sections work.
!       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
!     else
!       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
!     fi
      runpath_var='LD_RUN_PATH'
      hardcode_shlibpath_var=no
      hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
***************
*** 1461,1466 ****
--- 1551,1568 ----
      export_dynamic_flag_spec='-Bexport'
      ;;
  
+   sysv5*)
+     no_undefined_flag=' -z text'
+     # $CC -shared without GNU ld will not create a library from C++
+     # object files and a static libstdc++, better avoid it by now
+     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
+     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ 		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+     hardcode_libdir_flag_spec=
+     hardcode_shlibpath_var=no
+     runpath_var='LD_RUN_PATH'
+     ;;
+ 
    uts4*)
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
      hardcode_libdir_flag_spec='-L$libdir'
***************
*** 1474,1489 ****
      ;;
  
    sysv4*MP*)
!     if test -d /usr/nec ;then
!     # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
!     archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
      hardcode_shlibpath_var=no
-     runpath_var=LD_RUN_PATH
      hardcode_runpath_var=yes
!     ld_shlibs=yes
!     fi
      ;;
  
    *)
      ld_shlibs=no
      ;;
--- 1576,1605 ----
      ;;
  
    sysv4*MP*)
!     if test -d /usr/nec; then
!       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
!       hardcode_shlibpath_var=no
!       runpath_var=LD_RUN_PATH
!       hardcode_runpath_var=yes
!       ld_shlibs=yes
!     fi
!     ;;
! 
!   sysv4.2uw2*)
!     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
!     hardcode_direct=yes
!     hardcode_minus_L=no
      hardcode_shlibpath_var=no
      hardcode_runpath_var=yes
!     runpath_var=LD_RUN_PATH
      ;;
  
+   unixware7*)
+     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
+     runpath_var='LD_RUN_PATH'
+     hardcode_shlibpath_var=no
+     ;;
+ 
    *)
      ld_shlibs=no
      ;;
***************
*** 1504,1510 ****
  	# Check to see if the nm accepts a BSD-compat flag.
  	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
  	#   nm: unknown option "B" ignored
! 	if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  	  NM="$ac_dir/nm -B"
  	  break
  	elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
--- 1620,1627 ----
  	# Check to see if the nm accepts a BSD-compat flag.
  	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
  	#   nm: unknown option "B" ignored
! 	# Tru64's nm complains that /dev/null is an invalid object file
! 	if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
  	  NM="$ac_dir/nm -B"
  	  break
  	elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
***************
*** 1589,1599 ****
  main(){nm_test_var='a';nm_test_func();return(0);}
  EOF
  
!   echo "$progname:1592: checking if global_symbol_pipe works" >&5
!   if { (eval echo $progname:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
      # Now try to grab the symbols.
      nlist=conftest.nm
!     if { echo "$progname:1596: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  
        # Try sorting and uniquifying the output.
        if sort "$nlist" | uniq > "$nlist"T; then
--- 1706,1716 ----
  main(){nm_test_var='a';nm_test_func();return(0);}
  EOF
  
!   echo "$progname:1709: checking if global_symbol_pipe works" >&5
!   if { (eval echo $progname:1710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
      # Now try to grab the symbols.
      nlist=conftest.nm
!     if { echo "$progname:1713: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  
        # Try sorting and uniquifying the output.
        if sort "$nlist" | uniq > "$nlist"T; then
***************
*** 1645,1651 ****
  	  save_CFLAGS="$CFLAGS"
  	  LIBS="conftstm.$objext"
  	  CFLAGS="$CFLAGS$no_builtin_flag"
! 	  if { (eval echo $progname:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  	    pipe_works=yes
  	  else
  	    echo "$progname: failed program was:" >&5
--- 1762,1768 ----
  	  save_CFLAGS="$CFLAGS"
  	  LIBS="conftstm.$objext"
  	  CFLAGS="$CFLAGS$no_builtin_flag"
! 	  if { (eval echo $progname:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  	    pipe_works=yes
  	  else
  	    echo "$progname: failed program was:" >&5
***************
*** 1757,1772 ****
    soname_spec='${libname}${release}.so$major'
    ;;
  
! aix4*)
    version_type=linux
!   # AIX has no versioning support, so currently we can not hardcode correct
    # soname into executable. Probably we can add versioning support to
    # collect2, so additional links can be useful in future.
    # We preserve .a as extension for shared libraries though AIX4.2
    # and later linker supports .so
!   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
!   shlibpath_var=LIBPATH
!   deplibs_check_method=pass_all
    ;;
  
  amigaos*)
--- 1874,1905 ----
    soname_spec='${libname}${release}.so$major'
    ;;
  
! aix4* | aix5*)
    version_type=linux
!   if test "$host_cpu" = ia64; then
!     # AIX 5 supports IA64
!     library_names_spec='${libname}${release}.so$major  ${libname}${release}.so$versuffix ${libname}.so'
!     shlibpath_var=LD_LIBRARY_PATH
!     soname_spec='${libname}${release}.so$major'
!   else
!   # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
    # soname into executable. Probably we can add versioning support to
    # collect2, so additional links can be useful in future.
    # We preserve .a as extension for shared libraries though AIX4.2
    # and later linker supports .so
!     if test "$aix_use_runtimelinking" = yes; then
!       # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
!       # lib<name>.a to let people know that these are not typical AIX shared libraries.
!       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
!     else
!       # We preserve .a as extension for shared libraries though AIX4.2
!       # and later when we are not doing run time linking.
!       library_names_spec='${libname}${release}.a $libname.a'
!       soname_spec='${libname}${release}.so$major'
!     fi
!     shlibpath_var=LIBPATH
!     deplibs_check_method=pass_all
!   fi
    ;;
  
  amigaos*)
***************
*** 1787,1794 ****
  
  bsdi4*)
    version_type=linux
!   library_names_spec='${libname}.so$major ${libname}.so'
!   soname_spec='${libname}.so'
    finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
    shlibpath_var=LD_LIBRARY_PATH
    deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
--- 1920,1928 ----
  
  bsdi4*)
    version_type=linux
!   need_version=no
!   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
!   soname_spec='${libname}${release}.so$major'
    finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
    shlibpath_var=LD_LIBRARY_PATH
    deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
***************
*** 1796,1801 ****
--- 1930,1936 ----
    file_magic_test_file=/shlib/libc.so
    sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
    sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+   export_dynamic_flag_spec=-rdynamic
    # the default ld.so.conf also contains /usr/contrib/lib and
    # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
    # libtool to hard-code these into programs
***************
*** 1841,1853 ****
        need_version=yes
        ;;
    esac
-   finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
    shlibpath_var=LD_LIBRARY_PATH
    case "$host_os" in
!   freebsd2* | freebsd3.[01]*)
      shlibpath_overrides_runpath=yes
      ;;
!   *) # from 3.2 on
      shlibpath_overrides_runpath=no
      ;;
    esac
--- 1976,1987 ----
        need_version=yes
        ;;
    esac
    shlibpath_var=LD_LIBRARY_PATH
    case "$host_os" in
!   freebsd2*)
      shlibpath_overrides_runpath=yes
      ;;
!   *)
      shlibpath_overrides_runpath=no
      ;;
    esac
***************
*** 1875,1888 ****
    soname_spec='${libname}${release}.sl$major'
    # HP-UX runs *really* slowly unless shared libraries are mode 555.
    postinstall_cmds='chmod 555 $lib'
    ;;
  
  irix5* | irix6*)
    version_type=irix
    need_lib_prefix=no
    need_version=no
!   soname_spec='${libname}${release}.so.$major'
!   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
    case "$host_os" in
    irix5*)
      libsuff= shlibsuff=
--- 2009,2030 ----
    soname_spec='${libname}${release}.sl$major'
    # HP-UX runs *really* slowly unless shared libraries are mode 555.
    postinstall_cmds='chmod 555 $lib'
+   case "$host_os" in
+   hpux10.20*)
+     # TODO:  Does this work for hpux-11 too?
+     deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+     file_magic_cmd=/usr/bin/file
+     file_magic_test_file=/usr/lib/libc.sl
+     ;;
+   esac
    ;;
  
  irix5* | irix6*)
    version_type=irix
    need_lib_prefix=no
    need_version=no
!   soname_spec='${libname}${release}.so$major'
!   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
    case "$host_os" in
    irix5*)
      libsuff= shlibsuff=
***************
*** 1896,1903 ****
      *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
      *) libsuff= shlibsuff= libmagic=never-match;;
      esac
-     # this will be overridden with pass_all, but let us keep it just in case
-     deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
      ;;
    esac
    shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
--- 2038,2043 ----
***************
*** 1924,1942 ****
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
    shlibpath_var=LD_LIBRARY_PATH
    shlibpath_overrides_runpath=no
!   deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
!   file_magic_cmd=/usr/bin/file
!   file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  
!   if test -f /lib/ld.so.1; then
!     dynamic_linker='GNU ld.so'
!   else
!     # Only the GNU ld.so supports shared libraries on MkLinux.
!     case "$host_cpu" in
!     powerpc*) dynamic_linker=no ;;
!     *) dynamic_linker='Linux ld.so' ;;
!     esac
!   fi
    ;;
  
  netbsd*)
--- 2064,2078 ----
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
    shlibpath_var=LD_LIBRARY_PATH
    shlibpath_overrides_runpath=no
!   deplibs_check_method=pass_all
  
!   # We used to test for /lib/ld.so.1 and disable shared libraries on
!   # powerpc, because MkLinux only supported shared libraries with the
!   # GNU dynamic linker.  Since this was broken with cross compilers,
!   # most powerpc-linux boxes support dynamic linking these days and
!   # people can always --disable-shared, the test was removed, and we
!   # assume the GNU/Linux dynamic linker is in use.
!   dynamic_linker='GNU/Linux ld.so'
    ;;
  
  netbsd*)
***************
*** 1946,1951 ****
--- 2082,2090 ----
      finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
      dynamic_linker='NetBSD (a.out) ld.so'
    else
+     deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+     file_magic_cmd=/usr/bin/file
+     file_magic_test_file=`echo /usr/lib/libc.so*`
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
      soname_spec='${libname}${release}.so$major'
      dynamic_linker='NetBSD ld.elf_so'
***************
*** 1972,1978 ****
    shlibpath_var=LIBPATH
    ;;
  
! osf3* | osf4*)
    version_type=osf
    need_version=no
    soname_spec='${libname}${release}.so'
--- 2111,2117 ----
    shlibpath_var=LIBPATH
    ;;
  
! osf3* | osf4* | osf5*)
    version_type=osf
    need_version=no
    soname_spec='${libname}${release}.so'
***************
*** 1987,1992 ****
--- 2126,2139 ----
    sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
    ;;
  
+ rhapsody*)
+   version_type=sunos
+   library_names_spec='${libname}.so'
+   soname_spec='${libname}.so'
+   shlibpath_var=DYLD_LIBRARY_PATH
+   deplibs_check_method=pass_all
+   ;;
+ 
  sco3.2v5*)
    version_type=osf
    soname_spec='${libname}${release}.so$major'
***************
*** 2027,2032 ****
--- 2174,2183 ----
    soname_spec='${libname}${release}.so$major'
    shlibpath_var=LD_LIBRARY_PATH
    case "$host_vendor" in
+     sequent)
+       file_magic_cmd='/bin/file'
+       deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+       ;;
      ncr)
        deplibs_check_method='pass_all'
        ;;
***************
*** 2126,2132 ****
    fi
    ;;
  
! aix4*)
    test "$enable_shared" = yes && enable_static=no
    ;;
  esac
--- 2277,2283 ----
    fi
    ;;
  
! aix4* | aix5*)
    test "$enable_shared" = yes && enable_static=no
    ;;
  esac
***************
*** 2147,2152 ****
--- 2298,2308 ----
    enable_fast_install=needless
  fi
  
+ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+ if test "$with_gcc" = yes; then
+   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+ fi
+ 
  echo $ac_n "checking for objdir... $ac_c" 1>&6
  rm -f .libs 2>/dev/null
  mkdir .libs 2>/dev/null
***************
*** 2167,2173 ****
  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
    lt_cv_dlopen=no lt_cv_dlopen_libs=
  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
! echo "$progname:2170: checking for dlopen in -ldl" >&5
  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2323,2329 ----
  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
    lt_cv_dlopen=no lt_cv_dlopen_libs=
  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
! echo "$progname:2325: checking for dlopen in -ldl" >&5
  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2175,2191 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2178 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char dlopen();
  
  int main() {
  dlopen()
  ; return 0; }
  EOF
! if { (eval echo $progname:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2331,2350 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2333 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
  char dlopen();
  
  int main() {
  dlopen()
  ; return 0; }
  EOF
! if { (eval echo $progname:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2204,2221 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dlopen""... $ac_c" 1>&6
! echo "$progname:2207: checking for dlopen" >&5
  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2212 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char dlopen(); below.  */
  #include <assert.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char dlopen();
  
  int main() {
--- 2363,2383 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dlopen""... $ac_c" 1>&6
! echo "$progname:2365: checking for dlopen" >&5
  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2370 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char dlopen(); below.  */
  #include <assert.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
  char dlopen();
  
  int main() {
***************
*** 2231,2237 ****
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_dlopen=yes"
  else
--- 2393,2399 ----
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_dlopen=yes"
  else
***************
*** 2247,2254 ****
    lt_cv_dlopen="dlopen"
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
! echo "$progname:2251: checking for dld_link in -ldld" >&5
  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2409,2455 ----
    lt_cv_dlopen="dlopen"
  else
    echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
+ echo "$progname:2412: checking for dlopen in -lsvld" >&5
+ if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lsvld  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 2419 "ltconfig"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ char dlopen();
+ 
+ int main() {
+ dlopen()
+ ; return 0; }
+ EOF
+ if { (eval echo $progname:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_lib_svld_dlopen=yes
+ else
+   echo "$progname: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   ac_cv_lib_svld_dlopen=no
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
+   echo "$ac_t""yes" 1>&6
+   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+ else
+   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
! echo "$progname:2451: checking for dld_link in -ldld" >&5
  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2256,2272 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2259 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char dld_link();
  
  int main() {
  dld_link()
  ; return 0; }
  EOF
! if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2457,2476 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2459 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
  char dld_link();
  
  int main() {
  dld_link()
  ; return 0; }
  EOF
! if { (eval echo $progname:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2285,2302 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
! echo "$progname:2288: checking for shl_load" >&5
  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2293 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char shl_load(); below.  */
  #include <assert.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char shl_load();
  
  int main() {
--- 2489,2509 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
! echo "$progname:2491: checking for shl_load" >&5
  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2496 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char shl_load(); below.  */
  #include <assert.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
  char shl_load();
  
  int main() {
***************
*** 2312,2318 ****
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_shl_load=yes"
  else
--- 2519,2525 ----
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_shl_load=yes"
  else
***************
*** 2330,2336 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "$progname:2333: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2537,2543 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "$progname:2539: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2338,2355 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2341 "ltconfig"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
  char shl_load();
  
  int main() {
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo $progname:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2545,2565 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2547 "ltconfig"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
  char shl_load();
  
  int main() {
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo $progname:2561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2383,2390 ****
--- 2593,2604 ----
  
  fi
  
+ fi
+ 
    if test "x$lt_cv_dlopen" != xno; then
      enable_dlopen=yes
+   else
+     enable_dlopen=no
    fi
  
    case "$lt_cv_dlopen" in
***************
*** 2392,2408 ****
  for ac_hdr in dlfcn.h; do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "$progname:2395: 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 2400 "ltconfig"
  #include <$ac_hdr>
  int fnord = 0;
  EOF
! ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo $progname:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2606,2622 ----
  for ac_hdr in dlfcn.h; do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "$progname:2608: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2613 "ltconfig"
  #include <$ac_hdr>
  int fnord = 0;
  EOF
! ac_try="$ac_compile >/dev/null 2>conftest.out"
! { (eval echo $progname:2618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2430,2436 ****
      LIBS="$lt_cv_dlopen_libs $LIBS"
  
    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2433: checking whether a program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2644,2650 ----
      LIBS="$lt_cv_dlopen_libs $LIBS"
  
    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2646: checking whether a program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2438,2444 ****
      lt_cv_dlopen_self=cross
    else
      cat > conftest.c <<EOF
! #line 2441 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
--- 2652,2658 ----
      lt_cv_dlopen_self=cross
    else
      cat > conftest.c <<EOF
! #line 2654 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
***************
*** 2484,2490 ****
  	       if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self=yes
  else
--- 2698,2704 ----
  	       if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self=yes
  else
***************
*** 2503,2509 ****
    if test "$lt_cv_dlopen_self" = yes; then
      LDFLAGS="$LDFLAGS $link_static_flag"
    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2506: checking whether a statically linked program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self_static+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2717,2723 ----
    if test "$lt_cv_dlopen_self" = yes; then
      LDFLAGS="$LDFLAGS $link_static_flag"
    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2719: checking whether a statically linked program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self_static+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2511,2517 ****
      lt_cv_dlopen_self_static=cross
    else
      cat > conftest.c <<EOF
! #line 2514 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
--- 2725,2731 ----
      lt_cv_dlopen_self_static=cross
    else
      cat > conftest.c <<EOF
! #line 2727 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
***************
*** 2557,2563 ****
      if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self_static=yes
  else
--- 2771,2777 ----
      if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self_static=yes
  else
***************
*** 2649,2655 ****
  # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
  #
  # Copyright (C) 1996-1999 Free Software Foundation, Inc.
! # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
--- 2863,2869 ----
  # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
  #
  # Copyright (C) 1996-1999 Free Software Foundation, Inc.
! # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
***************
*** 2675,2681 ****
  
  # The HP-UX ksh and POSIX shell print the target directory to stdout
  # if CDPATH is set.
! if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
  
  ### BEGIN LIBTOOL CONFIG
  EOF
--- 2889,2895 ----
  
  # The HP-UX ksh and POSIX shell print the target directory to stdout
  # if CDPATH is set.
! if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  
  ### BEGIN LIBTOOL CONFIG
  EOF
***************
*** 2904,2909 ****
--- 3118,3127 ----
  # the resulting binary.
  hardcode_shlibpath_var=$hardcode_shlibpath_var
  
+ # Variables whose values should be saved in libtool wrapper scripts and
+ # restored at relink time.
+ variables_saved_for_relink="$variables_saved_for_relink"
+ 
  # Compile-time system search path for libraries
  sys_lib_search_path_spec=$sys_lib_search_path_spec
  
***************
*** 2938,2944 ****
  # 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
--- 3156,3162 ----
  # 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 "X${COLLECT_NAMES+set}" != Xset; then
    COLLECT_NAMES=
    export COLLECT_NAMES
  fi
***************
*** 2948,2953 ****
--- 3166,3175 ----
  
    # Append the ltmain.sh script.
    sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
+   # We use sed instead of cat because bash on DJGPP gets confused if
+   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+   # text mode, it properly converts lines to CR/LF.  This bash problem
+   # is reportedly fixed, but why not run on old versions too?
  
    chmod +x "$ofile"
    ;;
Index: libungif-4.1.0b1/ltmain.sh
diff -c libungif-4.1.0b1/ltmain.sh:1.1.1.1 libungif-4.1.0b1/ltmain.sh:1.2
*** libungif-4.1.0b1/ltmain.sh:1.1.1.1	Mon Jun 12 16:57:32 2000
--- libungif-4.1.0b1/ltmain.sh	Wed Mar  7 07:45:17 2001
***************
*** 1,7 ****
  # ltmain.sh - Provide generalized library-building support services.
  # NOTE: Changing this file will not affect anything until you rerun ltconfig.
  #
! # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This program is free software; you can redistribute it and/or modify
--- 1,7 ----
  # ltmain.sh - Provide generalized library-building support services.
  # NOTE: Changing this file will not affect anything until you rerun ltconfig.
  #
! # Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  #
  # This program is free software; you can redistribute it and/or modify
***************
*** 54,61 ****
  # Constants.
  PROGRAM=ltmain.sh
  PACKAGE=libtool
! VERSION=1.3.3
! TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
  
  default_mode=
  help="Try \`$progname --help' for more information."
--- 54,61 ----
  # Constants.
  PROGRAM=ltmain.sh
  PACKAGE=libtool
! VERSION=1.3.5a
! TIMESTAMP=" (1.385.2.236 2000/10/30 23:25:09)"
  
  default_mode=
  help="Try \`$progname --help' for more information."
***************
*** 390,396 ****
      # Calculate the filename of the output object if compiler does
      # not support -o with -c
      if test "$compiler_c_o" = no; then
!       output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
        lockfile="$output_obj.lock"
        removelist="$removelist $output_obj $lockfile"
        trap "$run $rm $removelist; exit 1" 1 2 15
--- 390,396 ----
      # Calculate the filename of the output object if compiler does
      # not support -o with -c
      if test "$compiler_c_o" = no; then
!       output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
        lockfile="$output_obj.lock"
        removelist="$removelist $output_obj $lockfile"
        trap "$run $rm $removelist; exit 1" 1 2 15
***************
*** 402,408 ****
      # Lock this critical section if it is needed
      # We use this script file to make the link, it avoids creating a new file
      if test "$need_locks" = yes; then
!       until ln "$0" "$lockfile" 2>/dev/null; do
  	$show "Waiting for $lockfile to be removed"
  	sleep 2
        done
--- 402,408 ----
      # Lock this critical section if it is needed
      # We use this script file to make the link, it avoids creating a new file
      if test "$need_locks" = yes; then
!       until $run ln "$0" "$lockfile" 2>/dev/null; do
  	$show "Waiting for $lockfile to be removed"
  	sleep 2
        done
***************
*** 435,441 ****
        fbsd_hideous_sh_bug=$base_compile
  
        # All platforms use -DPIC, to notify preprocessed assembler code.
!       command="$base_compile $pic_flag -DPIC $srcfile"
        if test "$build_old_libs" = yes; then
  	lo_libobj="$libobj"
  	dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
--- 435,441 ----
        fbsd_hideous_sh_bug=$base_compile
  
        # All platforms use -DPIC, to notify preprocessed assembler code.
!       command="$base_compile $srcfile $pic_flag -DPIC"
        if test "$build_old_libs" = yes; then
  	lo_libobj="$libobj"
  	dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
***************
*** 521,529 ****
  	  exit $error
  	fi
  
  	# Now arrange that obj and lo_libobj become the same file
! 	$show "$LN_S $obj $lo_libobj"
! 	if $run $LN_S $obj $lo_libobj; then
  	  exit 0
  	else
  	  error=$?
--- 521,537 ----
  	  exit $error
  	fi
  
+ 	xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ 	if test "X$xdir" = "X$obj"; then
+ 	  xdir="."
+ 	else
+ 	  xdir="$xdir"
+ 	fi
+ 	baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
+ 	libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
  	# Now arrange that obj and lo_libobj become the same file
! 	$show "(cd $xdir && $LN_S $baseobj $libobj)"
! 	if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
  	  exit 0
  	else
  	  error=$?
***************
*** 604,610 ****
  
      # Unlock the critical section if it was locked
      if test "$need_locks" != no; then
!       $rm "$lockfile"
      fi
  
      exit 0
--- 612,618 ----
  
      # Unlock the critical section if it was locked
      if test "$need_locks" != no; then
!       $run $rm "$lockfile"
      fi
  
      exit 0
***************
*** 613,620 ****
    # libtool link mode
    link)
      modename="$modename: link"
-     C_compiler="$CC" # save it, to compile generated C sources
-     CC="$nonopt"
      case "$host" in
      *-*-cygwin* | *-*-mingw* | *-*-os2*)
        # It is impossible to link a dll without this setting, and
--- 621,626 ----
***************
*** 802,809 ****
        allow_undefined=yes
        ;;
      esac
!     compile_command="$CC"
!     finalize_command="$CC"
  
      compile_rpath=
      finalize_rpath=
--- 808,815 ----
        allow_undefined=yes
        ;;
      esac
!     compile_command="$nonopt"
!     finalize_command="$nonopt"
  
      compile_rpath=
      finalize_rpath=
***************
*** 1130,1140 ****
  	;;
  
        -static)
! 	# If we have no pic_flag, then this is the same as -all-static.
! 	if test -z "$pic_flag" && test -n "$link_static_flag"; then
! 	  compile_command="$compile_command $link_static_flag"
! 	  finalize_command="$finalize_command $link_static_flag"
! 	fi
  	continue
  	;;
  
--- 1136,1146 ----
  	;;
  
        -static)
!         # The effects of -static are defined in a previous loop.
! 	# We used to do the same as -all-static on platforms that
! 	# didn't have a PIC flag, but the assumption that the effects
! 	# would be equivalent was wrong.  It would break on at least
! 	# Digital Unix and AIX.
  	continue
  	;;
  
***************
*** 1296,1301 ****
--- 1302,1310 ----
  	  # are required to link).
  	  if test -n "$old_library"; then
  	    dlprefiles="$dlprefiles $dir/$old_library"
+ 	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+ 	  elif test -n "$dlname"; then
+ 	    dlprefiles="$dlprefiles $dir/$dlname"
  	  else
  	    dlprefiles="$dlprefiles $dir/$linklib"
  	  fi
***************
*** 1691,1697 ****
  
  	irix)
  	  major=`expr $current - $age + 1`
- 	  versuffix="$major.$revision"
  	  verstring="sgi$major.$revision"
  
  	  # Add in all the interfaces that we are compatible with.
--- 1700,1705 ----
***************
*** 1701,1706 ****
--- 1709,1718 ----
  	    loop=`expr $loop - 1`
  	    verstring="sgi$major.$iface:$verstring"
  	  done
+ 
+ 	  # Before this point, $major must not contain `.'.
+ 	  major=.$major
+ 	  versuffix="$major.$revision"
  	  ;;
  
  	linux)
***************
*** 1789,1794 ****
--- 1801,1810 ----
  	*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  	  # these systems don't actually have a c library (as such)!
  	  ;;
+         *-*-rhapsody*)
+ 	  # rhapsody is a little odd...
+ 	  deplibs="$deplibs -framework System"
+ 	  ;;
  	*)
  	  # Add libc to deplibs on all other systems.
  	  deplibs="$deplibs -lc"
***************
*** 1851,1857 ****
  	  int main() { return 0; }
  EOF
  	  $rm conftest
! 	  $C_compiler -o conftest conftest.c $deplibs
  	  if test $? -eq 0 ; then
  	    ldd_output=`ldd conftest`
  	    for i in $deplibs; do
--- 1867,1873 ----
  	  int main() { return 0; }
  EOF
  	  $rm conftest
! 	  $CC -o conftest conftest.c $deplibs
  	  if test $? -eq 0 ; then
  	    ldd_output=`ldd conftest`
  	    for i in $deplibs; do
***************
*** 1884,1890 ****
  	     # If $name is empty we are operating on a -L argument.
  	      if test "$name" != "" ; then
  		$rm conftest
! 		$C_compiler -o conftest conftest.c $i
  		# Did it work?
  		if test $? -eq 0 ; then
  		  ldd_output=`ldd conftest`
--- 1900,1906 ----
  	     # If $name is empty we are operating on a -L argument.
  	      if test "$name" != "" ; then
  		$rm conftest
! 		$CC -o conftest conftest.c $i
  		# Did it work?
  		if test $? -eq 0 ; then
  		  ldd_output=`ldd conftest`
***************
*** 2047,2059 ****
  	done
  
  	# Ensure that we have .o objects for linkers which dislike .lo
! 	# (e.g. aix) incase we are running --disable-static
  	for obj in $libobjs; do
! 	  oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
! 	  if test ! -f $oldobj; then
! 	    $show "${LN_S} $obj $oldobj"
! 	    $run ${LN_S} $obj $oldobj || exit $?
  	  fi
  	done
  
  	# Use standard objects if they are pic
--- 2063,2082 ----
  	done
  
  	# Ensure that we have .o objects for linkers which dislike .lo
! 	# (e.g. aix) in case we are running --disable-static
  	for obj in $libobjs; do
! 	  xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
! 	  if test "X$xdir" = "X$obj"; then
! 	    xdir="."
! 	  else
! 	    xdir="$xdir"
  	  fi
+ 	  baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ 	  oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ 	  if test ! -f $xdir/$oldobj; then
+ 	    $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
+ 	    $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
+ 	  fi
  	done
  
  	# Use standard objects if they are pic
***************
*** 2311,2318 ****
  	# Just create a symlink.
  	$show $rm $libobj
  	$run $rm $libobj
! 	$show "$LN_S $obj $libobj"
! 	$run $LN_S $obj $libobj || exit $?
        fi
  
        if test -n "$gentop"; then
--- 2334,2349 ----
  	# Just create a symlink.
  	$show $rm $libobj
  	$run $rm $libobj
! 	xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
! 	if test "X$xdir" = "X$libobj"; then
! 	  xdir="."
! 	else
! 	  xdir="$xdir"
! 	fi
! 	baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
! 	oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
! 	$show "(cd $xdir && $LN_S $oldobj $baseobj)"
! 	$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
        fi
  
        if test -n "$gentop"; then
***************
*** 2598,2613 ****
  	  # linked before any other PIC object.  But we must not use
  	  # pic_flag when linking with -static.  The problem exists in
  	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
! 	  *-*-freebsd2*|*-*-freebsd3.0*)
  	    case "$compile_command " in
  	    *" -static "*) ;;
  	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
  	    esac
  	  esac
  
  	  # Now compile the dynamic symbol file.
! 	  $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
! 	  $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  
  	  # Clean up the generated files.
  	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
--- 2629,2649 ----
  	  # linked before any other PIC object.  But we must not use
  	  # pic_flag when linking with -static.  The problem exists in
  	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
! 	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
  	    case "$compile_command " in
  	    *" -static "*) ;;
  	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+ 	    esac;;
+ 	  *-*-hpux*)
+ 	    case "$compile_command " in
+ 	    *" -static "*) ;;
+ 	    *) pic_flag_for_symtable=" $pic_flag -DPIC";;
  	    esac
  	  esac
  
  	  # Now compile the dynamic symbol file.
! 	  $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
! 	  $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  
  	  # Clean up the generated files.
  	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
***************
*** 2733,2738 ****
--- 2769,2786 ----
  
        # Quote the relink command for shipping.
        if test -n "$relink_command"; then
+ 	# Preserve any variables that may affect compiler behavior
+ 	for var in $variables_saved_for_relink; do
+ 	  if eval test -z \"\${$var+set}\"; then
+ 	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ 	  elif eval var_value=\$$var; test -z "$var_value"; then
+ 	    relink_command="$var=; export $var; $relink_command"
+ 	  else
+ 	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ 	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ 	  fi
+ 	done
+ 	relink_command="cd `pwd`; $relink_command"
  	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
        fi
  
***************
*** 2776,2782 ****
  
  # The HP-UX ksh and POSIX shell print the target directory to stdout
  # if CDPATH is set.
! if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
  
  relink_command=\"$relink_command\"
  
--- 2824,2830 ----
  
  # The HP-UX ksh and POSIX shell print the target directory to stdout
  # if CDPATH is set.
! if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
  
  relink_command=\"$relink_command\"
  
***************
*** 2865,2871 ****
    fi"
  	else
  	  echo >> $output "\
!   program='$outputname$exeext'
    progdir=\"\$thisdir/$objdir\"
  "
  	fi
--- 2913,2919 ----
    fi"
  	else
  	  echo >> $output "\
!   program='$outputname'
    progdir=\"\$thisdir/$objdir\"
  "
  	fi
***************
*** 2901,2913 ****
        # Run the actual program with our arguments.
  "
  	case $host in
- 	*-*-cygwin* | *-*-mingw | *-*-os2*)
  	  # win32 systems need to use the prog path for dll
  	  # lookup to work
  	  $echo >> $output "\
        exec \$progdir\\\\\$program \${1+\"\$@\"}
  "
  	  ;;
  	*)
  	  $echo >> $output "\
        # Export the path to the program.
--- 2949,2969 ----
        # Run the actual program with our arguments.
  "
  	case $host in
  	  # win32 systems need to use the prog path for dll
  	  # lookup to work
+ 	*-*-cygwin*)
+ 	  $echo >> $output "\
+       exec \$progdir/\$program \${1+\"\$@\"}
+ "
+ 	  ;;
+ 
+ 	# Backslashes separate directories on plain windows
+ 	*-*-mingw | *-*-os2*)
  	  $echo >> $output "\
        exec \$progdir\\\\\$program \${1+\"\$@\"}
  "
  	  ;;
+ 
  	*)
  	  $echo >> $output "\
        # Export the path to the program.
***************
*** 2995,3008 ****
        if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  	eval cmds=\"$old_archive_from_new_cmds\"
        else
! 	# Ensure that we have .o objects in place incase we decided
  	# not to build a shared library, and have fallen back to building
  	# static libs even though --disable-static was passed!
  	for oldobj in $oldobjs; do
  	  if test ! -f $oldobj; then
! 	    obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"`
! 	    $show "${LN_S} $obj $oldobj"
! 	    $run ${LN_S} $obj $oldobj || exit $?
  	  fi
  	done
  
--- 3051,3071 ----
        if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  	eval cmds=\"$old_archive_from_new_cmds\"
        else
! 	# Ensure that we have .o objects in place in case we decided
  	# not to build a shared library, and have fallen back to building
  	# static libs even though --disable-static was passed!
  	for oldobj in $oldobjs; do
  	  if test ! -f $oldobj; then
! 	    xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
! 	    if test "X$xdir" = "X$oldobj"; then
! 	      xdir="."
! 	    else
! 	      xdir="$xdir"
! 	    fi
! 	    baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
! 	    obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
! 	    $show "(cd $xdir && ${LN_S} $obj $baseobj)"
! 	    $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
  	  fi
  	done
  
***************
*** 3095,3101 ****
  
      # There may be an optional sh(1) argument at the beginning of
      # install_prog (especially on Windows NT).
!     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
        # Aesthetically quote it.
        arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
        case "$arg" in
--- 3158,3166 ----
  
      # There may be an optional sh(1) argument at the beginning of
      # install_prog (especially on Windows NT).
!     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
!        # Allow the use of GNU shtool's install command.
!        $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
        # Aesthetically quote it.
        arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
        case "$arg" in
***************
*** 3672,3679 ****
      done
  
      if test -z "$run"; then
!       # Export the shlibpath_var.
!       eval "export $shlibpath_var"
  
        # Restore saved enviroment variables
        if test "${save_LC_ALL+set}" = set; then
--- 3737,3746 ----
      done
  
      if test -z "$run"; then
!       if test -n "$shlibpath_var"; then
!         # Export the shlibpath_var.
!         eval "export $shlibpath_var"
!       fi
  
        # Restore saved enviroment variables
        if test "${save_LC_ALL+set}" = set; then
***************
*** 3690,3697 ****
        exit 1
      else
        # Display what would be done.
!       eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
!       $echo "export $shlibpath_var"
        $echo "$cmd$args"
        exit 0
      fi
--- 3757,3766 ----
        exit 1
      else
        # Display what would be done.
!       if test -n "$shlibpath_var"; then
!         eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
!         $echo "export $shlibpath_var"
!       fi
        $echo "$cmd$args"
        exit 0
      fi
