Updated to libtool-1.5.22
authorSam Lantinga <slouken@libsdl.org>
Tue, 21 Mar 2006 10:20:44 +0000
changeset 1570a740bca2a1b1
parent 1569 50d9888d201d
child 1571 0160eb7cccee
Updated to libtool-1.5.22
acinclude.m4
build-scripts/ltmain.sh
     1.1 --- a/acinclude.m4	Tue Mar 21 09:51:33 2006 +0000
     1.2 +++ b/acinclude.m4	Tue Mar 21 10:20:44 2006 +0000
     1.3 @@ -314,32 +314,17 @@
     1.4  ])
     1.5  
     1.6  ##############################################################################
     1.7 -# Based on libtool-1.5.8
     1.8 +# Based on libtool-1.5.22
     1.9  # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
    1.10 -## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
    1.11 +## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
    1.12  ## Free Software Foundation, Inc.
    1.13  ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    1.14  ##
    1.15 -## This program is free software; you can redistribute it and/or modify
    1.16 -## it under the terms of the GNU General Public License as published by
    1.17 -## the Free Software Foundation; either version 2 of the License, or
    1.18 -## (at your option) any later version.
    1.19 -##
    1.20 -## This program is distributed in the hope that it will be useful, but
    1.21 -## WITHOUT ANY WARRANTY; without even the implied warranty of
    1.22 -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.23 -## General Public License for more details.
    1.24 -##
    1.25 -## You should have received a copy of the GNU General Public License
    1.26 -## along with this program; if not, write to the Free Software
    1.27 -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    1.28 -##
    1.29 -## As a special exception to the GNU General Public License, if you
    1.30 -## distribute this file as part of a program that contains a
    1.31 -## configuration script generated by Autoconf, you may include it under
    1.32 -## the same distribution terms that you use for the rest of that program.
    1.33 -
    1.34 -# serial 47 AC_PROG_LIBTOOL
    1.35 +## This file is free software; the Free Software Foundation gives
    1.36 +## unlimited permission to copy and/or distribute it, with or without
    1.37 +## modifications, as long as this notice is preserved.
    1.38 +
    1.39 +# serial 48 AC_PROG_LIBTOOL
    1.40  
    1.41  
    1.42  # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
    1.43 @@ -449,7 +434,7 @@
    1.44  
    1.45  # Sed substitution that helps us do robust quoting.  It backslashifies
    1.46  # metacharacters that are still active within double-quoted strings.
    1.47 -Xsed='sed -e s/^X//'
    1.48 +Xsed='sed -e 1s/^X//'
    1.49  [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
    1.50  
    1.51  # Same as above, but do not quote variable references.
    1.52 @@ -469,7 +454,7 @@
    1.53  default_ofile=libtool
    1.54  can_build_shared=yes
    1.55  
    1.56 -# All known linkers require a `.a' archive for static linking (except M$VC,
    1.57 +# All known linkers require a `.a' archive for static linking (except MSVC,
    1.58  # which needs '.lib').
    1.59  libext=a
    1.60  ltmain="$ac_aux_dir/ltmain.sh"
    1.61 @@ -489,6 +474,7 @@
    1.62  test -z "$AS" && AS=as
    1.63  test -z "$CC" && CC=cc
    1.64  test -z "$LTCC" && LTCC=$CC
    1.65 +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
    1.66  test -z "$DLLTOOL" && DLLTOOL=dlltool
    1.67  test -z "$LD" && LD=ld
    1.68  test -z "$LN_S" && LN_S="ln -s"
    1.69 @@ -508,16 +494,16 @@
    1.70  if test -n "$RANLIB"; then
    1.71    case $host_os in
    1.72    openbsd*)
    1.73 -    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
    1.74 +    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
    1.75      ;;
    1.76    *)
    1.77 -    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
    1.78 +    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
    1.79      ;;
    1.80    esac
    1.81    old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
    1.82  fi
    1.83  
    1.84 -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
    1.85 +_LT_CC_BASENAME([$compiler])
    1.86  
    1.87  # Only perform the check for file, if the check method requires it
    1.88  case $deplibs_check_method in
    1.89 @@ -559,11 +545,56 @@
    1.90  # If no C compiler was specified, use CC.
    1.91  LTCC=${LTCC-"$CC"}
    1.92  
    1.93 +# If no C compiler flags were specified, use CFLAGS.
    1.94 +LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
    1.95 +
    1.96  # Allow CC to be a program name with arguments.
    1.97  compiler=$CC
    1.98  ])# _LT_AC_SYS_COMPILER
    1.99  
   1.100  
   1.101 +# _LT_CC_BASENAME(CC)
   1.102 +# -------------------
   1.103 +# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
   1.104 +AC_DEFUN([_LT_CC_BASENAME],
   1.105 +[for cc_temp in $1""; do
   1.106 +  case $cc_temp in
   1.107 +    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
   1.108 +    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
   1.109 +    \-*) ;;
   1.110 +    *) break;;
   1.111 +  esac
   1.112 +done
   1.113 +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
   1.114 +])
   1.115 +
   1.116 +
   1.117 +# _LT_COMPILER_BOILERPLATE
   1.118 +# ------------------------
   1.119 +# Check for compiler boilerplate output or warnings with
   1.120 +# the simple compiler test code.
   1.121 +AC_DEFUN([_LT_COMPILER_BOILERPLATE],
   1.122 +[ac_outfile=conftest.$ac_objext
   1.123 +printf "$lt_simple_compile_test_code" >conftest.$ac_ext
   1.124 +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
   1.125 +_lt_compiler_boilerplate=`cat conftest.err`
   1.126 +$rm conftest*
   1.127 +])# _LT_COMPILER_BOILERPLATE
   1.128 +
   1.129 +
   1.130 +# _LT_LINKER_BOILERPLATE
   1.131 +# ----------------------
   1.132 +# Check for linker boilerplate output or warnings with
   1.133 +# the simple link test code.
   1.134 +AC_DEFUN([_LT_LINKER_BOILERPLATE],
   1.135 +[ac_outfile=conftest.$ac_objext
   1.136 +printf "$lt_simple_link_test_code" >conftest.$ac_ext
   1.137 +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
   1.138 +_lt_linker_boilerplate=`cat conftest.err`
   1.139 +$rm conftest*
   1.140 +])# _LT_LINKER_BOILERPLATE
   1.141 +
   1.142 +
   1.143  # _LT_AC_SYS_LIBPATH_AIX
   1.144  # ----------------------
   1.145  # Links a minimal program and checks the executable
   1.146 @@ -643,8 +674,8 @@
   1.147  # find a string as large as possible, as long as the shell can cope with it
   1.148    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
   1.149      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
   1.150 -    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
   1.151 -       echo_test_string="`eval $cmd`" &&
   1.152 +    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
   1.153 +       echo_test_string=`eval $cmd` &&
   1.154         (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
   1.155      then
   1.156        break
   1.157 @@ -813,7 +844,7 @@
   1.158    # Find out which ABI we are using.
   1.159    echo 'int i;' > conftest.$ac_ext
   1.160    if AC_TRY_EVAL(ac_compile); then
   1.161 -    case "`/usr/bin/file conftest.o`" in
   1.162 +    case `/usr/bin/file conftest.o` in
   1.163      *32-bit*)
   1.164        case $host in
   1.165          x86_64-*linux*)
   1.166 @@ -864,6 +895,22 @@
   1.167      CFLAGS="$SAVE_CFLAGS"
   1.168    fi
   1.169    ;;
   1.170 +sparc*-*solaris*)
   1.171 +  # Find out which ABI we are using.
   1.172 +  echo 'int i;' > conftest.$ac_ext
   1.173 +  if AC_TRY_EVAL(ac_compile); then
   1.174 +    case `/usr/bin/file conftest.o` in
   1.175 +    *64-bit*)
   1.176 +      case $lt_cv_prog_gnu_ld in
   1.177 +      yes*) LD="${LD-ld} -m elf64_sparc" ;;
   1.178 +      *)    LD="${LD-ld} -64" ;;
   1.179 +      esac
   1.180 +      ;;
   1.181 +    esac
   1.182 +  fi
   1.183 +  rm -rf conftest*
   1.184 +  ;;
   1.185 +
   1.186  AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
   1.187  [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
   1.188    AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   1.189 @@ -895,7 +942,7 @@
   1.190     # with a dollar sign (not a hyphen), so the echo should work correctly.
   1.191     # The option is referenced via a variable to avoid confusing sed.
   1.192     lt_compile=`echo "$ac_compile" | $SED \
   1.193 -   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
   1.194 +   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.195     -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
   1.196     -e 's:$: $lt_compiler_flag:'`
   1.197     (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
   1.198 @@ -905,8 +952,10 @@
   1.199     echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
   1.200     if (exit $ac_status) && test -s "$ac_outfile"; then
   1.201       # The compiler can only warn and ignore the option if not recognized
   1.202 -     # So say no if there are warnings
   1.203 -     if test ! -s conftest.err; then
   1.204 +     # So say no if there are warnings other than the usual output.
   1.205 +     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
   1.206 +     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
   1.207 +     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
   1.208         $2=yes
   1.209       fi
   1.210     fi
   1.211 @@ -932,11 +981,16 @@
   1.212     LDFLAGS="$LDFLAGS $3"
   1.213     printf "$lt_simple_link_test_code" > conftest.$ac_ext
   1.214     if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
   1.215 -     # The compiler can only warn and ignore the option if not recognized
   1.216 +     # The linker can only warn and ignore the option if not recognized
   1.217       # So say no if there are warnings
   1.218       if test -s conftest.err; then
   1.219         # Append any errors to the config.log.
   1.220         cat conftest.err 1>&AS_MESSAGE_LOG_FD
   1.221 +       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
   1.222 +       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
   1.223 +       if diff conftest.exp conftest.er2 >/dev/null; then
   1.224 +         $2=yes
   1.225 +       fi
   1.226       else
   1.227         $2=yes
   1.228       fi
   1.229 @@ -1001,20 +1055,50 @@
   1.230      lt_cv_sys_max_cmd_len=8192;
   1.231      ;;
   1.232  
   1.233 -  netbsd* | freebsd* | openbsd* | darwin* )
   1.234 +  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
   1.235      # This has been around since 386BSD, at least.  Likely further.
   1.236      if test -x /sbin/sysctl; then
   1.237        lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
   1.238      elif test -x /usr/sbin/sysctl; then
   1.239        lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
   1.240      else
   1.241 -      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
   1.242 +      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
   1.243      fi
   1.244      # And add a safety zone
   1.245      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
   1.246 +    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
   1.247      ;;
   1.248  
   1.249 - *)
   1.250 +  interix*)
   1.251 +    # We know the value 262144 and hardcode it with a safety zone (like BSD)
   1.252 +    lt_cv_sys_max_cmd_len=196608
   1.253 +    ;;
   1.254 +
   1.255 +  osf*)
   1.256 +    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
   1.257 +    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
   1.258 +    # nice to cause kernel panics so lets avoid the loop below.
   1.259 +    # First set a reasonable default.
   1.260 +    lt_cv_sys_max_cmd_len=16384
   1.261 +    #
   1.262 +    if test -x /sbin/sysconfig; then
   1.263 +      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
   1.264 +        *1*) lt_cv_sys_max_cmd_len=-1 ;;
   1.265 +      esac
   1.266 +    fi
   1.267 +    ;;
   1.268 +  sco3.2v5*)
   1.269 +    lt_cv_sys_max_cmd_len=102400
   1.270 +    ;;
   1.271 +  sysv5* | sco5v6* | sysv4.2uw2*)
   1.272 +    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
   1.273 +    if test -n "$kargmax"; then
   1.274 +      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
   1.275 +    else
   1.276 +      lt_cv_sys_max_cmd_len=32768
   1.277 +    fi
   1.278 +    ;;
   1.279 +  *)
   1.280      # If test is not a shell built-in, we'll probably end up computing a
   1.281      # maximum length that is only half of the actual maximum length, but
   1.282      # we can't tell.
   1.283 @@ -1045,7 +1129,7 @@
   1.284  
   1.285  
   1.286  # _LT_AC_CHECK_DLFCN
   1.287 -# --------------------
   1.288 +# ------------------
   1.289  AC_DEFUN([_LT_AC_CHECK_DLFCN],
   1.290  [AC_CHECK_HEADERS(dlfcn.h)dnl
   1.291  ])# _LT_AC_CHECK_DLFCN
   1.292 @@ -1053,7 +1137,7 @@
   1.293  
   1.294  # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
   1.295  #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
   1.296 -# ------------------------------------------------------------------
   1.297 +# ---------------------------------------------------------------------
   1.298  AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
   1.299  [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
   1.300  if test "$cross_compiling" = yes; then :
   1.301 @@ -1119,17 +1203,19 @@
   1.302        else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
   1.303        /* dlclose (self); */
   1.304      }
   1.305 +  else
   1.306 +    puts (dlerror ());
   1.307  
   1.308      exit (status);
   1.309  }]
   1.310  EOF
   1.311    if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
   1.312 -    (./conftest; exit; ) 2>/dev/null
   1.313 +    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
   1.314      lt_status=$?
   1.315      case x$lt_status in
   1.316        x$lt_dlno_uscore) $1 ;;
   1.317        x$lt_dlneed_uscore) $2 ;;
   1.318 -      x$lt_unknown|x*) $3 ;;
   1.319 +      x$lt_dlunknown|x*) $3 ;;
   1.320      esac
   1.321    else :
   1.322      # compilation failed
   1.323 @@ -1141,7 +1227,7 @@
   1.324  
   1.325  
   1.326  # AC_LIBTOOL_DLOPEN_SELF
   1.327 -# -------------------
   1.328 +# ----------------------
   1.329  AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
   1.330  [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
   1.331  if test "x$enable_dlopen" != xyes; then
   1.332 @@ -1212,7 +1298,7 @@
   1.333      test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
   1.334  
   1.335      save_LDFLAGS="$LDFLAGS"
   1.336 -    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
   1.337 +    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
   1.338  
   1.339      save_LIBS="$LIBS"
   1.340      LIBS="$lt_cv_dlopen_libs $LIBS"
   1.341 @@ -1225,7 +1311,7 @@
   1.342      ])
   1.343  
   1.344      if test "x$lt_cv_dlopen_self" = xyes; then
   1.345 -      LDFLAGS="$LDFLAGS $link_static_flag"
   1.346 +      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
   1.347        AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
   1.348      	  lt_cv_dlopen_self_static, [dnl
   1.349  	  _LT_AC_TRY_DLOPEN_SELF(
   1.350 @@ -1273,7 +1359,7 @@
   1.351     # Note that $ac_compile itself does not contain backslashes and begins
   1.352     # with a dollar sign (not a hyphen), so the echo should work correctly.
   1.353     lt_compile=`echo "$ac_compile" | $SED \
   1.354 -   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
   1.355 +   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.356     -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
   1.357     -e 's:$: $lt_compiler_flag:'`
   1.358     (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
   1.359 @@ -1285,11 +1371,13 @@
   1.360     then
   1.361       # The compiler can only warn and ignore the option if not recognized
   1.362       # So say no if there are warnings
   1.363 -     if test ! -s out/conftest.err; then
   1.364 +     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
   1.365 +     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
   1.366 +     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
   1.367         _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
   1.368       fi
   1.369     fi
   1.370 -   chmod u+w .
   1.371 +   chmod u+w . 2>&AS_MESSAGE_LOG_FD
   1.372     $rm conftest*
   1.373     # SGI C++ compiler will create directory out/ii_files/ for
   1.374     # template instantiation
   1.375 @@ -1549,7 +1637,8 @@
   1.376        dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
   1.377        dldir=$destdir/`dirname \$dlpath`~
   1.378        test -d \$dldir || mkdir -p \$dldir~
   1.379 -      $install_prog $dir/$dlname \$dldir/$dlname'
   1.380 +      $install_prog $dir/$dlname \$dldir/$dlname~
   1.381 +      chmod a+x \$dldir/$dlname'
   1.382      postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
   1.383        dlpath=$dir/\$dldll~
   1.384         $rm \$dlpath'
   1.385 @@ -1581,7 +1670,7 @@
   1.386        ;;
   1.387      pw32*)
   1.388        # pw32 DLLs use 'pw' prefix rather than 'lib'
   1.389 -      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
   1.390 +      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
   1.391        ;;
   1.392      esac
   1.393      ;;
   1.394 @@ -1604,7 +1693,7 @@
   1.395    soname_spec='${libname}${release}${major}$shared_ext'
   1.396    shlibpath_overrides_runpath=yes
   1.397    shlibpath_var=DYLD_LIBRARY_PATH
   1.398 -  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
   1.399 +  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
   1.400    # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
   1.401    if test "$GCC" = yes; then
   1.402      sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
   1.403 @@ -1639,8 +1728,17 @@
   1.404    dynamic_linker='GNU ld.so'
   1.405    ;;
   1.406  
   1.407 -freebsd*)
   1.408 -  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
   1.409 +freebsd* | dragonfly*)
   1.410 +  # DragonFly does not have aout.  When/if they implement a new
   1.411 +  # versioning mechanism, adjust this.
   1.412 +  if test -x /usr/bin/objformat; then
   1.413 +    objformat=`/usr/bin/objformat`
   1.414 +  else
   1.415 +    case $host_os in
   1.416 +    freebsd[[123]]*) objformat=aout ;;
   1.417 +    *) objformat=elf ;;
   1.418 +    esac
   1.419 +  fi
   1.420    version_type=freebsd-$objformat
   1.421    case $version_type in
   1.422      freebsd-elf*)
   1.423 @@ -1658,14 +1756,19 @@
   1.424    freebsd2*)
   1.425      shlibpath_overrides_runpath=yes
   1.426      ;;
   1.427 -  freebsd3.[01]* | freebsdelf3.[01]*)
   1.428 +  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
   1.429      shlibpath_overrides_runpath=yes
   1.430      hardcode_into_libs=yes
   1.431      ;;
   1.432 -  *) # from 3.2 on
   1.433 +  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
   1.434 +  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
   1.435      shlibpath_overrides_runpath=no
   1.436      hardcode_into_libs=yes
   1.437      ;;
   1.438 +  freebsd*) # from 4.6 on
   1.439 +    shlibpath_overrides_runpath=yes
   1.440 +    hardcode_into_libs=yes
   1.441 +    ;;
   1.442    esac
   1.443    ;;
   1.444  
   1.445 @@ -1685,7 +1788,7 @@
   1.446    version_type=sunos
   1.447    need_lib_prefix=no
   1.448    need_version=no
   1.449 -  case "$host_cpu" in
   1.450 +  case $host_cpu in
   1.451    ia64*)
   1.452      shrext_cmds='.so'
   1.453      hardcode_into_libs=yes
   1.454 @@ -1725,6 +1828,18 @@
   1.455    postinstall_cmds='chmod 555 $lib'
   1.456    ;;
   1.457  
   1.458 +interix3*)
   1.459 +  version_type=linux
   1.460 +  need_lib_prefix=no
   1.461 +  need_version=no
   1.462 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
   1.463 +  soname_spec='${libname}${release}${shared_ext}$major'
   1.464 +  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   1.465 +  shlibpath_var=LD_LIBRARY_PATH
   1.466 +  shlibpath_overrides_runpath=no
   1.467 +  hardcode_into_libs=yes
   1.468 +  ;;
   1.469 +
   1.470  irix5* | irix6* | nonstopux*)
   1.471    case $host_os in
   1.472      nonstopux*) version_type=nonstopux ;;
   1.473 @@ -1784,7 +1899,7 @@
   1.474  
   1.475    # Append ld.so.conf contents to the search path
   1.476    if test -f /etc/ld.so.conf; then
   1.477 -    lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
   1.478 +    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
   1.479      sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   1.480    fi
   1.481  
   1.482 @@ -1846,8 +1961,13 @@
   1.483  
   1.484  openbsd*)
   1.485    version_type=sunos
   1.486 +  sys_lib_dlsearch_path_spec="/usr/lib"
   1.487    need_lib_prefix=no
   1.488 -  need_version=no
   1.489 +  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
   1.490 +  case $host_os in
   1.491 +    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
   1.492 +    *)                         need_version=no  ;;
   1.493 +  esac
   1.494    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   1.495    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   1.496    shlibpath_var=LD_LIBRARY_PATH
   1.497 @@ -1885,13 +2005,6 @@
   1.498    sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
   1.499    ;;
   1.500  
   1.501 -sco3.2v5*)
   1.502 -  version_type=osf
   1.503 -  soname_spec='${libname}${release}${shared_ext}$major'
   1.504 -  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   1.505 -  shlibpath_var=LD_LIBRARY_PATH
   1.506 -  ;;
   1.507 -
   1.508  solaris*)
   1.509    version_type=linux
   1.510    need_lib_prefix=no
   1.511 @@ -1917,7 +2030,7 @@
   1.512    need_version=yes
   1.513    ;;
   1.514  
   1.515 -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
   1.516 +sysv4 | sysv4.3*)
   1.517    version_type=linux
   1.518    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   1.519    soname_spec='${libname}${release}${shared_ext}$major'
   1.520 @@ -1950,6 +2063,29 @@
   1.521    fi
   1.522    ;;
   1.523  
   1.524 +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   1.525 +  version_type=freebsd-elf
   1.526 +  need_lib_prefix=no
   1.527 +  need_version=no
   1.528 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
   1.529 +  soname_spec='${libname}${release}${shared_ext}$major'
   1.530 +  shlibpath_var=LD_LIBRARY_PATH
   1.531 +  hardcode_into_libs=yes
   1.532 +  if test "$with_gnu_ld" = yes; then
   1.533 +    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   1.534 +    shlibpath_overrides_runpath=no
   1.535 +  else
   1.536 +    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
   1.537 +    shlibpath_overrides_runpath=yes
   1.538 +    case $host_os in
   1.539 +      sco3.2v5*)
   1.540 +        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
   1.541 +	;;
   1.542 +    esac
   1.543 +  fi
   1.544 +  sys_lib_dlsearch_path_spec='/usr/lib'
   1.545 +  ;;
   1.546 +
   1.547  uts4*)
   1.548    version_type=linux
   1.549    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   1.550 @@ -1963,6 +2099,11 @@
   1.551  esac
   1.552  AC_MSG_RESULT([$dynamic_linker])
   1.553  test "$dynamic_linker" = no && can_build_shared=no
   1.554 +
   1.555 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
   1.556 +if test "$GCC" = yes; then
   1.557 +  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
   1.558 +fi
   1.559  ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
   1.560  
   1.561  
   1.562 @@ -1987,6 +2128,9 @@
   1.563        AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
   1.564      fi
   1.565    fi
   1.566 +  if test -z "$LTCFLAGS"; then
   1.567 +    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
   1.568 +  fi
   1.569  
   1.570    # Extract list of available tagged configurations in $ofile.
   1.571    # Note that this assumes the entire list is on one line.
   1.572 @@ -2013,7 +2157,9 @@
   1.573  
   1.574        case $tagname in
   1.575        CXX)
   1.576 -	if test -n "$CXX" && test "X$CXX" != "Xno"; then
   1.577 +	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
   1.578 +	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
   1.579 +	    (test "X$CXX" != "Xg++"))) ; then
   1.580  	  AC_LIBTOOL_LANG_CXX_CONFIG
   1.581  	else
   1.582  	  tagname=""
   1.583 @@ -2075,7 +2221,7 @@
   1.584  
   1.585  # AC_LIBTOOL_WIN32_DLL
   1.586  # --------------------
   1.587 -# declare package support for building win32 dll's
   1.588 +# declare package support for building win32 DLLs
   1.589  AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
   1.590  [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
   1.591  ])# AC_LIBTOOL_WIN32_DLL
   1.592 @@ -2113,7 +2259,7 @@
   1.593  
   1.594  # AC_DISABLE_SHARED
   1.595  # -----------------
   1.596 -#- set the default shared flag to --disable-shared
   1.597 +# set the default shared flag to --disable-shared
   1.598  AC_DEFUN([AC_DISABLE_SHARED],
   1.599  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   1.600  AC_ENABLE_SHARED(no)
   1.601 @@ -2249,7 +2395,7 @@
   1.602        if test -n "$file_magic_test_file"; then
   1.603  	case $deplibs_check_method in
   1.604  	"file_magic "*)
   1.605 -	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
   1.606 +	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
   1.607  	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
   1.608  	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
   1.609  	    $EGREP "$file_magic_regex" > /dev/null; then
   1.610 @@ -2359,7 +2505,7 @@
   1.611      if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
   1.612        lt_cv_path_LD="$ac_dir/$ac_prog"
   1.613        # Check to see if the program is GNU ld.  I'd rather use --version,
   1.614 -      # but apparently some GNU ld's only accept -v.
   1.615 +      # but apparently some variants of GNU ld only accept -v.
   1.616        # Break only if it was the GNU/non-GNU ld that we prefer.
   1.617        case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
   1.618        *GNU* | *'with BFD'*)
   1.619 @@ -2391,7 +2537,7 @@
   1.620  AC_DEFUN([AC_PROG_LD_GNU],
   1.621  [AC_REQUIRE([AC_PROG_EGREP])dnl
   1.622  AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
   1.623 -[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
   1.624 +[# I'd rather use --version here, but apparently some GNU lds only accept -v.
   1.625  case `$LD -v 2>&1 </dev/null` in
   1.626  *GNU* | *'with BFD'*)
   1.627    lt_cv_prog_gnu_ld=yes
   1.628 @@ -2421,7 +2567,7 @@
   1.629  case $host_os in
   1.630    darwin*)
   1.631      if test "$GCC" = yes; then
   1.632 -      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
   1.633 +      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
   1.634      else
   1.635        reload_cmds='$LD$reload_flag -o $output$reload_objs'
   1.636      fi
   1.637 @@ -2468,16 +2614,14 @@
   1.638  
   1.639  cygwin*)
   1.640    # func_win32_libid is a shell function defined in ltmain.sh
   1.641 -  #lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
   1.642 -  lt_cv_deplibs_check_method=pass_all
   1.643 +  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
   1.644    lt_cv_file_magic_cmd='func_win32_libid'
   1.645    ;;
   1.646  
   1.647  mingw* | pw32*)
   1.648    # Base MSYS/MinGW do not provide the 'file' command needed by
   1.649    # func_win32_libid shell function, so use a weaker test based on 'objdump'.
   1.650 -  #lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
   1.651 -  lt_cv_deplibs_check_method=pass_all
   1.652 +  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
   1.653    lt_cv_file_magic_cmd='$OBJDUMP -f'
   1.654    ;;
   1.655  
   1.656 @@ -2485,13 +2629,13 @@
   1.657    lt_cv_deplibs_check_method=pass_all
   1.658    ;;
   1.659  
   1.660 -freebsd* | kfreebsd*-gnu)
   1.661 +freebsd* | kfreebsd*-gnu | dragonfly*)
   1.662    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
   1.663      case $host_cpu in
   1.664      i*86 )
   1.665        # Not sure whether the presence of OpenBSD here was a mistake.
   1.666        # Let's accept both of them until this is cleared up.
   1.667 -      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
   1.668 +      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
   1.669        lt_cv_file_magic_cmd=/usr/bin/file
   1.670        lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
   1.671        ;;
   1.672 @@ -2507,7 +2651,7 @@
   1.673  
   1.674  hpux10.20* | hpux11*)
   1.675    lt_cv_file_magic_cmd=/usr/bin/file
   1.676 -  case "$host_cpu" in
   1.677 +  case $host_cpu in
   1.678    ia64*)
   1.679      lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
   1.680      lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
   1.681 @@ -2523,6 +2667,11 @@
   1.682    esac
   1.683    ;;
   1.684  
   1.685 +interix3*)
   1.686 +  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
   1.687 +  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
   1.688 +  ;;
   1.689 +
   1.690  irix5* | irix6* | nonstopux*)
   1.691    case $LD in
   1.692    *-32|*"-32 ") libmagic=32-bit;;
   1.693 @@ -2535,15 +2684,6 @@
   1.694  
   1.695  # This must be Linux ELF.
   1.696  linux*)
   1.697 -  case $host_cpu in
   1.698 -  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
   1.699 -    lt_cv_deplibs_check_method=pass_all ;;
   1.700 -  *)
   1.701 -    # glibc up to 2.1.1 does not perform some relocations on ARM
   1.702 -    # this will be overridden with pass_all, but let us keep it just in case
   1.703 -    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
   1.704 -  esac
   1.705 -  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   1.706    lt_cv_deplibs_check_method=pass_all
   1.707    ;;
   1.708  
   1.709 @@ -2577,15 +2717,11 @@
   1.710    lt_cv_deplibs_check_method=pass_all
   1.711    ;;
   1.712  
   1.713 -sco3.2v5*)
   1.714 -  lt_cv_deplibs_check_method=pass_all
   1.715 -  ;;
   1.716 -
   1.717  solaris*)
   1.718    lt_cv_deplibs_check_method=pass_all
   1.719    ;;
   1.720  
   1.721 -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
   1.722 +sysv4 | sysv4.3*)
   1.723    case $host_vendor in
   1.724    motorola)
   1.725      lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
   1.726 @@ -2606,10 +2742,13 @@
   1.727    siemens)
   1.728      lt_cv_deplibs_check_method=pass_all
   1.729      ;;
   1.730 +  pc)
   1.731 +    lt_cv_deplibs_check_method=pass_all
   1.732 +    ;;
   1.733    esac
   1.734    ;;
   1.735  
   1.736 -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
   1.737 +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   1.738    lt_cv_deplibs_check_method=pass_all
   1.739    ;;
   1.740  esac
   1.741 @@ -2629,36 +2768,43 @@
   1.742    # Let the user override the test.
   1.743    lt_cv_path_NM="$NM"
   1.744  else
   1.745 -  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   1.746 -  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
   1.747 -    IFS="$lt_save_ifs"
   1.748 -    test -z "$ac_dir" && ac_dir=.
   1.749 -    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
   1.750 -    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
   1.751 -      # Check to see if the nm accepts a BSD-compat flag.
   1.752 -      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
   1.753 -      #   nm: unknown option "B" ignored
   1.754 -      # Tru64's nm complains that /dev/null is an invalid object file
   1.755 -      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
   1.756 -      */dev/null* | *'Invalid file or object type'*)
   1.757 -	lt_cv_path_NM="$tmp_nm -B"
   1.758 -	break
   1.759 -        ;;
   1.760 -      *)
   1.761 -	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
   1.762 -	*/dev/null*)
   1.763 -	  lt_cv_path_NM="$tmp_nm -p"
   1.764 +  lt_nm_to_check="${ac_tool_prefix}nm"
   1.765 +  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
   1.766 +    lt_nm_to_check="$lt_nm_to_check nm"
   1.767 +  fi
   1.768 +  for lt_tmp_nm in $lt_nm_to_check; do
   1.769 +    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   1.770 +    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
   1.771 +      IFS="$lt_save_ifs"
   1.772 +      test -z "$ac_dir" && ac_dir=.
   1.773 +      tmp_nm="$ac_dir/$lt_tmp_nm"
   1.774 +      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
   1.775 +	# Check to see if the nm accepts a BSD-compat flag.
   1.776 +	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
   1.777 +	#   nm: unknown option "B" ignored
   1.778 +	# Tru64's nm complains that /dev/null is an invalid object file
   1.779 +	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
   1.780 +	*/dev/null* | *'Invalid file or object type'*)
   1.781 +	  lt_cv_path_NM="$tmp_nm -B"
   1.782  	  break
   1.783  	  ;;
   1.784  	*)
   1.785 -	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
   1.786 -	  continue # so that we can try to find one that supports BSD flags
   1.787 +	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
   1.788 +	  */dev/null*)
   1.789 +	    lt_cv_path_NM="$tmp_nm -p"
   1.790 +	    break
   1.791 +	    ;;
   1.792 +	  *)
   1.793 +	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
   1.794 +	    continue # so that we can try to find one that supports BSD flags
   1.795 +	    ;;
   1.796 +	  esac
   1.797  	  ;;
   1.798  	esac
   1.799 -      esac
   1.800 -    fi
   1.801 +      fi
   1.802 +    done
   1.803 +    IFS="$lt_save_ifs"
   1.804    done
   1.805 -  IFS="$lt_save_ifs"
   1.806    test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
   1.807  fi])
   1.808  NM="$lt_cv_path_NM"
   1.809 @@ -2690,13 +2836,13 @@
   1.810  # -----------------------------------
   1.811  # sets LIBLTDL to the link flags for the libltdl convenience library and
   1.812  # LTDLINCL to the include flags for the libltdl header and adds
   1.813 -# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
   1.814 -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
   1.815 -# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
   1.816 -# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
   1.817 -# '${top_srcdir}/' (note the single quotes!).  If your package is not
   1.818 -# flat and you're not using automake, define top_builddir and
   1.819 -# top_srcdir appropriately in the Makefiles.
   1.820 +# --enable-ltdl-convenience to the configure arguments.  Note that
   1.821 +# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
   1.822 +# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
   1.823 +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
   1.824 +# (note the single quotes!).  If your package is not flat and you're not
   1.825 +# using automake, define top_builddir and top_srcdir appropriately in
   1.826 +# the Makefiles.
   1.827  AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
   1.828  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   1.829    case $enable_ltdl_convenience in
   1.830 @@ -2715,13 +2861,13 @@
   1.831  # -----------------------------------
   1.832  # sets LIBLTDL to the link flags for the libltdl installable library and
   1.833  # LTDLINCL to the include flags for the libltdl header and adds
   1.834 -# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
   1.835 -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
   1.836 -# DIRECTORY is not provided and an installed libltdl is not found, it is
   1.837 -# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
   1.838 -# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
   1.839 -# quotes!).  If your package is not flat and you're not using automake,
   1.840 -# define top_builddir and top_srcdir appropriately in the Makefiles.
   1.841 +# --enable-ltdl-install to the configure arguments.  Note that
   1.842 +# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
   1.843 +# and an installed libltdl is not found, it is assumed to be `libltdl'.
   1.844 +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
   1.845 +# '${top_srcdir}/' (note the single quotes!).  If your package is not
   1.846 +# flat and you're not using automake, define top_builddir and top_srcdir
   1.847 +# appropriately in the Makefiles.
   1.848  # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
   1.849  AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
   1.850  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   1.851 @@ -2759,10 +2905,21 @@
   1.852  # ---------------
   1.853  AC_DEFUN([_LT_AC_LANG_CXX],
   1.854  [AC_REQUIRE([AC_PROG_CXX])
   1.855 -AC_REQUIRE([AC_PROG_CXXCPP])
   1.856 +AC_REQUIRE([_LT_AC_PROG_CXXCPP])
   1.857  _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
   1.858  ])# _LT_AC_LANG_CXX
   1.859  
   1.860 +# _LT_AC_PROG_CXXCPP
   1.861 +# ------------------
   1.862 +AC_DEFUN([_LT_AC_PROG_CXXCPP],
   1.863 +[
   1.864 +AC_REQUIRE([AC_PROG_CXX])
   1.865 +if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
   1.866 +    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
   1.867 +    (test "X$CXX" != "Xg++"))) ; then
   1.868 +  AC_PROG_CXXCPP
   1.869 +fi
   1.870 +])# _LT_AC_PROG_CXXCPP
   1.871  
   1.872  # AC_LIBTOOL_F77
   1.873  # --------------
   1.874 @@ -2802,7 +2959,7 @@
   1.875  
   1.876  
   1.877  # AC_LIBTOOL_RC
   1.878 -# --------------
   1.879 +# -------------
   1.880  # enable support for Windows resource files
   1.881  AC_DEFUN([AC_LIBTOOL_RC],
   1.882  [AC_REQUIRE([LT_AC_PROG_RC])
   1.883 @@ -2835,36 +2992,9 @@
   1.884  
   1.885  _LT_AC_SYS_COMPILER
   1.886  
   1.887 -#
   1.888 -# Check for any special shared library compilation flags.
   1.889 -#
   1.890 -_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
   1.891 -if test "$GCC" = no; then
   1.892 -  case $host_os in
   1.893 -  sco3.2v5*)
   1.894 -    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
   1.895 -    ;;
   1.896 -  esac
   1.897 -fi
   1.898 -if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
   1.899 -  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
   1.900 -  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
   1.901 -  else
   1.902 -    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
   1.903 -    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
   1.904 -  fi
   1.905 -fi
   1.906 -
   1.907 -
   1.908 -#
   1.909 -# Check to make sure the static flag actually works.
   1.910 -#
   1.911 -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
   1.912 -  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
   1.913 -  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
   1.914 -  [],
   1.915 -  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
   1.916 -
   1.917 +# save warnings/boilerplate of simple test code
   1.918 +_LT_COMPILER_BOILERPLATE
   1.919 +_LT_LINKER_BOILERPLATE
   1.920  
   1.921  ## CAVEAT EMPTOR:
   1.922  ## There is no encapsulation within the following macros, do not change
   1.923 @@ -2878,9 +3008,9 @@
   1.924  AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
   1.925  AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
   1.926  AC_LIBTOOL_SYS_LIB_STRIP
   1.927 -AC_LIBTOOL_DLOPEN_SELF($1)
   1.928 -
   1.929 -# Report which librarie types wil actually be built
   1.930 +AC_LIBTOOL_DLOPEN_SELF
   1.931 +
   1.932 +# Report which library types will actually be built
   1.933  AC_MSG_CHECKING([if libtool supports shared libraries])
   1.934  AC_MSG_RESULT([$can_build_shared])
   1.935  
   1.936 @@ -2889,7 +3019,7 @@
   1.937  
   1.938  # On AIX, shared libraries and static libraries use the same namespace, and
   1.939  # are all built from PIC.
   1.940 -case "$host_os" in
   1.941 +case $host_os in
   1.942  aix3*)
   1.943    test "$enable_shared" = yes && enable_static=no
   1.944    if test -n "$RANLIB"; then
   1.945 @@ -2927,7 +3057,7 @@
   1.946  AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
   1.947  [AC_LANG_PUSH(C++)
   1.948  AC_REQUIRE([AC_PROG_CXX])
   1.949 -AC_REQUIRE([AC_PROG_CXXCPP])
   1.950 +AC_REQUIRE([_LT_AC_PROG_CXXCPP])
   1.951  
   1.952  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
   1.953  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
   1.954 @@ -2939,6 +3069,7 @@
   1.955  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
   1.956  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
   1.957  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
   1.958 +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
   1.959  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
   1.960  _LT_AC_TAGVAR(module_cmds, $1)=
   1.961  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
   1.962 @@ -2956,7 +3087,7 @@
   1.963  _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
   1.964  
   1.965  # Source file extension for C++ test sources.
   1.966 -ac_ext=cc
   1.967 +ac_ext=cpp
   1.968  
   1.969  # Object file extension for compiled C++ test sources.
   1.970  objext=o
   1.971 @@ -2966,11 +3097,15 @@
   1.972  lt_simple_compile_test_code="int some_variable = 0;\n"
   1.973  
   1.974  # Code to be used in simple link tests
   1.975 -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
   1.976 +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
   1.977  
   1.978  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
   1.979  _LT_AC_SYS_COMPILER
   1.980  
   1.981 +# save warnings/boilerplate of simple test code
   1.982 +_LT_COMPILER_BOILERPLATE
   1.983 +_LT_LINKER_BOILERPLATE
   1.984 +
   1.985  # Allow CC to be a program name with arguments.
   1.986  lt_save_CC=$CC
   1.987  lt_save_LD=$LD
   1.988 @@ -2981,18 +3116,18 @@
   1.989  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
   1.990    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
   1.991  else
   1.992 -  unset lt_cv_prog_gnu_ld
   1.993 +  $as_unset lt_cv_prog_gnu_ld
   1.994  fi
   1.995  if test -n "${lt_cv_path_LDCXX+set}"; then
   1.996    lt_cv_path_LD=$lt_cv_path_LDCXX
   1.997  else
   1.998 -  unset lt_cv_path_LD
   1.999 +  $as_unset lt_cv_path_LD
  1.1000  fi
  1.1001  test -z "${LDCXX+set}" || LD=$LDCXX
  1.1002  CC=${CXX-"c++"}
  1.1003  compiler=$CC
  1.1004  _LT_AC_TAGVAR(compiler, $1)=$CC
  1.1005 -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
  1.1006 +_LT_CC_BASENAME([$compiler])
  1.1007  
  1.1008  # We don't want -fno-exception wen compiling C++ code, so set the
  1.1009  # no_builtin_flag separately
  1.1010 @@ -3081,6 +3216,7 @@
  1.1011  	    ;;
  1.1012  	  esac
  1.1013  	done
  1.1014 +	;;
  1.1015        esac
  1.1016  
  1.1017        exp_sym_flag='-bexport'
  1.1018 @@ -3099,7 +3235,7 @@
  1.1019      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  1.1020  
  1.1021      if test "$GXX" = yes; then
  1.1022 -      case $host_os in aix4.[012]|aix4.[012].*)
  1.1023 +      case $host_os in aix4.[[012]]|aix4.[[012]].*)
  1.1024        # We only want to do this on AIX 4.2 and lower, the check
  1.1025        # below for broken collect2 doesn't work under 4.3+
  1.1026  	collect2name=`${CC} -print-prog-name=collect2`
  1.1027 @@ -3118,8 +3254,12 @@
  1.1028  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  1.1029  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  1.1030  	fi
  1.1031 +	;;
  1.1032        esac
  1.1033        shared_flag='-shared'
  1.1034 +      if test "$aix_use_runtimelinking" = yes; then
  1.1035 +	shared_flag="$shared_flag "'${wl}-G'
  1.1036 +      fi
  1.1037      else
  1.1038        # not using gcc
  1.1039        if test "$host_cpu" = ia64; then
  1.1040 @@ -3146,12 +3286,12 @@
  1.1041        _LT_AC_SYS_LIBPATH_AIX
  1.1042        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  1.1043  
  1.1044 -      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  1.1045 +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  1.1046       else
  1.1047        if test "$host_cpu" = ia64; then
  1.1048  	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  1.1049  	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  1.1050 -	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  1.1051 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  1.1052        else
  1.1053  	# Determine the default libpath from the value encoded in an empty executable.
  1.1054  	_LT_AC_SYS_LIBPATH_AIX
  1.1055 @@ -3160,16 +3300,26 @@
  1.1056  	# -berok will link without error, but may produce a broken library.
  1.1057  	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  1.1058  	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  1.1059 -	# -bexpall does not export symbols beginning with underscore (_)
  1.1060 -	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
  1.1061  	# Exported symbols can be pulled into shared objects from archives
  1.1062 -	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  1.1063 +	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  1.1064  	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  1.1065 -	# This is similar to how AIX traditionally builds it's shared libraries.
  1.1066 -	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  1.1067 +	# This is similar to how AIX traditionally builds its shared libraries.
  1.1068 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  1.1069        fi
  1.1070      fi
  1.1071      ;;
  1.1072 +
  1.1073 +  beos*)
  1.1074 +    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  1.1075 +      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  1.1076 +      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  1.1077 +      # support --undefined.  This deserves some investigation.  FIXME
  1.1078 +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1.1079 +    else
  1.1080 +      _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1081 +    fi
  1.1082 +    ;;
  1.1083 +
  1.1084    chorus*)
  1.1085      case $cc_basename in
  1.1086        *)
  1.1087 @@ -3179,7 +3329,6 @@
  1.1088      esac
  1.1089      ;;
  1.1090  
  1.1091 -
  1.1092    cygwin* | mingw* | pw32*)
  1.1093      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  1.1094      # as there is no search path for DLLs.
  1.1095 @@ -3189,30 +3338,22 @@
  1.1096      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  1.1097  
  1.1098      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  1.1099 -##      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  1.1100 -      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib'
  1.1101 +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  1.1102        # If the export-symbols file already is a .def file (1st line
  1.1103        # is EXPORTS), use it as is; otherwise, prepend...
  1.1104 -##      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  1.1105 -##	cp $export_symbols $output_objdir/$soname.def;
  1.1106 -##      else
  1.1107 -##	echo EXPORTS > $output_objdir/$soname.def;
  1.1108 -##	cat $export_symbols >> $output_objdir/$soname.def;
  1.1109 -##      fi~
  1.1110 -##      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  1.1111        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  1.1112  	cp $export_symbols $output_objdir/$soname.def;
  1.1113        else
  1.1114  	echo EXPORTS > $output_objdir/$soname.def;
  1.1115  	cat $export_symbols >> $output_objdir/$soname.def;
  1.1116        fi~
  1.1117 -      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib'
  1.1118 +      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  1.1119      else
  1.1120        _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1121      fi
  1.1122    ;;
  1.1123        darwin* | rhapsody*)
  1.1124 -        case "$host_os" in
  1.1125 +        case $host_os in
  1.1126          rhapsody* | darwin1.[[012]])
  1.1127           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  1.1128           ;;
  1.1129 @@ -3250,7 +3391,7 @@
  1.1130            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  1.1131          fi
  1.1132          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  1.1133 -        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  1.1134 +        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  1.1135            if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  1.1136              _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1.1137            else
  1.1138 @@ -3258,12 +3399,12 @@
  1.1139            fi
  1.1140              _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1.1141        else
  1.1142 -      case "$cc_basename" in
  1.1143 +      case $cc_basename in
  1.1144          xlc*)
  1.1145           output_verbose_link_cmd='echo'
  1.1146            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
  1.1147            _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  1.1148 -          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  1.1149 +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  1.1150            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1.1151            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1.1152            ;;
  1.1153 @@ -3276,11 +3417,11 @@
  1.1154  
  1.1155    dgux*)
  1.1156      case $cc_basename in
  1.1157 -      ec++)
  1.1158 +      ec++*)
  1.1159  	# FIXME: insert proper C++ library support
  1.1160  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1161  	;;
  1.1162 -      ghcx)
  1.1163 +      ghcx*)
  1.1164  	# Green Hills C++ Compiler
  1.1165  	# FIXME: insert proper C++ library support
  1.1166  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1167 @@ -3291,14 +3432,14 @@
  1.1168  	;;
  1.1169      esac
  1.1170      ;;
  1.1171 -  freebsd[12]*)
  1.1172 +  freebsd[[12]]*)
  1.1173      # C++ shared libraries reported to be fairly broken before switch to ELF
  1.1174      _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1175      ;;
  1.1176    freebsd-elf*)
  1.1177      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  1.1178      ;;
  1.1179 -  freebsd* | kfreebsd*-gnu)
  1.1180 +  freebsd* | kfreebsd*-gnu | dragonfly*)
  1.1181      # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  1.1182      # conventions
  1.1183      _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  1.1184 @@ -3315,11 +3456,11 @@
  1.1185  				# location of the library.
  1.1186  
  1.1187      case $cc_basename in
  1.1188 -    CC)
  1.1189 +    CC*)
  1.1190        # FIXME: insert proper C++ library support
  1.1191        _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1192        ;;
  1.1193 -    aCC)
  1.1194 +    aCC*)
  1.1195        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  1.1196        # Commands to make compiler produce verbose output that lists
  1.1197        # what "hidden" libraries, object files and flags are used when
  1.1198 @@ -3329,7 +3470,7 @@
  1.1199        # explicitly linking system object files so we need to strip them
  1.1200        # from the output so that they don't get included in the library
  1.1201        # dependencies.
  1.1202 -      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  1.1203 +      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  1.1204        ;;
  1.1205      *)
  1.1206        if test "$GXX" = yes; then
  1.1207 @@ -3343,34 +3484,23 @@
  1.1208      ;;
  1.1209    hpux10*|hpux11*)
  1.1210      if test $with_gnu_ld = no; then
  1.1211 -      case "$host_cpu" in
  1.1212 -      hppa*64*)
  1.1213 -	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  1.1214 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  1.1215 +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.1216 +
  1.1217 +      case $host_cpu in
  1.1218 +      hppa*64*|ia64*)
  1.1219  	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  1.1220 -	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.1221 -        ;;
  1.1222 -      ia64*)
  1.1223 -	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  1.1224          ;;
  1.1225        *)
  1.1226 -	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  1.1227 -	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.1228  	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  1.1229          ;;
  1.1230        esac
  1.1231      fi
  1.1232 -    case "$host_cpu" in
  1.1233 -    hppa*64*)
  1.1234 +    case $host_cpu in
  1.1235 +    hppa*64*|ia64*)
  1.1236        _LT_AC_TAGVAR(hardcode_direct, $1)=no
  1.1237        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.1238        ;;
  1.1239 -    ia64*)
  1.1240 -      _LT_AC_TAGVAR(hardcode_direct, $1)=no
  1.1241 -      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.1242 -      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  1.1243 -					      # but as the default
  1.1244 -					      # location of the library.
  1.1245 -      ;;
  1.1246      *)
  1.1247        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  1.1248        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  1.1249 @@ -3380,14 +3510,17 @@
  1.1250      esac
  1.1251  
  1.1252      case $cc_basename in
  1.1253 -      CC)
  1.1254 +      CC*)
  1.1255  	# FIXME: insert proper C++ library support
  1.1256  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1257  	;;
  1.1258 -      aCC)
  1.1259 -	case "$host_cpu" in
  1.1260 -	hppa*64*|ia64*)
  1.1261 -	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  1.1262 +      aCC*)
  1.1263 +	case $host_cpu in
  1.1264 +	hppa*64*)
  1.1265 +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  1.1266 +	  ;;
  1.1267 +	ia64*)
  1.1268 +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  1.1269  	  ;;
  1.1270  	*)
  1.1271  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  1.1272 @@ -3406,9 +3539,12 @@
  1.1273        *)
  1.1274  	if test "$GXX" = yes; then
  1.1275  	  if test $with_gnu_ld = no; then
  1.1276 -	    case "$host_cpu" in
  1.1277 -	    ia64*|hppa*64*)
  1.1278 -	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  1.1279 +	    case $host_cpu in
  1.1280 +	    hppa*64*)
  1.1281 +	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  1.1282 +	      ;;
  1.1283 +	    ia64*)
  1.1284 +	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  1.1285  	      ;;
  1.1286  	    *)
  1.1287  	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  1.1288 @@ -3422,11 +3558,25 @@
  1.1289  	;;
  1.1290      esac
  1.1291      ;;
  1.1292 +  interix3*)
  1.1293 +    _LT_AC_TAGVAR(hardcode_direct, $1)=no
  1.1294 +    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.1295 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  1.1296 +    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  1.1297 +    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  1.1298 +    # Instead, shared libraries are loaded at an image base (0x10000000 by
  1.1299 +    # default) and relocated if they conflict, which is a slow very memory
  1.1300 +    # consuming and fragmenting process.  To avoid this, we pick a random,
  1.1301 +    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  1.1302 +    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
  1.1303 +    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  1.1304 +    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  1.1305 +    ;;
  1.1306    irix5* | irix6*)
  1.1307      case $cc_basename in
  1.1308 -      CC)
  1.1309 +      CC*)
  1.1310  	# SGI C++
  1.1311 -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1.1312 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1.1313  
  1.1314  	# Archives containing C++ object files must be created using
  1.1315  	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
  1.1316 @@ -3437,7 +3587,7 @@
  1.1317        *)
  1.1318  	if test "$GXX" = yes; then
  1.1319  	  if test "$with_gnu_ld" = no; then
  1.1320 -	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  1.1321 +	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  1.1322  	  else
  1.1323  	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  1.1324  	  fi
  1.1325 @@ -3450,7 +3600,7 @@
  1.1326      ;;
  1.1327    linux*)
  1.1328      case $cc_basename in
  1.1329 -      KCC)
  1.1330 +      KCC*)
  1.1331  	# Kuck and Associates, Inc. (KAI) C++ Compiler
  1.1332  
  1.1333  	# KCC will only create a shared library if the output file
  1.1334 @@ -3475,7 +3625,7 @@
  1.1335  	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
  1.1336  	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  1.1337  	;;
  1.1338 -      icpc)
  1.1339 +      icpc*)
  1.1340  	# Intel C++
  1.1341  	with_gnu_ld=yes
  1.1342  	# version 8.0 and above of icpc choke on multiply defined symbols
  1.1343 @@ -3487,8 +3637,12 @@
  1.1344    	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1.1345  	  ;;
  1.1346  	*)  # Version 8.0 or newer
  1.1347 -  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1.1348 -  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1.1349 +	  tmp_idyn=
  1.1350 +	  case $host_cpu in
  1.1351 +	    ia64*) tmp_idyn=' -i_dynamic';;
  1.1352 +	  esac
  1.1353 +  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1.1354 +	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1.1355  	  ;;
  1.1356  	esac
  1.1357  	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  1.1358 @@ -3496,7 +3650,16 @@
  1.1359  	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  1.1360  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  1.1361  	;;
  1.1362 -      cxx)
  1.1363 +      pgCC*)
  1.1364 +        # Portland Group C++ compiler
  1.1365 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  1.1366 +  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
  1.1367 +
  1.1368 +	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  1.1369 +	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  1.1370 +	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  1.1371 +        ;;
  1.1372 +      cxx*)
  1.1373  	# Compaq C++
  1.1374  	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1.1375  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
  1.1376 @@ -3527,7 +3690,7 @@
  1.1377      ;;
  1.1378    mvs*)
  1.1379      case $cc_basename in
  1.1380 -      cxx)
  1.1381 +      cxx*)
  1.1382  	# FIXME: insert proper C++ library support
  1.1383  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1384  	;;
  1.1385 @@ -3553,6 +3716,8 @@
  1.1386      _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1387      ;;
  1.1388    openbsd*)
  1.1389 +    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  1.1390 +    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.1391      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  1.1392      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  1.1393      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1.1394 @@ -3564,7 +3729,7 @@
  1.1395      ;;
  1.1396    osf3*)
  1.1397      case $cc_basename in
  1.1398 -      KCC)
  1.1399 +      KCC*)
  1.1400  	# Kuck and Associates, Inc. (KAI) C++ Compiler
  1.1401  
  1.1402  	# KCC will only create a shared library if the output file
  1.1403 @@ -3580,14 +3745,14 @@
  1.1404  	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  1.1405  
  1.1406  	;;
  1.1407 -      RCC)
  1.1408 +      RCC*)
  1.1409  	# Rational C++ 2.4.1
  1.1410  	# FIXME: insert proper C++ library support
  1.1411  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1412  	;;
  1.1413 -      cxx)
  1.1414 +      cxx*)
  1.1415  	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  1.1416 -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1.1417 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1.1418  
  1.1419  	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  1.1420  	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.1421 @@ -3605,7 +3770,7 @@
  1.1422        *)
  1.1423  	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  1.1424  	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  1.1425 -	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  1.1426 +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  1.1427  
  1.1428  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  1.1429  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.1430 @@ -3624,7 +3789,7 @@
  1.1431      ;;
  1.1432    osf4* | osf5*)
  1.1433      case $cc_basename in
  1.1434 -      KCC)
  1.1435 +      KCC*)
  1.1436  	# Kuck and Associates, Inc. (KAI) C++ Compiler
  1.1437  
  1.1438  	# KCC will only create a shared library if the output file
  1.1439 @@ -3639,17 +3804,17 @@
  1.1440  	# the KAI C++ compiler.
  1.1441  	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  1.1442  	;;
  1.1443 -      RCC)
  1.1444 +      RCC*)
  1.1445  	# Rational C++ 2.4.1
  1.1446  	# FIXME: insert proper C++ library support
  1.1447  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1448  	;;
  1.1449 -      cxx)
  1.1450 +      cxx*)
  1.1451  	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  1.1452 -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1.1453 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1.1454  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  1.1455  	  echo "-hidden">> $lib.exp~
  1.1456 -	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
  1.1457 +	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
  1.1458  	  $rm $lib.exp'
  1.1459  
  1.1460  	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  1.1461 @@ -3668,7 +3833,7 @@
  1.1462        *)
  1.1463  	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  1.1464  	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  1.1465 -	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  1.1466 +	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  1.1467  
  1.1468  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  1.1469  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.1470 @@ -3689,27 +3854,14 @@
  1.1471      # FIXME: insert proper C++ library support
  1.1472      _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1473      ;;
  1.1474 -  sco*)
  1.1475 -    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  1.1476 -    case $cc_basename in
  1.1477 -      CC)
  1.1478 -	# FIXME: insert proper C++ library support
  1.1479 -	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1480 -	;;
  1.1481 -      *)
  1.1482 -	# FIXME: insert proper C++ library support
  1.1483 -	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1484 -	;;
  1.1485 -    esac
  1.1486 -    ;;
  1.1487    sunos4*)
  1.1488      case $cc_basename in
  1.1489 -      CC)
  1.1490 +      CC*)
  1.1491  	# Sun C++ 4.x
  1.1492  	# FIXME: insert proper C++ library support
  1.1493  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1494  	;;
  1.1495 -      lcc)
  1.1496 +      lcc*)
  1.1497  	# Lucid
  1.1498  	# FIXME: insert proper C++ library support
  1.1499  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1500 @@ -3722,36 +3874,33 @@
  1.1501      ;;
  1.1502    solaris*)
  1.1503      case $cc_basename in
  1.1504 -      CC)
  1.1505 +      CC*)
  1.1506  	# Sun C++ 4.2, 5.x and Centerline C++
  1.1507 +        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
  1.1508  	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  1.1509 -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  1.1510 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  1.1511  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1.1512 -	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  1.1513 +	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  1.1514  
  1.1515  	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  1.1516  	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.1517  	case $host_os in
  1.1518 -	  solaris2.[0-5] | solaris2.[0-5].*) ;;
  1.1519 +	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  1.1520  	  *)
  1.1521  	    # The C++ compiler is used as linker so we must use $wl
  1.1522  	    # flag to pass the commands to the underlying system
  1.1523 -	    # linker.
  1.1524 +	    # linker. We must also pass each convience library through
  1.1525 +	    # to the system linker between allextract/defaultextract.
  1.1526 +	    # The C++ compiler will combine linker options so we
  1.1527 +	    # cannot just pass the convience library names through
  1.1528 +	    # without $wl.
  1.1529  	    # Supported since Solaris 2.6 (maybe 2.5.1?)
  1.1530 -	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  1.1531 +	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
  1.1532  	    ;;
  1.1533  	esac
  1.1534  	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  1.1535  
  1.1536 -	# Commands to make compiler produce verbose output that lists
  1.1537 -	# what "hidden" libraries, object files and flags are used when
  1.1538 -	# linking a shared library.
  1.1539 -	#
  1.1540 -	# There doesn't appear to be a way to prevent this compiler from
  1.1541 -	# explicitly linking system object files so we need to strip them
  1.1542 -	# from the output so that they don't get included in the library
  1.1543 -	# dependencies.
  1.1544 -	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  1.1545 +	output_verbose_link_cmd='echo'
  1.1546  
  1.1547  	# Archives containing C++ object files must be created using
  1.1548  	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
  1.1549 @@ -3759,7 +3908,7 @@
  1.1550  	# in the archive.
  1.1551  	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  1.1552  	;;
  1.1553 -      gcx)
  1.1554 +      gcx*)
  1.1555  	# Green Hills C++ Compiler
  1.1556  	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  1.1557  
  1.1558 @@ -3797,12 +3946,63 @@
  1.1559  	;;
  1.1560      esac
  1.1561      ;;
  1.1562 -  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  1.1563 +  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  1.1564 +    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  1.1565      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  1.1566 +    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.1567 +    runpath_var='LD_RUN_PATH'
  1.1568 +
  1.1569 +    case $cc_basename in
  1.1570 +      CC*)
  1.1571 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.1572 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.1573 +	;;
  1.1574 +      *)
  1.1575 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.1576 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.1577 +	;;
  1.1578 +    esac
  1.1579 +    ;;
  1.1580 +  sysv5* | sco3.2v5* | sco5v6*)
  1.1581 +    # Note: We can NOT use -z defs as we might desire, because we do not
  1.1582 +    # link with -lc, and that would cause any symbols used from libc to
  1.1583 +    # always be unresolved, which means just about no library would
  1.1584 +    # ever link correctly.  If we're not using GNU ld we use -z text
  1.1585 +    # though, which does catch some bad symbols but isn't as heavy-handed
  1.1586 +    # as -z defs.
  1.1587 +    # For security reasons, it is highly recommended that you always
  1.1588 +    # use absolute paths for naming shared libraries, and exclude the
  1.1589 +    # DT_RUNPATH tag from executables and libraries.  But doing so
  1.1590 +    # requires that you compile everything twice, which is a pain.
  1.1591 +    # So that behaviour is only enabled if SCOABSPATH is set to a
  1.1592 +    # non-empty value in the environment.  Most likely only useful for
  1.1593 +    # creating official distributions of packages.
  1.1594 +    # This is a hack until libtool officially supports absolute path
  1.1595 +    # names for shared libraries.
  1.1596 +    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  1.1597 +    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  1.1598 +    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  1.1599 +    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.1600 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
  1.1601 +    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  1.1602 +    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  1.1603 +    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  1.1604 +    runpath_var='LD_RUN_PATH'
  1.1605 +
  1.1606 +    case $cc_basename in
  1.1607 +      CC*)
  1.1608 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.1609 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.1610 +	;;
  1.1611 +      *)
  1.1612 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.1613 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.1614 +	;;
  1.1615 +    esac
  1.1616      ;;
  1.1617    tandem*)
  1.1618      case $cc_basename in
  1.1619 -      NCC)
  1.1620 +      NCC*)
  1.1621  	# NonStop-UX NCC 3.20
  1.1622  	# FIXME: insert proper C++ library support
  1.1623  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.1624 @@ -3839,8 +4039,6 @@
  1.1625  AC_LIBTOOL_PROG_LD_SHLIBS($1)
  1.1626  AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  1.1627  AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  1.1628 -AC_LIBTOOL_SYS_LIB_STRIP
  1.1629 -AC_LIBTOOL_DLOPEN_SELF($1)
  1.1630  
  1.1631  AC_LIBTOOL_CONFIG($1)
  1.1632  
  1.1633 @@ -3858,7 +4056,7 @@
  1.1634  ])# AC_LIBTOOL_LANG_CXX_CONFIG
  1.1635  
  1.1636  # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  1.1637 -# ------------------------
  1.1638 +# ------------------------------------
  1.1639  # Figure out "hidden" library dependencies from verbose
  1.1640  # compiler output when linking a shared library.
  1.1641  # Parse the compiler output and extract the necessary
  1.1642 @@ -3912,7 +4110,7 @@
  1.1643    # The `*' in the case matches for architectures that use `case' in
  1.1644    # $output_verbose_cmd can trigger glob expansion during the loop
  1.1645    # eval without this substitution.
  1.1646 -  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
  1.1647 +  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
  1.1648  
  1.1649    for p in `eval $output_verbose_link_cmd`; do
  1.1650      case $p in
  1.1651 @@ -3988,13 +4186,37 @@
  1.1652  
  1.1653  $rm -f confest.$objext
  1.1654  
  1.1655 +# PORTME: override above test on systems where it is broken
  1.1656 +ifelse([$1],[CXX],
  1.1657 +[case $host_os in
  1.1658 +interix3*)
  1.1659 +  # Interix 3.5 installs completely hosed .la files for C++, so rather than
  1.1660 +  # hack all around it, let's just trust "g++" to DTRT.
  1.1661 +  _LT_AC_TAGVAR(predep_objects,$1)=
  1.1662 +  _LT_AC_TAGVAR(postdep_objects,$1)=
  1.1663 +  _LT_AC_TAGVAR(postdeps,$1)=
  1.1664 +  ;;
  1.1665 +
  1.1666 +solaris*)
  1.1667 +  case $cc_basename in
  1.1668 +  CC*)
  1.1669 +    # Adding this requires a known-good setup of shared libraries for
  1.1670 +    # Sun compiler versions before 5.6, else PIC objects from an old
  1.1671 +    # archive will be linked into the output, leading to subtle bugs.
  1.1672 +    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
  1.1673 +    ;;
  1.1674 +  esac
  1.1675 +  ;;
  1.1676 +esac
  1.1677 +])
  1.1678 +
  1.1679  case " $_LT_AC_TAGVAR(postdeps, $1) " in
  1.1680  *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  1.1681  esac
  1.1682  ])# AC_LIBTOOL_POSTDEP_PREDEP
  1.1683  
  1.1684  # AC_LIBTOOL_LANG_F77_CONFIG
  1.1685 -# ------------------------
  1.1686 +# --------------------------
  1.1687  # Ensure that the configuration vars for the C compiler are
  1.1688  # suitably defined.  Those variables are subsequently used by
  1.1689  # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  1.1690 @@ -4038,12 +4260,16 @@
  1.1691  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  1.1692  _LT_AC_SYS_COMPILER
  1.1693  
  1.1694 +# save warnings/boilerplate of simple test code
  1.1695 +_LT_COMPILER_BOILERPLATE
  1.1696 +_LT_LINKER_BOILERPLATE
  1.1697 +
  1.1698  # Allow CC to be a program name with arguments.
  1.1699  lt_save_CC="$CC"
  1.1700  CC=${F77-"f77"}
  1.1701  compiler=$CC
  1.1702  _LT_AC_TAGVAR(compiler, $1)=$CC
  1.1703 -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
  1.1704 +_LT_CC_BASENAME([$compiler])
  1.1705  
  1.1706  AC_MSG_CHECKING([if libtool supports shared libraries])
  1.1707  AC_MSG_RESULT([$can_build_shared])
  1.1708 @@ -4053,7 +4279,7 @@
  1.1709  
  1.1710  # On AIX, shared libraries and static libraries use the same namespace, and
  1.1711  # are all built from PIC.
  1.1712 -case "$host_os" in
  1.1713 +case $host_os in
  1.1714  aix3*)
  1.1715    test "$enable_shared" = yes && enable_static=no
  1.1716    if test -n "$RANLIB"; then
  1.1717 @@ -4062,7 +4288,9 @@
  1.1718    fi
  1.1719    ;;
  1.1720  aix4* | aix5*)
  1.1721 -  test "$enable_shared" = yes && enable_static=no
  1.1722 +  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  1.1723 +    test "$enable_shared" = yes && enable_static=no
  1.1724 +  fi
  1.1725    ;;
  1.1726  esac
  1.1727  AC_MSG_RESULT([$enable_shared])
  1.1728 @@ -4072,8 +4300,6 @@
  1.1729  test "$enable_shared" = yes || enable_static=yes
  1.1730  AC_MSG_RESULT([$enable_static])
  1.1731  
  1.1732 -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  1.1733 -
  1.1734  _LT_AC_TAGVAR(GCC, $1)="$G77"
  1.1735  _LT_AC_TAGVAR(LD, $1)="$LD"
  1.1736  
  1.1737 @@ -4083,8 +4309,6 @@
  1.1738  AC_LIBTOOL_PROG_LD_SHLIBS($1)
  1.1739  AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  1.1740  AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  1.1741 -AC_LIBTOOL_SYS_LIB_STRIP
  1.1742 -
  1.1743  
  1.1744  AC_LIBTOOL_CONFIG($1)
  1.1745  
  1.1746 @@ -4113,20 +4337,27 @@
  1.1747  lt_simple_compile_test_code="class foo {}\n"
  1.1748  
  1.1749  # Code to be used in simple link tests
  1.1750 -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
  1.1751 +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
  1.1752  
  1.1753  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  1.1754  _LT_AC_SYS_COMPILER
  1.1755  
  1.1756 +# save warnings/boilerplate of simple test code
  1.1757 +_LT_COMPILER_BOILERPLATE
  1.1758 +_LT_LINKER_BOILERPLATE
  1.1759 +
  1.1760  # Allow CC to be a program name with arguments.
  1.1761  lt_save_CC="$CC"
  1.1762  CC=${GCJ-"gcj"}
  1.1763  compiler=$CC
  1.1764  _LT_AC_TAGVAR(compiler, $1)=$CC
  1.1765 +_LT_CC_BASENAME([$compiler])
  1.1766  
  1.1767  # GCJ did not exist at the time GCC didn't implicitly link libc in.
  1.1768  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  1.1769  
  1.1770 +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  1.1771 +
  1.1772  ## CAVEAT EMPTOR:
  1.1773  ## There is no encapsulation within the following macros, do not change
  1.1774  ## the running order or otherwise move them around unless you know exactly
  1.1775 @@ -4138,8 +4369,6 @@
  1.1776  AC_LIBTOOL_PROG_LD_SHLIBS($1)
  1.1777  AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  1.1778  AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  1.1779 -AC_LIBTOOL_SYS_LIB_STRIP
  1.1780 -AC_LIBTOOL_DLOPEN_SELF($1)
  1.1781  
  1.1782  AC_LIBTOOL_CONFIG($1)
  1.1783  
  1.1784 @@ -4149,7 +4378,7 @@
  1.1785  
  1.1786  
  1.1787  # AC_LIBTOOL_LANG_RC_CONFIG
  1.1788 -# --------------------------
  1.1789 +# -------------------------
  1.1790  # Ensure that the configuration vars for the Windows resource compiler are
  1.1791  # suitably defined.  Those variables are subsequently used by
  1.1792  # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  1.1793 @@ -4173,11 +4402,16 @@
  1.1794  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  1.1795  _LT_AC_SYS_COMPILER
  1.1796  
  1.1797 +# save warnings/boilerplate of simple test code
  1.1798 +_LT_COMPILER_BOILERPLATE
  1.1799 +_LT_LINKER_BOILERPLATE
  1.1800 +
  1.1801  # Allow CC to be a program name with arguments.
  1.1802  lt_save_CC="$CC"
  1.1803  CC=${RC-"windres"}
  1.1804  compiler=$CC
  1.1805  _LT_AC_TAGVAR(compiler, $1)=$CC
  1.1806 +_LT_CC_BASENAME([$compiler])
  1.1807  _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1.1808  
  1.1809  AC_LIBTOOL_CONFIG($1)
  1.1810 @@ -4207,7 +4441,7 @@
  1.1811    # Now quote all the things that may contain metacharacters while being
  1.1812    # careful not to overquote the AC_SUBSTed values.  We take copies of the
  1.1813    # variables and quote the copies for generation of the libtool script.
  1.1814 -  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
  1.1815 +  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
  1.1816      SED SHELL STRIP \
  1.1817      libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  1.1818      old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  1.1819 @@ -4313,7 +4547,7 @@
  1.1820  #
  1.1821  # You should have received a copy of the GNU General Public License
  1.1822  # along with this program; if not, write to the Free Software
  1.1823 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  1.1824 +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  1.1825  #
  1.1826  # As a special exception to the GNU General Public License, if you
  1.1827  # distribute this file as part of a program that contains a
  1.1828 @@ -4324,7 +4558,7 @@
  1.1829  SED=$lt_SED
  1.1830  
  1.1831  # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  1.1832 -Xsed="$SED -e s/^X//"
  1.1833 +Xsed="$SED -e 1s/^X//"
  1.1834  
  1.1835  # The HP-UX ksh and POSIX shell print the target directory to stdout
  1.1836  # if CDPATH is set.
  1.1837 @@ -4359,6 +4593,12 @@
  1.1838  # The host system.
  1.1839  host_alias=$host_alias
  1.1840  host=$host
  1.1841 +host_os=$host_os
  1.1842 +
  1.1843 +# The build system.
  1.1844 +build_alias=$build_alias
  1.1845 +build=$build
  1.1846 +build_os=$build_os
  1.1847  
  1.1848  # An echo program that does not interpret backslashes.
  1.1849  echo=$lt_echo
  1.1850 @@ -4370,6 +4610,9 @@
  1.1851  # A C compiler.
  1.1852  LTCC=$lt_LTCC
  1.1853  
  1.1854 +# LTCC compiler flags.
  1.1855 +LTCFLAGS=$lt_LTCFLAGS
  1.1856 +
  1.1857  # A language-specific compiler.
  1.1858  CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  1.1859  
  1.1860 @@ -4435,7 +4678,7 @@
  1.1861  # Does compiler simultaneously support -c and -o options?
  1.1862  compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  1.1863  
  1.1864 -# Must we lock files when doing compilation ?
  1.1865 +# Must we lock files when doing compilation?
  1.1866  need_locks=$lt_need_locks
  1.1867  
  1.1868  # Do we need the lib prefix for modules?
  1.1869 @@ -4709,9 +4952,6 @@
  1.1870  # Regexp to match symbols that can be accessed directly from C.
  1.1871  sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  1.1872  
  1.1873 -# Transform the above into a raw symbol and a C symbol.
  1.1874 -symxfrm='\1 \2\3 \3'
  1.1875 -
  1.1876  # Transform an extracted symbol line into a proper C declaration
  1.1877  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  1.1878  
  1.1879 @@ -4733,15 +4973,31 @@
  1.1880    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  1.1881    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
  1.1882    ;;
  1.1883 +linux*)
  1.1884 +  if test "$host_cpu" = ia64; then
  1.1885 +    symcode='[[ABCDGIRSTW]]'
  1.1886 +    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  1.1887 +    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
  1.1888 +  fi
  1.1889 +  ;;
  1.1890  irix* | nonstopux*)
  1.1891    symcode='[[BCDEGRST]]'
  1.1892    ;;
  1.1893  osf*)
  1.1894    symcode='[[BCDEGQRST]]'
  1.1895    ;;
  1.1896 -solaris* | sysv5*)
  1.1897 +solaris*)
  1.1898    symcode='[[BDRT]]'
  1.1899    ;;
  1.1900 +sco3.2v5*)
  1.1901 +  symcode='[[DT]]'
  1.1902 +  ;;
  1.1903 +sysv4.2uw2*)
  1.1904 +  symcode='[[DT]]'
  1.1905 +  ;;
  1.1906 +sysv5* | sco5v6* | unixware* | OpenUNIX*)
  1.1907 +  symcode='[[ABDT]]'
  1.1908 +  ;;
  1.1909  sysv4)
  1.1910    symcode='[[DFNSTU]]'
  1.1911    ;;
  1.1912 @@ -4764,8 +5020,11 @@
  1.1913  # Try without a prefix undercore, then with it.
  1.1914  for ac_symprfx in "" "_"; do
  1.1915  
  1.1916 +  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  1.1917 +  symxfrm="\\1 $ac_symprfx\\2 \\2"
  1.1918 +
  1.1919    # Write the raw and C identifiers.
  1.1920 -  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
  1.1921 +  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  1.1922  
  1.1923    # Check to see that the pipe works correctly.
  1.1924    pipe_works=no
  1.1925 @@ -4921,6 +5180,10 @@
  1.1926        # DJGPP does not support shared libraries at all
  1.1927        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  1.1928        ;;
  1.1929 +    interix3*)
  1.1930 +      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  1.1931 +      # Instead, we relocate shared libraries at runtime.
  1.1932 +      ;;
  1.1933      sysv4*MP*)
  1.1934        if test -d /usr/nec; then
  1.1935  	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  1.1936 @@ -4929,7 +5192,7 @@
  1.1937      hpux*)
  1.1938        # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  1.1939        # not for PA HP-UX.
  1.1940 -      case "$host_cpu" in
  1.1941 +      case $host_cpu in
  1.1942        hppa*64*|ia64*)
  1.1943  	;;
  1.1944        *)
  1.1945 @@ -4954,7 +5217,7 @@
  1.1946  	;;
  1.1947        chorus*)
  1.1948  	case $cc_basename in
  1.1949 -	cxch68)
  1.1950 +	cxch68*)
  1.1951  	  # Green Hills C++ Compiler
  1.1952  	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  1.1953  	  ;;
  1.1954 @@ -4963,7 +5226,7 @@
  1.1955         darwin*)
  1.1956           # PIC is the default on this platform
  1.1957           # Common symbols not allowed in MH_DYLIB files
  1.1958 -         case "$cc_basename" in
  1.1959 +         case $cc_basename in
  1.1960             xlc*)
  1.1961             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  1.1962             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.1963 @@ -4972,10 +5235,10 @@
  1.1964         ;;
  1.1965        dgux*)
  1.1966  	case $cc_basename in
  1.1967 -	  ec++)
  1.1968 +	  ec++*)
  1.1969  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1.1970  	    ;;
  1.1971 -	  ghcx)
  1.1972 +	  ghcx*)
  1.1973  	    # Green Hills C++ Compiler
  1.1974  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1.1975  	    ;;
  1.1976 @@ -4983,22 +5246,22 @@
  1.1977  	    ;;
  1.1978  	esac
  1.1979  	;;
  1.1980 -      freebsd* | kfreebsd*-gnu)
  1.1981 +      freebsd* | kfreebsd*-gnu | dragonfly*)
  1.1982  	# FreeBSD uses GNU C++
  1.1983  	;;
  1.1984        hpux9* | hpux10* | hpux11*)
  1.1985  	case $cc_basename in
  1.1986 -	  CC)
  1.1987 +	  CC*)
  1.1988  	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.1989 -	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  1.1990 +	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  1.1991  	    if test "$host_cpu" != ia64; then
  1.1992  	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  1.1993  	    fi
  1.1994  	    ;;
  1.1995 -	  aCC)
  1.1996 +	  aCC*)
  1.1997  	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.1998 -	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  1.1999 -	    case "$host_cpu" in
  1.2000 +	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  1.2001 +	    case $host_cpu in
  1.2002  	    hppa*64*|ia64*)
  1.2003  	      # +Z the default
  1.2004  	      ;;
  1.2005 @@ -5011,9 +5274,13 @@
  1.2006  	    ;;
  1.2007  	esac
  1.2008  	;;
  1.2009 +      interix*)
  1.2010 +	# This is c89, which is MS Visual C++ (no shared libs)
  1.2011 +	# Anyone wants to do a port?
  1.2012 +	;;
  1.2013        irix5* | irix6* | nonstopux*)
  1.2014  	case $cc_basename in
  1.2015 -	  CC)
  1.2016 +	  CC*)
  1.2017  	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2018  	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  1.2019  	    # CC pic flag -KPIC is the default.
  1.2020 @@ -5024,18 +5291,24 @@
  1.2021  	;;
  1.2022        linux*)
  1.2023  	case $cc_basename in
  1.2024 -	  KCC)
  1.2025 +	  KCC*)
  1.2026  	    # KAI C++ Compiler
  1.2027  	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  1.2028  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  1.2029  	    ;;
  1.2030 -	  icpc)
  1.2031 +	  icpc* | ecpc*)
  1.2032  	    # Intel C++
  1.2033  	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2034  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1.2035  	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  1.2036  	    ;;
  1.2037 -	  cxx)
  1.2038 +	  pgCC*)
  1.2039 +	    # Portland Group C++ compiler.
  1.2040 +	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2041 +	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  1.2042 +	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2043 +	    ;;
  1.2044 +	  cxx*)
  1.2045  	    # Compaq C++
  1.2046  	    # Make sure the PIC flag is empty.  It appears that all Alpha
  1.2047  	    # Linux and Compaq Tru64 Unix objects are PIC.
  1.2048 @@ -5052,7 +5325,7 @@
  1.2049  	;;
  1.2050        mvs*)
  1.2051  	case $cc_basename in
  1.2052 -	  cxx)
  1.2053 +	  cxx*)
  1.2054  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  1.2055  	    ;;
  1.2056  	  *)
  1.2057 @@ -5063,14 +5336,14 @@
  1.2058  	;;
  1.2059        osf3* | osf4* | osf5*)
  1.2060  	case $cc_basename in
  1.2061 -	  KCC)
  1.2062 +	  KCC*)
  1.2063  	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  1.2064  	    ;;
  1.2065 -	  RCC)
  1.2066 +	  RCC*)
  1.2067  	    # Rational C++ 2.4.1
  1.2068  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1.2069  	    ;;
  1.2070 -	  cxx)
  1.2071 +	  cxx*)
  1.2072  	    # Digital/Compaq C++
  1.2073  	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2074  	    # Make sure the PIC flag is empty.  It appears that all Alpha
  1.2075 @@ -5084,24 +5357,15 @@
  1.2076  	;;
  1.2077        psos*)
  1.2078  	;;
  1.2079 -      sco*)
  1.2080 -	case $cc_basename in
  1.2081 -	  CC)
  1.2082 -	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  1.2083 -	    ;;
  1.2084 -	  *)
  1.2085 -	    ;;
  1.2086 -	esac
  1.2087 -	;;
  1.2088        solaris*)
  1.2089  	case $cc_basename in
  1.2090 -	  CC)
  1.2091 +	  CC*)
  1.2092  	    # Sun C++ 4.2, 5.x and Centerline C++
  1.2093  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1.2094  	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2095  	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  1.2096  	    ;;
  1.2097 -	  gcx)
  1.2098 +	  gcx*)
  1.2099  	    # Green Hills C++ Compiler
  1.2100  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  1.2101  	    ;;
  1.2102 @@ -5111,12 +5375,12 @@
  1.2103  	;;
  1.2104        sunos4*)
  1.2105  	case $cc_basename in
  1.2106 -	  CC)
  1.2107 +	  CC*)
  1.2108  	    # Sun C++ 4.x
  1.2109  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1.2110  	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2111  	    ;;
  1.2112 -	  lcc)
  1.2113 +	  lcc*)
  1.2114  	    # Lucid
  1.2115  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1.2116  	    ;;
  1.2117 @@ -5126,7 +5390,7 @@
  1.2118  	;;
  1.2119        tandem*)
  1.2120  	case $cc_basename in
  1.2121 -	  NCC)
  1.2122 +	  NCC*)
  1.2123  	    # NonStop-UX NCC 3.20
  1.2124  	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1.2125  	    ;;
  1.2126 @@ -5134,7 +5398,14 @@
  1.2127  	    ;;
  1.2128  	esac
  1.2129  	;;
  1.2130 -      unixware*)
  1.2131 +      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  1.2132 +	case $cc_basename in
  1.2133 +	  CC*)
  1.2134 +	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2135 +	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1.2136 +	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2137 +	    ;;
  1.2138 +	esac
  1.2139  	;;
  1.2140        vxworks*)
  1.2141  	;;
  1.2142 @@ -5181,6 +5452,11 @@
  1.2143        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  1.2144        ;;
  1.2145  
  1.2146 +    interix3*)
  1.2147 +      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  1.2148 +      # Instead, we relocate shared libraries at runtime.
  1.2149 +      ;;
  1.2150 +
  1.2151      msdosdjgpp*)
  1.2152        # Just because we use GCC doesn't mean we suddenly get shared libraries
  1.2153        # on systems that don't support them.
  1.2154 @@ -5197,7 +5473,7 @@
  1.2155      hpux*)
  1.2156        # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  1.2157        # not for PA HP-UX.
  1.2158 -      case "$host_cpu" in
  1.2159 +      case $host_cpu in
  1.2160        hppa*64*|ia64*)
  1.2161  	# +Z the default
  1.2162  	;;
  1.2163 @@ -5226,7 +5502,7 @@
  1.2164        darwin*)
  1.2165          # PIC is the default on this platform
  1.2166          # Common symbols not allowed in MH_DYLIB files
  1.2167 -       case "$cc_basename" in
  1.2168 +       case $cc_basename in
  1.2169           xlc*)
  1.2170           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
  1.2171           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2172 @@ -5244,7 +5520,7 @@
  1.2173        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2174        # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  1.2175        # not for PA HP-UX.
  1.2176 -      case "$host_cpu" in
  1.2177 +      case $host_cpu in
  1.2178        hppa*64*|ia64*)
  1.2179  	# +Z the default
  1.2180  	;;
  1.2181 @@ -5268,12 +5544,19 @@
  1.2182        ;;
  1.2183  
  1.2184      linux*)
  1.2185 -      case $CC in
  1.2186 +      case $cc_basename in
  1.2187        icc* | ecc*)
  1.2188  	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2189  	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1.2190  	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  1.2191          ;;
  1.2192 +      pgcc* | pgf77* | pgf90* | pgf95*)
  1.2193 +        # Portland Group compilers (*not* the Pentium gcc compiler,
  1.2194 +	# which looks to be a dead project)
  1.2195 +	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2196 +	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  1.2197 +	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2198 +        ;;
  1.2199        ccc*)
  1.2200          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2201          # All Alpha code is PIC.
  1.2202 @@ -5288,15 +5571,15 @@
  1.2203        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  1.2204        ;;
  1.2205  
  1.2206 -    sco3.2v5*)
  1.2207 -      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
  1.2208 -      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
  1.2209 -      ;;
  1.2210 -
  1.2211      solaris*)
  1.2212 -      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2213        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1.2214        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2215 +      case $cc_basename in
  1.2216 +      f77* | f90* | f95*)
  1.2217 +	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  1.2218 +      *)
  1.2219 +	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  1.2220 +      esac
  1.2221        ;;
  1.2222  
  1.2223      sunos4*)
  1.2224 @@ -5305,7 +5588,7 @@
  1.2225        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2226        ;;
  1.2227  
  1.2228 -    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1.2229 +    sysv4 | sysv4.2uw2* | sysv4.3*)
  1.2230        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2231        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1.2232        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2233 @@ -5318,6 +5601,17 @@
  1.2234        fi
  1.2235        ;;
  1.2236  
  1.2237 +    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  1.2238 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2239 +      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  1.2240 +      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2241 +      ;;
  1.2242 +
  1.2243 +    unicos*)
  1.2244 +      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  1.2245 +      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  1.2246 +      ;;
  1.2247 +
  1.2248      uts4*)
  1.2249        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  1.2250        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  1.2251 @@ -5345,7 +5639,7 @@
  1.2252      [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  1.2253       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  1.2254  fi
  1.2255 -case "$host_os" in
  1.2256 +case $host_os in
  1.2257    # For platforms which do not support PIC, -DPIC is meaningless:
  1.2258    *djgpp*)
  1.2259      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  1.2260 @@ -5354,6 +5648,16 @@
  1.2261      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  1.2262      ;;
  1.2263  esac
  1.2264 +
  1.2265 +#
  1.2266 +# Check to make sure the static flag actually works.
  1.2267 +#
  1.2268 +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
  1.2269 +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  1.2270 +  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
  1.2271 +  $lt_tmp_static_flag,
  1.2272 +  [],
  1.2273 +  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  1.2274  ])
  1.2275  
  1.2276  
  1.2277 @@ -5378,7 +5682,7 @@
  1.2278      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  1.2279    ;;
  1.2280    cygwin* | mingw*)
  1.2281 -    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  1.2282 +    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  1.2283    ;;
  1.2284    *)
  1.2285      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  1.2286 @@ -5421,7 +5725,8 @@
  1.2287    # rely on this symbol name, it's probably fine to never include it in
  1.2288    # preloaded symbol tables.
  1.2289    extract_expsyms_cmds=
  1.2290 -
  1.2291 +  # Just being paranoid about ensuring that cc_basename is set.
  1.2292 +  _LT_CC_BASENAME([$compiler])
  1.2293    case $host_os in
  1.2294    cygwin* | mingw* | pw32*)
  1.2295      # FIXME: the MSVC++ port hasn't been tested in a loooong time
  1.2296 @@ -5431,6 +5736,10 @@
  1.2297        with_gnu_ld=no
  1.2298      fi
  1.2299      ;;
  1.2300 +  interix*)
  1.2301 +    # we just hope/assume this is gcc and not c89 (= MSVC++)
  1.2302 +    with_gnu_ld=yes
  1.2303 +    ;;
  1.2304    openbsd*)
  1.2305      with_gnu_ld=no
  1.2306      ;;
  1.2307 @@ -5441,6 +5750,27 @@
  1.2308      # If archive_cmds runs LD, not CC, wlarc should be empty
  1.2309      wlarc='${wl}'
  1.2310  
  1.2311 +    # Set some defaults for GNU ld with shared library support. These
  1.2312 +    # are reset later if shared libraries are not supported. Putting them
  1.2313 +    # here allows them to be overridden if necessary.
  1.2314 +    runpath_var=LD_RUN_PATH
  1.2315 +    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  1.2316 +    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  1.2317 +    # ancient GNU ld didn't support --whole-archive et. al.
  1.2318 +    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  1.2319 +	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1.2320 +      else
  1.2321 +  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  1.2322 +    fi
  1.2323 +    supports_anon_versioning=no
  1.2324 +    case `$LD -v 2>/dev/null` in
  1.2325 +      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  1.2326 +      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  1.2327 +      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  1.2328 +      *\ 2.11.*) ;; # other 2.11 versions
  1.2329 +      *) supports_anon_versioning=yes ;;
  1.2330 +    esac
  1.2331 +
  1.2332      # See if GNU ld supports shared libraries.
  1.2333      case $host_os in
  1.2334      aix3* | aix4* | aix5*)
  1.2335 @@ -5491,29 +5821,67 @@
  1.2336        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  1.2337        _LT_AC_TAGVAR(always_export_symbols, $1)=no
  1.2338        _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  1.2339 -      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  1.2340 +      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  1.2341  
  1.2342        if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  1.2343 -##        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  1.2344 -        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib'
  1.2345 +        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  1.2346  	# If the export-symbols file already is a .def file (1st line
  1.2347  	# is EXPORTS), use it as is; otherwise, prepend...
  1.2348 -##	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  1.2349 -##	  cp $export_symbols $output_objdir/$soname.def;
  1.2350 -##	else
  1.2351 -##	  echo EXPORTS > $output_objdir/$soname.def;
  1.2352 -##	  cat $export_symbols >> $output_objdir/$soname.def;
  1.2353 -##	fi~
  1.2354 -##	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
  1.2355  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  1.2356  	  cp $export_symbols $output_objdir/$soname.def;
  1.2357  	else
  1.2358  	  echo EXPORTS > $output_objdir/$soname.def;
  1.2359  	  cat $export_symbols >> $output_objdir/$soname.def;
  1.2360  	fi~
  1.2361 -	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base  ${wl}--out-implib,$lib'
  1.2362 +	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  1.2363        else
  1.2364 -	ld_shlibs=no
  1.2365 +	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.2366 +      fi
  1.2367 +      ;;
  1.2368 +
  1.2369 +    interix3*)
  1.2370 +      _LT_AC_TAGVAR(hardcode_direct, $1)=no
  1.2371 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2372 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  1.2373 +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  1.2374 +      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  1.2375 +      # Instead, shared libraries are loaded at an image base (0x10000000 by
  1.2376 +      # default) and relocated if they conflict, which is a slow very memory
  1.2377 +      # consuming and fragmenting process.  To avoid this, we pick a random,
  1.2378 +      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  1.2379 +      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
  1.2380 +      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  1.2381 +      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  1.2382 +      ;;
  1.2383 +
  1.2384 +    linux*)
  1.2385 +      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  1.2386 +	tmp_addflag=
  1.2387 +	case $cc_basename,$host_cpu in
  1.2388 +	pgcc*)				# Portland Group C compiler
  1.2389 +	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  1.2390 +	  tmp_addflag=' $pic_flag'
  1.2391 +	  ;;
  1.2392 +	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
  1.2393 +	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
  1.2394 +	  tmp_addflag=' $pic_flag -Mnomain' ;;
  1.2395 +	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
  1.2396 +	  tmp_addflag=' -i_dynamic' ;;
  1.2397 +	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
  1.2398 +	  tmp_addflag=' -i_dynamic -nofor_main' ;;
  1.2399 +	ifc* | ifort*)			# Intel Fortran compiler
  1.2400 +	  tmp_addflag=' -nofor_main' ;;
  1.2401 +	esac
  1.2402 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1.2403 +
  1.2404 +	if test $supports_anon_versioning = yes; then
  1.2405 +	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  1.2406 +  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  1.2407 +  $echo "local: *; };" >> $output_objdir/$libname.ver~
  1.2408 +	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  1.2409 +	fi
  1.2410 +      else
  1.2411 +	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.2412        fi
  1.2413        ;;
  1.2414  
  1.2415 @@ -5527,7 +5895,7 @@
  1.2416        fi
  1.2417        ;;
  1.2418  
  1.2419 -    solaris* | sysv5*)
  1.2420 +    solaris*)
  1.2421        if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  1.2422  	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.2423  	cat <<EOF 1>&2
  1.2424 @@ -5548,6 +5916,33 @@
  1.2425        fi
  1.2426        ;;
  1.2427  
  1.2428 +    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  1.2429 +      case `$LD -v 2>&1` in
  1.2430 +        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
  1.2431 +	_LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.2432 +	cat <<_LT_EOF 1>&2
  1.2433 +
  1.2434 +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  1.2435 +*** reliably create shared libraries on SCO systems.  Therefore, libtool
  1.2436 +*** is disabling shared libraries support.  We urge you to upgrade GNU
  1.2437 +*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
  1.2438 +*** your PATH or compiler configuration so that the native linker is
  1.2439 +*** used, and then restart.
  1.2440 +
  1.2441 +_LT_EOF
  1.2442 +	;;
  1.2443 +	*)
  1.2444 +	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  1.2445 +	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
  1.2446 +	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
  1.2447 +	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
  1.2448 +	  else
  1.2449 +	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.2450 +	  fi
  1.2451 +	;;
  1.2452 +      esac
  1.2453 +      ;;
  1.2454 +
  1.2455      sunos4*)
  1.2456        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1.2457        wlarc=
  1.2458 @@ -5555,31 +5950,6 @@
  1.2459        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2460        ;;
  1.2461  
  1.2462 -  linux*)
  1.2463 -    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  1.2464 -        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1.2465 -	_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
  1.2466 -      supports_anon_versioning=no
  1.2467 -      case `$LD -v 2>/dev/null` in
  1.2468 -        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  1.2469 -        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  1.2470 -        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  1.2471 -        *\ 2.11.*) ;; # other 2.11 versions
  1.2472 -        *) supports_anon_versioning=yes ;;
  1.2473 -      esac
  1.2474 -      if test $supports_anon_versioning = yes; then
  1.2475 -        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  1.2476 -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  1.2477 -$echo "local: *; };" >> $output_objdir/$libname.ver~
  1.2478 -        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  1.2479 -      else
  1.2480 -        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
  1.2481 -      fi
  1.2482 -    else
  1.2483 -      _LT_AC_TAGVAR(ld_shlibs, $1)=no
  1.2484 -    fi
  1.2485 -    ;;
  1.2486 -
  1.2487      *)
  1.2488        if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  1.2489  	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1.2490 @@ -5590,16 +5960,11 @@
  1.2491        ;;
  1.2492      esac
  1.2493  
  1.2494 -    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
  1.2495 -      runpath_var=LD_RUN_PATH
  1.2496 -      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  1.2497 -      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  1.2498 -      # ancient GNU ld didn't support --whole-archive et. al.
  1.2499 -      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  1.2500 - 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1.2501 -      else
  1.2502 -  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  1.2503 -      fi
  1.2504 +    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
  1.2505 +      runpath_var=
  1.2506 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  1.2507 +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  1.2508 +      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  1.2509      fi
  1.2510    else
  1.2511      # PORTME fill in a description of your system's linker (not GNU ld)
  1.2512 @@ -5611,7 +5976,7 @@
  1.2513        # Note: this linker hardcodes the directories in LIBPATH if there
  1.2514        # are no directories specified by -L.
  1.2515        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  1.2516 -      if test "$GCC" = yes && test -z "$link_static_flag"; then
  1.2517 +      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  1.2518  	# Neither direct hardcoding nor static linking is supported with a
  1.2519  	# broken collect2.
  1.2520  	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  1.2521 @@ -5645,6 +6010,7 @@
  1.2522    	    break
  1.2523    	  fi
  1.2524  	  done
  1.2525 +	  ;;
  1.2526  	esac
  1.2527  
  1.2528  	exp_sym_flag='-bexport'
  1.2529 @@ -5663,7 +6029,7 @@
  1.2530        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  1.2531  
  1.2532        if test "$GCC" = yes; then
  1.2533 -	case $host_os in aix4.[012]|aix4.[012].*)
  1.2534 +	case $host_os in aix4.[[012]]|aix4.[[012]].*)
  1.2535  	# We only want to do this on AIX 4.2 and lower, the check
  1.2536  	# below for broken collect2 doesn't work under 4.3+
  1.2537  	  collect2name=`${CC} -print-prog-name=collect2`
  1.2538 @@ -5682,8 +6048,12 @@
  1.2539    	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  1.2540    	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  1.2541  	  fi
  1.2542 +	  ;;
  1.2543  	esac
  1.2544  	shared_flag='-shared'
  1.2545 +	if test "$aix_use_runtimelinking" = yes; then
  1.2546 +	  shared_flag="$shared_flag "'${wl}-G'
  1.2547 +	fi
  1.2548        else
  1.2549  	# not using gcc
  1.2550  	if test "$host_cpu" = ia64; then
  1.2551 @@ -5691,11 +6061,11 @@
  1.2552    	# chokes on -Wl,-G. The following line is correct:
  1.2553  	  shared_flag='-G'
  1.2554  	else
  1.2555 -  	if test "$aix_use_runtimelinking" = yes; then
  1.2556 +	  if test "$aix_use_runtimelinking" = yes; then
  1.2557  	    shared_flag='${wl}-G'
  1.2558  	  else
  1.2559  	    shared_flag='${wl}-bM:SRE'
  1.2560 -  	fi
  1.2561 +	  fi
  1.2562  	fi
  1.2563        fi
  1.2564  
  1.2565 @@ -5709,12 +6079,12 @@
  1.2566         # Determine the default libpath from the value encoded in an empty executable.
  1.2567         _LT_AC_SYS_LIBPATH_AIX
  1.2568         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  1.2569 -	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  1.2570 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  1.2571         else
  1.2572  	if test "$host_cpu" = ia64; then
  1.2573  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  1.2574  	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  1.2575 -	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  1.2576 +	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  1.2577  	else
  1.2578  	 # Determine the default libpath from the value encoded in an empty executable.
  1.2579  	 _LT_AC_SYS_LIBPATH_AIX
  1.2580 @@ -5723,13 +6093,11 @@
  1.2581  	  # -berok will link without error, but may produce a broken library.
  1.2582  	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  1.2583  	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  1.2584 -	  # -bexpall does not export symbols beginning with underscore (_)
  1.2585 -	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  1.2586  	  # Exported symbols can be pulled into shared objects from archives
  1.2587 -	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  1.2588 +	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  1.2589  	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  1.2590 -	  # This is similar to how AIX traditionally builds it's shared libraries.
  1.2591 -	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  1.2592 +	  # This is similar to how AIX traditionally builds its shared libraries.
  1.2593 +	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  1.2594  	fi
  1.2595        fi
  1.2596        ;;
  1.2597 @@ -5763,12 +6131,12 @@
  1.2598        _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  1.2599        # FIXME: Should let the user specify the lib program.
  1.2600        _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
  1.2601 -      fix_srcfile_path='`cygpath -w "$srcfile"`'
  1.2602 +      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  1.2603        _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  1.2604        ;;
  1.2605  
  1.2606      darwin* | rhapsody*)
  1.2607 -      case "$host_os" in
  1.2608 +      case $host_os in
  1.2609          rhapsody* | darwin1.[[012]])
  1.2610           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
  1.2611           ;;
  1.2612 @@ -5797,16 +6165,16 @@
  1.2613      	output_verbose_link_cmd='echo'
  1.2614          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  1.2615        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  1.2616 -      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  1.2617 +      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  1.2618        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1.2619        _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1.2620      else
  1.2621 -      case "$cc_basename" in
  1.2622 +      case $cc_basename in
  1.2623          xlc*)
  1.2624           output_verbose_link_cmd='echo'
  1.2625           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
  1.2626           _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  1.2627 -          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  1.2628 +          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
  1.2629           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1.2630            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1.2631            ;;
  1.2632 @@ -5847,7 +6215,7 @@
  1.2633        ;;
  1.2634  
  1.2635      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  1.2636 -    freebsd* | kfreebsd*-gnu)
  1.2637 +    freebsd* | kfreebsd*-gnu | dragonfly*)
  1.2638        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  1.2639        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  1.2640        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  1.2641 @@ -5870,47 +6238,62 @@
  1.2642        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  1.2643        ;;
  1.2644  
  1.2645 -    hpux10* | hpux11*)
  1.2646 +    hpux10*)
  1.2647        if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  1.2648 -	case "$host_cpu" in
  1.2649 -	hppa*64*|ia64*)
  1.2650 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  1.2651 +      else
  1.2652 +	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  1.2653 +      fi
  1.2654 +      if test "$with_gnu_ld" = no; then
  1.2655 +	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  1.2656 +	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.2657 +
  1.2658 +	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
  1.2659 +	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  1.2660 +
  1.2661 +	# hardcode_minus_L: Not really in the search PATH,
  1.2662 +	# but as the default location of the library.
  1.2663 +	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  1.2664 +      fi
  1.2665 +      ;;
  1.2666 +
  1.2667 +    hpux11*)
  1.2668 +      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  1.2669 +	case $host_cpu in
  1.2670 +	hppa*64*)
  1.2671  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2672  	  ;;
  1.2673 +	ia64*)
  1.2674 +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  1.2675 +	  ;;
  1.2676  	*)
  1.2677  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  1.2678  	  ;;
  1.2679  	esac
  1.2680        else
  1.2681 -	case "$host_cpu" in
  1.2682 -	hppa*64*|ia64*)
  1.2683 -	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
  1.2684 +	case $host_cpu in
  1.2685 +	hppa*64*)
  1.2686 +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2687 +	  ;;
  1.2688 +	ia64*)
  1.2689 +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  1.2690  	  ;;
  1.2691  	*)
  1.2692 -	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  1.2693 +	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  1.2694  	  ;;
  1.2695  	esac
  1.2696        fi
  1.2697        if test "$with_gnu_ld" = no; then
  1.2698 -	case "$host_cpu" in
  1.2699 -	hppa*64*)
  1.2700 -	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  1.2701 +	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  1.2702 +	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.2703 +
  1.2704 +	case $host_cpu in
  1.2705 +	hppa*64*|ia64*)
  1.2706  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  1.2707 -	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.2708  	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
  1.2709  	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2710  	  ;;
  1.2711 -	ia64*)
  1.2712 -	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  1.2713 -	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
  1.2714 -	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2715 -
  1.2716 -	  # hardcode_minus_L: Not really in the search PATH,
  1.2717 -	  # but as the default location of the library.
  1.2718 -	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  1.2719 -	  ;;
  1.2720  	*)
  1.2721 -	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  1.2722 -	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.2723  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  1.2724  	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  1.2725  
  1.2726 @@ -6004,7 +6387,7 @@
  1.2727  	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  1.2728  	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1.2729  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
  1.2730 -	$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'
  1.2731 +	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
  1.2732  
  1.2733  	# Both c and cxx compiler support -rpath directly
  1.2734  	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  1.2735 @@ -6012,21 +6395,15 @@
  1.2736        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  1.2737        ;;
  1.2738  
  1.2739 -    sco3.2v5*)
  1.2740 -      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1.2741 -      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2742 -      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  1.2743 -      runpath_var=LD_RUN_PATH
  1.2744 -      hardcode_runpath_var=yes
  1.2745 -      ;;
  1.2746 -
  1.2747      solaris*)
  1.2748        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  1.2749        if test "$GCC" = yes; then
  1.2750 +	wlarc='${wl}'
  1.2751  	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2752  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1.2753  	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
  1.2754        else
  1.2755 +	wlarc=''
  1.2756  	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1.2757  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1.2758    	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  1.2759 @@ -6035,8 +6412,18 @@
  1.2760        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2761        case $host_os in
  1.2762        solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  1.2763 -      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  1.2764 -	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
  1.2765 +      *)
  1.2766 + 	# The compiler driver will combine linker options so we
  1.2767 + 	# cannot just pass the convience library names through
  1.2768 + 	# without $wl, iff we do not link with $LD.
  1.2769 + 	# Luckily, gcc supports the same syntax we need for Sun Studio.
  1.2770 + 	# Supported since Solaris 2.6 (maybe 2.5.1?)
  1.2771 + 	case $wlarc in
  1.2772 + 	'')
  1.2773 + 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
  1.2774 + 	*)
  1.2775 + 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
  1.2776 + 	esac ;;
  1.2777        esac
  1.2778        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  1.2779        ;;
  1.2780 @@ -6093,36 +6480,45 @@
  1.2781        fi
  1.2782        ;;
  1.2783  
  1.2784 -    sysv4.2uw2*)
  1.2785 -      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  1.2786 -      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  1.2787 -      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  1.2788 -      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2789 -      hardcode_runpath_var=yes
  1.2790 -      runpath_var=LD_RUN_PATH
  1.2791 -      ;;
  1.2792 -
  1.2793 -   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
  1.2794 -      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
  1.2795 -      if test "$GCC" = yes; then
  1.2796 -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2797 -      else
  1.2798 -	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2799 -      fi
  1.2800 -      runpath_var='LD_RUN_PATH'
  1.2801 -      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2802 -      ;;
  1.2803 -
  1.2804 -    sysv5*)
  1.2805 -      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  1.2806 -      # $CC -shared without GNU ld will not create a library from C++
  1.2807 -      # object files and a static libstdc++, better avoid it by now
  1.2808 -      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1.2809 -      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1.2810 -  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  1.2811 -      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  1.2812 +    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
  1.2813 +      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  1.2814 +      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  1.2815        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2816        runpath_var='LD_RUN_PATH'
  1.2817 +
  1.2818 +      if test "$GCC" = yes; then
  1.2819 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2820 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2821 +      else
  1.2822 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2823 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2824 +      fi
  1.2825 +      ;;
  1.2826 +
  1.2827 +    sysv5* | sco3.2v5* | sco5v6*)
  1.2828 +      # Note: We can NOT use -z defs as we might desire, because we do not
  1.2829 +      # link with -lc, and that would cause any symbols used from libc to
  1.2830 +      # always be unresolved, which means just about no library would
  1.2831 +      # ever link correctly.  If we're not using GNU ld we use -z text
  1.2832 +      # though, which does catch some bad symbols but isn't as heavy-handed
  1.2833 +      # as -z defs.
  1.2834 +      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  1.2835 +      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  1.2836 +      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  1.2837 +      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  1.2838 +      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
  1.2839 +      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  1.2840 +      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  1.2841 +      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  1.2842 +      runpath_var='LD_RUN_PATH'
  1.2843 +
  1.2844 +      if test "$GCC" = yes; then
  1.2845 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2846 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2847 +      else
  1.2848 +	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2849 +	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1.2850 +      fi
  1.2851        ;;
  1.2852  
  1.2853      uts4*)
  1.2854 @@ -6140,11 +6536,6 @@
  1.2855  AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  1.2856  test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  1.2857  
  1.2858 -variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  1.2859 -if test "$GCC" = yes; then
  1.2860 -  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  1.2861 -fi
  1.2862 -
  1.2863  #
  1.2864  # Do we need to explicitly link libc?
  1.2865  #
  1.2866 @@ -6172,6 +6563,7 @@
  1.2867          libobjs=conftest.$ac_objext
  1.2868          deplibs=
  1.2869          wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  1.2870 +	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  1.2871          compiler_flags=-v
  1.2872          linker_flags=-v
  1.2873          verstring=
  1.2874 @@ -6299,7 +6691,7 @@
  1.2875  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  1.2876  # along with /bin/sed that truncates output.
  1.2877  for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  1.2878 -  test ! -f $lt_ac_sed && break
  1.2879 +  test ! -f $lt_ac_sed && continue
  1.2880    cat /dev/null > conftest.in
  1.2881    lt_ac_count=0
  1.2882    echo $ECHO_N "0123456789$ECHO_C" >conftest.in
     2.1 --- a/build-scripts/ltmain.sh	Tue Mar 21 09:51:33 2006 +0000
     2.2 +++ b/build-scripts/ltmain.sh	Tue Mar 21 10:20:44 2006 +0000
     2.3 @@ -1,8 +1,8 @@
     2.4 -# Based on libtool-1.5.8
     2.5 +# Based on libtool-1.5.22
     2.6  # ltmain.sh - Provide generalized library-building support services.
     2.7  # NOTE: Changing this file will not affect anything until you rerun configure.
     2.8  #
     2.9 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
    2.10 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
    2.11  # Free Software Foundation, Inc.
    2.12  # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    2.13  #
    2.14 @@ -18,7 +18,7 @@
    2.15  #
    2.16  # You should have received a copy of the GNU General Public License
    2.17  # along with this program; if not, write to the Free Software
    2.18 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    2.19 +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    2.20  #
    2.21  # As a special exception to the GNU General Public License, if you
    2.22  # distribute this file as part of a program that contains a
    2.23 @@ -44,8 +44,8 @@
    2.24  
    2.25  PROGRAM=ltmain.sh
    2.26  PACKAGE=libtool
    2.27 -VERSION=1.5.8
    2.28 -TIMESTAMP=" (1.1220.2.117 2004/08/04 14:12:05)"
    2.29 +VERSION=1.5.22
    2.30 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
    2.31  
    2.32  # See if we are running on zsh, and set the options which allow our
    2.33  # commands through without removal of \ escapes.
    2.34 @@ -89,14 +89,15 @@
    2.35  Xsed="${SED}"' -e 1s/^X//'
    2.36  sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
    2.37  # test EBCDIC or ASCII
    2.38 -case `echo A|tr A '\301'` in
    2.39 - A) # EBCDIC based system
    2.40 -  SP2NL="tr '\100' '\n'"
    2.41 -  NL2SP="tr '\r\n' '\100\100'"
    2.42 +case `echo X|tr X '\101'` in
    2.43 + A) # ASCII based system
    2.44 +    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
    2.45 +  SP2NL='tr \040 \012'
    2.46 +  NL2SP='tr \015\012 \040\040'
    2.47    ;;
    2.48 - *) # Assume ASCII based system
    2.49 -  SP2NL="tr '\040' '\012'"
    2.50 -  NL2SP="tr '\015\012' '\040\040'"
    2.51 + *) # EBCDIC based system
    2.52 +  SP2NL='tr \100 \n'
    2.53 +  NL2SP='tr \r\n \100\100'
    2.54    ;;
    2.55  esac
    2.56  
    2.57 @@ -113,8 +114,9 @@
    2.58  fi
    2.59  
    2.60  # Make sure IFS has a sensible default
    2.61 -: ${IFS=" 	
    2.62 -"}
    2.63 +lt_nl='
    2.64 +'
    2.65 +IFS=" 	$lt_nl"
    2.66  
    2.67  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
    2.68    $echo "$modename: not configured to build any kind of library" 1>&2
    2.69 @@ -131,6 +133,8 @@
    2.70  show="$echo"
    2.71  show_help=
    2.72  execute_dlfiles=
    2.73 +duplicate_deps=no
    2.74 +preserve_args=
    2.75  lo2o="s/\\.lo\$/.${objext}/"
    2.76  o2lo="s/\\.${objext}\$/.lo/"
    2.77  
    2.78 @@ -138,13 +142,51 @@
    2.79  # Shell function definitions:
    2.80  # This seems to be the best place for them
    2.81  
    2.82 +# func_mktempdir [string]
    2.83 +# Make a temporary directory that won't clash with other running
    2.84 +# libtool processes, and avoids race conditions if possible.  If
    2.85 +# given, STRING is the basename for that directory.
    2.86 +func_mktempdir ()
    2.87 +{
    2.88 +    my_template="${TMPDIR-/tmp}/${1-$progname}"
    2.89 +
    2.90 +    if test "$run" = ":"; then
    2.91 +      # Return a directory name, but don't create it in dry-run mode
    2.92 +      my_tmpdir="${my_template}-$$"
    2.93 +    else
    2.94 +
    2.95 +      # If mktemp works, use that first and foremost
    2.96 +      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
    2.97 +
    2.98 +      if test ! -d "$my_tmpdir"; then
    2.99 +	# Failing that, at least try and use $RANDOM to avoid a race
   2.100 +	my_tmpdir="${my_template}-${RANDOM-0}$$"
   2.101 +
   2.102 +	save_mktempdir_umask=`umask`
   2.103 +	umask 0077
   2.104 +	$mkdir "$my_tmpdir"
   2.105 +	umask $save_mktempdir_umask
   2.106 +      fi
   2.107 +
   2.108 +      # If we're not in dry-run mode, bomb out on failure
   2.109 +      test -d "$my_tmpdir" || {
   2.110 +        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
   2.111 +	exit $EXIT_FAILURE
   2.112 +      }
   2.113 +    fi
   2.114 +
   2.115 +    $echo "X$my_tmpdir" | $Xsed
   2.116 +}
   2.117 +
   2.118 +
   2.119  # func_win32_libid arg
   2.120  # return the library type of file 'arg'
   2.121  #
   2.122  # Need a lot of goo to handle *both* DLLs and import libs
   2.123  # Has to be a shell function in order to 'eat' the argument
   2.124  # that is supplied when $file_magic_command is called.
   2.125 -func_win32_libid () {
   2.126 +func_win32_libid ()
   2.127 +{
   2.128    win32_libid_type="unknown"
   2.129    win32_fileres=`file -L $1 2>/dev/null`
   2.130    case $win32_fileres in
   2.131 @@ -155,12 +197,11 @@
   2.132      if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
   2.133        $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
   2.134        win32_nmres=`eval $NM -f posix -A $1 | \
   2.135 -	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
   2.136 -      if test "X$win32_nmres" = "Ximport" ; then
   2.137 -        win32_libid_type="x86 archive import"
   2.138 -      else
   2.139 -        win32_libid_type="x86 archive static"
   2.140 -      fi
   2.141 +	$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
   2.142 +      case $win32_nmres in
   2.143 +      import*)  win32_libid_type="x86 archive import";;
   2.144 +      *)        win32_libid_type="x86 archive static";;
   2.145 +      esac
   2.146      fi
   2.147      ;;
   2.148    *DLL*)
   2.149 @@ -184,7 +225,8 @@
   2.150  # Only attempt this if the compiler in the base compile
   2.151  # command doesn't match the default compiler.
   2.152  # arg is usually of the form 'gcc ...'
   2.153 -func_infer_tag () {
   2.154 +func_infer_tag ()
   2.155 +{
   2.156      if test -n "$available_tags" && test -z "$tagname"; then
   2.157        CC_quoted=
   2.158        for arg in $CC; do
   2.159 @@ -243,8 +285,25 @@
   2.160  }
   2.161  
   2.162  
   2.163 +# func_extract_an_archive dir oldlib
   2.164 +func_extract_an_archive ()
   2.165 +{
   2.166 +    f_ex_an_ar_dir="$1"; shift
   2.167 +    f_ex_an_ar_oldlib="$1"
   2.168 +
   2.169 +    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
   2.170 +    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
   2.171 +    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
   2.172 +     :
   2.173 +    else
   2.174 +      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
   2.175 +      exit $EXIT_FAILURE
   2.176 +    fi
   2.177 +}
   2.178 +
   2.179  # func_extract_archives gentop oldlib ...
   2.180 -func_extract_archives () {
   2.181 +func_extract_archives ()
   2.182 +{
   2.183      my_gentop="$1"; shift
   2.184      my_oldlibs=${1+"$@"}
   2.185      my_oldobjs=""
   2.186 @@ -275,9 +334,9 @@
   2.187        $run ${rm}r "$my_xdir"
   2.188        $show "$mkdir $my_xdir"
   2.189        $run $mkdir "$my_xdir"
   2.190 -      status=$?
   2.191 -      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
   2.192 -	exit $status
   2.193 +      exit_status=$?
   2.194 +      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
   2.195 +	exit $exit_status
   2.196        fi
   2.197        case $host in
   2.198        *-darwin*)
   2.199 @@ -288,7 +347,7 @@
   2.200  	  cd $my_xdir || exit $?
   2.201  	  darwin_archive=$my_xabs
   2.202  	  darwin_curdir=`pwd`
   2.203 -	  darwin_base_archive=`basename $darwin_archive`
   2.204 +	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
   2.205  	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
   2.206  	  if test -n "$darwin_arches"; then 
   2.207  	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
   2.208 @@ -297,64 +356,33 @@
   2.209  	    for darwin_arch in  $darwin_arches ; do
   2.210  	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
   2.211  	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
   2.212 -	      # Remove the table of contents from the thin files.
   2.213 -	      $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true
   2.214 -	      $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true
   2.215  	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
   2.216 -	      $AR -xo "${darwin_base_archive}"
   2.217 -	      rm "${darwin_base_archive}"
   2.218 +	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
   2.219  	      cd "$darwin_curdir"
   2.220 +	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
   2.221  	    done # $darwin_arches
   2.222        ## Okay now we have a bunch of thin objects, gotta fatten them up :)
   2.223 -	    darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
   2.224 +	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
   2.225  	    darwin_file=
   2.226  	    darwin_files=
   2.227  	    for darwin_file in $darwin_filelist; do
   2.228  	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
   2.229  	      lipo -create -output "$darwin_file" $darwin_files
   2.230  	    done # $darwin_filelist
   2.231 -	    rm -rf unfat-$$
   2.232 +	    ${rm}r unfat-$$
   2.233  	    cd "$darwin_orig_dir"
   2.234  	  else
   2.235 -	    cd $darwin_orig_dir
   2.236 -	    (cd $my_xdir && $AR x $my_xabs) || exit $?
   2.237 +	    cd "$darwin_orig_dir"
   2.238 + 	    func_extract_an_archive "$my_xdir" "$my_xabs"
   2.239  	  fi # $darwin_arches
   2.240  	fi # $run
   2.241 -      ;;
   2.242 +	;;
   2.243        *)
   2.244 -	# We will extract separately just the conflicting names and we will
   2.245 -	# no longer touch any unique names. It is faster to leave these
   2.246 -	# extract automatically by $AR in one run.
   2.247 -	$show "(cd $my_xdir && $AR x $my_xabs)"
   2.248 -	$run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $?
   2.249 -	if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then
   2.250 -	  :
   2.251 -	else
   2.252 -	  $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
   2.253 -	  $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
   2.254 -	  $AR t "$my_xabs" | sort | uniq -cd | while read -r count name
   2.255 -	  do
   2.256 -	    i=1
   2.257 -	    while test "$i" -le "$count"
   2.258 -	    do
   2.259 -	      # Put our $i before any first dot (extension)
   2.260 -	      # Never overwrite any file
   2.261 -	      name_to="$name"
   2.262 -	      while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
   2.263 -	      do
   2.264 -		name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
   2.265 -	      done
   2.266 -	      $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
   2.267 -	      $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $?
   2.268 -	      i=`expr $i + 1`
   2.269 -	    done
   2.270 -	  done
   2.271 -	fi
   2.272 -	;;
   2.273 +        func_extract_an_archive "$my_xdir" "$my_xabs"
   2.274 +        ;;
   2.275        esac
   2.276        my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
   2.277      done
   2.278 -
   2.279      func_extract_archives_result="$my_oldobjs"
   2.280  }
   2.281  # End of Shell function definitions
   2.282 @@ -363,6 +391,8 @@
   2.283  # Darwin sucks
   2.284  eval std_shrext=\"$shrext_cmds\"
   2.285  
   2.286 +disable_libs=no
   2.287 +
   2.288  # Parse our command line options once, thoroughly.
   2.289  while test "$#" -gt 0
   2.290  do
   2.291 @@ -427,10 +457,10 @@
   2.292    --version)
   2.293      $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
   2.294      $echo
   2.295 -    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
   2.296 +    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
   2.297      $echo "This is free software; see the source for copying conditions.  There is NO"
   2.298      $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
   2.299 -    exit $EXIT_SUCCESS
   2.300 +    exit $?
   2.301      ;;
   2.302  
   2.303    --config)
   2.304 @@ -439,7 +469,7 @@
   2.305      for tagname in $taglist; do
   2.306        ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
   2.307      done
   2.308 -    exit $EXIT_SUCCESS
   2.309 +    exit $?
   2.310      ;;
   2.311  
   2.312    --debug)
   2.313 @@ -464,7 +494,7 @@
   2.314      else
   2.315        $echo "disable static libraries"
   2.316      fi
   2.317 -    exit $EXIT_SUCCESS
   2.318 +    exit $?
   2.319      ;;
   2.320  
   2.321    --finish) mode="finish" ;;
   2.322 @@ -479,7 +509,11 @@
   2.323      preserve_args="$preserve_args $arg"
   2.324      ;;
   2.325  
   2.326 -  --tag) prevopt="--tag" prev=tag ;;
   2.327 +  --tag)
   2.328 +    prevopt="--tag"
   2.329 +    prev=tag
   2.330 +    preserve_args="$preserve_args --tag"
   2.331 +    ;;
   2.332    --tag=*)
   2.333      set tag "$optarg" ${1+"$@"}
   2.334      shift
   2.335 @@ -511,6 +545,18 @@
   2.336    exit $EXIT_FAILURE
   2.337  fi
   2.338  
   2.339 +case $disable_libs in
   2.340 +no) 
   2.341 +  ;;
   2.342 +shared)
   2.343 +  build_libtool_libs=no
   2.344 +  build_old_libs=yes
   2.345 +  ;;
   2.346 +static)
   2.347 +  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
   2.348 +  ;;
   2.349 +esac
   2.350 +
   2.351  # If this variable is set in any of the actions, the command in it
   2.352  # will be execed at the end.  This prevents here-documents from being
   2.353  # left over by shells.
   2.354 @@ -521,7 +567,7 @@
   2.355    # Infer the operation mode.
   2.356    if test -z "$mode"; then
   2.357      $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
   2.358 -    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
   2.359 +    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
   2.360      case $nonopt in
   2.361      *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
   2.362        mode=link
   2.363 @@ -587,7 +633,7 @@
   2.364  
   2.365      for arg
   2.366      do
   2.367 -      case "$arg_mode" in
   2.368 +      case $arg_mode in
   2.369        arg  )
   2.370  	# do not "continue".  Instead, add this to base_compile
   2.371  	lastarg="$arg"
   2.372 @@ -669,7 +715,10 @@
   2.373        case $lastarg in
   2.374        # Double-quote args containing other shell metacharacters.
   2.375        # Many Bourne shells cannot handle close brackets correctly
   2.376 -      # in scan sets, so we specify it separately.
   2.377 +      # in scan sets, and some SunOS ksh mistreat backslash-escaping
   2.378 +      # in scan sets (worked around with variable expansion),
   2.379 +      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
   2.380 +      # at all, so we specify them separately.
   2.381        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   2.382  	lastarg="\"$lastarg\""
   2.383  	;;
   2.384 @@ -743,6 +792,14 @@
   2.385        esac
   2.386      done
   2.387  
   2.388 +    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
   2.389 +    case $qlibobj in
   2.390 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   2.391 +	qlibobj="\"$qlibobj\"" ;;
   2.392 +    esac
   2.393 +    test "X$libobj" != "X$qlibobj" \
   2.394 +	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
   2.395 +	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
   2.396      objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
   2.397      xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
   2.398      if test "X$xdir" = "X$obj"; then
   2.399 @@ -815,12 +872,17 @@
   2.400  	$run $rm $removelist
   2.401  	exit $EXIT_FAILURE
   2.402        fi
   2.403 -      $echo $srcfile > "$lockfile"
   2.404 +      $echo "$srcfile" > "$lockfile"
   2.405      fi
   2.406  
   2.407      if test -n "$fix_srcfile_path"; then
   2.408        eval srcfile=\"$fix_srcfile_path\"
   2.409      fi
   2.410 +    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
   2.411 +    case $qsrcfile in
   2.412 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   2.413 +      qsrcfile="\"$qsrcfile\"" ;;
   2.414 +    esac
   2.415  
   2.416      $run $rm "$libobj" "${libobj}T"
   2.417  
   2.418 @@ -842,18 +904,18 @@
   2.419        fbsd_hideous_sh_bug=$base_compile
   2.420  
   2.421        if test "$pic_mode" != no; then
   2.422 -	command="$base_compile $srcfile $pic_flag"
   2.423 +	command="$base_compile $qsrcfile $pic_flag"
   2.424        else
   2.425  	# Don't build PIC code
   2.426 -	command="$base_compile $srcfile"
   2.427 +	command="$base_compile $qsrcfile"
   2.428        fi
   2.429  
   2.430        if test ! -d "${xdir}$objdir"; then
   2.431  	$show "$mkdir ${xdir}$objdir"
   2.432  	$run $mkdir ${xdir}$objdir
   2.433 -	status=$?
   2.434 -	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
   2.435 -	  exit $status
   2.436 +	exit_status=$?
   2.437 +	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
   2.438 +	  exit $exit_status
   2.439  	fi
   2.440        fi
   2.441  
   2.442 @@ -925,9 +987,9 @@
   2.443      if test "$build_old_libs" = yes; then
   2.444        if test "$pic_mode" != yes; then
   2.445  	# Don't build PIC code
   2.446 -	command="$base_compile $srcfile"
   2.447 +	command="$base_compile $qsrcfile"
   2.448        else
   2.449 -	command="$base_compile $srcfile $pic_flag"
   2.450 +	command="$base_compile $qsrcfile $pic_flag"
   2.451        fi
   2.452        if test "$compiler_c_o" = yes; then
   2.453  	command="$command -o $obj"
   2.454 @@ -1056,6 +1118,7 @@
   2.455      no_install=no
   2.456      objs=
   2.457      non_pic_objects=
   2.458 +    notinst_path= # paths that contain not-installed libtool libraries
   2.459      precious_files_regex=
   2.460      prefer_static_libs=no
   2.461      preload=no
   2.462 @@ -1084,14 +1147,15 @@
   2.463  	  if test -n "$link_static_flag"; then
   2.464  	    dlopen_self=$dlopen_self_static
   2.465  	  fi
   2.466 +	  prefer_static_libs=yes
   2.467  	else
   2.468  	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
   2.469  	    dlopen_self=$dlopen_self_static
   2.470  	  fi
   2.471 +	  prefer_static_libs=built
   2.472  	fi
   2.473  	build_libtool_libs=no
   2.474  	build_old_libs=yes
   2.475 -	prefer_static_libs=yes
   2.476  	break
   2.477  	;;
   2.478        esac
   2.479 @@ -1266,6 +1330,11 @@
   2.480  		  if test -z "$pic_object" || test "$pic_object" = none ; then
   2.481  		    arg="$non_pic_object"
   2.482  		  fi
   2.483 +		else
   2.484 +		  # If the PIC object exists, use it instead.
   2.485 +		  # $xdir was prepended to $pic_object above.
   2.486 +		  non_pic_object="$pic_object"
   2.487 +		  non_pic_objects="$non_pic_objects $non_pic_object"
   2.488  		fi
   2.489  	      else
   2.490  		# Only an error if not doing a dry-run.
   2.491 @@ -1362,6 +1431,13 @@
   2.492  	  prev=
   2.493  	  continue
   2.494  	  ;;
   2.495 +	darwin_framework|darwin_framework_skip)
   2.496 +	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
   2.497 +	  compile_command="$compile_command $arg"
   2.498 +	  finalize_command="$finalize_command $arg"
   2.499 +	  prev=
   2.500 +	  continue
   2.501 +	  ;;
   2.502  	*)
   2.503  	  eval "$prev=\"\$arg\""
   2.504  	  prev=
   2.505 @@ -1420,6 +1496,18 @@
   2.506  	continue
   2.507  	;;
   2.508  
   2.509 +      -framework|-arch|-isysroot)
   2.510 +	case " $CC " in
   2.511 +	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
   2.512 +		prev=darwin_framework_skip ;;
   2.513 +	  *) compiler_flags="$compiler_flags $arg"
   2.514 +	     prev=darwin_framework ;;
   2.515 +	esac
   2.516 +	compile_command="$compile_command $arg"
   2.517 +	finalize_command="$finalize_command $arg"
   2.518 +	continue
   2.519 +	;;
   2.520 +
   2.521        -inst-prefix-dir)
   2.522  	prev=inst_prefix
   2.523  	continue
   2.524 @@ -1446,7 +1534,8 @@
   2.525  	  absdir=`cd "$dir" && pwd`
   2.526  	  if test -z "$absdir"; then
   2.527  	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
   2.528 -	    exit $EXIT_FAILURE
   2.529 +	    absdir="$dir"
   2.530 +	    notinst_path="$notinst_path $dir"
   2.531  	  fi
   2.532  	  dir="$absdir"
   2.533  	  ;;
   2.534 @@ -1460,10 +1549,15 @@
   2.535  	esac
   2.536  	case $host in
   2.537  	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
   2.538 +	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
   2.539  	  case :$dllsearchpath: in
   2.540  	  *":$dir:"*) ;;
   2.541  	  *) dllsearchpath="$dllsearchpath:$dir";;
   2.542  	  esac
   2.543 +	  case :$dllsearchpath: in
   2.544 +	  *":$testbindir:"*) ;;
   2.545 +	  *) dllsearchpath="$dllsearchpath:$testbindir";;
   2.546 +	  esac
   2.547  	  ;;
   2.548  	esac
   2.549  	continue
   2.550 @@ -1472,15 +1566,15 @@
   2.551        -l*)
   2.552  	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
   2.553  	  case $host in
   2.554 -	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
   2.555 +	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
   2.556  	    # These systems don't actually have a C or math library (as such)
   2.557  	    continue
   2.558  	    ;;
   2.559 -	  *-*-mingw* | *-*-os2*)
   2.560 +	  *-*-os2*)
   2.561  	    # These systems don't actually have a C library (as such)
   2.562  	    test "X$arg" = "X-lc" && continue
   2.563  	    ;;
   2.564 -	  *-*-openbsd* | *-*-freebsd*)
   2.565 +	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
   2.566  	    # Do not include libc due to us having libc/libc_r.
   2.567  	    test "X$arg" = "X-lc" && continue
   2.568  	    ;;
   2.569 @@ -1488,10 +1582,19 @@
   2.570  	    # Rhapsody C and math libraries are in the System framework
   2.571  	    deplibs="$deplibs -framework System"
   2.572  	    continue
   2.573 +	    ;;
   2.574 +	  *-*-sco3.2v5* | *-*-sco5v6*)
   2.575 +	    # Causes problems with __ctype
   2.576 +	    test "X$arg" = "X-lc" && continue
   2.577 +	    ;;
   2.578 +	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
   2.579 +	    # Compiler inserts libc in the correct place for threads to work
   2.580 +	    test "X$arg" = "X-lc" && continue
   2.581 +	    ;;
   2.582  	  esac
   2.583  	elif test "X$arg" = "X-lc_r"; then
   2.584  	 case $host in
   2.585 -	 *-*-openbsd* | *-*-freebsd*)
   2.586 +	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
   2.587  	   # Do not include libc_r directly, use -pthread flag.
   2.588  	   continue
   2.589  	   ;;
   2.590 @@ -1501,8 +1604,20 @@
   2.591  	continue
   2.592  	;;
   2.593  
   2.594 +      # Tru64 UNIX uses -model [arg] to determine the layout of C++
   2.595 +      # classes, name mangling, and exception handling.
   2.596 +      -model)
   2.597 +	compile_command="$compile_command $arg"
   2.598 +	compiler_flags="$compiler_flags $arg"
   2.599 +	finalize_command="$finalize_command $arg"
   2.600 +	prev=xcompiler
   2.601 +	continue
   2.602 +	;;
   2.603 +
   2.604       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
   2.605 -	deplibs="$deplibs $arg"
   2.606 +	compiler_flags="$compiler_flags $arg"
   2.607 +	compile_command="$compile_command $arg"
   2.608 +	finalize_command="$finalize_command $arg"
   2.609  	continue
   2.610  	;;
   2.611  
   2.612 @@ -1511,13 +1626,19 @@
   2.613  	continue
   2.614  	;;
   2.615  
   2.616 -      # gcc -m* arguments should be passed to the linker via $compiler_flags
   2.617 -      # in order to pass architecture information to the linker
   2.618 -      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
   2.619 -      # but this is not reliable with gcc because gcc may use -mfoo to
   2.620 -      # select a different linker, different libraries, etc, while
   2.621 -      # -Wl,-mfoo simply passes -mfoo to the linker.
   2.622 -      -m*)
   2.623 +      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
   2.624 +      # -r[0-9][0-9]* specifies the processor on the SGI compiler
   2.625 +      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
   2.626 +      # +DA*, +DD* enable 64-bit mode on the HP compiler
   2.627 +      # -q* pass through compiler args for the IBM compiler
   2.628 +      # -m* pass through architecture-specific compiler args for GCC
   2.629 +      # -m*, -t[45]*, -txscale* pass through architecture-specific
   2.630 +      # compiler args for GCC
   2.631 +      # -pg pass through profiling flag for GCC
   2.632 +      # @file GCC response files
   2.633 +      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
   2.634 +      -t[45]*|-txscale*|@*)
   2.635 +
   2.636  	# Unknown arguments in both finalize_command and compile_command need
   2.637  	# to be aesthetically quoted because they are evaled later.
   2.638  	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
   2.639 @@ -1528,9 +1649,7 @@
   2.640  	esac
   2.641          compile_command="$compile_command $arg"
   2.642          finalize_command="$finalize_command $arg"
   2.643 -        if test "$with_gcc" = "yes" ; then
   2.644 -          compiler_flags="$compiler_flags $arg"
   2.645 -        fi
   2.646 +        compiler_flags="$compiler_flags $arg"
   2.647          continue
   2.648          ;;
   2.649  
   2.650 @@ -1773,6 +1892,11 @@
   2.651  	    if test -z "$pic_object" || test "$pic_object" = none ; then
   2.652  	      arg="$non_pic_object"
   2.653  	    fi
   2.654 +	  else
   2.655 +	    # If the PIC object exists, use it instead.
   2.656 +	    # $xdir was prepended to $pic_object above.
   2.657 +	    non_pic_object="$pic_object"
   2.658 +	    non_pic_objects="$non_pic_objects $non_pic_object"
   2.659  	  fi
   2.660  	else
   2.661  	  # Only an error if not doing a dry-run.
   2.662 @@ -1878,9 +2002,9 @@
   2.663      if test ! -d "$output_objdir"; then
   2.664        $show "$mkdir $output_objdir"
   2.665        $run $mkdir $output_objdir
   2.666 -      status=$?
   2.667 -      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
   2.668 -	exit $status
   2.669 +      exit_status=$?
   2.670 +      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
   2.671 +	exit $exit_status
   2.672        fi
   2.673      fi
   2.674  
   2.675 @@ -1943,7 +2067,6 @@
   2.676      newlib_search_path=
   2.677      need_relink=no # whether we're linking any uninstalled libtool libraries
   2.678      notinst_deplibs= # not-installed libtool libraries
   2.679 -    notinst_path= # paths that contain not-installed libtool libraries
   2.680      case $linkmode in
   2.681      lib)
   2.682  	passes="conv link"
   2.683 @@ -1995,7 +2118,7 @@
   2.684  	    compile_deplibs="$deplib $compile_deplibs"
   2.685  	    finalize_deplibs="$deplib $finalize_deplibs"
   2.686  	  else
   2.687 -	    deplibs="$deplib $deplibs"
   2.688 +	    compiler_flags="$compiler_flags $deplib"
   2.689  	  fi
   2.690  	  continue
   2.691  	  ;;
   2.692 @@ -2004,10 +2127,6 @@
   2.693  	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
   2.694  	    continue
   2.695  	  fi
   2.696 -	  if test "$pass" = conv; then
   2.697 -	    deplibs="$deplib $deplibs"
   2.698 -	    continue
   2.699 -	  fi
   2.700  	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
   2.701  	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
   2.702  	    for search_ext in .la $std_shrext .so .a; do
   2.703 @@ -2195,7 +2314,7 @@
   2.704  	esac # case $deplib
   2.705  	if test "$found" = yes || test -f "$lib"; then :
   2.706  	else
   2.707 -	  $echo "$modename: cannot find the library \`$lib'" 1>&2
   2.708 +	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
   2.709  	  exit $EXIT_FAILURE
   2.710  	fi
   2.711  
   2.712 @@ -2219,6 +2338,8 @@
   2.713  	# it will not redefine variables installed, or shouldnotlink
   2.714  	installed=yes
   2.715  	shouldnotlink=no
   2.716 +	avoidtemprpath=
   2.717 +
   2.718  
   2.719  	# Read the .la file
   2.720  	case $lib in
   2.721 @@ -2324,6 +2445,7 @@
   2.722  	    dir="$libdir"
   2.723  	    absdir="$libdir"
   2.724  	  fi
   2.725 +	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
   2.726  	else
   2.727  	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
   2.728  	    dir="$ladir"
   2.729 @@ -2408,12 +2530,12 @@
   2.730  	  if test -n "$library_names" &&
   2.731  	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
   2.732  	    # We need to hardcode the library path
   2.733 -	    if test -n "$shlibpath_var"; then
   2.734 +	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
   2.735  	      # Make sure the rpath contains only unique directories.
   2.736  	      case "$temp_rpath " in
   2.737  	      *" $dir "*) ;;
   2.738  	      *" $absdir "*) ;;
   2.739 -	      *) temp_rpath="$temp_rpath $dir" ;;
   2.740 +	      *) temp_rpath="$temp_rpath $absdir" ;;
   2.741  	      esac
   2.742  	    fi
   2.743  
   2.744 @@ -2450,8 +2572,12 @@
   2.745  	fi
   2.746  
   2.747  	link_static=no # Whether the deplib will be linked statically
   2.748 +	use_static_libs=$prefer_static_libs
   2.749 +	if test "$use_static_libs" = built && test "$installed" = yes ; then
   2.750 +	  use_static_libs=no
   2.751 +	fi
   2.752  	if test -n "$library_names" &&
   2.753 -	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
   2.754 +	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
   2.755  	  if test "$installed" = no; then
   2.756  	    notinst_deplibs="$notinst_deplibs $lib"
   2.757  	    need_relink=yes
   2.758 @@ -2564,11 +2690,15 @@
   2.759  	      if test "$hardcode_direct" = no; then
   2.760  		add="$dir/$linklib"
   2.761  		case $host in
   2.762 -		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
   2.763 +		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
   2.764 +		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
   2.765 +		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
   2.766 +		    *-*-unixware7*) add_dir="-L$dir" ;;
   2.767  		  *-*-darwin* )
   2.768  		    # if the lib is a module then we can not link against
   2.769  		    # it, someone is ignoring the new warnings I added
   2.770 -		    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
   2.771 +		    if /usr/bin/file -L $add 2> /dev/null |
   2.772 +                      $EGREP ": [^:]* bundle" >/dev/null ; then
   2.773  		      $echo "** Warning, lib $linklib is a module, not a shared library"
   2.774  		      if test -z "$old_library" ; then
   2.775  		        $echo
   2.776 @@ -2599,7 +2729,7 @@
   2.777  		add_dir="-L$dir"
   2.778  		# Try looking first in the location we're being installed to.
   2.779  		if test -n "$inst_prefix_dir"; then
   2.780 -		  case "$libdir" in
   2.781 +		  case $libdir in
   2.782  		    [\\/]*)
   2.783  		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
   2.784  		      ;;
   2.785 @@ -2672,7 +2802,7 @@
   2.786  	      add_dir="-L$libdir"
   2.787  	      # Try looking first in the location we're being installed to.
   2.788  	      if test -n "$inst_prefix_dir"; then
   2.789 -		case "$libdir" in
   2.790 +		case $libdir in
   2.791  		  [\\/]*)
   2.792  		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
   2.793  		    ;;
   2.794 @@ -2733,8 +2863,6 @@
   2.795  	      fi
   2.796  	    fi
   2.797  	  else
   2.798 -	    convenience="$convenience $dir/$old_library"
   2.799 -	    old_convenience="$old_convenience $dir/$old_library"
   2.800  	    deplibs="$dir/$old_library $deplibs"
   2.801  	    link_static=yes
   2.802  	  fi
   2.803 @@ -2859,13 +2987,13 @@
   2.804  	      *) continue ;;
   2.805  	      esac
   2.806  	      case " $deplibs " in
   2.807 +	      *" $path "*) ;;
   2.808 +	      *) deplibs="$path $deplibs" ;;
   2.809 +	      esac
   2.810 +	      case " $deplibs " in
   2.811  	      *" $depdepl "*) ;;
   2.812  	      *) deplibs="$depdepl $deplibs" ;;
   2.813  	      esac
   2.814 -	      case " $deplibs " in
   2.815 -	      *" $path "*) ;;
   2.816 -	      *) deplibs="$deplibs $path" ;;
   2.817 -	      esac
   2.818  	    done
   2.819  	  fi # link_all_deplibs != no
   2.820  	fi # linkmode = lib
   2.821 @@ -3129,27 +3257,27 @@
   2.822  
   2.823  	# Check that each of the things are valid numbers.
   2.824  	case $current in
   2.825 -	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
   2.826 +	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
   2.827  	*)
   2.828 -	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
   2.829 +	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
   2.830  	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
   2.831  	  exit $EXIT_FAILURE
   2.832  	  ;;
   2.833  	esac
   2.834  
   2.835  	case $revision in
   2.836 -	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
   2.837 +	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
   2.838  	*)
   2.839 -	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
   2.840 +	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
   2.841  	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
   2.842  	  exit $EXIT_FAILURE
   2.843  	  ;;
   2.844  	esac
   2.845  
   2.846  	case $age in
   2.847 -	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
   2.848 +	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
   2.849  	*)
   2.850 -	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
   2.851 +	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
   2.852  	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
   2.853  	  exit $EXIT_FAILURE
   2.854  	  ;;
   2.855 @@ -3328,9 +3456,9 @@
   2.856  
   2.857        # Eliminate all temporary directories.
   2.858        for path in $notinst_path; do
   2.859 -	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
   2.860 -	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
   2.861 -	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
   2.862 +	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
   2.863 +	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
   2.864 +	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
   2.865        done
   2.866  
   2.867        if test -n "$xrpath"; then
   2.868 @@ -3381,9 +3509,14 @@
   2.869  	  *-*-netbsd*)
   2.870  	    # Don't link with libc until the a.out ld.so is fixed.
   2.871  	    ;;
   2.872 -	  *-*-openbsd* | *-*-freebsd*)
   2.873 +	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
   2.874  	    # Do not include libc due to us having libc/libc_r.
   2.875 -	    test "X$arg" = "X-lc" && continue
   2.876 +	    ;;
   2.877 +	  *-*-sco3.2v5* | *-*-sco5v6*)
   2.878 +	    # Causes problems with __ctype
   2.879 +	    ;;
   2.880 +	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
   2.881 +	    # Compiler inserts libc in the correct place for threads to work
   2.882  	    ;;
   2.883   	  *)
   2.884  	    # Add libc to deplibs on all other systems if necessary.
   2.885 @@ -3427,11 +3560,11 @@
   2.886  	  int main() { return 0; }
   2.887  EOF
   2.888  	  $rm conftest
   2.889 -	  $LTCC -o conftest conftest.c $deplibs
   2.890 +	  $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
   2.891  	  if test "$?" -eq 0 ; then
   2.892  	    ldd_output=`ldd conftest`
   2.893  	    for i in $deplibs; do
   2.894 -	      name="`expr $i : '-l\(.*\)'`"
   2.895 +	      name=`expr $i : '-l\(.*\)'`
   2.896  	      # If $name is empty we are operating on a -L argument.
   2.897                if test "$name" != "" && test "$name" -ne "0"; then
   2.898  		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
   2.899 @@ -3468,11 +3601,11 @@
   2.900  	    # Error occurred in the first compile.  Let's try to salvage
   2.901  	    # the situation: Compile a separate program for each library.
   2.902  	    for i in $deplibs; do
   2.903 -	      name="`expr $i : '-l\(.*\)'`"
   2.904 +	      name=`expr $i : '-l\(.*\)'`
   2.905  	      # If $name is empty we are operating on a -L argument.
   2.906                if test "$name" != "" && test "$name" != "0"; then
   2.907  		$rm conftest
   2.908 -		$LTCC -o conftest conftest.c $i
   2.909 +		$LTCC $LTCFLAGS -o conftest conftest.c $i
   2.910  		# Did it work?
   2.911  		if test "$?" -eq 0 ; then
   2.912  		  ldd_output=`ldd conftest`
   2.913 @@ -3520,7 +3653,7 @@
   2.914  	  set dummy $deplibs_check_method
   2.915  	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
   2.916  	  for a_deplib in $deplibs; do
   2.917 -	    name="`expr $a_deplib : '-l\(.*\)'`"
   2.918 +	    name=`expr $a_deplib : '-l\(.*\)'`
   2.919  	    # If $name is empty we are operating on a -L argument.
   2.920              if test "$name" != "" && test  "$name" != "0"; then
   2.921  	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
   2.922 @@ -3589,7 +3722,7 @@
   2.923  	  set dummy $deplibs_check_method
   2.924  	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
   2.925  	  for a_deplib in $deplibs; do
   2.926 -	    name="`expr $a_deplib : '-l\(.*\)'`"
   2.927 +	    name=`expr $a_deplib : '-l\(.*\)'`
   2.928  	    # If $name is empty we are operating on a -L argument.
   2.929  	    if test -n "$name" && test "$name" != "0"; then
   2.930  	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
   2.931 @@ -3726,6 +3859,35 @@
   2.932  	deplibs=$newdeplibs
   2.933        fi
   2.934  
   2.935 +
   2.936 +      # move library search paths that coincide with paths to not yet
   2.937 +      # installed libraries to the beginning of the library search list
   2.938 +      new_libs=
   2.939 +      for path in $notinst_path; do
   2.940 +	case " $new_libs " in
   2.941 +	*" -L$path/$objdir "*) ;;
   2.942 +	*)
   2.943 +	  case " $deplibs " in
   2.944 +	  *" -L$path/$objdir "*)
   2.945 +	    new_libs="$new_libs -L$path/$objdir" ;;
   2.946 +	  esac
   2.947 +	  ;;
   2.948 +	esac
   2.949 +      done
   2.950 +      for deplib in $deplibs; do
   2.951 +	case $deplib in
   2.952 +	-L*)
   2.953 +	  case " $new_libs " in
   2.954 +	  *" $deplib "*) ;;
   2.955 +	  *) new_libs="$new_libs $deplib" ;;
   2.956 +	  esac
   2.957 +	  ;;
   2.958 +	*) new_libs="$new_libs $deplib" ;;
   2.959 +	esac
   2.960 +      done
   2.961 +      deplibs="$new_libs"
   2.962 +
   2.963 +
   2.964        # All the library-specific variables (install_libdir is set above).
   2.965        library_names=
   2.966        old_library=
   2.967 @@ -3809,6 +3971,7 @@
   2.968  	fi
   2.969  
   2.970  	lib="$output_objdir/$realname"
   2.971 +	linknames=
   2.972  	for link
   2.973  	do
   2.974  	  linknames="$linknames $link"
   2.975 @@ -3837,6 +4000,9 @@
   2.976  	        # The command line is too long to execute in one step.
   2.977  	        $show "using reloadable object file for export list..."
   2.978  	        skipped_export=:
   2.979 +		# Break out early, otherwise skipped_export may be
   2.980 +		# set to false by a later but shorter cmd.
   2.981 +		break
   2.982  	      fi
   2.983  	    done
   2.984  	    IFS="$save_ifs"
   2.985 @@ -3906,7 +4072,8 @@
   2.986  	  fi
   2.987  	fi
   2.988  
   2.989 -	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
   2.990 +	if test "X$skipped_export" != "X:" &&
   2.991 +	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
   2.992  	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
   2.993  	  :
   2.994  	else
   2.995 @@ -3925,6 +4092,7 @@
   2.996  	    save_libobjs=$libobjs
   2.997  	  fi
   2.998  	  save_output=$output
   2.999 +	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
  2.1000  
  2.1001  	  # Clear the reloadable object creation command queue and
  2.1002  	  # initialize k to one.
  2.1003 @@ -3934,13 +4102,13 @@
  2.1004  	  delfiles=
  2.1005  	  last_robj=
  2.1006  	  k=1
  2.1007 -	  output=$output_objdir/$save_output-${k}.$objext
  2.1008 +	  output=$output_objdir/$output_la-${k}.$objext
  2.1009  	  # Loop over the list of objects to be linked.
  2.1010  	  for obj in $save_libobjs
  2.1011  	  do
  2.1012  	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
  2.1013  	    if test "X$objlist" = X ||
  2.1014 -	       { len=`expr "X$test_cmds" : ".*"` &&
  2.1015 +	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  2.1016  		 test "$len" -le "$max_cmd_len"; }; then
  2.1017  	      objlist="$objlist $obj"
  2.1018  	    else
  2.1019 @@ -3954,9 +4122,9 @@
  2.1020  		# the last one created.
  2.1021  		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
  2.1022  	      fi
  2.1023 -	      last_robj=$output_objdir/$save_output-${k}.$objext
  2.1024 +	      last_robj=$output_objdir/$output_la-${k}.$objext
  2.1025  	      k=`expr $k + 1`
  2.1026 -	      output=$output_objdir/$save_output-${k}.$objext
  2.1027 +	      output=$output_objdir/$output_la-${k}.$objext
  2.1028  	      objlist=$obj
  2.1029  	      len=1
  2.1030  	    fi
  2.1031 @@ -3976,13 +4144,13 @@
  2.1032  	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
  2.1033            fi
  2.1034  
  2.1035 -	  # Set up a command to remove the reloadale object files
  2.1036 +	  # Set up a command to remove the reloadable object files
  2.1037  	  # after they are used.
  2.1038  	  i=0
  2.1039  	  while test "$i" -lt "$k"
  2.1040  	  do
  2.1041  	    i=`expr $i + 1`
  2.1042 -	    delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
  2.1043 +	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
  2.1044  	  done
  2.1045  
  2.1046  	  $echo "creating a temporary reloadable object file: $output"
  2.1047 @@ -4030,13 +4198,30 @@
  2.1048  	  IFS="$save_ifs"
  2.1049  	  eval cmd=\"$cmd\"
  2.1050  	  $show "$cmd"
  2.1051 -	  $run eval "$cmd" || exit $?
  2.1052 +	  $run eval "$cmd" || {
  2.1053 +	    lt_exit=$?
  2.1054 +
  2.1055 +	    # Restore the uninstalled library and exit
  2.1056 +	    if test "$mode" = relink; then
  2.1057 +	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
  2.1058 +	    fi
  2.1059 +
  2.1060 +	    exit $lt_exit
  2.1061 +	  }
  2.1062  	done
  2.1063  	IFS="$save_ifs"
  2.1064  
  2.1065  	# Restore the uninstalled library and exit
  2.1066  	if test "$mode" = relink; then
  2.1067  	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
  2.1068 +
  2.1069 +	  if test -n "$convenience"; then
  2.1070 +	    if test -z "$whole_archive_flag_spec"; then
  2.1071 +	      $show "${rm}r $gentop"
  2.1072 +	      $run ${rm}r "$gentop"
  2.1073 +	    fi
  2.1074 +	  fi
  2.1075 +
  2.1076  	  exit $EXIT_SUCCESS
  2.1077  	fi
  2.1078  
  2.1079 @@ -4221,6 +4406,35 @@
  2.1080          ;;
  2.1081        esac
  2.1082  
  2.1083 +
  2.1084 +      # move library search paths that coincide with paths to not yet
  2.1085 +      # installed libraries to the beginning of the library search list
  2.1086 +      new_libs=
  2.1087 +      for path in $notinst_path; do
  2.1088 +	case " $new_libs " in
  2.1089 +	*" -L$path/$objdir "*) ;;
  2.1090 +	*)
  2.1091 +	  case " $compile_deplibs " in
  2.1092 +	  *" -L$path/$objdir "*)
  2.1093 +	    new_libs="$new_libs -L$path/$objdir" ;;
  2.1094 +	  esac
  2.1095 +	  ;;
  2.1096 +	esac
  2.1097 +      done
  2.1098 +      for deplib in $compile_deplibs; do
  2.1099 +	case $deplib in
  2.1100 +	-L*)
  2.1101 +	  case " $new_libs " in
  2.1102 +	  *" $deplib "*) ;;
  2.1103 +	  *) new_libs="$new_libs $deplib" ;;
  2.1104 +	  esac
  2.1105 +	  ;;
  2.1106 +	*) new_libs="$new_libs $deplib" ;;
  2.1107 +	esac
  2.1108 +      done
  2.1109 +      compile_deplibs="$new_libs"
  2.1110 +
  2.1111 +
  2.1112        compile_command="$compile_command $compile_deplibs"
  2.1113        finalize_command="$finalize_command $finalize_deplibs"
  2.1114  
  2.1115 @@ -4265,10 +4479,15 @@
  2.1116  	fi
  2.1117  	case $host in
  2.1118  	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  2.1119 +	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
  2.1120  	  case :$dllsearchpath: in
  2.1121  	  *":$libdir:"*) ;;
  2.1122  	  *) dllsearchpath="$dllsearchpath:$libdir";;
  2.1123  	  esac
  2.1124 +	  case :$dllsearchpath: in
  2.1125 +	  *":$testbindir:"*) ;;
  2.1126 +	  *) dllsearchpath="$dllsearchpath:$testbindir";;
  2.1127 +	  esac
  2.1128  	  ;;
  2.1129  	esac
  2.1130        done
  2.1131 @@ -4382,13 +4601,25 @@
  2.1132  
  2.1133  	    # Prepare the list of exported symbols
  2.1134  	    if test -z "$export_symbols"; then
  2.1135 -	      export_symbols="$output_objdir/$output.exp"
  2.1136 +	      export_symbols="$output_objdir/$outputname.exp"
  2.1137  	      $run $rm $export_symbols
  2.1138 -	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  2.1139 +	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  2.1140 +              case $host in
  2.1141 +              *cygwin* | *mingw* )
  2.1142 +	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
  2.1143 +		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
  2.1144 +                ;;
  2.1145 +              esac
  2.1146  	    else
  2.1147 -	      $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
  2.1148 -	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
  2.1149 +	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
  2.1150 +	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
  2.1151  	      $run eval 'mv "$nlist"T "$nlist"'
  2.1152 +              case $host in
  2.1153 +              *cygwin* | *mingw* )
  2.1154 +	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
  2.1155 +		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
  2.1156 +                ;;
  2.1157 +              esac
  2.1158  	    fi
  2.1159  	  fi
  2.1160  
  2.1161 @@ -4439,7 +4670,26 @@
  2.1162  #endif
  2.1163  
  2.1164  /* The mapping between symbol names and symbols. */
  2.1165 +"
  2.1166 +
  2.1167 +	    case $host in
  2.1168 +	    *cygwin* | *mingw* )
  2.1169 +	  $echo >> "$output_objdir/$dlsyms" "\
  2.1170 +/* DATA imports from DLLs on WIN32 can't be const, because
  2.1171 +   runtime relocations are performed -- see ld's documentation
  2.1172 +   on pseudo-relocs */
  2.1173 +struct {
  2.1174 +"
  2.1175 +	      ;;
  2.1176 +	    * )
  2.1177 +	  $echo >> "$output_objdir/$dlsyms" "\
  2.1178  const struct {
  2.1179 +"
  2.1180 +	      ;;
  2.1181 +	    esac
  2.1182 +
  2.1183 +
  2.1184 +	  $echo >> "$output_objdir/$dlsyms" "\
  2.1185    const char *name;
  2.1186    lt_ptr address;
  2.1187  }
  2.1188 @@ -4486,16 +4736,29 @@
  2.1189  	  esac
  2.1190  
  2.1191  	  # Now compile the dynamic symbol file.
  2.1192 -	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  2.1193 -	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  2.1194 +	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  2.1195 +	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  2.1196  
  2.1197  	  # Clean up the generated files.
  2.1198  	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  2.1199  	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
  2.1200  
  2.1201  	  # Transform the symbol file into the correct name.
  2.1202 -	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  2.1203 -	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  2.1204 +          case $host in
  2.1205 +          *cygwin* | *mingw* )
  2.1206 +            if test -f "$output_objdir/${outputname}.def" ; then
  2.1207 +              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
  2.1208 +              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
  2.1209 +            else
  2.1210 +              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  2.1211 +              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  2.1212 +             fi
  2.1213 +            ;;
  2.1214 +          * )
  2.1215 +            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  2.1216 +            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  2.1217 +            ;;
  2.1218 +          esac
  2.1219  	  ;;
  2.1220  	*)
  2.1221  	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  2.1222 @@ -4520,7 +4783,7 @@
  2.1223  	# We have no uninstalled library dependencies, so finalize right now.
  2.1224  	$show "$link_command"
  2.1225  	$run eval "$link_command"
  2.1226 -	status=$?
  2.1227 +	exit_status=$?
  2.1228  
  2.1229  	# Delete the generated files.
  2.1230  	if test -n "$dlsyms"; then
  2.1231 @@ -4528,7 +4791,7 @@
  2.1232  	  $run $rm "$output_objdir/${outputname}S.${objext}"
  2.1233  	fi
  2.1234  
  2.1235 -	exit $status
  2.1236 +	exit $exit_status
  2.1237        fi
  2.1238  
  2.1239        if test -n "$shlibpath_var"; then
  2.1240 @@ -4668,10 +4931,12 @@
  2.1241  	esac
  2.1242  	case $host in
  2.1243  	  *cygwin* | *mingw* )
  2.1244 -	    cwrappersource=`$echo ${objdir}/lt-${output}.c`
  2.1245 -	    cwrapper=`$echo ${output}.exe`
  2.1246 -	    $rm $cwrappersource $cwrapper
  2.1247 -	    trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
  2.1248 +            output_name=`basename $output`
  2.1249 +            output_path=`dirname $output`
  2.1250 +            cwrappersource="$output_path/$objdir/lt-$output_name.c"
  2.1251 +            cwrapper="$output_path/$output_name.exe"
  2.1252 +            $rm $cwrappersource $cwrapper
  2.1253 +            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
  2.1254  
  2.1255  	    cat > $cwrappersource <<EOF
  2.1256  
  2.1257 @@ -4696,6 +4961,9 @@
  2.1258  #include <malloc.h>
  2.1259  #include <stdarg.h>
  2.1260  #include <assert.h>
  2.1261 +#include <string.h>
  2.1262 +#include <ctype.h>
  2.1263 +#include <sys/stat.h>
  2.1264  
  2.1265  #if defined(PATH_MAX)
  2.1266  # define LT_PATHMAX PATH_MAX
  2.1267 @@ -4706,15 +4974,19 @@
  2.1268  #endif
  2.1269  
  2.1270  #ifndef DIR_SEPARATOR
  2.1271 -#define DIR_SEPARATOR '/'
  2.1272 +# define DIR_SEPARATOR '/'
  2.1273 +# define PATH_SEPARATOR ':'
  2.1274  #endif
  2.1275  
  2.1276  #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
  2.1277    defined (__OS2__)
  2.1278 -#define HAVE_DOS_BASED_FILE_SYSTEM
  2.1279 -#ifndef DIR_SEPARATOR_2
  2.1280 -#define DIR_SEPARATOR_2 '\\'
  2.1281 -#endif
  2.1282 +# define HAVE_DOS_BASED_FILE_SYSTEM
  2.1283 +# ifndef DIR_SEPARATOR_2
  2.1284 +#  define DIR_SEPARATOR_2 '\\'
  2.1285 +# endif
  2.1286 +# ifndef PATH_SEPARATOR_2
  2.1287 +#  define PATH_SEPARATOR_2 ';'
  2.1288 +# endif
  2.1289  #endif
  2.1290  
  2.1291  #ifndef DIR_SEPARATOR_2
  2.1292 @@ -4724,17 +4996,32 @@
  2.1293          (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
  2.1294  #endif /* DIR_SEPARATOR_2 */
  2.1295  
  2.1296 +#ifndef PATH_SEPARATOR_2
  2.1297 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
  2.1298 +#else /* PATH_SEPARATOR_2 */
  2.1299 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
  2.1300 +#endif /* PATH_SEPARATOR_2 */
  2.1301 +
  2.1302  #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
  2.1303  #define XFREE(stale) do { \
  2.1304    if (stale) { free ((void *) stale); stale = 0; } \
  2.1305  } while (0)
  2.1306  
  2.1307 +/* -DDEBUG is fairly common in CFLAGS.  */
  2.1308 +#undef DEBUG
  2.1309 +#if defined DEBUGWRAPPER
  2.1310 +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
  2.1311 +#else
  2.1312 +# define DEBUG(format, ...)
  2.1313 +#endif
  2.1314 +
  2.1315  const char *program_name = NULL;
  2.1316  
  2.1317  void * xmalloc (size_t num);
  2.1318  char * xstrdup (const char *string);
  2.1319 -char * basename (const char *name);
  2.1320 -char * fnqualify(const char *path);
  2.1321 +const char * base_name (const char *name);
  2.1322 +char * find_executable(const char *wrapper);
  2.1323 +int    check_executable(const char *path);
  2.1324  char * strendzap(char *str, const char *pat);
  2.1325  void lt_fatal (const char *message, ...);
  2.1326  
  2.1327 @@ -4744,29 +5031,51 @@
  2.1328    char **newargz;
  2.1329    int i;
  2.1330  
  2.1331 -  program_name = (char *) xstrdup ((char *) basename (argv[0]));
  2.1332 +  program_name = (char *) xstrdup (base_name (argv[0]));
  2.1333 +  DEBUG("(main) argv[0]      : %s\n",argv[0]);
  2.1334 +  DEBUG("(main) program_name : %s\n",program_name);
  2.1335    newargz = XMALLOC(char *, argc+2);
  2.1336  EOF
  2.1337  
  2.1338 -	    cat >> $cwrappersource <<EOF
  2.1339 -  newargz[0] = "$SHELL";
  2.1340 +            cat >> $cwrappersource <<EOF
  2.1341 +  newargz[0] = (char *) xstrdup("$SHELL");
  2.1342  EOF
  2.1343  
  2.1344 -	    cat >> $cwrappersource <<"EOF"
  2.1345 -  newargz[1] = fnqualify(argv[0]);
  2.1346 +            cat >> $cwrappersource <<"EOF"
  2.1347 +  newargz[1] = find_executable(argv[0]);
  2.1348 +  if (newargz[1] == NULL)
  2.1349 +    lt_fatal("Couldn't find %s", argv[0]);
  2.1350 +  DEBUG("(main) found exe at : %s\n",newargz[1]);
  2.1351    /* we know the script has the same name, without the .exe */
  2.1352    /* so make sure newargz[1] doesn't end in .exe */
  2.1353    strendzap(newargz[1],".exe");
  2.1354    for (i = 1; i < argc; i++)
  2.1355      newargz[i+1] = xstrdup(argv[i]);
  2.1356    newargz[argc+1] = NULL;
  2.1357 +
  2.1358 +  for (i=0; i<argc+1; i++)
  2.1359 +  {
  2.1360 +    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
  2.1361 +    ;
  2.1362 +  }
  2.1363 +
  2.1364  EOF
  2.1365  
  2.1366 -	    cat >> $cwrappersource <<EOF
  2.1367 +            case $host_os in
  2.1368 +              mingw*)
  2.1369 +                cat >> $cwrappersource <<EOF
  2.1370 +  execv("$SHELL",(char const **)newargz);
  2.1371 +EOF
  2.1372 +              ;;
  2.1373 +              *)
  2.1374 +                cat >> $cwrappersource <<EOF
  2.1375    execv("$SHELL",newargz);
  2.1376  EOF
  2.1377 -
  2.1378 -	    cat >> $cwrappersource <<"EOF"
  2.1379 +              ;;
  2.1380 +            esac
  2.1381 +
  2.1382 +            cat >> $cwrappersource <<"EOF"
  2.1383 +  return 127;
  2.1384  }
  2.1385  
  2.1386  void *
  2.1387 @@ -4786,48 +5095,148 @@
  2.1388  ;
  2.1389  }
  2.1390  
  2.1391 -char *
  2.1392 -basename (const char *name)
  2.1393 +const char *
  2.1394 +base_name (const char *name)
  2.1395  {
  2.1396    const char *base;
  2.1397  
  2.1398  #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  2.1399    /* Skip over the disk name in MSDOS pathnames. */
  2.1400 -  if (isalpha (name[0]) && name[1] == ':')
  2.1401 +  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
  2.1402      name += 2;
  2.1403  #endif
  2.1404  
  2.1405    for (base = name; *name; name++)
  2.1406      if (IS_DIR_SEPARATOR (*name))
  2.1407        base = name + 1;
  2.1408 -  return (char *) base;
  2.1409 +  return base;
  2.1410  }
  2.1411  
  2.1412 +int
  2.1413 +check_executable(const char * path)
  2.1414 +{
  2.1415 +  struct stat st;
  2.1416 +
  2.1417 +  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
  2.1418 +  if ((!path) || (!*path))
  2.1419 +    return 0;
  2.1420 +
  2.1421 +  if ((stat (path, &st) >= 0) &&
  2.1422 +      (
  2.1423 +        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
  2.1424 +#if defined (S_IXOTH)
  2.1425 +       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
  2.1426 +#endif
  2.1427 +#if defined (S_IXGRP)
  2.1428 +       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
  2.1429 +#endif
  2.1430 +       ((st.st_mode & S_IXUSR) == S_IXUSR))
  2.1431 +      )
  2.1432 +    return 1;
  2.1433 +  else
  2.1434 +    return 0;
  2.1435 +}
  2.1436 +
  2.1437 +/* Searches for the full path of the wrapper.  Returns
  2.1438 +   newly allocated full path name if found, NULL otherwise */
  2.1439  char *
  2.1440 -fnqualify(const char *path)
  2.1441 +find_executable (const char* wrapper)
  2.1442  {
  2.1443 -  size_t size;
  2.1444 -  char *p;
  2.1445 +  int has_slash = 0;
  2.1446 +  const char* p;
  2.1447 +  const char* p_next;
  2.1448 +  /* static buffer for getcwd */
  2.1449    char tmp[LT_PATHMAX + 1];
  2.1450 -
  2.1451 -  assert(path != NULL);
  2.1452 -
  2.1453 -  /* Is it qualified already? */
  2.1454 +  int tmp_len;
  2.1455 +  char* concat_name;
  2.1456 +
  2.1457 +  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
  2.1458 +
  2.1459 +  if ((wrapper == NULL) || (*wrapper == '\0'))
  2.1460 +    return NULL;
  2.1461 +
  2.1462 +  /* Absolute path? */
  2.1463  #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  2.1464 -  if (isalpha (path[0]) && path[1] == ':')
  2.1465 -    return xstrdup (path);
  2.1466 +  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
  2.1467 +  {
  2.1468 +    concat_name = xstrdup (wrapper);
  2.1469 +    if (check_executable(concat_name))
  2.1470 +      return concat_name;
  2.1471 +    XFREE(concat_name);
  2.1472 +  }
  2.1473 +  else
  2.1474 +  {
  2.1475  #endif
  2.1476 -  if (IS_DIR_SEPARATOR (path[0]))
  2.1477 -    return xstrdup (path);
  2.1478 -
  2.1479 -  /* prepend the current directory */
  2.1480 -  /* doesn't handle '~' */
  2.1481 +    if (IS_DIR_SEPARATOR (wrapper[0]))
  2.1482 +    {
  2.1483 +      concat_name = xstrdup (wrapper);
  2.1484 +      if (check_executable(concat_name))
  2.1485 +        return concat_name;
  2.1486 +      XFREE(concat_name);
  2.1487 +    }
  2.1488 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  2.1489 +  }
  2.1490 +#endif
  2.1491 +
  2.1492 +  for (p = wrapper; *p; p++)
  2.1493 +    if (*p == '/')
  2.1494 +    {
  2.1495 +      has_slash = 1;
  2.1496 +      break;
  2.1497 +    }
  2.1498 +  if (!has_slash)
  2.1499 +  {
  2.1500 +    /* no slashes; search PATH */
  2.1501 +    const char* path = getenv ("PATH");
  2.1502 +    if (path != NULL)
  2.1503 +    {
  2.1504 +      for (p = path; *p; p = p_next)
  2.1505 +      {
  2.1506 +        const char* q;
  2.1507 +        size_t p_len;
  2.1508 +        for (q = p; *q; q++)
  2.1509 +          if (IS_PATH_SEPARATOR(*q))
  2.1510 +            break;
  2.1511 +        p_len = q - p;
  2.1512 +        p_next = (*q == '\0' ? q : q + 1);
  2.1513 +        if (p_len == 0)
  2.1514 +        {
  2.1515 +          /* empty path: current directory */
  2.1516 +          if (getcwd (tmp, LT_PATHMAX) == NULL)
  2.1517 +            lt_fatal ("getcwd failed");
  2.1518 +          tmp_len = strlen(tmp);
  2.1519 +          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
  2.1520 +          memcpy (concat_name, tmp, tmp_len);
  2.1521 +          concat_name[tmp_len] = '/';
  2.1522 +          strcpy (concat_name + tmp_len + 1, wrapper);
  2.1523 +        }
  2.1524 +        else
  2.1525 +        {
  2.1526 +          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
  2.1527 +          memcpy (concat_name, p, p_len);
  2.1528 +          concat_name[p_len] = '/';
  2.1529 +          strcpy (concat_name + p_len + 1, wrapper);
  2.1530 +        }
  2.1531 +        if (check_executable(concat_name))
  2.1532 +          return concat_name;
  2.1533 +        XFREE(concat_name);
  2.1534 +      }
  2.1535 +    }
  2.1536 +    /* not found in PATH; assume curdir */
  2.1537 +  }
  2.1538 +  /* Relative path | not found in path: prepend cwd */
  2.1539    if (getcwd (tmp, LT_PATHMAX) == NULL)
  2.1540      lt_fatal ("getcwd failed");
  2.1541 -  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
  2.1542 -  p = XMALLOC(char, size);
  2.1543 -  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
  2.1544 -  return p;
  2.1545 +  tmp_len = strlen(tmp);
  2.1546 +  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
  2.1547 +  memcpy (concat_name, tmp, tmp_len);
  2.1548 +  concat_name[tmp_len] = '/';
  2.1549 +  strcpy (concat_name + tmp_len + 1, wrapper);
  2.1550 +
  2.1551 +  if (check_executable(concat_name))
  2.1552 +    return concat_name;
  2.1553 +  XFREE(concat_name);
  2.1554 +  return NULL;
  2.1555  }
  2.1556  
  2.1557  char *
  2.1558 @@ -4871,16 +5280,16 @@
  2.1559    va_end (ap);
  2.1560  }
  2.1561  EOF
  2.1562 -	  # we should really use a build-platform specific compiler
  2.1563 -	  # here, but OTOH, the wrappers (shell script and this C one)
  2.1564 -	  # are only useful if you want to execute the "real" binary.
  2.1565 -	  # Since the "real" binary is built for $host, then this
  2.1566 -	  # wrapper might as well be built for $host, too.
  2.1567 -	  $run $LTCC -s -o $cwrapper $cwrappersource
  2.1568 -	  ;;
  2.1569 -	esac
  2.1570 -	$rm $output
  2.1571 -	trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
  2.1572 +          # we should really use a build-platform specific compiler
  2.1573 +          # here, but OTOH, the wrappers (shell script and this C one)
  2.1574 +          # are only useful if you want to execute the "real" binary.
  2.1575 +          # Since the "real" binary is built for $host, then this
  2.1576 +          # wrapper might as well be built for $host, too.
  2.1577 +          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
  2.1578 +          ;;
  2.1579 +        esac
  2.1580 +        $rm $output
  2.1581 +        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
  2.1582  
  2.1583  	$echo > $output "\
  2.1584  #! $SHELL
  2.1585 @@ -5030,13 +5439,13 @@
  2.1586  	# Backslashes separate directories on plain windows
  2.1587  	*-*-mingw | *-*-os2*)
  2.1588  	  $echo >> $output "\
  2.1589 -      exec \$progdir\\\\\$program \${1+\"\$@\"}
  2.1590 +      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
  2.1591  "
  2.1592  	  ;;
  2.1593  
  2.1594  	*)
  2.1595  	  $echo >> $output "\
  2.1596 -      exec \$progdir/\$program \${1+\"\$@\"}
  2.1597 +      exec \"\$progdir/\$program\" \${1+\"\$@\"}
  2.1598  "
  2.1599  	  ;;
  2.1600  	esac
  2.1601 @@ -5046,7 +5455,7 @@
  2.1602      fi
  2.1603    else
  2.1604      # The program doesn't exist.
  2.1605 -    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
  2.1606 +    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
  2.1607      \$echo \"This script is just a wrapper for \$program.\" 1>&2
  2.1608      $echo \"See the $PACKAGE documentation for more information.\" 1>&2
  2.1609      exit $EXIT_FAILURE
  2.1610 @@ -5088,6 +5497,63 @@
  2.1611        if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  2.1612         cmds=$old_archive_from_new_cmds
  2.1613        else
  2.1614 +	# POSIX demands no paths to be encoded in archives.  We have
  2.1615 +	# to avoid creating archives with duplicate basenames if we
  2.1616 +	# might have to extract them afterwards, e.g., when creating a
  2.1617 +	# static archive out of a convenience library, or when linking
  2.1618 +	# the entirety of a libtool archive into another (currently
  2.1619 +	# not supported by libtool).
  2.1620 +	if (for obj in $oldobjs
  2.1621 +	    do
  2.1622 +	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
  2.1623 +	    done | sort | sort -uc >/dev/null 2>&1); then
  2.1624 +	  :
  2.1625 +	else
  2.1626 +	  $echo "copying selected object files to avoid basename conflicts..."
  2.1627 +
  2.1628 +	  if test -z "$gentop"; then
  2.1629 +	    gentop="$output_objdir/${outputname}x"
  2.1630 +	    generated="$generated $gentop"
  2.1631 +
  2.1632 +	    $show "${rm}r $gentop"
  2.1633 +	    $run ${rm}r "$gentop"
  2.1634 +	    $show "$mkdir $gentop"
  2.1635 +	    $run $mkdir "$gentop"
  2.1636 +	    exit_status=$?
  2.1637 +	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
  2.1638 +	      exit $exit_status
  2.1639 +	    fi
  2.1640 +	  fi
  2.1641 +
  2.1642 +	  save_oldobjs=$oldobjs
  2.1643 +	  oldobjs=
  2.1644 +	  counter=1
  2.1645 +	  for obj in $save_oldobjs
  2.1646 +	  do
  2.1647 +	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
  2.1648 +	    case " $oldobjs " in
  2.1649 +	    " ") oldobjs=$obj ;;
  2.1650 +	    *[\ /]"$objbase "*)
  2.1651 +	      while :; do
  2.1652 +		# Make sure we don't pick an alternate name that also
  2.1653 +		# overlaps.
  2.1654 +		newobj=lt$counter-$objbase
  2.1655 +		counter=`expr $counter + 1`
  2.1656 +		case " $oldobjs " in
  2.1657 +		*[\ /]"$newobj "*) ;;
  2.1658 +		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
  2.1659 +		esac
  2.1660 +	      done
  2.1661 +	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
  2.1662 +	      $run ln "$obj" "$gentop/$newobj" ||
  2.1663 +	      $run cp "$obj" "$gentop/$newobj"
  2.1664 +	      oldobjs="$oldobjs $gentop/$newobj"
  2.1665 +	      ;;
  2.1666 +	    *) oldobjs="$oldobjs $obj" ;;
  2.1667 +	    esac
  2.1668 +	  done
  2.1669 +	fi
  2.1670 +
  2.1671  	eval cmds=\"$old_archive_cmds\"
  2.1672  
  2.1673  	if len=`expr "X$cmds" : ".*"` &&
  2.1674 @@ -5101,20 +5567,7 @@
  2.1675  	  objlist=
  2.1676  	  concat_cmds=
  2.1677  	  save_oldobjs=$oldobjs
  2.1678 -	  # GNU ar 2.10+ was changed to match POSIX; thus no paths are
  2.1679 -	  # encoded into archives.  This makes 'ar r' malfunction in
  2.1680 -	  # this piecewise linking case whenever conflicting object
  2.1681 -	  # names appear in distinct ar calls; check, warn and compensate.
  2.1682 -	    if (for obj in $save_oldobjs
  2.1683 -	    do
  2.1684 -	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
  2.1685 -	    done | sort | sort -uc >/dev/null 2>&1); then
  2.1686 -	    :
  2.1687 -	  else
  2.1688 -	    $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
  2.1689 -	    $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
  2.1690 -	    AR_FLAGS=cq
  2.1691 -	  fi
  2.1692 +
  2.1693  	  # Is there a better way of finding the last object in the list?
  2.1694  	  for obj in $save_oldobjs
  2.1695  	  do
  2.1696 @@ -5125,7 +5578,7 @@
  2.1697  	    oldobjs="$objlist $obj"
  2.1698  	    objlist="$objlist $obj"
  2.1699  	    eval test_cmds=\"$old_archive_cmds\"
  2.1700 -	    if len=`expr "X$test_cmds" : ".*"` &&
  2.1701 +	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  2.1702  	       test "$len" -le "$max_cmd_len"; then
  2.1703  	      :
  2.1704  	    else
  2.1705 @@ -5322,11 +5775,11 @@
  2.1706      # install_prog (especially on Windows NT).
  2.1707      if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
  2.1708         # Allow the use of GNU shtool's install command.
  2.1709 -       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
  2.1710 +       $echo "X$nonopt" | grep shtool > /dev/null; then
  2.1711        # Aesthetically quote it.
  2.1712        arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
  2.1713        case $arg in
  2.1714 -      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
  2.1715 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  2.1716  	arg="\"$arg\""
  2.1717  	;;
  2.1718        esac
  2.1719 @@ -5335,14 +5788,14 @@
  2.1720        shift
  2.1721      else
  2.1722        install_prog=
  2.1723 -      arg="$nonopt"
  2.1724 +      arg=$nonopt
  2.1725      fi
  2.1726  
  2.1727      # The real first argument should be the name of the installation program.
  2.1728      # Aesthetically quote it.
  2.1729      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  2.1730      case $arg in
  2.1731 -    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
  2.1732 +    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  2.1733        arg="\"$arg\""
  2.1734        ;;
  2.1735      esac
  2.1736 @@ -5360,28 +5813,31 @@
  2.1737      do
  2.1738        if test -n "$dest"; then
  2.1739  	files="$files $dest"
  2.1740 -	dest="$arg"
  2.1741 +	dest=$arg
  2.1742  	continue
  2.1743        fi
  2.1744  
  2.1745        case $arg in
  2.1746        -d) isdir=yes ;;
  2.1747 -      -f) prev="-f" ;;
  2.1748 -      -g) prev="-g" ;;
  2.1749 -      -m) prev="-m" ;;
  2.1750 -      -o) prev="-o" ;;
  2.1751 +      -f) 
  2.1752 +      	case " $install_prog " in
  2.1753 +	*[\\\ /]cp\ *) ;;
  2.1754 +	*) prev=$arg ;;
  2.1755 +	esac
  2.1756 +	;;
  2.1757 +      -g | -m | -o) prev=$arg ;;
  2.1758        -s)
  2.1759  	stripme=" -s"
  2.1760  	continue
  2.1761  	;;
  2.1762 -      -*) ;;
  2.1763 -
  2.1764 +      -*)
  2.1765 +	;;
  2.1766        *)
  2.1767  	# If the previous option needed an argument, then skip it.
  2.1768  	if test -n "$prev"; then
  2.1769  	  prev=
  2.1770  	else
  2.1771 -	  dest="$arg"
  2.1772 +	  dest=$arg
  2.1773  	  continue
  2.1774  	fi
  2.1775  	;;
  2.1776 @@ -5390,7 +5846,7 @@
  2.1777        # Aesthetically quote the argument.
  2.1778        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  2.1779        case $arg in
  2.1780 -      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
  2.1781 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  2.1782  	arg="\"$arg\""
  2.1783  	;;
  2.1784        esac
  2.1785 @@ -5559,11 +6015,14 @@
  2.1786  
  2.1787  	  if test "$#" -gt 0; then
  2.1788  	    # Delete the old symlinks, and create new ones.
  2.1789 +	    # Try `ln -sf' first, because the `ln' binary might depend on
  2.1790 +	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
  2.1791 +	    # so we also need to try rm && ln -s.
  2.1792  	    for linkname
  2.1793  	    do
  2.1794  	      if test "$linkname" != "$realname"; then
  2.1795 -		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
  2.1796 -		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
  2.1797 +                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
  2.1798 +                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
  2.1799  	      fi
  2.1800  	    done
  2.1801  	  fi
  2.1802 @@ -5576,7 +6035,16 @@
  2.1803  	    IFS="$save_ifs"
  2.1804  	    eval cmd=\"$cmd\"
  2.1805  	    $show "$cmd"
  2.1806 -	    $run eval "$cmd" || exit $?
  2.1807 +	    $run eval "$cmd" || {
  2.1808 +	      lt_exit=$?
  2.1809 +
  2.1810 +	      # Restore the uninstalled library and exit
  2.1811 +	      if test "$mode" = relink; then
  2.1812 +		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
  2.1813 +	      fi
  2.1814 +
  2.1815 +	      exit $lt_exit
  2.1816 +	    }
  2.1817  	  done
  2.1818  	  IFS="$save_ifs"
  2.1819  	fi
  2.1820 @@ -5670,17 +6138,15 @@
  2.1821  	  notinst_deplibs=
  2.1822  	  relink_command=
  2.1823  
  2.1824 -	  # To insure that "foo" is sourced, and not "foo.exe",
  2.1825 -	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
  2.1826 -	  # which disallows the automatic-append-.exe behavior.
  2.1827 -	  case $build in
  2.1828 -	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
  2.1829 -	  *) wrapperdot=${wrapper} ;;
  2.1830 -	  esac
  2.1831 +	  # Note that it is not necessary on cygwin/mingw to append a dot to
  2.1832 +	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
  2.1833 +	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
  2.1834 +	  # `FILE.' does not work on cygwin managed mounts.
  2.1835 +	  #
  2.1836  	  # If there is no directory component, then add one.
  2.1837 -	  case $file in
  2.1838 -	  */* | *\\*) . ${wrapperdot} ;;
  2.1839 -	  *) . ./${wrapperdot} ;;
  2.1840 +	  case $wrapper in
  2.1841 +	  */* | *\\*) . ${wrapper} ;;
  2.1842 +	  *) . ./${wrapper} ;;
  2.1843  	  esac
  2.1844  
  2.1845  	  # Check the variables that should have been set.
  2.1846 @@ -5708,34 +6174,21 @@
  2.1847  	  done
  2.1848  
  2.1849  	  relink_command=
  2.1850 -	  # To insure that "foo" is sourced, and not "foo.exe",
  2.1851 -	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
  2.1852 -	  # which disallows the automatic-append-.exe behavior.
  2.1853 -	  case $build in
  2.1854 -	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
  2.1855 -	  *) wrapperdot=${wrapper} ;;
  2.1856 -	  esac
  2.1857 +	  # Note that it is not necessary on cygwin/mingw to append a dot to
  2.1858 +	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
  2.1859 +	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
  2.1860 +	  # `FILE.' does not work on cygwin managed mounts.
  2.1861 +	  #
  2.1862  	  # If there is no directory component, then add one.
  2.1863 -	  case $file in
  2.1864 -	  */* | *\\*) . ${wrapperdot} ;;
  2.1865 -	  *) . ./${wrapperdot} ;;
  2.1866 +	  case $wrapper in
  2.1867 +	  */* | *\\*) . ${wrapper} ;;
  2.1868 +	  *) . ./${wrapper} ;;
  2.1869  	  esac
  2.1870  
  2.1871  	  outputname=
  2.1872  	  if test "$fast_install" = no && test -n "$relink_command"; then
  2.1873  	    if test "$finalize" = yes && test -z "$run"; then
  2.1874 -	      tmpdir="/tmp"
  2.1875 -	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
  2.1876 -	      tmpdir="$tmpdir/libtool-$$"
  2.1877 -	      save_umask=`umask`
  2.1878 -	      umask 0077
  2.1879 -	      if $mkdir "$tmpdir"; then
  2.1880 -	        umask $save_umask
  2.1881 -	      else
  2.1882 -	        umask $save_umask
  2.1883 -		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
  2.1884 -		continue
  2.1885 -	      fi
  2.1886 +	      tmpdir=`func_mktempdir`
  2.1887  	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
  2.1888  	      outputname="$tmpdir/$file"
  2.1889  	      # Replace the output file specification.
  2.1890 @@ -5759,7 +6212,7 @@
  2.1891  	fi
  2.1892  
  2.1893  	# remove .exe since cygwin /usr/bin/install will append another
  2.1894 -	# one anyways
  2.1895 +	# one anyway 
  2.1896  	case $install_prog,$host in
  2.1897  	*/usr/bin/install*,*cygwin*)
  2.1898  	  case $file:$destfile in
  2.1899 @@ -5859,7 +6312,7 @@
  2.1900      # Exit here if they wanted silent mode.
  2.1901      test "$show" = : && exit $EXIT_SUCCESS
  2.1902  
  2.1903 -    $echo "----------------------------------------------------------------------"
  2.1904 +    $echo "X----------------------------------------------------------------------" | $Xsed
  2.1905      $echo "Libraries have been installed in:"
  2.1906      for libdir in $libdirs; do
  2.1907        $echo "   $libdir"
  2.1908 @@ -5892,7 +6345,7 @@
  2.1909      $echo
  2.1910      $echo "See any operating system documentation about shared libraries for"
  2.1911      $echo "more information, such as the ld(1) and ld.so(8) manual pages."
  2.1912 -    $echo "----------------------------------------------------------------------"
  2.1913 +    $echo "X----------------------------------------------------------------------" | $Xsed
  2.1914      exit $EXIT_SUCCESS
  2.1915      ;;
  2.1916  
  2.1917 @@ -6109,9 +6562,17 @@
  2.1918  	    rmfiles="$rmfiles $objdir/$n"
  2.1919  	  done
  2.1920  	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
  2.1921 -	  test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
  2.1922 -
  2.1923 -	  if test "$mode" = uninstall; then
  2.1924 +
  2.1925 +	  case "$mode" in
  2.1926 +	  clean)
  2.1927 +	    case "  $library_names " in
  2.1928 +	    # "  " in the beginning catches empty $dlname
  2.1929 +	    *" $dlname "*) ;;
  2.1930 +	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
  2.1931 +	    esac
  2.1932 +	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
  2.1933 +	    ;;
  2.1934 +	  uninstall)
  2.1935  	    if test -n "$library_names"; then
  2.1936  	      # Do each command in the postuninstall commands.
  2.1937  	      cmds=$postuninstall_cmds
  2.1938 @@ -6144,7 +6605,8 @@
  2.1939  	      IFS="$save_ifs"
  2.1940  	    fi
  2.1941  	    # FIXME: should reinstall the best remaining shared library.
  2.1942 -	  fi
  2.1943 +	    ;;
  2.1944 +	  esac
  2.1945  	fi
  2.1946  	;;
  2.1947  
  2.1948 @@ -6429,7 +6891,7 @@
  2.1949  $echo
  2.1950  $echo "Try \`$modename --help' for more information about other modes."
  2.1951  
  2.1952 -exit $EXIT_SUCCESS
  2.1953 +exit $?
  2.1954  
  2.1955  # The TAGs below are defined such that we never get into a situation
  2.1956  # in which we disable both kinds of libraries.  Given conflicting
  2.1957 @@ -6443,12 +6905,11 @@
  2.1958  # configuration.  But we'll never go from static-only to shared-only.
  2.1959  
  2.1960  # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
  2.1961 -build_libtool_libs=no
  2.1962 -build_old_libs=yes
  2.1963 +disable_libs=shared
  2.1964  # ### END LIBTOOL TAG CONFIG: disable-shared
  2.1965  
  2.1966  # ### BEGIN LIBTOOL TAG CONFIG: disable-static
  2.1967 -build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
  2.1968 +disable_libs=static
  2.1969  # ### END LIBTOOL TAG CONFIG: disable-static
  2.1970  
  2.1971  # Local Variables: