From 525d703d6f846e9706481a816910aef2ee70fb54 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 25 Mar 2020 16:16:37 -0700 Subject: binutils: Pregenerate autoconf files libtool patch will result in configure file regeneration, instead of doing that at build time, do it in patch itself, this avoids running autoconf before configure step. Since binutils needs specific version of autoconf ( which is 2.69 ) this will break on systems using newer or older verisons of autoconf in current state. Signed-off-by: Khem Raj Cc: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-devtools/binutils/binutils.inc | 8 +- .../binutils/binutils/0007-Use-libtool-2.4.patch | 26583 ++++++++++++++----- 2 files changed, 20352 insertions(+), 6239 deletions(-) diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index b0937e62fc..53f46bb611 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc @@ -114,13 +114,7 @@ export CC_FOR_BUILD = "LD_LIBRARY_PATH= ${BUILD_CC}" MULTIARCH := "${@bb.utils.contains("DISTRO_FEATURES", "multiarch", "yes", "no", d)}" do_configure[vardeps] += "MULTIARCH" do_configure () { - (for d in . bfd binutils gas gold gprof ld libctf opcodes; do - cd ${S}/$d - autoconf - rm -rf autom4te.cache - done - cd ${S} - gnu-configize) + (cd ${S} && gnu-configize) oe_runconf # diff --git a/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch b/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch index c71e19ecb4..89da62fbf7 100644 --- a/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch +++ b/meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch @@ -1,7 +1,7 @@ -From 3a2e7ec956568c503a678385ebee17098337feab Mon Sep 17 00:00:00 2001 +From b8fafd8ce6c47c9a551ed796176d884a34930086 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 14 Feb 2016 17:04:07 +0000 -Subject: [PATCH] Use libtool 2.4 +Subject: [PATCH 07/15] Use libtool 2.4 get libtool sysroot support @@ -9,408 +9,165 @@ Upstream-Status: Pending Signed-off-by: Khem Raj --- - bfd/configure.ac | 2 +- - libtool.m4 | 1080 +++++++++++------ - ltmain.sh | 2925 +++++++++++++++++++++++++++++++--------------- - ltoptions.m4 | 2 +- - ltversion.m4 | 12 +- - lt~obsolete.m4 | 2 +- - 6 files changed, 2717 insertions(+), 1306 deletions(-) + bfd/configure | 1322 +++++++++++++++----- + bfd/configure.ac | 2 +- + binutils/configure | 1320 +++++++++++++++----- + gas/configure | 1320 +++++++++++++++----- + gprof/configure | 1320 +++++++++++++++----- + ld/configure | 1695 ++++++++++++++++++------- + libctf/configure | 1319 +++++++++++++++----- + libtool.m4 | 1080 +++++++++++----- + ltmain.sh | 2925 +++++++++++++++++++++++++++++--------------- + ltoptions.m4 | 2 +- + ltversion.m4 | 12 +- + lt~obsolete.m4 | 2 +- + opcodes/configure | 1320 +++++++++++++++----- + 13 files changed, 9939 insertions(+), 3700 deletions(-) -diff --git a/bfd/configure.ac b/bfd/configure.ac -index af4d4b8c13..a521738244 100644 ---- a/bfd/configure.ac -+++ b/bfd/configure.ac -@@ -296,7 +296,7 @@ changequote(,)dnl - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` - changequote([,])dnl - if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -+ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" - fi - - case "${host}" in -diff --git a/libtool.m4 b/libtool.m4 -index 434530059f..e45fdc6998 100644 ---- a/libtool.m4 -+++ b/libtool.m4 -@@ -1,7 +1,8 @@ - # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is free software; the Free Software Foundation gives -@@ -10,7 +11,8 @@ - - m4_define([_LT_COPYING], [dnl - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -+# Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is part of GNU Libtool. -@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl - # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - ]) - --# serial 56 LT_INIT -+# serial 57 LT_INIT - - - # LT_PREREQ(VERSION) -@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1]) - LIBTOOL_DEPS="$ltmain" - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(SHELL) $(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - AC_SUBST(LIBTOOL)dnl - - _LT_SETUP -@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl - dnl - m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_CHECK_SHELL_FEATURES])dnl -+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl - m4_require([_LT_CMD_RELOAD])dnl - m4_require([_LT_CHECK_MAGIC_METHOD])dnl -+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl - m4_require([_LT_CMD_OLD_ARCHIVE])dnl - m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -+m4_require([_LT_WITH_SYSROOT])dnl - - _LT_CONFIG_LIBTOOL_INIT([ - # See if we are running on zsh, and set the options which allow our -@@ -199,7 +205,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a `.a' archive for static linking (except MSVC, -@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl - m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) - configured by $[0], generated by m4_PACKAGE_STRING. - --Copyright (C) 2009 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This config.lt script is free software; the Free Software Foundation - gives unlimited permision to copy, distribute and modify it." - -@@ -746,15 +752,12 @@ _LT_EOF - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? -- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -+ sed '$q' "$ltmain" >> "$cfgfile" \ -+ || (rm -f "$cfgfile"; exit 1) - -- _LT_PROG_XSI_SHELLFNS -+ _LT_PROG_REPLACE_SHELLFNS - -- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ -- || (rm -f "$cfgfile"; exit 1) -- -- mv -f "$cfgfile" "$ofile" || -+ mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - ], -@@ -980,6 +983,8 @@ _LT_EOF - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD -+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD -+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF - int main() { return 0;} - _LT_EOF -@@ -1069,30 +1074,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], - fi - ]) - --# _LT_SYS_MODULE_PATH_AIX --# ----------------------- -+# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -+# ---------------------------------- - # Links a minimal program and checks the executable - # for the system default hardcoded library path. In most cases, - # this is /usr/lib:/lib, but when the MPI compilers are used - # the location of the communication and MPI libs are included too. - # If we don't find anything, use the default library path according - # to the aix ld manual. -+# Store the results from the different compilers for each TAGNAME. -+# Allow to override them for all tags through lt_cv_aix_libpath. - m4_defun([_LT_SYS_MODULE_PATH_AIX], - [m4_require([_LT_DECL_SED])dnl --AC_LINK_IFELSE([AC_LANG_SOURCE([AC_LANG_PROGRAM])],[ --lt_aix_libpath_sed=' -- /Import File Strings/,/^$/ { -- /^0/ { -- s/^0 *\(.*\)$/\1/ -- p -- } -- }' --aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --# Check for a 64-bit object if we didn't find anything. --if test -z "$aix_libpath"; then -- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` --fi],[]) --if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+if test "${lt_cv_aix_libpath+set}" = set; then -+ aix_libpath=$lt_cv_aix_libpath -+else -+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], -+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ -+ lt_aix_libpath_sed='[ -+ /Import File Strings/,/^$/ { -+ /^0/ { -+ s/^0 *\([^ ]*\) *$/\1/ -+ p -+ } -+ }]' -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ # Check for a 64-bit object if we didn't find anything. -+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -+ fi],[]) -+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" -+ fi -+ ]) -+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -+fi - ])# _LT_SYS_MODULE_PATH_AIX +diff --git a/bfd/configure b/bfd/configure +index bc576b7894a..cd036638081 100755 +--- a/bfd/configure ++++ b/bfd/configure +@@ -704,6 +704,9 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL ++ac_ct_AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -822,6 +825,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1504,6 +1508,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-mmap try using mmap for BFD input files if available + --with-separate-debug-dir=DIR + Look for global separate debug info in DIR +@@ -5693,8 +5699,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' -@@ -1117,7 +1133,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - AC_MSG_CHECKING([how to print strings]) +@@ -5734,7 +5740,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then -@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) - ])# _LT_PROG_ECHO_BACKSLASH +@@ -6420,8 +6426,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6470,6 +6476,80 @@ esac -+# _LT_WITH_SYSROOT -+# ---------------- -+AC_DEFUN([_LT_WITH_SYSROOT], -+[AC_MSG_CHECKING([for sysroot]) -+AC_ARG_WITH([libtool-sysroot], -+[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR -+ (or the compiler's sysroot if not specified).], -+[], [with_libtool_sysroot=no]) -+ -+dnl lt_sysroot will always be passed unquoted. We quote it here -+dnl in case the user passed a directory name. -+lt_sysroot= -+case ${with_libtool_sysroot} in #( -+ yes) -+ if test "$GCC" = yes; then -+ lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ fi -+ ;; #( -+ /*) -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` -+ ;; #( -+ no|'') -+ ;; #( -+ *) -+ AC_MSG_RESULT([${with_libtool_sysroot}]) -+ AC_MSG_ERROR([The sysroot must be an absolute path.]) -+ ;; + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if ${lt_cv_to_host_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; +esac + -+ AC_MSG_RESULT([${lt_sysroot:-no}]) -+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -+[dependent libraries, and in which our libraries should be installed.])]) ++fi + - # _LT_ENABLE_LOCK - # --------------- - m4_defun([_LT_ENABLE_LOCK], -@@ -1320,14 +1369,47 @@ need_locks="$enable_libtool_lock" - ])# _LT_ENABLE_LOCK - - -+# _LT_PROG_AR -+# ----------- -+m4_defun([_LT_PROG_AR], -+[AC_CHECK_TOOLS(AR, [ar], false) -+: ${AR=ar} -+: ${AR_FLAGS=cru} -+_LT_DECL([], [AR], [1], [The archiver]) -+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } + -+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], -+ [lt_cv_ar_at_file=no -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM], -+ [echo conftest.$ac_objext > conftest.lst -+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' -+ AC_TRY_EVAL([lt_ar_try]) -+ if test "$ac_status" -eq 0; then -+ # Ensure the archiver fails upon bogus file names. -+ rm -f conftest.$ac_objext libconftest.a -+ AC_TRY_EVAL([lt_ar_try]) -+ if test "$ac_status" -ne 0; then -+ lt_cv_ar_at_file=@ -+ fi -+ fi -+ rm -f conftest.* libconftest.a -+ ]) -+ ]) + -+if test "x$lt_cv_ar_at_file" = xno; then -+ archiver_list_spec= ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if ${lt_cv_to_tool_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 +else -+ archiver_list_spec=$lt_cv_ar_at_file ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ +fi -+_LT_DECL([], [archiver_list_spec], [1], -+ [How to feed a file listing to the archiver]) -+])# _LT_PROG_AR + ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + - # _LT_CMD_OLD_ARCHIVE - # ------------------- - m4_defun([_LT_CMD_OLD_ARCHIVE], --[AC_CHECK_TOOL(AR, ar, false) --test -z "$AR" && AR=ar --test -z "$AR_FLAGS" && AR_FLAGS=cru --_LT_DECL([], [AR], [1], [The archiver]) --_LT_DECL([], [AR_FLAGS], [1]) -+[_LT_PROG_AR - - AC_CHECK_TOOL(STRIP, strip, :) - test -z "$STRIP" && STRIP=: -@@ -1623,7 +1705,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --[#line __oline__ "configure" -+[#line $LINENO "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -1667,10 +1749,10 @@ else - /* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ - #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) --void fnord () __attribute__((visibility("default"))); -+int fnord () __attribute__((visibility("default"))); - #endif - --void fnord () { int i=42; } -+int fnord () { return 42; } - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -@@ -2210,8 +2292,9 @@ cygwin* | mingw* | pw32* | cegcc*) - need_version=no - need_lib_prefix=no - -- case $GCC,$host_os in -- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) -+ case $GCC,$cc_basename in -+ yes,*) -+ # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ -@@ -2244,13 +2327,71 @@ m4_if([$1], [],[ - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac -+ dynamic_linker='Win32 ld.exe' -+ ;; + -+ *,cl*) -+ # Native MSVC -+ libname_spec='$name' -+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='${libname}.dll.lib' + -+ case $build_os in -+ mingw*) -+ sys_lib_search_path_spec= -+ lt_save_ifs=$IFS -+ IFS=';' -+ for lt_path in $LIB -+ do -+ IFS=$lt_save_ifs -+ # Let DOS variable expansion print the short 8.3 style file name. -+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` -+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" -+ done -+ IFS=$lt_save_ifs -+ # Convert to MSYS style. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` -+ ;; -+ cygwin*) -+ # Convert to unix form, then to dos form, then back to unix form -+ # but this time dos style (no spaces!) so that the unix form looks -+ # like /cygdrive/c/PROGRA~1:/cygdr... -+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` -+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` -+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ ;; -+ *) -+ sys_lib_search_path_spec="$LIB" -+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then -+ # It is most probably a Windows format PATH. -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -+ else -+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` -+ fi -+ # FIXME: find the short name or the path components, as spaces are -+ # common. (e.g. "Program Files" -> "PROGRA~1") -+ ;; -+ esac + -+ # DLL is installed to $(libdir)/../bin by postinstall_cmds -+ postinstall_cmds='base_file=`basename \${file}`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' -+ shlibpath_overrides_runpath=yes -+ dynamic_linker='Win32 link.exe' - ;; - - *) -+ # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ dynamic_linker='Win32 ld.exe' - ;; - esac -- dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; -@@ -2342,7 +2483,7 @@ haiku*) - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes -- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' -+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -@@ -2950,6 +3091,11 @@ case $reload_flag in ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if ${lt_cv_ld_reload_flag+:} false; then : +@@ -6486,6 +6566,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in @@ -422,7 +179,7 @@ index 434530059f..e45fdc6998 100644 darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -@@ -3016,7 +3162,8 @@ mingw* | pw32*) +@@ -6654,7 +6739,8 @@ mingw* | pw32*) lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -432,10 +189,10 @@ index 434530059f..e45fdc6998 100644 lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -@@ -3167,6 +3314,21 @@ tpf*) - ;; - esac - ]) +@@ -6808,6 +6894,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no @@ -445,7 +202,7 @@ index 434530059f..e45fdc6998 100644 + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else -+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac @@ -454,107 +211,318 @@ index 434530059f..e45fdc6998 100644 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -3174,7 +3336,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - _LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) - _LT_DECL([], [file_magic_cmd], [1], -- [Command to use when deplibs_check_method == "file_magic"]) -+ [Command to use when deplibs_check_method = "file_magic"]) -+_LT_DECL([], [file_magic_glob], [1], -+ [How to find potential files when deplibs_check_method = "file_magic"]) -+_LT_DECL([], [want_nocaseglob], [1], -+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) - ])# _LT_CHECK_MAGIC_METHOD +@@ -6821,11 +6922,164 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown -@@ -3277,6 +3443,67 @@ dnl aclocal-1.4 backwards compatibility: - dnl AC_DEFUN([AM_PROG_NM], []) - dnl AC_DEFUN([AC_PROG_NM], []) -+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -+# -------------------------------- -+# how to determine the name of the shared library -+# associated with a specific link library. -+# -- PORTME fill in with the dynamic library characteristics -+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -+[m4_require([_LT_DECL_EGREP]) -+m4_require([_LT_DECL_OBJDUMP]) -+m4_require([_LT_DECL_DLLTOOL]) -+AC_CACHE_CHECK([how to associate runtime and link libraries], -+lt_cv_sharedlib_from_linklib_cmd, -+[lt_cv_sharedlib_from_linklib_cmd='unknown' + -+case $host_os in -+cygwin* | mingw* | pw32* | cegcc*) -+ # two different shell functions defined in ltmain.sh -+ # decide which to use based on capabilities of $DLLTOOL -+ case `$DLLTOOL --help 2>&1` in -+ *--identify-strict*) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -+ ;; -+ *) -+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback -+ ;; -+ esac -+ ;; -+*) -+ # fallback: assume linklib IS sharedlib -+ lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ ;; -+esac -+]) -+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + -+_LT_DECL([], [sharedlib_from_linklib_cmd], [1], -+ [Command to associate shared and link libraries]) -+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + -+# _LT_PATH_MANIFEST_TOOL -+# ---------------------- -+# locate the manifest tool -+m4_defun([_LT_PATH_MANIFEST_TOOL], -+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], -+ [lt_cv_path_mainfest_tool=no -+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD -+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out -+ cat conftest.err >&AS_MESSAGE_LOG_FD -+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then -+ lt_cv_path_mainfest_tool=yes -+ fi -+ rm -f conftest*]) -+if test "x$lt_cv_path_mainfest_tool" != xyes; then -+ MANIFEST_TOOL=: -+fi -+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -+])# _LT_PATH_MANIFEST_TOOL ++ ++ ++ ++ ++ + - # LT_LIB_M - # -------- -@@ -3403,8 +3630,8 @@ esac + + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_AR+:} false; then : +@@ -6841,7 +7095,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6861,11 +7115,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_ac_ct_AR+:} false; then : +@@ -6881,7 +7139,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6900,6 +7158,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6911,16 +7173,72 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if ${lt_cv_ar_at_file+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } + ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi + + + +@@ -7262,8 +7580,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= -@@ -3440,6 +3667,7 @@ for ac_symprfx in "" "_"; do +@@ -7299,6 +7617,7 @@ for ac_symprfx in "" "_"; do else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no -@@ -3473,6 +3701,18 @@ _LT_EOF +@@ -7340,6 +7659,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext @@ -562,27 +530,27 @@ index 434530059f..e45fdc6998 100644 +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ -+# define LT@&t@_DLSYM_CONST ++# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ -+# define LT@&t@_DLSYM_CONST ++# define LT_DLSYM_CONST +#else -+# define LT@&t@_DLSYM_CONST const ++# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif -@@ -3484,7 +3724,7 @@ _LT_EOF +@@ -7351,7 +7682,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { -+LT@&t@_DLSYM_CONST struct { ++LT_DLSYM_CONST struct { const char *name; void *address; } -@@ -3510,15 +3750,15 @@ static const void *lt_preloaded_setup() { +@@ -7377,8 +7708,8 @@ static const void *lt_preloaded_setup() { _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext @@ -591,8 +559,10 @@ index 434530059f..e45fdc6998 100644 + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -7388,8 +7719,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" @@ -600,167 +570,308 @@ index 434530059f..e45fdc6998 100644 + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + echo "cannot find nm_test_func in $nlist" >&5 fi -@@ -3551,6 +3791,13 @@ else - AC_MSG_RESULT(ok) +@@ -7426,6 +7757,16 @@ else + $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' -+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + - _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) - _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], -@@ -3561,6 +3808,8 @@ _LT_DECL([global_symbol_to_c_name_address], - _LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -+_LT_DECL([], [nm_file_list_spec], [1], -+ [Specify filename containing input files for $NM]) - ]) # _LT_CMD_GLOBAL_SYMBOLS ++ ++ ++ -@@ -3572,7 +3821,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)= - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)= --AC_MSG_CHECKING([for $compiler option to produce PIC]) - m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then -@@ -3678,6 +3926,12 @@ m4_if([$1], [CXX], [ - ;; - esac - ;; -+ mingw* | cygwin* | os2* | pw32* | cegcc*) -+ # This hack is so that the source file can tell whether it is being -+ # built for inclusion in a dll (and should export symbols for example). -+ m4_if([$1], [GCJ], [], -+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) -+ ;; - dgux*) - case $cc_basename in - ec++*) -@@ -3830,7 +4084,7 @@ m4_if([$1], [CXX], [ - ;; - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -@@ -4053,6 +4307,12 @@ m4_if([$1], [CXX], [ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; -+ nagfor*) -+ # NAG Fortran compiler -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -4115,7 +4375,7 @@ m4_if([$1], [CXX], [ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in -- f77* | f90* | f95*) -+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; -@@ -4172,9 +4432,11 @@ case $host_os in - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; - esac --AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) --_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], -- [How to pass a linker flag through the compiler]) -+ -+AC_CACHE_CHECK([for $compiler option to produce PIC], -+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], -+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) +@@ -7442,6 +7783,45 @@ fi - # - # Check to make sure the PIC flag actually works. -@@ -4193,6 +4455,8 @@ fi - _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) -+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], -+ [How to pass a linker flag through the compiler]) - # - # Check to make sure the static flag actually works. - # -@@ -4213,6 +4477,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - m4_defun([_LT_LINKER_SHLIBS], - [AC_REQUIRE([LT_PATH_LD])dnl - AC_REQUIRE([LT_PATH_NM])dnl -+m4_require([_LT_PATH_MANIFEST_TOOL])dnl - m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_DECL_EGREP])dnl - m4_require([_LT_DECL_SED])dnl -@@ -4221,6 +4486,7 @@ m4_require([_LT_TAG_COMPILER])dnl - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. -@@ -4235,15 +4501,20 @@ m4_if([$1], [CXX], [ + ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -7653,6 +8033,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if ${lt_cv_path_mainfest_tool+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -8216,6 +8713,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -8380,7 +8879,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -8469,7 +8969,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8767,8 +9267,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8934,6 +9432,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8996,7 +9500,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -9053,13 +9557,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" -- ;; -+ ;; - cygwin* | mingw* | cegcc*) -- _LT_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' -- ;; -+ case $cc_basename in -+ cl*) ;; -+ *) -+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' -+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] -+ ;; -+ esac -+ ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' -- ;; -+ ;; - esac -- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - ], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= -@@ -4411,7 +4682,8 @@ _LT_EOF - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- _LT_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' -+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' -+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if ${lt_cv_prog_compiler_pic+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -9120,6 +9628,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -9470,7 +9983,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -@@ -4510,12 +4782,12 @@ _LT_EOF - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' -- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9569,12 +10083,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' @@ -768,89 +879,187 @@ index 434530059f..e45fdc6998 100644 fi ;; esac -@@ -4529,8 +4801,8 @@ _LT_EOF - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' +@@ -9588,8 +10102,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; -@@ -4548,8 +4820,8 @@ _LT_EOF +@@ -9607,8 +10121,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else - _LT_TAGVAR(ld_shlibs, $1)=no + ld_shlibs=no fi -@@ -4595,8 +4867,8 @@ _LT_EOF +@@ -9654,8 +10168,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else - _LT_TAGVAR(ld_shlibs, $1)=no + ld_shlibs=no fi -@@ -4726,7 +4998,7 @@ _LT_EOF - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' +@@ -9785,7 +10299,13 @@ _LT_EOF + allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else -@@ -4737,7 +5009,7 @@ _LT_EOF +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9798,22 +10318,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9825,7 +10352,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else # Determine the default libpath from the value encoded in an # empty executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -@@ -4781,20 +5053,63 @@ _LT_EOF - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- # Tell ltmain to make .lib files, not .a files. -- libext=lib -- # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -- # FIXME: Setting linknames here is a bad hack. -- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' -- # The linker will automatically build a .lib file if we build a DLL. -- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -- # FIXME: Should let the user specify the lib program. -- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' -- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ case $cc_basename in -+ cl*) -+ # Native MSVC -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ _LT_TAGVAR(always_export_symbols, $1)=yes -+ _LT_TAGVAR(file_list_spec, $1)='@' +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9838,22 +10371,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9898,20 +10438,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; @@ -858,12 +1067,12 @@ index 434530059f..e45fdc6998 100644 + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ _LT_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' ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib -+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' -+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; @@ -879,616 +1088,498 @@ index 434530059f..e45fdc6998 100644 + ;; + *) + # Assume MSVC wrapper -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. -+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. -+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) -@@ -4828,7 +5143,7 @@ _LT_EOF +@@ -9972,7 +10555,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -@@ -4836,7 +5151,7 @@ _LT_EOF +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9980,7 +10563,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hpux9*) if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi -@@ -4852,7 +5167,7 @@ _LT_EOF +@@ -9996,7 +10579,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi -@@ -4876,10 +5191,10 @@ _LT_EOF - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' +@@ -10020,10 +10603,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else -@@ -4926,16 +5241,31 @@ _LT_EOF +@@ -10102,23 +10685,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -- AC_LINK_IFELSE([AC_LANG_SOURCE([int foo(void) {}])], -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -- ) -- LDFLAGS="$save_LDFLAGS" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. -+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], -+ [lt_cv_irix_exported_symbol], -+ [save_LDFLAGS="$LDFLAGS" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if ${lt_cv_irix_exported_symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ AC_LINK_IFELSE( -+ [AC_LANG_SOURCE( -+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], -+ [C++], [[int foo (void) { return 0; }]], -+ [Fortran 77], [[ -+ subroutine foo -+ end]], -+ [Fortran], [[ -+ subroutine foo -+ end]])])], -+ [lt_cv_irix_exported_symbol=yes], -+ [lt_cv_irix_exported_symbol=no]) -+ LDFLAGS="$save_LDFLAGS"]) ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -@@ -5020,7 +5350,7 @@ _LT_EOF + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -10203,7 +10799,7 @@ rm -f core conftest.err conftest.$ac_objext \ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -@@ -5039,9 +5369,9 @@ _LT_EOF - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + allow_undefined_flag=' -expect_unresolved \*' +@@ -10222,9 +10818,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) -@@ -5313,8 +5643,6 @@ _LT_TAGDECL([], [inherit_rpath], [0], - to runtime path list]) - _LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) --_LT_TAGDECL([], [fix_srcfile_path], [1], -- [Fix the shell variable $srcfile for the compiler]) - _LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) - _LT_TAGDECL([], [export_symbols_cmds], [2], -@@ -5325,6 +5653,8 @@ _LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) - _LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -+_LT_TAGDECL([], [postlink_cmds], [2], -+ [Commands necessary for finishing linking programs]) - _LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) - dnl FIXME: Not yet implemented -@@ -5426,6 +5756,7 @@ CC="$lt_save_CC" - m4_defun([_LT_LANG_CXX_CONFIG], - [m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_DECL_EGREP])dnl -+m4_require([_LT_PATH_MANIFEST_TOOL])dnl - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then -@@ -5487,6 +5818,7 @@ if test "$_lt_caught_CXX_error" != yes; then - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC -+ lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX -@@ -5504,6 +5836,7 @@ if test "$_lt_caught_CXX_error" != yes; then - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} -+ CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) -@@ -5667,7 +6000,7 @@ if test "$_lt_caught_CXX_error" != yes; then - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" +@@ -10800,8 +11396,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no - _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -@@ -5679,7 +6012,7 @@ if test "$_lt_caught_CXX_error" != yes; then - else - # Determine the default libpath from the value encoded in an - # empty executable. -- _LT_SYS_MODULE_PATH_AIX -+ _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -@@ -5721,29 +6054,75 @@ if test "$_lt_caught_CXX_error" != yes; then - ;; +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10834,13 +11431,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; - cygwin* | mingw* | pw32* | cegcc*) -- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -- # as there is no search path for DLLs. -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' -- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_TAGVAR(always_export_symbols, $1)=no -- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -- -- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -- _LT_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' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $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' -- else -- _LT_TAGVAR(ld_shlibs, $1)=no -- fi -- ;; -+ case $GXX,$cc_basename in -+ ,cl* | no,cl*) -+ # Native MSVC -+ # hardcode_libdir_flag_spec is actually meaningless, as there is -+ # no search path for DLLs. -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ _LT_TAGVAR(always_export_symbols, $1)=yes -+ _LT_TAGVAR(file_list_spec, $1)='@' -+ # Tell ltmain to make .lib files, not .a files. -+ libext=lib -+ # Tell ltmain to make .dll files, not .so files. -+ shrext_cmds=".dll" -+ # FIXME: Setting linknames here is a bad hack. -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -+ else -+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' -+ # The linker will not automatically build a static lib if we build a DLL. -+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ # Don't use ranlib -+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' -+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile="$lt_outputfile.exe" -+ lt_tool_outputfile="$lt_tool_outputfile.exe" -+ ;; -+ esac~ -+ func_to_tool_file "$lt_outputfile"~ -+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' -+ ;; -+ *) -+ # g++ -+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, -+ # as there is no search path for DLLs. -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ _LT_TAGVAR(always_export_symbols, $1)=no -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ -+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -+ _LT_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' -+ # If the export-symbols file already is a .def file (1st line -+ # is EXPORTS), use it as is; otherwise, prepend... -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -+ cp $export_symbols $output_objdir/$soname.def; -+ else -+ echo EXPORTS > $output_objdir/$soname.def; -+ cat $export_symbols >> $output_objdir/$soname.def; -+ fi~ -+ $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' -+ else -+ _LT_TAGVAR(ld_shlibs, $1)=no -+ fi -+ ;; -+ esac -+ ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; -@@ -5818,7 +6197,7 @@ if test "$_lt_caught_CXX_error" != yes; then - ;; - *) - if test "$GXX" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' -+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no -@@ -5889,10 +6268,10 @@ if test "$_lt_caught_CXX_error" != yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) -- _LT_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' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi -@@ -5933,9 +6312,9 @@ if test "$_lt_caught_CXX_error" != yes; then - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes -@@ -6005,20 +6384,20 @@ if test "$_lt_caught_CXX_error" != yes; then - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ -- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' -+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ -- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ -+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' -+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -@@ -6213,7 +6592,7 @@ if test "$_lt_caught_CXX_error" != yes; then - _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) -- _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10932,7 +11587,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; -@@ -6259,7 +6638,7 @@ if test "$_lt_caught_CXX_error" != yes; then +@@ -11728,7 +12383,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11731 "configure" ++#line $LINENO "configure" + #include "confdefs.h" - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' -@@ -6300,9 +6679,9 @@ if test "$_lt_caught_CXX_error" != yes; then - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + #if HAVE_DLFCN_H +@@ -11772,10 +12427,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when -@@ -6431,6 +6810,7 @@ if test "$_lt_caught_CXX_error" != yes; then - fi # test -n "$compiler" +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11834,7 +12489,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11837 "configure" ++#line $LINENO "configure" + #include "confdefs.h" - CC=$lt_save_CC -+ CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC -@@ -6445,6 +6825,29 @@ AC_LANG_POP - ])# _LT_LANG_CXX_CONFIG + #if HAVE_DLFCN_H +@@ -11878,10 +12533,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -14554,7 +15209,7 @@ SHARED_LDFLAGS= + if test "$enable_shared" = "yes"; then + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi -+# _LT_FUNC_STRIPNAME_CNF -+# ---------------------- -+# func_stripname_cnf prefix suffix name -+# strip PREFIX and SUFFIX off of NAME. -+# PREFIX and SUFFIX must not contain globbing or regex special -+# characters, hashes, percent signs, but SUFFIX may contain a leading -+# dot (in which case that matches only a dot). -+# -+# This function is identical to the (non-XSI) version of func_stripname, -+# except this one can be used by m4 code that may be executed by configure, -+# rather than the libtool script. -+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -+AC_REQUIRE([_LT_DECL_SED]) -+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -+func_stripname_cnf () -+{ -+ case ${2} in -+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -+ esac -+} # func_stripname_cnf -+])# _LT_FUNC_STRIPNAME_CNF -+ - # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) - # --------------------------------- - # Figure out "hidden" library dependencies from verbose -@@ -6453,6 +6856,7 @@ AC_LANG_POP - # objects, libraries and library flags. - m4_defun([_LT_SYS_HIDDEN_LIBDEPS], - [m4_require([_LT_FILEUTILS_DEFAULTS])dnl -+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl - # Dependencies to place before and after the object being linked: - _LT_TAGVAR(predep_objects, $1)= - _LT_TAGVAR(postdep_objects, $1)= -@@ -6503,6 +6907,13 @@ public class foo { - }; - _LT_EOF - ]) + case "${host}" in +@@ -17176,13 +17831,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -17197,14 +17859,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -17237,12 +17902,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -17297,8 +17962,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -17308,12 +17978,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -17329,7 +18001,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -17365,6 +18036,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -18153,7 +18825,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -18256,19 +18929,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd + -+_lt_libdeps_save_CFLAGS=$CFLAGS -+case "$CC $CFLAGS " in #( -+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -+esac ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd + - dnl Parse the compiler output and extract the necessary - dnl objects, libraries and library flags. - if AC_TRY_EVAL(ac_compile); then -@@ -6514,7 +6925,7 @@ if AC_TRY_EVAL(ac_compile); then - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do -- case $p in -+ case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. -@@ -6523,13 +6934,22 @@ if AC_TRY_EVAL(ac_compile); then - test $p = "-R"; then - prev=$p - continue -- else -- prev= - fi - -+ # Expand the sysroot to ease extracting the directories later. -+ if test -z "$prev"; then -+ case $p in -+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; -+ esac -+ fi -+ case $p in -+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; -+ esac - if test "$pre_test_object_deps_done" = no; then -- case $p in -- -L* | -R*) -+ case ${prev} in -+ -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. -@@ -6549,8 +6969,10 @@ if AC_TRY_EVAL(ac_compile); then - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi -+ prev= - ;; - -+ *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. -@@ -6586,6 +7008,7 @@ else - fi - - $RM -f confest.$objext -+CFLAGS=$_lt_libdeps_save_CFLAGS + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP - # PORTME: override above test on systems where it is broken - m4_if([$1], [CXX], -@@ -6622,7 +7045,7 @@ linux*) - - solaris*) - case $cc_basename in -- CC*) -+ CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as -@@ -6735,7 +7158,9 @@ if test "$_lt_disable_F77" != yes; then - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC -+ lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} -+ CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) -@@ -6789,6 +7214,7 @@ if test "$_lt_disable_F77" != yes; then - - GCC=$lt_save_GCC - CC="$lt_save_CC" -+ CFLAGS="$lt_save_CFLAGS" - fi # test "$_lt_disable_F77" != yes - - AC_LANG_POP -@@ -6865,7 +7291,9 @@ if test "$_lt_disable_FC" != yes; then - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC -+ lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} -+ CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method -@@ -6921,7 +7349,8 @@ if test "$_lt_disable_FC" != yes; then - fi # test -n "$compiler" +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd - GCC=$lt_save_GCC -- CC="$lt_save_CC" -+ CC=$lt_save_CC -+ CFLAGS=$lt_save_CFLAGS - fi # test "$_lt_disable_FC" != yes ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS - AC_LANG_POP -@@ -6958,10 +7387,12 @@ _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP - # Allow CC to be a program name with arguments. --lt_save_CC="$CC" -+lt_save_CC=$CC -+lt_save_CFLAGS=$CFLAGS - lt_save_GCC=$GCC - GCC=yes - CC=${GCJ-"gcj"} -+CFLAGS=$GCJFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_TAGVAR(LD, $1)="$LD" -@@ -6992,7 +7423,8 @@ fi - AC_LANG_RESTORE +@@ -18298,6 +18994,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - GCC=$lt_save_GCC --CC="$lt_save_CC" -+CC=$lt_save_CC -+CFLAGS=$lt_save_CFLAGS - ])# _LT_LANG_GCJ_CONFIG ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir +@@ -18307,6 +19009,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks -@@ -7027,9 +7459,11 @@ _LT_LINKER_BOILERPLATE ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" -+lt_save_CFLAGS=$CFLAGS - lt_save_GCC=$GCC - GCC= - CC=${RC-"windres"} -+CFLAGS= - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) -@@ -7042,7 +7476,8 @@ fi +@@ -18421,12 +19126,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - GCC=$lt_save_GCC - AC_LANG_RESTORE --CC="$lt_save_CC" -+CC=$lt_save_CC -+CFLAGS=$lt_save_CFLAGS - ])# _LT_LANG_RC_CONFIG +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static -@@ -7101,6 +7536,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) - AC_SUBST([OBJDUMP]) - ]) +@@ -18513,9 +19218,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs -+# _LT_DECL_DLLTOOL -+# ---------------- -+# Ensure DLLTOOL variable is set. -+m4_defun([_LT_DECL_DLLTOOL], -+[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -+test -z "$DLLTOOL" && DLLTOOL=dlltool -+_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -+AC_SUBST([DLLTOOL]) -+]) +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols - # _LT_DECL_SED - # ------------ -@@ -7194,8 +7638,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], - # Try some XSI features - xsi_shell=no - ( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,, \ -+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -+ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -@@ -7234,206 +7678,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl - ])# _LT_CHECK_SHELL_FEATURES +@@ -18531,6 +19233,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec --# _LT_PROG_XSI_SHELLFNS --# --------------------- --# Bourne and XSI compatible variants of some useful shell functions. --m4_defun([_LT_PROG_XSI_SHELLFNS], --[case $xsi_shell in +@@ -18563,210 +19268,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - @@ -1569,7 +1660,7 @@ index 434530059f..e45fdc6998 100644 -# func_arith arithmetic-term... -func_arith () -{ -- func_arith_result=$(( $[*] )) +- func_arith_result=$(( $* )) -} - -# func_len string @@ -1578,27 +1669,12 @@ index 434530059f..e45fdc6998 100644 -{ - func_len_result=${#1} -} -+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -+# ------------------------------------------------------ -+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -+m4_defun([_LT_PROG_FUNCTION_REPLACE], -+[dnl { -+sed -e '/^$1 ()$/,/^} # $1 /c\ -+$1 ()\ -+{\ -+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ -+ && mv -f "$cfgfile.tmp" "$cfgfile" \ -+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -+test 0 -eq $? || _lt_function_replace_fail=: -+]) - +- -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - +- -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. @@ -1612,47 +1688,14 @@ index 434530059f..e45fdc6998 100644 - func_dirname_result="$func_dirname_result${2}" - fi -} -+# _LT_PROG_REPLACE_SHELLFNS -+# ------------------------- -+# Replace existing portable implementations of several shell functions with -+# equivalent extended shell implementations where those features are available.. -+m4_defun([_LT_PROG_REPLACE_SHELLFNS], -+[if test x"$xsi_shell" = xyes; then -+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl -+ case ${1} in -+ */*) func_dirname_result="${1%/*}${2}" ;; -+ * ) func_dirname_result="${3}" ;; -+ esac]) -+ -+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl -+ func_basename_result="${1##*/}"]) -+ -+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl -+ case ${1} in -+ */*) func_dirname_result="${1%/*}${2}" ;; -+ * ) func_dirname_result="${3}" ;; -+ esac -+ func_basename_result="${1##*/}"]) - +- -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} -+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl -+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -+ # positional parameters, so assign one to ordinary parameter first. -+ func_stripname_result=${3} -+ func_stripname_result=${func_stripname_result#"${1}"} -+ func_stripname_result=${func_stripname_result%"${2}"}]) - --dnl func_dirname_and_basename --dnl A portable version of this function is already defined in general.m4sh --dnl so there is no need for it here. -+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl -+ func_split_long_opt_name=${1%%=*} -+ func_split_long_opt_arg=${1#*=}]) - +- +- -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special @@ -1666,102 +1709,330 @@ index 434530059f..e45fdc6998 100644 - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} -+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl -+ func_split_short_opt_arg=${1#??} -+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - +- -# sed scripts: --my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' --my_sed_long_arg='1s/^-[[^=]]*=//' -+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl -+ case ${1} in -+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -+ *) func_lo2o_result=${1} ;; -+ esac]) - +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} -+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - +- -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} -+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - +- -# func_xform libobj-or-source -func_xform () -{ -- func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} -+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -+fi - +- -# func_arith arithmetic-term... -func_arith () -{ -- func_arith_result=`expr "$[@]"` +- func_arith_result=`expr "$@"` -} -+if test x"$lt_shell_append" = xyes; then -+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - +- -# func_len string -# STRING may not start with a hyphen. -func_len () -{ -- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} -+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl -+ func_quote_for_eval "${2}" -+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ -+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - +- -_LT_EOF -esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ + # Save a `func_append' function call where possible by direct use of '+=' -+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available -+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi - --case $lt_shell_append in -- yes) -- cat << \_LT_EOF >> "$cfgfile" ++ +if test x"$_lt_function_replace_fail" = x":"; then -+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi -+]) ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$[1]+=\$[2]" --} --_LT_EOF -+# _LT_PATH_CONVERSION_FUNCTIONS -+# ----------------------------- -+# Determine which file name conversion functions should be used by -+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -+# for certain cross-compile configurations and native mingw. -+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -+[AC_REQUIRE([AC_CANONICAL_HOST])dnl -+AC_REQUIRE([AC_CANONICAL_BUILD])dnl -+AC_MSG_CHECKING([how to convert $build file names to $host format]) -+AC_CACHE_VAL(lt_cv_to_host_file_cmd, -+[case $host in +diff --git a/bfd/configure.ac b/bfd/configure.ac +index c5bfbd5d129..e666b1cc106 100644 +--- a/bfd/configure.ac ++++ b/bfd/configure.ac +@@ -290,7 +290,7 @@ changequote(,)dnl + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` + changequote([,])dnl + if test -n "$x"; then +- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" ++ SHARED_LIBADD="`pwd`/../libiberty/pic/libiberty.a" + fi + + case "${host}" in +diff --git a/binutils/configure b/binutils/configure +index a8dfd4bd68c..82316496953 100755 +--- a/binutils/configure ++++ b/binutils/configure +@@ -690,8 +690,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -808,6 +811,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1485,6 +1489,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-debuginfod Enable debuginfo lookups with debuginfod + (auto/yes/no) + --with-system-zlib use installed libz +@@ -5461,8 +5467,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5502,7 +5508,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -6188,8 +6194,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6238,6 +6244,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if ${lt_cv_to_host_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys @@ -1774,18 +2045,7 @@ index 434530059f..e45fdc6998 100644 + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac - ;; -- *) -- cat << \_LT_EOF >> "$cfgfile" -- --# func_append var value --# Append VALUE to the end of shell variable VAR. --func_append () --{ -- eval "$[1]=\$$[1]\$[2]" --} -- --_LT_EOF ++ ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys @@ -1798,21 +2058,28 @@ index 434530059f..e45fdc6998 100644 + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac - ;; -- esac ++ ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac -+]) ++ ++fi ++ +to_host_file_cmd=$lt_cv_to_host_file_cmd -+AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], -+ [0], [convert $build file names to $host format])dnl ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } + -+AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -+AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -+[#assume ordinary cross tools, or native build. ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if ${lt_cv_to_tool_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) @@ -1823,1872 +2090,2296 @@ index 434530059f..e45fdc6998 100644 + esac + ;; +esac - ]) ++ ++fi ++ +to_tool_file_cmd=$lt_cv_to_tool_file_cmd -+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], -+ [0], [convert $build files to toolchain format])dnl -+])# _LT_PATH_CONVERSION_FUNCTIONS -diff --git a/ltmain.sh b/ltmain.sh -index 9503ec85d7..70e856e065 100644 ---- a/ltmain.sh -+++ b/ltmain.sh -@@ -1,10 +1,9 @@ --# Generated from ltmain.m4sh. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if ${lt_cv_ld_reload_flag+:} false; then : +@@ -6254,6 +6334,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6422,7 +6507,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6576,6 +6662,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6591,9 +6692,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown --# libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a -+# libtool (GNU libtool) 2.4 - # Written by Gordon Matzigkeit , 1996 - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, --# 2007, 2008, 2009 Free Software Foundation, Inc. -+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - # This is free software; see the source for copying conditions. There is NO - # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -@@ -38,7 +37,6 @@ - # -n, --dry-run display commands without modifying any files - # --features display basic configuration information and exit - # --mode=MODE use operation mode MODE --# --no-finish let install mode avoid finish commands - # --preserve-dup-deps don't remove duplicate dependency libraries - # --quiet, --silent don't print informational messages - # --no-quiet, --no-silent -@@ -71,17 +69,19 @@ - # compiler: $LTCC - # compiler flags: $LTCFLAGS - # linker: $LD (gnu? $with_gnu_ld) --# $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a -+# $progname: (GNU libtool) 2.4 - # automake: $automake_version - # autoconf: $autoconf_version - # - # Report bugs to . -+# GNU libtool home page: . -+# General help using GNU software: . ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_AR+:} false; then : +@@ -6609,7 +6863,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6629,11 +6883,15 @@ $as_echo "no" >&6; } + fi - PROGRAM=libtool - PACKAGE=libtool --VERSION=2.2.7a --TIMESTAMP=" 1.3134 2009-11-29" --package_revision=1.3134 -+VERSION=2.4 -+TIMESTAMP="" -+package_revision=1.3293 - # Be Bourne compatible - if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -@@ -106,9 +106,6 @@ _LTECHO_EOF' - } ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_ac_ct_AR+:} false; then : +@@ -6649,7 +6907,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6668,6 +6926,10 @@ else + $as_echo "no" >&6; } + fi - # NLS nuisances: We save the old values to restore during execute mode. --# Only set LANG and LC_ALL to C if already set. --# These must not be set unconditionally because not all systems understand --# e.g. LANG=C (notably SCO). - lt_user_locale= - lt_safe_locale= - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -@@ -121,15 +118,13 @@ do - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" - done -+LC_ALL=C -+LANGUAGE=C -+export LANGUAGE LC_ALL ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6679,12 +6941,10 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi - $lt_unset CDPATH +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} -- -- -- -- -- - # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh - # is ksh but when the shell is invoked as "sh" and the current value of - # the _XPG environment variable is not equal to 1 (one), the special -@@ -140,7 +135,7 @@ progpath="$0" +@@ -6696,6 +6956,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - : ${CP="cp -f"} --: ${ECHO=$as_echo} -+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} - : ${EGREP="/bin/grep -E"} - : ${FGREP="/bin/grep -F"} - : ${GREP="/bin/grep"} -@@ -149,7 +144,7 @@ progpath="$0" - : ${MKDIR="mkdir"} - : ${MV="mv -f"} - : ${RM="rm -f"} --: ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"} -+: ${SED="/bin/sed"} - : ${SHELL="${CONFIG_SHELL-/bin/sh}"} - : ${Xsed="$SED -e 1s/^X//"} -@@ -169,6 +164,27 @@ IFS=" $lt_nl" - dirname="s,/[^/]*$,," - basename="s,^.*/,," -+# func_dirname file append nondir_replacement -+# Compute the dirname of FILE. If nonempty, add APPEND to the result, -+# otherwise set result to NONDIR_REPLACEMENT. -+func_dirname () ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if ${lt_cv_ar_at_file+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () +{ -+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` -+ if test "X$func_dirname_result" = "X${1}"; then -+ func_dirname_result="${3}" -+ else -+ func_dirname_result="$func_dirname_result${2}" -+ fi -+} # func_dirname may be replaced by extended shell implementation + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + -+# func_basename file -+func_basename () -+{ -+ func_basename_result=`$ECHO "${1}" | $SED "$basename"` -+} # func_basename may be replaced by extended shell implementation ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } + - # func_dirname_and_basename file append nondir_replacement - # perform func_basename and func_dirname in a single function - # call: -@@ -183,17 +199,31 @@ basename="s,^.*/,," - # those functions but instead duplicate the functionality here. - func_dirname_and_basename () - { -- # Extract subdirectory from the argument. -- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` -- if test "X$func_dirname_result" = "X${1}"; then -- func_dirname_result="${3}" -- else -- func_dirname_result="$func_dirname_result${2}" -- fi -- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` --} -+ # Extract subdirectory from the argument. -+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` -+ if test "X$func_dirname_result" = "X${1}"; then -+ func_dirname_result="${3}" -+ else -+ func_dirname_result="$func_dirname_result${2}" -+ fi -+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -+} # func_dirname_and_basename may be replaced by extended shell implementation ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi + + -+# func_stripname prefix suffix name -+# strip PREFIX and SUFFIX off of NAME. -+# PREFIX and SUFFIX must not contain globbing or regex special -+# characters, hashes, percent signs, but SUFFIX may contain a leading -+# dot (in which case that matches only a dot). -+# func_strip_suffix prefix name -+func_stripname () -+{ -+ case ${2} in -+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -+ esac -+} # func_stripname may be replaced by extended shell implementation ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +@@ -7030,8 +7348,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" --# Generated shell functions inserted here. + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - # These SED scripts presuppose an absolute path with a trailing slash. - pathcar='s,^/\([^/]*\).*$,\1,' -@@ -376,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - # Same as above, but do not quote variable references. - double_quote_subst='s/\(["`\\]\)/\\\1/g' + # Handle CRLF in mingw tool chain + opt_cr= +@@ -7067,6 +7385,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" -+# Sed substitution that turns a string into a regex matching for the -+# string literally. -+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' -+ -+# Sed substitution that converts a w32 file name or path -+# which contains forward slashes, into one that contains -+# (escaped) backslashes. A very naive implementation. -+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Check to see that the pipe works correctly. + pipe_works=no +@@ -7108,6 +7427,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif + - # Re-`\' parameter expansions in output of double_quote_subst that were - # `\'-ed in input to the same. If an odd number of `\' preceded a '$' - # in input to double_quote_subst, that '$' was protected from expansion. -@@ -404,7 +443,7 @@ opt_warning=: - # name if it has been set yet. - func_echo () - { -- $ECHO "$progname${mode+: }$mode: $*" -+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*" - } + #ifdef __cplusplus + extern "C" { + #endif +@@ -7119,7 +7450,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext - # func_verbose arg... -@@ -430,14 +469,14 @@ func_echo_all () - # Echo program name prefixed message to standard error. - func_error () - { -- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; } +@@ -7145,8 +7476,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -7156,8 +7487,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -7194,6 +7525,21 @@ else + $as_echo "ok" >&6; } + fi - # func_warning arg... - # Echo program name prefixed warning message to standard error. - func_warning () - { -- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 -+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ - # bash bug again: - : -@@ -656,19 +695,35 @@ func_show_eval_locale () - fi - } -- -- -+# func_tr_sh -+# Turn $1 into a string suitable for a shell variable name. -+# Result is stored in $func_tr_sh_result. All characters -+# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -+# if $1 begins with a digit, a '_' is prepended as well. -+func_tr_sh () -+{ -+ case $1 in -+ [0-9]* | *[!a-zA-Z0-9_]*) -+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` -+ ;; -+ * ) -+ func_tr_sh_result=$1 -+ ;; -+ esac -+} + +@@ -7210,6 +7556,40 @@ fi + - # func_version - # Echo version message to standard output and exit. - func_version () - { -+ $opt_debug + - $SED -n '/(C)/!b go - :more - /\./!{ - N -- s/\n# // -+ s/\n# / / - b more - } - :go -@@ -685,7 +740,9 @@ func_version () - # Echo short help message to standard output and exit. - func_usage () - { -- $SED -n '/^# Usage:/,/^# *-h/ { -+ $opt_debug + -+ $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ -@@ -701,7 +758,10 @@ func_usage () - # unless 'noexit' is passed as argument. - func_help () - { -+ $opt_debug ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } + - $SED -n '/^# Usage:/,/# Report bugs to/ { -+ :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* -@@ -714,7 +774,11 @@ func_help () - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p -- }' < "$progpath" -+ d -+ } -+ /^# .* home page:/b print -+ /^# General help using/b print -+ ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret -@@ -726,12 +790,39 @@ func_help () - # exit_cmd. - func_missing_arg () - { -- func_error "missing argument for $1" -+ $opt_debug ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi + -+ func_error "missing argument for $1." - exit_cmd=exit - } - --exit_cmd=: - -+# func_split_short_opt shortopt -+# Set func_split_short_opt_name and func_split_short_opt_arg shell -+# variables after splitting SHORTOPT after the 2nd character. -+func_split_short_opt () -+{ -+ my_sed_short_opt='1s/^\(..\).*$/\1/;q' -+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q' -+ -+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` -+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -+} # func_split_short_opt may be replaced by extended shell implementation -+ -+ -+# func_split_long_opt longopt -+# Set func_split_long_opt_name and func_split_long_opt_arg shell -+# variables after splitting LONGOPT at the `=' sign. -+func_split_long_opt () -+{ -+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' -+ my_sed_long_arg='1s/^--[^=]*=//' + -+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` -+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -+} # func_split_long_opt may be replaced by extended shell implementation ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac + -+exit_cmd=: - ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } -@@ -741,26 +832,64 @@ magic="%%%MAGIC variable%%%" - magic_exe="%%%MAGIC EXE variable%%%" - # Global variables. --# $mode is unset - nonopt= --execute_dlfiles= - preserve_args= - lo2o="s/\\.lo\$/.${objext}/" - o2lo="s/\\.${objext}\$/.lo/" - extracted_archives= - extracted_serial=0 +@@ -7421,6 +7801,123 @@ esac --opt_dry_run=false --opt_finish=: --opt_duplicate_deps=false --opt_silent=false --opt_debug=: -- - # If this variable is set in any of the actions, the command in it - # will be execed at the end. This prevents here-documents from being - # left over by shells. - exec_cmd= + need_locks="$enable_libtool_lock" -+# func_append var value -+# Append VALUE to the end of shell variable VAR. -+func_append () -+{ -+ eval "${1}=\$${1}\${2}" -+} # func_append may be replaced by extended shell implementation ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS + -+# func_append_quoted var value -+# Quote VALUE and append to the end of shell variable VAR, separated -+# by a space. -+func_append_quoted () -+{ -+ func_quote_for_eval "${2}" -+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -+} # func_append_quoted may be replaced by extended shell implementation ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi + + -+# func_arith arithmetic-term... -+func_arith () -+{ -+ func_arith_result=`expr "${@}"` -+} # func_arith may be replaced by extended shell implementation ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS + ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi + -+# func_len string -+# STRING may not start with a hyphen. -+func_len () -+{ -+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -+} # func_len may be replaced by extended shell implementation ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi + ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if ${lt_cv_path_mainfest_tool+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi + -+# func_lo2o object -+func_lo2o () -+{ -+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -+} # func_lo2o may be replaced by extended shell implementation + + -+# func_xform libobj-or-source -+func_xform () -+{ -+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -+} # func_xform may be replaced by extended shell implementation + + - # func_fatal_configuration arg... - # Echo program name prefixed message to standard error, followed by - # a configuration failure hint, and exit. -@@ -850,130 +979,204 @@ func_enable_tag () - esac - } --# Parse options once, thoroughly. This comes as soon as possible in --# the script to make things like `libtool --version' happen quickly. -+# func_check_version_match -+# Ensure that we are using m4 macros, and libtool script from the same -+# release of libtool. -+func_check_version_match () - { -+ if test "$package_revision" != "$macro_revision"; then -+ if test "$VERSION" != "$macro_version"; then -+ if test -z "$macro_version"; then -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -+$progname: definition of this LT_INIT comes from an older release. -+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -+$progname: and run autoconf again. -+_LT_EOF -+ else -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -+$progname: and run autoconf again. -+_LT_EOF -+ fi -+ else -+ cat >&2 <<_LT_EOF -+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -+$progname: but the definition of this LT_INIT comes from revision $macro_revision. -+$progname: You should recreate aclocal.m4 with macros from revision $package_revision -+$progname: of $PACKAGE $VERSION and run autoconf again. -+_LT_EOF -+ fi + case $host_os in + rhapsody* | darwin*) +@@ -7984,6 +8481,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -8179,7 +8678,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -8268,7 +8768,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8566,8 +9066,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8733,6 +9231,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8795,7 +9299,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8852,13 +9356,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if ${lt_cv_prog_compiler_pic+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8919,6 +9427,11 @@ fi + + -- # Shorthand for --mode=foo, only valid as the first argument -- case $1 in -- clean|clea|cle|cl) -- shift; set dummy --mode clean ${1+"$@"}; shift -- ;; -- compile|compil|compi|comp|com|co|c) -- shift; set dummy --mode compile ${1+"$@"}; shift -- ;; -- execute|execut|execu|exec|exe|ex|e) -- shift; set dummy --mode execute ${1+"$@"}; shift -- ;; -- finish|finis|fini|fin|fi|f) -- shift; set dummy --mode finish ${1+"$@"}; shift -- ;; -- install|instal|insta|inst|ins|in|i) -- shift; set dummy --mode install ${1+"$@"}; shift -- ;; -- link|lin|li|l) -- shift; set dummy --mode link ${1+"$@"}; shift -- ;; -- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) -- shift; set dummy --mode uninstall ${1+"$@"}; shift -- ;; -- esac -+ exit $EXIT_MISMATCH -+ fi -+} + + -+# Shorthand for --mode=foo, only valid as the first argument -+case $1 in -+clean|clea|cle|cl) -+ shift; set dummy --mode clean ${1+"$@"}; shift -+ ;; -+compile|compil|compi|comp|com|co|c) -+ shift; set dummy --mode compile ${1+"$@"}; shift -+ ;; -+execute|execut|execu|exec|exe|ex|e) -+ shift; set dummy --mode execute ${1+"$@"}; shift -+ ;; -+finish|finis|fini|fin|fi|f) -+ shift; set dummy --mode finish ${1+"$@"}; shift -+ ;; -+install|instal|insta|inst|ins|in|i) -+ shift; set dummy --mode install ${1+"$@"}; shift -+ ;; -+link|lin|li|l) -+ shift; set dummy --mode link ${1+"$@"}; shift -+ ;; -+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) -+ shift; set dummy --mode uninstall ${1+"$@"}; shift -+ ;; -+esac - -- # Parse non-mode specific arguments: -- while test "$#" -gt 0; do + + -+# Option defaults: -+opt_debug=: -+opt_dry_run=false -+opt_config=false -+opt_preserve_dup_deps=false -+opt_features=false -+opt_finish=false -+opt_help=false -+opt_help_all=false -+opt_silent=: -+opt_verbose=: -+opt_silent=false -+opt_verbose=false -+ -+ -+# Parse options once, thoroughly. This comes as soon as possible in the -+# script to make things like `--version' happen as quickly as we can. -+{ -+ # this just eases exit handling -+ while test $# -gt 0; do - opt="$1" - shift -- - case $opt in -- --config) func_config ;; -- -- --debug) preserve_args="$preserve_args $opt" -+ --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" -- opt_debug='set -x' - $opt_debug - ;; -- -- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break -- execute_dlfiles="$execute_dlfiles $1" -- shift -+ --dry-run|--dryrun|-n) -+ opt_dry_run=: - ;; -- -- --dry-run | -n) opt_dry_run=: ;; -- --features) func_features ;; -- --finish) mode="finish" ;; -- --no-finish) opt_finish=false ;; -- -- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break -- case $1 in -- # Valid mode arguments: -- clean) ;; -- compile) ;; -- execute) ;; -- finish) ;; -- install) ;; -- link) ;; -- relink) ;; -- uninstall) ;; -- -- # Catch anything else as an error -- *) func_error "invalid argument for $opt" -- exit_cmd=exit -- break -- ;; -- esac -- -- mode="$1" -+ --config) -+ opt_config=: -+func_config -+ ;; -+ --dlopen|-dlopen) -+ optarg="$1" -+ opt_dlopen="${opt_dlopen+$opt_dlopen -+}$optarg" - shift - ;; -- - --preserve-dup-deps) -- opt_duplicate_deps=: ;; -- -- --quiet|--silent) preserve_args="$preserve_args $opt" -- opt_silent=: -- opt_verbose=false -+ opt_preserve_dup_deps=: - ;; -- -- --no-quiet|--no-silent) -- preserve_args="$preserve_args $opt" -- opt_silent=false -+ --features) -+ opt_features=: -+func_features - ;; -- -- --verbose| -v) preserve_args="$preserve_args $opt" -+ --finish) -+ opt_finish=: -+set dummy --mode finish ${1+"$@"}; shift -+ ;; -+ --help) -+ opt_help=: -+ ;; -+ --help-all) -+ opt_help_all=: -+opt_help=': help-all' -+ ;; -+ --mode) -+ test $# = 0 && func_missing_arg $opt && break -+ optarg="$1" -+ opt_mode="$optarg" -+case $optarg in -+ # Valid mode arguments: -+ clean|compile|execute|finish|install|link|relink|uninstall) ;; + -+ # Catch anything else as an error -+ *) func_error "invalid argument for $opt" -+ exit_cmd=exit -+ break -+ ;; -+esac -+ shift -+ ;; -+ --no-silent|--no-quiet) - opt_silent=false -- opt_verbose=: -+func_append preserve_args " $opt" - ;; -- -- --no-verbose) preserve_args="$preserve_args $opt" -+ --no-verbose) - opt_verbose=false -+func_append preserve_args " $opt" - ;; -- -- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break -- preserve_args="$preserve_args $opt $1" -- func_enable_tag "$1" # tagname is set here -+ --silent|--quiet) -+ opt_silent=: -+func_append preserve_args " $opt" -+ opt_verbose=false -+ ;; -+ --verbose|-v) -+ opt_verbose=: -+func_append preserve_args " $opt" -+opt_silent=false -+ ;; -+ --tag) -+ test $# = 0 && func_missing_arg $opt && break -+ optarg="$1" -+ opt_tag="$optarg" -+func_append preserve_args " $opt $optarg" -+func_enable_tag "$optarg" - shift - ;; + # + # Check to make sure the static flag actually works. + # +@@ -9269,7 +9782,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' -+ -\?|-h) func_usage ;; -+ --help) func_help ;; -+ --version) func_version ;; -+ - # Separate optargs to long options: -- -dlopen=*|--mode=*|--tag=*) -- func_opt_split "$opt" -- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} -+ --*=*) -+ func_split_long_opt "$opt" -+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9368,12 +9882,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9387,8 +9901,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; -- -\?|-h) func_usage ;; -- --help) opt_help=: ;; -- --help-all) opt_help=': help-all' ;; -- --version) func_version ;; -- -- -*) func_fatal_help "unrecognized option \`$opt'" ;; -- -- *) nonopt="$opt" -- break -+ # Separate non-argument short options: -+ -\?*|-h*|-n*|-v*) -+ func_split_short_opt "$opt" -+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} -+ shift - ;; -+ -+ --) break ;; -+ -*) func_fatal_help "unrecognized option \`$opt'" ;; -+ *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done +@@ -9406,8 +9920,8 @@ _LT_EOF -+ # Validate options: -+ -+ # save first non-option argument -+ if test "$#" -gt 0; then -+ nonopt="$opt" -+ shift -+ fi -+ -+ # preserve --debug -+ test "$opt_debug" = : || func_append preserve_args " --debug" + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9453,8 +9967,8 @@ _LT_EOF - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* ) -@@ -981,82 +1184,44 @@ func_enable_tag () - opt_duplicate_compiler_generated_deps=: - ;; *) -- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps -+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9584,7 +10098,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ -- # Having warned about all mis-specified options, bail out if -- # anything was wrong. -- $exit_cmd $EXIT_FAILURE --} -+ $opt_help || { -+ # Sanity checks first: -+ func_check_version_match - --# func_check_version_match --# Ensure that we are using m4 macros, and libtool script from the same --# release of libtool. --func_check_version_match () --{ -- if test "$package_revision" != "$macro_revision"; then -- if test "$VERSION" != "$macro_version"; then -- if test -z "$macro_version"; then -- cat >&2 <<_LT_EOF --$progname: Version mismatch error. This is $PACKAGE $VERSION, but the --$progname: definition of this LT_INIT comes from an older release. --$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION --$progname: and run autoconf again. --_LT_EOF -- else -- cat >&2 <<_LT_EOF --$progname: Version mismatch error. This is $PACKAGE $VERSION, but the --$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. --$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION --$progname: and run autoconf again. --_LT_EOF -- fi -- else -- cat >&2 <<_LT_EOF --$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, --$progname: but the definition of this LT_INIT comes from revision $macro_revision. --$progname: You should recreate aclocal.m4 with macros from revision $package_revision --$progname: of $PACKAGE $VERSION and run autoconf again. --_LT_EOF -+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then -+ func_fatal_configuration "not configured to build any kind of library" - fi + int +@@ -9597,22 +10117,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : -- exit $EXIT_MISMATCH -- fi --} -- -+ # Darwin sucks -+ eval std_shrext=\"$shrext_cmds\" +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi --## ----------- ## --## Main. ## --## ----------- ## -- --$opt_help || { -- # Sanity checks first: -- func_check_version_match -- -- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then -- func_fatal_configuration "not configured to build any kind of library" -- fi -+ # Only execute mode is allowed to have -dlopen flags. -+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then -+ func_error "unrecognized option \`-dlopen'" -+ $ECHO "$help" 1>&2 -+ exit $EXIT_FAILURE -+ fi + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9624,7 +10151,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ -- test -z "$mode" && func_fatal_error "error: you must specify a MODE." -+ # Change the help message to a mode-specific one. -+ generic_help="$help" -+ help="Try \`$progname --help --mode=$opt_mode' for more information." -+ } + int +@@ -9637,22 +10170,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi -- # Darwin sucks -- eval "std_shrext=\"$shrext_cmds\"" -+ # Bail if the options were screwed -+ $exit_cmd $EXIT_FAILURE -+} + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9697,20 +10237,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + darwin* | rhapsody*) +@@ -9771,7 +10354,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -- # Only execute mode is allowed to have -dlopen flags. -- if test -n "$execute_dlfiles" && test "$mode" != execute; then -- func_error "unrecognized option \`-dlopen'" -- $ECHO "$help" 1>&2 -- exit $EXIT_FAILURE -- fi + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9779,7 +10362,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -- # Change the help message to a mode-specific one. -- generic_help="$help" -- help="Try \`$progname --help --mode=$mode' for more information." --} + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -9795,7 +10378,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -+## ----------- ## -+## Main. ## -+## ----------- ## + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9819,10 +10402,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9901,23 +10484,36 @@ fi - # func_lalib_p file - # True iff FILE is a libtool `.la' library or `.lo' object file. -@@ -1121,12 +1286,9 @@ func_ltwrapper_executable_p () - # temporary ltwrapper_script. - func_ltwrapper_scriptname () - { -- func_ltwrapper_scriptname_result="" -- if func_ltwrapper_executable_p "$1"; then -- func_dirname_and_basename "$1" "" "." -- func_stripname '' '.exe' "$func_basename_result" -- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" -- fi -+ func_dirname_and_basename "$1" "" "." -+ func_stripname '' '.exe' "$func_basename_result" -+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - } + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if ${lt_cv_irix_exported_symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -10002,7 +10598,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -10021,9 +10617,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10599,8 +11195,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no - # func_ltwrapper_p file -@@ -1149,7 +1311,7 @@ func_execute_cmds () - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs -- eval "cmd=\"$cmd\"" -+ eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -@@ -1172,6 +1334,37 @@ func_source () - } +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10633,13 +11230,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10731,7 +11386,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; -+# func_resolve_sysroot PATH -+# Replace a leading = in PATH with a sysroot. Store the result into -+# func_resolve_sysroot_result -+func_resolve_sysroot () -+{ -+ func_resolve_sysroot_result=$1 -+ case $func_resolve_sysroot_result in -+ =*) -+ func_stripname '=' '' "$func_resolve_sysroot_result" -+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result -+ ;; -+ esac -+} +@@ -11527,7 +12182,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11530 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11571,10 +12226,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11633,7 +12288,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11636 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11677,10 +12332,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -16024,13 +16679,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -16045,14 +16707,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -16085,12 +16750,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -16145,8 +16810,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -16156,12 +16826,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -16177,7 +16849,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -16213,6 +16884,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -16979,7 +17651,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -17082,19 +17755,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd + -+# func_replace_sysroot PATH -+# If PATH begins with the sysroot, replace it with = and -+# store the result into func_replace_sysroot_result. -+func_replace_sysroot () -+{ -+ case "$lt_sysroot:$1" in -+ ?*:"$lt_sysroot"*) -+ func_stripname "$lt_sysroot" '' "$1" -+ func_replace_sysroot_result="=$func_stripname_result" -+ ;; -+ *) -+ # Including no sysroot. -+ func_replace_sysroot_result=$1 -+ ;; -+ esac -+} ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd + - # func_infer_tag arg - # Infer tagged configuration to use if any are available and - # if one wasn't chosen via the "--tag" command line option. -@@ -1184,8 +1377,7 @@ func_infer_tag () - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do -- func_quote_for_eval "$arg" -- CC_quoted="$CC_quoted $func_quote_for_eval_result" -+ func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` -@@ -1204,8 +1396,7 @@ func_infer_tag () - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. -- func_quote_for_eval "$arg" -- CC_quoted="$CC_quoted $func_quote_for_eval_result" -+ func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` -@@ -1274,6 +1465,486 @@ EOF - } - } + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob + -+################################################## -+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # -+################################################## ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob + -+# func_convert_core_file_wine_to_w32 ARG -+# Helper function used by file name conversion functions when $build is *nix, -+# and $host is mingw, cygwin, or some other w32 environment. Relies on a -+# correctly configured wine environment available, with the winepath program -+# in $build's $PATH. -+# -+# ARG is the $build file name to be converted to w32 format. -+# Result is available in $func_convert_core_file_wine_to_w32_result, and will -+# be empty on error (or when ARG is empty) -+func_convert_core_file_wine_to_w32 () -+{ -+ $opt_debug -+ func_convert_core_file_wine_to_w32_result="$1" -+ if test -n "$1"; then -+ # Unfortunately, winepath does not exit with a non-zero error code, so we -+ # are forced to check the contents of stdout. On the other hand, if the -+ # command is not found, the shell will set an exit code of 127 and print -+ # *an error message* to stdout. So we must check for both error code of -+ # zero AND non-empty stdout, which explains the odd construction: -+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` -+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then -+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | -+ $SED -e "$lt_sed_naive_backslashify"` -+ else -+ func_convert_core_file_wine_to_w32_result= -+ fi -+ fi -+} -+# end: func_convert_core_file_wine_to_w32 ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL + ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + -+# func_convert_core_path_wine_to_w32 ARG -+# Helper function used by path conversion functions when $build is *nix, and -+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -+# configured wine environment available, with the winepath program in $build's -+# $PATH. Assumes ARG has no leading or trailing path separator characters. -+# -+# ARG is path to be converted from $build format to win32. -+# Result is available in $func_convert_core_path_wine_to_w32_result. -+# Unconvertible file (directory) names in ARG are skipped; if no directory names -+# are convertible, then the result may be empty. -+func_convert_core_path_wine_to_w32 () -+{ -+ $opt_debug -+ # unfortunately, winepath doesn't convert paths, only file names -+ func_convert_core_path_wine_to_w32_result="" -+ if test -n "$1"; then -+ oldIFS=$IFS -+ IFS=: -+ for func_convert_core_path_wine_to_w32_f in $1; do -+ IFS=$oldIFS -+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" -+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then -+ if test -z "$func_convert_core_path_wine_to_w32_result"; then -+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" -+ else -+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" -+ fi -+ fi -+ done -+ IFS=$oldIFS -+ fi -+} -+# end: func_convert_core_path_wine_to_w32 -+ -+ -+# func_cygpath ARGS... -+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -+# (2), returns the Cygwin file name or path in func_cygpath_result (input -+# file name or path is assumed to be in w32 format, as previously converted -+# from $build's *nix or MSYS format). In case (3), returns the w32 file name -+# or path in func_cygpath_result (input file name or path is assumed to be in -+# Cygwin format). Returns an empty string on error. -+# -+# ARGS are passed to cygpath, with the last one being the file name or path to -+# be converted. -+# -+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -+# environment variable; do not put it in $PATH. -+func_cygpath () -+{ -+ $opt_debug -+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then -+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` -+ if test "$?" -ne 0; then -+ # on failure, ensure result is empty -+ func_cygpath_result= -+ fi -+ else -+ func_cygpath_result= -+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" -+ fi -+} -+#end: func_cygpath -+ -+ -+# func_convert_core_msys_to_w32 ARG -+# Convert file name or path ARG from MSYS format to w32 format. Return -+# result in func_convert_core_msys_to_w32_result. -+func_convert_core_msys_to_w32 () -+{ -+ $opt_debug -+ # awkward: cmd appends spaces to result -+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | -+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -+} -+#end: func_convert_core_msys_to_w32 -+ -+ -+# func_convert_file_check ARG1 ARG2 -+# Verify that ARG1 (a file name in $build format) was converted to $host -+# format in ARG2. Otherwise, emit an error message, but continue (resetting -+# func_to_host_file_result to ARG1). -+func_convert_file_check () -+{ -+ $opt_debug -+ if test -z "$2" && test -n "$1" ; then -+ func_error "Could not determine host file name corresponding to" -+ func_error " \`$1'" -+ func_error "Continuing, but uninstalled executables may not work." -+ # Fallback: -+ func_to_host_file_result="$1" -+ fi -+} -+# end func_convert_file_check -+ -+ -+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -+# Verify that FROM_PATH (a path in $build format) was converted to $host -+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -+# func_to_host_file_result to a simplistic fallback value (see below). -+func_convert_path_check () -+{ -+ $opt_debug -+ if test -z "$4" && test -n "$3"; then -+ func_error "Could not determine the host path corresponding to" -+ func_error " \`$3'" -+ func_error "Continuing, but uninstalled executables may not work." -+ # Fallback. This is a deliberately simplistic "conversion" and -+ # should not be "improved". See libtool.info. -+ if test "x$1" != "x$2"; then -+ lt_replace_pathsep_chars="s|$1|$2|g" -+ func_to_host_path_result=`echo "$3" | -+ $SED -e "$lt_replace_pathsep_chars"` -+ else -+ func_to_host_path_result="$3" -+ fi -+ fi -+} -+# end func_convert_path_check -+ -+ -+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -+# and appending REPL if ORIG matches BACKPAT. -+func_convert_path_front_back_pathsep () -+{ -+ $opt_debug -+ case $4 in -+ $1 ) func_to_host_path_result="$3$func_to_host_path_result" -+ ;; -+ esac -+ case $4 in -+ $2 ) func_append func_to_host_path_result "$3" -+ ;; -+ esac -+} -+# end func_convert_path_front_back_pathsep -+ -+ -+################################################## -+# $build to $host FILE NAME CONVERSION FUNCTIONS # -+################################################## -+# invoked via `$to_host_file_cmd ARG' -+# -+# In each case, ARG is the path to be converted from $build to $host format. -+# Result will be available in $func_to_host_file_result. -+ -+ -+# func_to_host_file ARG -+# Converts the file name ARG from $build format to $host format. Return result -+# in func_to_host_file_result. -+func_to_host_file () -+{ -+ $opt_debug -+ $to_host_file_cmd "$1" -+} -+# end func_to_host_file -+ -+ -+# func_to_tool_file ARG LAZY -+# converts the file name ARG from $build format to toolchain format. Return -+# result in func_to_tool_file_result. If the conversion in use is listed -+# in (the comma separated) LAZY, no conversion takes place. -+func_to_tool_file () -+{ -+ $opt_debug -+ case ,$2, in -+ *,"$to_tool_file_cmd",*) -+ func_to_tool_file_result=$1 -+ ;; -+ *) -+ $to_tool_file_cmd "$1" -+ func_to_tool_file_result=$func_to_host_file_result -+ ;; -+ esac -+} -+# end func_to_tool_file -+ -+ -+# func_convert_file_noop ARG -+# Copy ARG to func_to_host_file_result. -+func_convert_file_noop () -+{ -+ func_to_host_file_result="$1" -+} -+# end func_convert_file_noop -+ -+ -+# func_convert_file_msys_to_w32 ARG -+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -+# conversion to w32 is not available inside the cwrapper. Returns result in -+# func_to_host_file_result. -+func_convert_file_msys_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_msys_to_w32 "$1" -+ func_to_host_file_result="$func_convert_core_msys_to_w32_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_msys_to_w32 -+ -+ -+# func_convert_file_cygwin_to_w32 ARG -+# Convert file name ARG from Cygwin to w32 format. Returns result in -+# func_to_host_file_result. -+func_convert_file_cygwin_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use -+ # LT_CYGPATH in this case. -+ func_to_host_file_result=`cygpath -m "$1"` -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_cygwin_to_w32 -+ + # The archiver. + AR=$lt_AR + -+# func_convert_file_nix_to_w32 ARG -+# Convert file name ARG from *nix to w32 format. Requires a wine environment -+# and a working winepath. Returns result in func_to_host_file_result. -+func_convert_file_nix_to_w32 () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_file_wine_to_w32 "$1" -+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_nix_to_w32 ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec + + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -17124,6 +17820,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec + -+# func_convert_file_msys_to_cygwin ARG -+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -+# Returns result in func_to_host_file_result. -+func_convert_file_msys_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ func_convert_core_msys_to_w32 "$1" -+ func_cygpath -u "$func_convert_core_msys_to_w32_result" -+ func_to_host_file_result="$func_cygpath_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_msys_to_cygwin ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot + + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -17133,6 +17835,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL + -+# func_convert_file_nix_to_cygwin ARG -+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -+# in func_to_host_file_result. -+func_convert_file_nix_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_file_result="$1" -+ if test -n "$1"; then -+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. -+ func_convert_core_file_wine_to_w32 "$1" -+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result" -+ func_to_host_file_result="$func_cygpath_result" -+ fi -+ func_convert_file_check "$1" "$func_to_host_file_result" -+} -+# end func_convert_file_nix_to_cygwin + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -17247,12 +17952,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl + + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -17339,9 +18044,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -17357,6 +18059,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds + -+############################################# -+# $build to $host PATH CONVERSION FUNCTIONS # -+############################################# -+# invoked via `$to_host_path_cmd ARG' -+# -+# In each case, ARG is the path to be converted from $build to $host format. -+# The result will be available in $func_to_host_path_result. -+# -+# Path separators are also converted from $build format to $host format. If -+# ARG begins or ends with a path separator character, it is preserved (but -+# converted to $host format) on output. -+# -+# All path conversion functions are named using the following convention: -+# file name conversion function : func_convert_file_X_to_Y () -+# path conversion function : func_convert_path_X_to_Y () -+# where, for any given $build/$host combination the 'X_to_Y' value is the -+# same. If conversion functions are added for new $build/$host combinations, -+# the two new functions must follow this pattern, or func_init_to_host_path_cmd -+# will break. + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -17389,210 +18094,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: + -+# func_init_to_host_path_cmd -+# Ensures that function "pointer" variable $to_host_path_cmd is set to the -+# appropriate value, based on the value of $to_host_file_cmd. -+to_host_path_cmd= -+func_init_to_host_path_cmd () -+{ -+ $opt_debug -+ if test -z "$to_host_path_cmd"; then -+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd" -+ to_host_path_cmd="func_convert_path_${func_stripname_result}" -+ fi -+} + ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: + -+# func_to_host_path ARG -+# Converts the path ARG from $build format to $host format. Return result -+# in func_to_host_path_result. -+func_to_host_path () -+{ -+ $opt_debug -+ func_init_to_host_path_cmd -+ $to_host_path_cmd "$1" -+} -+# end func_to_host_path + ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: + -+# func_convert_path_noop ARG -+# Copy ARG to func_to_host_path_result. -+func_convert_path_noop () -+{ -+ func_to_host_path_result="$1" -+} -+# end func_convert_path_noop + ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: + -+# func_convert_path_msys_to_w32 ARG -+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -+# conversion to w32 is not available inside the cwrapper. Returns result in -+# func_to_host_path_result. -+func_convert_path_msys_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # Remove leading and trailing path separator characters from ARG. MSYS -+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; -+ # and winepath ignores them completely. -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" -+ func_to_host_path_result="$func_convert_core_msys_to_w32_result" -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_msys_to_w32 + ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: + -+# func_convert_path_cygwin_to_w32 ARG -+# Convert path ARG from Cygwin to w32 format. Returns result in -+# func_to_host_file_result. -+func_convert_path_cygwin_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_cygwin_to_w32 + ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: + -+# func_convert_path_nix_to_w32 ARG -+# Convert path ARG from *nix to w32 format. Requires a wine environment and -+# a working winepath. Returns result in func_to_host_file_result. -+func_convert_path_nix_to_w32 () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" -+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" -+ func_convert_path_check : ";" \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" -+ fi -+} -+# end func_convert_path_nix_to_w32 + ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: + -+# func_convert_path_msys_to_cygwin ARG -+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -+# Returns result in func_to_host_file_result. -+func_convert_path_msys_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # See func_convert_path_msys_to_w32: -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" -+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result" -+ func_to_host_path_result="$func_cygpath_result" -+ func_convert_path_check : : \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" : "$1" -+ fi -+} -+# end func_convert_path_msys_to_cygwin + ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: + -+# func_convert_path_nix_to_cygwin ARG -+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -+# func_to_host_file_result. -+func_convert_path_nix_to_cygwin () -+{ -+ $opt_debug -+ func_to_host_path_result="$1" -+ if test -n "$1"; then -+ # Remove leading and trailing path separator characters from -+ # ARG. msys behavior is inconsistent here, cygpath turns them -+ # into '.;' and ';.', and winepath ignores them completely. -+ func_stripname : : "$1" -+ func_to_host_path_tmp1=$func_stripname_result -+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" -+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" -+ func_to_host_path_result="$func_cygpath_result" -+ func_convert_path_check : : \ -+ "$func_to_host_path_tmp1" "$func_to_host_path_result" -+ func_convert_path_front_back_pathsep ":*" "*:" : "$1" -+ fi -+} -+# end func_convert_path_nix_to_cygwin ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: + + - # func_mode_compile arg... - func_mode_compile () - { -@@ -1314,12 +1985,12 @@ func_mode_compile () - ;; - - -pie | -fpie | -fPIE) -- pie_flag="$pie_flag $arg" -+ func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) -- later="$later $arg" -+ func_append later " $arg" - continue - ;; - -@@ -1340,15 +2011,14 @@ func_mode_compile () - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" -- func_quote_for_eval "$arg" -- lastarg="$lastarg $func_quote_for_eval_result" -+ func_append_quoted lastarg "$arg" - done - IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. -- base_compile="$base_compile $lastarg" -+ func_append base_compile " $lastarg" - continue - ;; - -@@ -1364,8 +2034,7 @@ func_mode_compile () - esac # case $arg_mode ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" - # Aesthetically quote the previous argument. -- func_quote_for_eval "$lastarg" -- base_compile="$base_compile $func_quote_for_eval_result" -+ func_append_quoted base_compile "$lastarg" - done # for arg +diff --git a/gas/configure b/gas/configure +index 60c1a055ae2..0e0ce4c0e23 100755 +--- a/gas/configure ++++ b/gas/configure +@@ -681,8 +681,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -799,6 +802,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1490,6 +1494,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-cpu=CPU default cpu variant is CPU (currently only supported + on ARC) + --with-system-zlib use installed libz +@@ -5277,8 +5283,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' - case $arg_mode in -@@ -1496,17 +2165,16 @@ compiler." - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi -- removelist="$removelist $output_obj" -+ func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - $opt_dry_run || $RM $removelist -- removelist="$removelist $lockfile" -+ func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 -- if test -n "$fix_srcfile_path"; then -- eval "srcfile=\"$fix_srcfile_path\"" -- fi -+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 -+ srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result +@@ -5318,7 +5324,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -6004,8 +6010,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6054,6 +6060,80 @@ esac -@@ -1526,7 +2194,7 @@ compiler." - if test -z "$output_obj"; then - # Place PIC objects in $objdir -- command="$command -o $lobj" -+ func_append command " -o $lobj" - fi - func_show_eval_locale "$command" \ -@@ -1573,11 +2241,11 @@ compiler." - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then -- command="$command -o $obj" -+ func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. -- command="$command$suppress_output" -+ func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - -@@ -1622,13 +2290,13 @@ compiler." - } - - $opt_help || { -- test "$mode" = compile && func_mode_compile ${1+"$@"} -+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"} - } - - func_mode_help () - { - # We need to display help for each of the modes. -- case $mode in -+ case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. -@@ -1659,8 +2327,8 @@ This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes -- -prefer-pic try to building PIC objects only -- -prefer-non-pic try to building non-PIC objects only -+ -prefer-pic try to build PIC objects only -+ -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler -@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted using RM." - ;; - - *) -- func_fatal_help "invalid operation mode \`$mode'" -+ func_fatal_help "invalid operation mode \`$opt_mode'" - ;; - esac - -@@ -1819,13 +2487,13 @@ if $opt_help; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if ${lt_cv_to_host_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if ${lt_cv_to_tool_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if ${lt_cv_ld_reload_flag+:} false; then : +@@ -6070,6 +6150,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6238,7 +6323,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' else - { - func_help noexit -- for mode in compile link execute install finish uninstall clean; do -+ for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit -- for mode in compile link execute install finish uninstall clean; do -+ for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done -@@ -1854,13 +2522,16 @@ func_mode_execute () - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. -- for file in $execute_dlfiles; do -+ for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) -+ func_resolve_sysroot "$file" -+ file=$func_resolve_sysroot_result +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6392,6 +6478,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } + - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" -@@ -1882,7 +2553,7 @@ func_mode_execute () - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then -- dir="$dir/$objdir" -+ func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" -@@ -1907,10 +2578,10 @@ func_mode_execute () - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. -- if eval test -z \"\$$shlibpath_var\"; then -- eval $shlibpath_var=\$dir -+ if eval "test -z \"\$$shlibpath_var\""; then -+ eval "$shlibpath_var=\"\$dir\"" - else -- eval $shlibpath_var=\$dir:\$$shlibpath_var -+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - -@@ -1939,8 +2610,7 @@ func_mode_execute () - ;; - esac - # Quote arguments (to preserve shell metacharacters). -- func_quote_for_eval "$file" -- args="$args $func_quote_for_eval_result" -+ func_append_quoted args "$file" - done - - if test "X$opt_dry_run" = Xfalse; then -@@ -1972,22 +2642,59 @@ func_mode_execute () - fi - } - --test "$mode" = execute && func_mode_execute ${1+"$@"} -+test "$opt_mode" = execute && func_mode_execute ${1+"$@"} - ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6407,9 +6508,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown - # func_mode_finish arg... - func_mode_finish () - { - $opt_debug -- libdirs="$nonopt" -+ libs= -+ libdirs= - admincmds= -- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -- for dir -- do -- libdirs="$libdirs $dir" -- done -+ for opt in "$nonopt" ${1+"$@"} -+ do -+ if test -d "$opt"; then -+ func_append libdirs " $opt" -+ elif test -f "$opt"; then -+ if func_lalib_unsafe_p "$opt"; then -+ func_append libs " $opt" -+ else -+ func_warning "\`$opt' is not a valid libtool archive" -+ fi + -+ else -+ func_fatal_error "invalid argument \`$opt'" -+ fi -+ done + -+ if test -n "$libs"; then -+ if test -n "$lt_sysroot"; then -+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` -+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" -+ else -+ sysroot_cmd= -+ fi + -+ # Remove sysroot references -+ if $opt_dry_run; then -+ for lib in $libs; do -+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib" -+ done -+ else -+ tmpdir=`func_mktempdir` -+ for lib in $libs; do -+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ -+ > $tmpdir/tmp-la -+ mv -f $tmpdir/tmp-la $lib -+ done -+ ${RM}r "$tmpdir" -+ fi -+ fi + -+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. -@@ -1997,7 +2704,7 @@ func_mode_finish () - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" -- $opt_dry_run || eval "$cmds" || admincmds="$admincmds -+ $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done -@@ -2006,53 +2713,55 @@ func_mode_finish () - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_AR+:} false; then : +@@ -6425,7 +6679,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6445,11 +6699,15 @@ $as_echo "no" >&6; } + fi -- echo "----------------------------------------------------------------------" -- echo "Libraries have been installed in:" -- for libdir in $libdirs; do -- $ECHO " $libdir" -- done -- echo -- echo "If you ever happen to want to link against installed libraries" -- echo "in a given directory, LIBDIR, you must either use libtool, and" -- echo "specify the full pathname of the library, or use the \`-LLIBDIR'" -- echo "flag during linking and do at least one of the following:" -- if test -n "$shlibpath_var"; then -- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -- echo " during execution" -- fi -- if test -n "$runpath_var"; then -- echo " - add LIBDIR to the \`$runpath_var' environment variable" -- echo " during linking" -- fi -- if test -n "$hardcode_libdir_flag_spec"; then -- libdir=LIBDIR -- eval "flag=\"$hardcode_libdir_flag_spec\"" -+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -+ echo "----------------------------------------------------------------------" -+ echo "Libraries have been installed in:" -+ for libdir in $libdirs; do -+ $ECHO " $libdir" -+ done -+ echo -+ echo "If you ever happen to want to link against installed libraries" -+ echo "in a given directory, LIBDIR, you must either use libtool, and" -+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'" -+ echo "flag during linking and do at least one of the following:" -+ if test -n "$shlibpath_var"; then -+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -+ echo " during execution" -+ fi -+ if test -n "$runpath_var"; then -+ echo " - add LIBDIR to the \`$runpath_var' environment variable" -+ echo " during linking" -+ fi -+ if test -n "$hardcode_libdir_flag_spec"; then -+ libdir=LIBDIR -+ eval flag=\"$hardcode_libdir_flag_spec\" -- $ECHO " - use the \`$flag' linker flag" -- fi -- if test -n "$admincmds"; then -- $ECHO " - have your system administrator run these commands:$admincmds" -- fi -- if test -f /etc/ld.so.conf; then -- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -- fi -- echo -+ $ECHO " - use the \`$flag' linker flag" -+ fi -+ if test -n "$admincmds"; then -+ $ECHO " - have your system administrator run these commands:$admincmds" -+ fi -+ if test -f /etc/ld.so.conf; then -+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -+ fi -+ echo ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_ac_ct_AR+:} false; then : +@@ -6465,7 +6723,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6484,6 +6742,10 @@ else + $as_echo "no" >&6; } + fi -- echo "See any operating system documentation about shared libraries for" -- case $host in -- solaris2.[6789]|solaris2.1[0-9]) -- echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" -- echo "pages." -- ;; -- *) -- echo "more information, such as the ld(1) and ld.so(8) manual pages." -- ;; -- esac -- echo "----------------------------------------------------------------------" -+ echo "See any operating system documentation about shared libraries for" -+ case $host in -+ solaris2.[6789]|solaris2.1[0-9]) -+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" -+ echo "pages." -+ ;; -+ *) -+ echo "more information, such as the ld(1) and ld.so(8) manual pages." -+ ;; -+ esac -+ echo "----------------------------------------------------------------------" -+ fi - exit $EXIT_SUCCESS - } ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6495,12 +6757,10 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi --test "$mode" = finish && func_mode_finish ${1+"$@"} -+test "$opt_mode" = finish && func_mode_finish ${1+"$@"} +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} - # func_mode_install arg... -@@ -2077,7 +2786,7 @@ func_mode_install () - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" -- install_prog="$install_prog$func_quote_for_eval_result" -+ func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; -@@ -2097,7 +2806,7 @@ func_mode_install () - do - arg2= - if test -n "$dest"; then -- files="$files $dest" -+ func_append files " $dest" - dest=$arg - continue - fi -@@ -2135,11 +2844,11 @@ func_mode_install () - # Aesthetically quote the argument. - func_quote_for_eval "$arg" -- install_prog="$install_prog $func_quote_for_eval_result" -+ func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi -- install_shared_prog="$install_shared_prog $func_quote_for_eval_result" -+ func_append install_shared_prog " $func_quote_for_eval_result" - done +@@ -6512,6 +6772,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru - test -z "$install_prog" && \ -@@ -2151,7 +2860,7 @@ func_mode_install () - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" -- install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" -+ func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi -@@ -2209,10 +2918,13 @@ func_mode_install () - case $file in - *.$libext) - # Do the static libraries later. -- staticlibs="$staticlibs $file" -+ func_append staticlibs " $file" - ;; - *.la) -+ func_resolve_sysroot "$file" -+ file=$func_resolve_sysroot_result ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if ${lt_cv_ar_at_file+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" -@@ -2226,23 +2938,30 @@ func_mode_install () - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; -- *) current_libdirs="$current_libdirs $libdir" ;; -+ *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; -- *) future_libdirs="$future_libdirs $libdir" ;; -+ *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" -- dir="$dir$objdir" -+ func_append dir "$objdir" - - if test -n "$relink_command"; then -+ # Strip any trailing slash from the destination. -+ func_stripname '' '/' "$libdir" -+ destlibdir=$func_stripname_result ++int ++main () ++{ + -+ func_stripname '' '/' "$destdir" -+ s_destdir=$func_stripname_result ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + - # Determine the prefix the user has applied to our future dir. -- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` -+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that -@@ -2315,7 +3034,7 @@ func_mode_install () - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. -- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" -+ test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) -@@ -2503,7 +3222,7 @@ func_mode_install () - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - -- if test -n "$current_libdirs" && $opt_finish; then -+ if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' -@@ -2512,7 +3231,7 @@ func_mode_install () - fi - } - --test "$mode" = install && func_mode_install ${1+"$@"} -+test "$opt_mode" = install && func_mode_install ${1+"$@"} ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +@@ -6846,8 +7164,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - # func_generate_dlsyms outputname originator pic_p -@@ -2559,6 +3278,18 @@ extern \"C\" { - #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" - #endif + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6883,6 +7201,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6924,6 +7243,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime @@ -3701,1309 +4392,12821 @@ index 9503ec85d7..70e856e065 100644 +# define LT_DLSYM_CONST const +#endif + - /* External symbol declarations for the compiler. */\ - " - -@@ -2570,21 +3301,22 @@ extern \"C\" { - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do -- func_verbose "extracting global C symbols from \`$progfile'" -- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" -+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32 -+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" -+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done + #ifdef __cplusplus + extern "C" { + #endif +@@ -6935,7 +7266,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext - if test -n "$exclude_expsyms"; then - $opt_dry_run || { -- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T -- $MV "$nlist"T "$nlist" -+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' - } + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6961,8 +7292,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6972,8 +7303,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -7010,6 +7341,21 @@ else + $as_echo "ok" >&6; } + fi - if test -n "$export_symbols_regex"; then - $opt_dry_run || { -- $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T -- $MV "$nlist"T "$nlist" -+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' - } - fi ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ ++ ++ -@@ -2593,23 +3325,23 @@ extern \"C\" { - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols -- ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols" -+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) -- echo EXPORTS > "$output_objdir/$outputname.def" -- cat "$export_symbols" >> "$output_objdir/$outputname.def" -+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { -- ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp" -- $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T -- $MV "$nlist"T "$nlist" -+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' -+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' -+ eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) -- echo EXPORTS > "$output_objdir/$outputname.def" -- cat "$nlist" >> "$output_objdir/$outputname.def" -+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } -@@ -2620,10 +3352,52 @@ extern \"C\" { - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" -- $opt_dry_run || { -- $ECHO ": $name " >> "$nlist" -- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" -- } -+ case $host in -+ *cygwin* | *mingw* | *cegcc* ) -+ # if an import library, we need to obtain dlname -+ if func_win32_import_lib_p "$dlprefile"; then -+ func_tr_sh "$dlprefile" -+ eval "curr_lafile=\$libfile_$func_tr_sh_result" -+ dlprefile_dlbasename="" -+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then -+ # Use subshell, to avoid clobbering current variable values -+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` -+ if test -n "$dlprefile_dlname" ; then -+ func_basename "$dlprefile_dlname" -+ dlprefile_dlbasename="$func_basename_result" -+ else -+ # no lafile. user explicitly requested -dlpreopen . -+ $sharedlib_from_linklib_cmd "$dlprefile" -+ dlprefile_dlbasename=$sharedlib_from_linklib_result -+ fi -+ fi -+ $opt_dry_run || { -+ if test -n "$dlprefile_dlbasename" ; then -+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' -+ else -+ func_warning "Could not compute DLL name from $name" -+ eval '$ECHO ": $name " >> "$nlist"' -+ fi -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | -+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" -+ } -+ else # not an import lib -+ $opt_dry_run || { -+ eval '$ECHO ": $name " >> "$nlist"' -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" -+ } -+ fi -+ ;; -+ *) -+ $opt_dry_run || { -+ eval '$ECHO ": $name " >> "$nlist"' -+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 -+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" -+ } -+ ;; -+ esac - done - $opt_dry_run || { -@@ -2661,26 +3435,9 @@ typedef struct { - const char *name; - void *address; - } lt_dlsymlist; --" -- case $host in -- *cygwin* | *mingw* | *cegcc* ) -- echo >> "$output_objdir/$my_dlsyms" "\ --/* DATA imports from DLLs on WIN32 con't be const, because -- runtime relocations are performed -- see ld's documentation -- on pseudo-relocs. */" -- lt_dlsym_const= ;; -- *osf5*) -- echo >> "$output_objdir/$my_dlsyms" "\ --/* This system does not cope well with relocations in const data */" -- lt_dlsym_const= ;; -- *) -- lt_dlsym_const=const ;; -- esac -- -- echo >> "$output_objdir/$my_dlsyms" "\ --extern $lt_dlsym_const lt_dlsymlist -+extern LT_DLSYM_CONST lt_dlsymlist - lt_${my_prefix}_LTX_preloaded_symbols[]; --$lt_dlsym_const lt_dlsymlist -+LT_DLSYM_CONST lt_dlsymlist - lt_${my_prefix}_LTX_preloaded_symbols[] = - {\ - { \"$my_originator\", (void *) 0 }," -@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup() { - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; -- *) symtab_cflags="$symtab_cflags $arg" ;; -+ *) func_append symtab_cflags " $arg" ;; - esac - done -@@ -2796,9 +3553,11 @@ func_win32_libid () - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static -- if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null | -- $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then -- win32_nmres=`$NM -f posix -A "$1" | -+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. -+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | -+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ -@@ -2827,6 +3586,131 @@ func_win32_libid () - $ECHO "$win32_libid_type" - } +@@ -7026,6 +7372,40 @@ fi + + -+# func_cygming_dll_for_implib ARG -+# -+# Platform-specific function to extract the -+# name of the DLL associated with the specified -+# import library ARG. -+# Invoked by eval'ing the libtool variable -+# $sharedlib_from_linklib_cmd -+# Result is available in the variable -+# $sharedlib_from_linklib_result -+func_cygming_dll_for_implib () -+{ -+ $opt_debug -+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -+} + -+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -+# -+# The is the core of a fallback implementation of a -+# platform-specific function to extract the name of the -+# DLL associated with the specified import library LIBNAME. -+# -+# SECTION_NAME is either .idata$6 or .idata$7, depending -+# on the platform and compiler that created the implib. -+# -+# Echos the name of the DLL associated with the -+# specified import library. -+func_cygming_dll_for_implib_fallback_core () -+{ -+ $opt_debug -+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` -+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null | -+ $SED '/^Contents of section '"$match_literal"':/{ -+ # Place marker at beginning of archive member dllname section -+ s/.*/====MARK====/ -+ p -+ d -+ } -+ # These lines can sometimes be longer than 43 characters, but -+ # are always uninteresting -+ /:[ ]*file format pe[i]\{,1\}-/d -+ /^In archive [^:]*:/d -+ # Ensure marker is printed -+ /^====MARK====/p -+ # Remove all lines with less than 43 characters -+ /^.\{43\}/!d -+ # From remaining lines, remove first 43 characters -+ s/^.\{43\}//' | -+ $SED -n ' -+ # Join marker and all lines until next marker into a single line -+ /^====MARK====/ b para -+ H -+ $ b para -+ b -+ :para -+ x -+ s/\n//g -+ # Remove the marker -+ s/^====MARK====// -+ # Remove trailing dots and whitespace -+ s/[\. \t]*$// -+ # Print -+ /./p' | -+ # we now have a list, one entry per line, of the stringified -+ # contents of the appropriate section of all members of the -+ # archive which possess that section. Heuristic: eliminate -+ # all those which have a first or second character that is -+ # a '.' (that is, objdump's representation of an unprintable -+ # character.) This should work for all archives with less than -+ # 0x302f exports -- but will fail for DLLs whose name actually -+ # begins with a literal '.' or a single character followed by -+ # a '.'. -+ # -+ # Of those that remain, print the first one. -+ $SED -e '/^\./d;/^.\./d;q' -+} + -+# func_cygming_gnu_implib_p ARG -+# This predicate returns with zero status (TRUE) if -+# ARG is a GNU/binutils-style import library. Returns -+# with nonzero status (FALSE) otherwise. -+func_cygming_gnu_implib_p () -+{ -+ $opt_debug -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` -+ test -n "$func_cygming_gnu_implib_tmp" -+} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } + -+# func_cygming_ms_implib_p ARG -+# This predicate returns with zero status (TRUE) if -+# ARG is an MS-style import library. Returns -+# with nonzero status (FALSE) otherwise. -+func_cygming_ms_implib_p () -+{ -+ $opt_debug -+ func_to_tool_file "$1" func_convert_file_msys_to_w32 -+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` -+ test -n "$func_cygming_ms_implib_tmp" -+} ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi + -+# func_cygming_dll_for_implib_fallback ARG -+# Platform-specific function to extract the -+# name of the DLL associated with the specified -+# import library ARG. -+# -+# This fallback implementation is for use when $DLLTOOL -+# does not support the --identify-strict option. -+# Invoked by eval'ing the libtool variable -+# $sharedlib_from_linklib_cmd -+# Result is available in the variable -+# $sharedlib_from_linklib_result -+func_cygming_dll_for_implib_fallback () -+{ -+ $opt_debug -+ if func_cygming_gnu_implib_p "$1" ; then -+ # binutils import library -+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` -+ elif func_cygming_ms_implib_p "$1" ; then -+ # ms-generated import library -+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` -+ else -+ # unknown -+ sharedlib_from_linklib_result="" -+ fi -+} ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } - # func_extract_an_archive dir oldlib -@@ -2917,7 +3801,7 @@ func_extract_archives () - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do -- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` -+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ -@@ -2932,7 +3816,7 @@ func_extract_archives () - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac -- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -@@ -3014,7 +3898,110 @@ func_fallback_echo () - _LTECHO_EOF' - } - ECHO=\"$qECHO\" -- fi\ +@@ -7237,6 +7617,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 + fi ++done ++ done ++IFS=$as_save_IFS + -+# Very basic option parsing. These options are (a) specific to -+# the libtool wrapper, (b) are identical between the wrapper -+# /script/ and the wrapper /executable/ which is used only on -+# windows platforms, and (c) all begin with the string "--lt-" -+# (application programs are unlikely to have options which match -+# this pattern). -+# -+# There are only two supported options: --lt-debug and -+# --lt-dump-script. There is, deliberately, no --lt-help. -+# -+# The first argument to this parsing function should be the -+# script's $0 value, followed by "$@". -+lt_option_debug= -+func_parse_lt_options () -+{ -+ lt_script_arg0=\$0 -+ shift -+ for lt_opt -+ do -+ case \"\$lt_opt\" in -+ --lt-debug) lt_option_debug=1 ;; -+ --lt-dump-script) -+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` -+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. -+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` -+ cat \"\$lt_dump_D/\$lt_dump_F\" -+ exit 0 -+ ;; -+ --lt-*) -+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 -+ exit 1 -+ ;; -+ esac ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done + done ++IFS=$as_save_IFS + -+ # Print the debug banner immediately: -+ if test -n \"\$lt_option_debug\"; then -+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi -+} ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if ${lt_cv_path_mainfest_tool+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi + -+# Used when --lt-debug. Prints its arguments to stdout -+# (redirection is the responsibility of the caller) -+func_lt_dump_args () -+{ -+ lt_dump_args_N=1; -+ for lt_arg -+ do -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" -+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` -+ done -+} + -+# Core function for launching the target application -+func_exec_program_core () -+{ -+" -+ case $host in -+ # Backslashes separate directories on plain windows -+ *-*-mingw | *-*-os2* | *-cegcc*) -+ $ECHO "\ -+ if test -n \"\$lt_option_debug\"; then -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 -+ func_lt_dump_args \${1+\"\$@\"} 1>&2 -+ fi -+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -+" -+ ;; + -+ *) -+ $ECHO "\ -+ if test -n \"\$lt_option_debug\"; then -+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 -+ func_lt_dump_args \${1+\"\$@\"} 1>&2 -+ fi -+ exec \"\$progdir/\$program\" \${1+\"\$@\"} -+" -+ ;; -+ esac -+ $ECHO "\ -+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 -+ exit 1 -+} + -+# A function to encapsulate launching the target application -+# Strips options in the --lt-* namespace from \$@ and -+# launches target application with the remaining arguments. -+func_exec_program () -+{ -+ for lt_wr_arg -+ do -+ case \$lt_wr_arg in -+ --lt-*) ;; -+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; -+ esac -+ shift -+ done -+ func_exec_program_core \${1+\"\$@\"} -+} + -+ # Parse options -+ func_parse_lt_options \"\$0\" \${1+\"\$@\"} - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` -@@ -3078,7 +4065,7 @@ _LTECHO_EOF' + case $host_os in + rhapsody* | darwin*) +@@ -7800,6 +8297,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7995,7 +8494,8 @@ fi + LIBTOOL_DEPS="$ltmain" - # relink executable if necessary - if test -n \"\$relink_command\"; then -- if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then : -+ if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" -@@ -3102,6 +4089,18 @@ _LTECHO_EOF' + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" - if test -f \"\$progdir/\$program\"; then" -+ # fixup the dll searchpath if we need to. -+ # -+ # Fix the DLL searchpath if we need to. Do this before prepending -+ # to shlibpath, because on Windows, both are PATH and uninstalled -+ # libraries must come first. -+ if test -n "$dllsearchpath"; then -+ $ECHO "\ -+ # Add the dll search path components to the executable PATH -+ PATH=$dllsearchpath:\$PATH -+" -+ fi -+ - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ -@@ -3116,35 +4115,10 @@ _LTECHO_EOF' - " - fi -- # fixup the dll searchpath if we need to. -- if test -n "$dllsearchpath"; then -- $ECHO "\ -- # Add the dll search path components to the executable PATH -- PATH=$dllsearchpath:\$PATH --" -- fi +@@ -8084,7 +8584,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8382,8 +8882,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8549,6 +9047,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8611,7 +9115,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8668,13 +9172,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. --" -- case $host in -- # Backslashes separate directories on plain windows -- *-*-mingw | *-*-os2* | *-cegcc*) -- $ECHO "\ -- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} --" -- ;; - -- *) -- $ECHO "\ -- exec \"\$progdir/\$program\" \${1+\"\$@\"} --" -- ;; -- esac -- $ECHO "\ -- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 -- exit 1 -+ func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. -@@ -3158,166 +4132,6 @@ fi\ - } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if ${lt_cv_prog_compiler_pic+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic --# func_to_host_path arg --# --# Convert paths to host format when used with build tools. --# Intended for use with "native" mingw (where libtool itself --# is running under the msys shell), or in the following cross- --# build environments: --# $build $host --# mingw (msys) mingw [e.g. native] --# cygwin mingw --# *nix + wine mingw --# where wine is equipped with the `winepath' executable. --# In the native mingw case, the (msys) shell automatically --# converts paths for any non-msys applications it launches, --# but that facility isn't available from inside the cwrapper. --# Similar accommodations are necessary for $host mingw and --# $build cygwin. Calling this function does no harm for other --# $host/$build combinations not listed above. --# --# ARG is the path (on $build) that should be converted to --# the proper representation for $host. The result is stored --# in $func_to_host_path_result. --func_to_host_path () --{ -- func_to_host_path_result="$1" -- if test -n "$1"; then -- case $host in -- *mingw* ) -- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -- case $build in -- *mingw* ) # actually, msys -- # awkward: cmd appends spaces to result -- func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | -- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -- ;; -- *cygwin* ) -- func_to_host_path_result=`cygpath -w "$1" | -- $SED -e "$lt_sed_naive_backslashify"` -- ;; -- * ) -- # Unfortunately, winepath does not exit with a non-zero -- # error code, so we are forced to check the contents of -- # stdout. On the other hand, if the command is not -- # found, the shell will set an exit code of 127 and print -- # *an error message* to stdout. So we must check for both -- # error code of zero AND non-empty stdout, which explains -- # the odd construction: -- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` -- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then -- func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | -- $SED -e "$lt_sed_naive_backslashify"` -- else -- # Allow warning below. -- func_to_host_path_result= -- fi -- ;; -- esac -- if test -z "$func_to_host_path_result" ; then -- func_error "Could not determine host path corresponding to" -- func_error " \`$1'" -- func_error "Continuing, but uninstalled executables may not work." -- # Fallback: -- func_to_host_path_result="$1" -- fi -- ;; -- esac -- fi --} --# end: func_to_host_path -- --# func_to_host_pathlist arg --# --# Convert pathlists to host format when used with build tools. --# See func_to_host_path(), above. This function supports the --# following $build/$host combinations (but does no harm for --# combinations not listed here): --# $build $host --# mingw (msys) mingw [e.g. native] --# cygwin mingw --# *nix + wine mingw --# --# Path separators are also converted from $build format to --# $host format. If ARG begins or ends with a path separator --# character, it is preserved (but converted to $host format) --# on output. --# --# ARG is a pathlist (on $build) that should be converted to --# the proper representation on $host. The result is stored --# in $func_to_host_pathlist_result. --func_to_host_pathlist () --{ -- func_to_host_pathlist_result="$1" -- if test -n "$1"; then -- case $host in -- *mingw* ) -- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -- # Remove leading and trailing path separator characters from -- # ARG. msys behavior is inconsistent here, cygpath turns them -- # into '.;' and ';.', and winepath ignores them completely. -- func_stripname : : "$1" -- func_to_host_pathlist_tmp1=$func_stripname_result -- case $build in -- *mingw* ) # Actually, msys. -- # Awkward: cmd appends spaces to result. -- func_to_host_pathlist_result=` -- ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | -- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -- ;; -- *cygwin* ) -- func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | -- $SED -e "$lt_sed_naive_backslashify"` -- ;; -- * ) -- # unfortunately, winepath doesn't convert pathlists -- func_to_host_pathlist_result="" -- func_to_host_pathlist_oldIFS=$IFS -- IFS=: -- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do -- IFS=$func_to_host_pathlist_oldIFS -- if test -n "$func_to_host_pathlist_f" ; then -- func_to_host_path "$func_to_host_pathlist_f" -- if test -n "$func_to_host_path_result" ; then -- if test -z "$func_to_host_pathlist_result" ; then -- func_to_host_pathlist_result="$func_to_host_path_result" -- else -- func_append func_to_host_pathlist_result ";$func_to_host_path_result" -- fi -- fi -- fi -- done -- IFS=$func_to_host_pathlist_oldIFS -- ;; -- esac -- if test -z "$func_to_host_pathlist_result"; then -- func_error "Could not determine the host path(s) corresponding to" -- func_error " \`$1'" -- func_error "Continuing, but uninstalled executables may not work." -- # Fallback. This may break if $1 contains DOS-style drive -- # specifications. The fix is not to complicate the expression -- # below, but for the user to provide a working wine installation -- # with winepath so that path translation in the cross-to-mingw -- # case works properly. -- lt_replace_pathsep_nix_to_dos="s|:|;|g" -- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ -- $SED -e "$lt_replace_pathsep_nix_to_dos"` -- fi -- # Now, add the leading and trailing path separators back -- case "$1" in -- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" -- ;; -- esac -- case "$1" in -- *: ) func_append func_to_host_pathlist_result ";" -- ;; -- esac -- ;; -- esac -- fi --} --# end: func_to_host_pathlist -- - # func_emit_cwrapperexe_src - # emit the source code for a wrapper executable on stdout - # Must ONLY be called from within func_mode_link because -@@ -3334,10 +4148,6 @@ func_emit_cwrapperexe_src () + # + # Check to make sure the PIC flag actually works. +@@ -8735,6 +9243,11 @@ fi - This wrapper executable should never be moved out of the build directory. - If it is, it will not operate correctly. -- -- Currently, it simply execs the wrapper *script* "$SHELL $output", -- but could eventually absorb all of the scripts functionality and -- exec $objdir/$outputname directly. - */ - EOF - cat <<"EOF" -@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *, int); - if (stale) { free ((void *) stale); stale = 0; } \ - } while (0) --#undef LTWRAPPER_DEBUGPRINTF --#if defined LT_DEBUGWRAPPER --# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args --static void --ltwrapper_debugprintf (const char *fmt, ...) --{ -- va_list args; -- va_start (args, fmt); -- (void) vfprintf (stderr, fmt, args); -- va_end (args); --} -+#if defined(LT_DEBUGWRAPPER) -+static int lt_debug = 1; - #else --# define LTWRAPPER_DEBUGPRINTF(args) -+static int lt_debug = 0; - #endif --const char *program_name = NULL; -+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -9085,7 +9598,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - void *xmalloc (size_t num); - char *xstrdup (const char *string); -@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathspec); - int make_executable (const char *path); - int check_executable (const char *path); - char *strendzap (char *str, const char *pat); --void lt_fatal (const char *message, ...); -+void lt_debugprintf (const char *file, int line, const char *fmt, ...); -+void lt_fatal (const char *file, int line, const char *message, ...); -+static const char *nonnull (const char *s); -+static const char *nonempty (const char *s); - void lt_setenv (const char *name, const char *value); - char *lt_extend_str (const char *orig_value, const char *add, int to_end); - void lt_update_exe_path (const char *name, const char *value); -@@ -3497,14 +4301,14 @@ void lt_dump_script (FILE *f); - EOF + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9184,12 +9698,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9203,8 +9717,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; - cat <&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9269,8 +9783,8 @@ _LT_EOF - if test -n "$dllsearchpath"; then -- func_to_host_pathlist "$dllsearchpath:" -+ func_to_host_path "$dllsearchpath:" - cat <&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9400,7 +9914,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ - #define LTWRAPPER_OPTION_PREFIX "--lt-" --#define LTWRAPPER_OPTION_PREFIX_LENGTH 5 + int +@@ -9413,22 +9933,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : --static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH; - static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX; -- - static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; -+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug"; +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9440,7 +9967,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ int - main (int argc, char *argv[]) -@@ -3561,10 +4363,13 @@ main (int argc, char *argv[]) - int i; +@@ -9453,22 +9986,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : - program_name = (char *) xstrdup (base_name (argv[0])); -- LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0])); -- LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name)); -+ newargz = XMALLOC (char *, argc + 1); - -- /* very simple arg parsing; don't want to rely on getopt */ -+ /* very simple arg parsing; don't want to rely on getopt -+ * also, copy all non cwrapper options to newargz, except -+ * argz[0], which is handled differently -+ */ -+ newargc=0; - for (i = 1; i < argc; i++) - { - if (strcmp (argv[i], dumpscript_opt) == 0) -@@ -3581,21 +4386,54 @@ EOF - lt_dump_script (stdout); - return 0; - } -+ if (strcmp (argv[i], debug_opt) == 0) -+ { -+ lt_debug = 1; -+ continue; -+ } -+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0) -+ { -+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX -+ namespace, but it is not one of the ones we know about and -+ have already dealt with, above (inluding dump-script), then -+ report an error. Otherwise, targets might begin to believe -+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX -+ namespace. The first time any user complains about this, we'll -+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option -+ or a configure.ac-settable value. -+ */ -+ lt_fatal (__FILE__, __LINE__, -+ "unrecognized %s option: '%s'", -+ ltwrapper_option_prefix, argv[i]); -+ } -+ /* otherwise ... */ -+ newargz[++newargc] = xstrdup (argv[i]); - } -+ newargz[++newargc] = NULL; +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi + -+EOF -+ cat < $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; - /* wrapper name transforms */ -@@ -3613,8 +4451,9 @@ EOF - target_name = tmp_pathspec; - tmp_pathspec = 0; + darwin* | rhapsody*) +@@ -9587,7 +10170,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -- LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n", -- target_name)); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(main) libtool target name: %s\n", -+ target_name); - EOF + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9595,7 +10178,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - cat <conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if ${lt_cv_irix_exported_symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -- LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : ""))); -+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", -+ nonnull (lt_argv_zero)); - for (i = 0; i < newargc; i++) - { -- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); -+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", -+ i, nonnull (newargz[i])); - } ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -9818,7 +10414,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9837,9 +10433,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10415,8 +11011,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no - EOF -@@ -3706,7 +4529,9 @@ EOF - if (rval == -1) - { - /* failed to start process */ -- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(main) failed to launch target \"%s\": %s\n", -+ lt_argv_zero, nonnull (strerror (errno))); - return 127; - } - return rval; -@@ -3728,7 +4553,7 @@ xmalloc (size_t num) +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10449,13 +11046,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10547,7 +11202,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11343,7 +11998,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11346 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11387,10 +12042,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () { - void *p = (void *) malloc (num); - if (!p) -- lt_fatal ("Memory exhausted"); -+ lt_fatal (__FILE__, __LINE__, "memory exhausted"); + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11449,7 +12104,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11452 "configure" ++#line $LINENO "configure" + #include "confdefs.h" - return p; - } -@@ -3762,8 +4587,8 @@ check_executable (const char *path) + #if HAVE_DLFCN_H +@@ -11493,10 +12148,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () { - struct stat st; + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -15928,13 +16583,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -15949,14 +16611,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -15989,12 +16654,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -16049,8 +16714,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -16060,12 +16730,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -16081,7 +16753,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -16117,6 +16788,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -16890,7 +17562,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -16993,19 +17666,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP -- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", -- path ? (*path ? path : "EMPTY!") : "NULL!")); -+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", -+ nonempty (path)); - if ((!path) || (!*path)) - return 0; ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP -@@ -3780,8 +4605,8 @@ make_executable (const char *path) - int rval = 0; - struct stat st; + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method -- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", -- path ? (*path ? path : "EMPTY!") : "NULL!")); -+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", -+ nonempty (path)); - if ((!path) || (!*path)) - return 0; +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd -@@ -3807,8 +4632,8 @@ find_executable (const char *wrapper) - int tmp_len; - char *concat_name; ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS -- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", -- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); -+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", -+ nonempty (wrapper)); ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; -@@ -3861,7 +4686,8 @@ find_executable (const char *wrapper) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) -- lt_fatal ("getcwd failed"); -+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", -+ nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); -@@ -3886,7 +4712,8 @@ find_executable (const char *wrapper) - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) -- lt_fatal ("getcwd failed"); -+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", -+ nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); -@@ -3912,8 +4739,9 @@ chase_symlinks (const char *pathspec) - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { -- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", -- tmp_pathspec)); -+ lt_debugprintf (__FILE__, __LINE__, -+ "checking path component for symlinks: %s\n", -+ tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) -@@ -3935,8 +4763,9 @@ chase_symlinks (const char *pathspec) - } - else - { -- char *errstr = strerror (errno); -- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); -+ lt_fatal (__FILE__, __LINE__, -+ "error accessing file \"%s\": %s", -+ tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); -@@ -3949,7 +4778,8 @@ chase_symlinks (const char *pathspec) - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { -- lt_fatal ("Could not follow symlinks for %s", pathspec); -+ lt_fatal (__FILE__, __LINE__, -+ "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); - #endif -@@ -3975,11 +4805,25 @@ strendzap (char *str, const char *pat) - return str; - } +@@ -17035,6 +17731,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -+void -+lt_debugprintf (const char *file, int line, const char *fmt, ...) -+{ -+ va_list args; -+ if (lt_debug) -+ { -+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); -+ va_start (args, fmt); -+ (void) vfprintf (stderr, fmt, args); -+ va_end (args); -+ } -+} ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec + - static void --lt_error_core (int exit_status, const char *mode, -+lt_error_core (int exit_status, const char *file, -+ int line, const char *mode, - const char *message, va_list ap) - { -- fprintf (stderr, "%s: %s: ", program_name, mode); -+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir -@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const char *mode, - } +@@ -17044,6 +17746,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks - void --lt_fatal (const char *message, ...) -+lt_fatal (const char *file, int line, const char *message, ...) - { - va_list ap; - va_start (ap, message); -- lt_error_core (EXIT_FAILURE, "FATAL", message, ap); -+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); - } - -+static const char * -+nonnull (const char *s) -+{ -+ return s ? s : "(null)"; -+} -+ -+static const char * -+nonempty (const char *s) -+{ -+ return (s && !*s) ? "(empty)" : nonnull (s); -+} ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL + - void - lt_setenv (const char *name, const char *value) - { -- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", -- (name ? name : ""), -- (value ? value : ""))); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_setenv) setting '%s' to '%s'\n", -+ nonnull (name), nonnull (value)); - { - #ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ -@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) - void - lt_update_exe_path (const char *name, const char *value) - { -- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", -- (name ? name : ""), -- (value ? value : ""))); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", -+ nonnull (name), nonnull (value)); + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL - if (name && *name && value && *value) - { -@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, const char *value) - void - lt_update_lib_path (const char *name, const char *value) - { -- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", -- (name ? name : ""), -- (value ? value : ""))); -+ lt_debugprintf (__FILE__, __LINE__, -+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", -+ nonnull (name), nonnull (value)); +@@ -17158,12 +17863,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - if (name && *name && value && *value) - { -@@ -4222,7 +5078,7 @@ EOF - func_win32_import_lib_p () - { - $opt_debug -- case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in -+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -@@ -4401,9 +5257,9 @@ func_mode_link () - ;; - *) - if test "$prev" = dlfiles; then -- dlfiles="$dlfiles $arg" -+ func_append dlfiles " $arg" - else -- dlprefiles="$dlprefiles $arg" -+ func_append dlprefiles " $arg" - fi - prev= - continue -@@ -4427,7 +5283,7 @@ func_mode_link () - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; -- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later -+ *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; -@@ -4446,7 +5302,7 @@ func_mode_link () - moreargs= - for fil in `cat "$save_arg"` - do --# moreargs="$moreargs $fil" -+# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic -@@ -4475,7 +5331,7 @@ func_mode_link () ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -- dlfiles="$dlfiles $pic_object" -+ func_append dlfiles " $pic_object" - prev= - continue - else -@@ -4487,7 +5343,7 @@ func_mode_link () - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. -- dlprefiles="$dlprefiles $pic_object" -+ func_append dlprefiles " $pic_object" - prev= - fi +@@ -17250,9 +17955,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs -@@ -4557,12 +5413,12 @@ func_mode_link () - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; -- *) rpath="$rpath $arg" ;; -+ *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; -- *) xrpath="$xrpath $arg" ;; -+ *) func_append xrpath " $arg" ;; - esac - fi - prev= -@@ -4574,28 +5430,28 @@ func_mode_link () - continue - ;; - weak) -- weak_libs="$weak_libs $arg" -+ func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) -- linker_flags="$linker_flags $qarg" -- compiler_flags="$compiler_flags $qarg" -+ func_append linker_flags " $qarg" -+ func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) -- compiler_flags="$compiler_flags $qarg" -+ func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) -- linker_flags="$linker_flags $qarg" -- compiler_flags="$compiler_flags $wl$qarg" -+ func_append linker_flags " $qarg" -+ func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" -@@ -4686,15 +5542,16 @@ func_mode_link () - ;; +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols - -L*) -- func_stripname '-L' '' "$arg" -- dir=$func_stripname_result -- if test -z "$dir"; then -+ func_stripname "-L" '' "$arg" -+ if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi -+ func_resolve_sysroot "$func_stripname_result" -+ dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; -@@ -4706,10 +5563,16 @@ func_mode_link () - ;; - esac - case "$deplibs " in -- *" -L$dir "*) ;; -+ *" -L$dir "* | *" $arg "*) -+ # Will only happen for absolute or sysroot arguments -+ ;; - *) -- deplibs="$deplibs -L$dir" -- lib_search_path="$lib_search_path $dir" -+ # Preserve sysroot, but never include relative directories -+ case $dir in -+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; -+ *) func_append deplibs " -L$dir" ;; -+ esac -+ func_append lib_search_path " $dir" - ;; - esac - case $host in -@@ -4718,12 +5581,12 @@ func_mode_link () - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; -- *) dllsearchpath="$dllsearchpath:$dir";; -+ *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; -- *) dllsearchpath="$dllsearchpath:$testbindir";; -+ *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac -@@ -4747,7 +5610,7 @@ func_mode_link () - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework -- deplibs="$deplibs System.ltframework" -+ func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) -@@ -4758,9 +5621,6 @@ func_mode_link () - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; -- *-*-linux*) -- test "X$arg" = "X-lc" && continue -- ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in -@@ -4770,7 +5630,7 @@ func_mode_link () - ;; - esac - fi -- deplibs="$deplibs $arg" -+ func_append deplibs " $arg" - continue - ;; +@@ -17268,6 +17970,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds -@@ -4782,8 +5642,8 @@ func_mode_link () - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. -- -model|-arch|-isysroot) -- compiler_flags="$compiler_flags $arg" -+ -model|-arch|-isysroot|--sysroot) -+ func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler -@@ -4791,12 +5651,12 @@ func_mode_link () - ;; ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) +@@ -17300,210 +18005,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +diff --git a/gprof/configure b/gprof/configure +index c23692e5c3d..9f936a5b03d 100755 +--- a/gprof/configure ++++ b/gprof/configure +@@ -662,8 +662,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -780,6 +783,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1442,6 +1446,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + + Some influential environment variables: + CC C compiler command +@@ -5124,8 +5130,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5165,7 +5171,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -5851,8 +5857,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -5901,6 +5907,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if ${lt_cv_to_host_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if ${lt_cv_to_tool_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if ${lt_cv_ld_reload_flag+:} false; then : +@@ -5917,6 +5997,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6085,7 +6170,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6239,6 +6325,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6252,11 +6353,164 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_AR+:} false; then : +@@ -6272,7 +6526,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6292,11 +6546,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_ac_ct_AR+:} false; then : +@@ -6312,7 +6570,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6331,6 +6589,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6342,16 +6604,72 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if ${lt_cv_ar_at_file+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } + ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi + + + +@@ -6693,8 +7011,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -6730,6 +7048,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -6771,6 +7090,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -6782,7 +7113,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -6808,8 +7139,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -6819,8 +7150,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -6857,6 +7188,20 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -6873,6 +7218,41 @@ fi + + + ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -7084,6 +7464,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if ${lt_cv_path_mainfest_tool+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7647,6 +8144,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -7842,7 +8341,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -7931,7 +8431,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8229,8 +8729,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8396,6 +8894,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8458,7 +8962,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8515,13 +9019,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if ${lt_cv_prog_compiler_pic+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8582,6 +9090,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -8932,7 +9445,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9031,12 +9545,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9050,8 +9564,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9069,8 +9583,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9116,8 +9630,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9247,7 +9761,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9260,22 +9780,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9287,7 +9814,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9300,22 +9833,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9360,20 +9900,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9434,7 +10017,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9442,7 +10025,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -9458,7 +10041,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9482,10 +10065,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9564,23 +10147,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if ${lt_cv_irix_exported_symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -9665,7 +10261,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9684,9 +10280,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10262,8 +10858,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10296,13 +10893,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10394,7 +11049,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11190,7 +11845,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11193 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11234,10 +11889,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11296,7 +11951,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11299 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11340,10 +11995,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -13309,13 +13964,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -13330,14 +13992,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -13370,12 +14035,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -13430,8 +14095,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -13441,12 +14111,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -13462,7 +14134,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -13498,6 +14169,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -14263,7 +14935,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -14366,19 +15039,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -14408,6 +15104,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -14417,6 +15119,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -14531,12 +15236,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -14623,9 +15328,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -14641,6 +15343,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -14673,210 +15378,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +diff --git a/ld/configure b/ld/configure +index 811134a503b..f432f4637d0 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -691,8 +691,11 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -819,6 +822,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_plugins + enable_largefile +@@ -1512,6 +1516,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-lib-path=dir1:dir2... set default LIB_PATH + --with-sysroot=DIR Search for usr/lib et al within DIR. + --with-system-zlib use installed libz +@@ -5965,8 +5971,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -6006,7 +6012,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -6692,8 +6698,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6742,6 +6748,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if ${lt_cv_to_host_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if ${lt_cv_to_tool_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if ${lt_cv_ld_reload_flag+:} false; then : +@@ -6758,6 +6838,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6926,7 +7011,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -7080,6 +7166,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -7095,9 +7196,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_AR+:} false; then : +@@ -7113,7 +7367,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -7133,11 +7387,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_ac_ct_AR+:} false; then : +@@ -7153,7 +7411,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -7172,6 +7430,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -7183,12 +7445,12 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ + + + +@@ -7198,6 +7460,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if ${lt_cv_ar_at_file+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++ ++ ++ ++ ++ + + + if test -n "$ac_tool_prefix"; then +@@ -7534,8 +7852,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -7571,6 +7889,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -7612,6 +7931,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -7623,7 +7954,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -7649,8 +7980,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -7660,8 +7991,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -7698,6 +8029,19 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ ++ ++ ++ + + + +@@ -7714,6 +8058,42 @@ fi + + + ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -7925,6 +8305,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if ${lt_cv_path_mainfest_tool+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -8488,6 +8985,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -8556,6 +9055,16 @@ done + + + ++func_stripname_cnf () ++{ ++ case ${2} in ++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; ++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; ++ esac ++} # func_stripname_cnf ++ ++ ++ + + + # Set options +@@ -8684,7 +9193,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -8773,7 +9283,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -9071,8 +9581,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -9238,6 +9746,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -9300,7 +9814,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -9357,13 +9871,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if ${lt_cv_prog_compiler_pic+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -9424,6 +9942,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -9774,7 +10297,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9873,12 +10397,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9892,8 +10416,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9911,8 +10435,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9958,8 +10482,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -10089,7 +10613,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -10102,22 +10632,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -10129,7 +10666,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -10142,22 +10685,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -10201,21 +10751,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +- # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ # no search path for DLLs. ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -10276,7 +10869,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -10284,7 +10877,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -10300,7 +10893,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -10324,10 +10917,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -10406,23 +10999,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if ${lt_cv_irix_exported_symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -10507,7 +11113,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -10526,9 +11132,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -11104,8 +11710,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -11138,13 +11745,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -11236,7 +11901,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -12032,7 +12697,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12035 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12076,10 +12741,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -12138,7 +12803,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12141 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12182,10 +12847,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -12577,6 +13242,7 @@ $RM -r conftest* + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC ++ lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX +@@ -12594,6 +13260,7 @@ $RM -r conftest* + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} ++ CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do +@@ -12876,7 +13543,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath__CXX+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -12889,22 +13562,29 @@ main () + _ACEOF + if ac_fn_cxx_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath__CXX"; then ++ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath__CXX"; then ++ lt_cv_aix_libpath__CXX="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath__CXX ++fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + +@@ -12917,7 +13597,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath__CXX+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -12930,22 +13616,29 @@ main () + _ACEOF + if ac_fn_cxx_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath__CXX"; then ++ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath__CXX"; then ++ lt_cv_aix_libpath__CXX="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath__CXX ++fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -12988,29 +13681,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) +- # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, +- # as there is no search path for DLLs. +- hardcode_libdir_flag_spec_CXX='-L$libdir' +- export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' +- allow_undefined_flag_CXX=unsupported +- always_export_symbols_CXX=no +- enable_shared_with_static_runtimes_CXX=yes +- +- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then +- archive_cmds_CXX='$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' +- # If the export-symbols file already is a .def file (1st line +- # is EXPORTS), use it as is; otherwise, prepend... +- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then +- cp $export_symbols $output_objdir/$soname.def; +- else +- echo EXPORTS > $output_objdir/$soname.def; +- cat $export_symbols >> $output_objdir/$soname.def; +- fi~ +- $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' +- else +- ld_shlibs_CXX=no +- fi +- ;; ++ case $GXX,$cc_basename in ++ ,cl* | no,cl*) ++ # Native MSVC ++ # hardcode_libdir_flag_spec is actually meaningless, as there is ++ # no search path for DLLs. ++ hardcode_libdir_flag_spec_CXX=' ' ++ allow_undefined_flag_CXX=unsupported ++ always_export_symbols_CXX=yes ++ file_list_spec_CXX='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' ++ enable_shared_with_static_runtimes_CXX=yes ++ # Don't use ranlib ++ old_postinstall_cmds_CXX='chmod 644 $oldlib' ++ postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ func_to_tool_file "$lt_outputfile"~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # g++ ++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, ++ # as there is no search path for DLLs. ++ hardcode_libdir_flag_spec_CXX='-L$libdir' ++ export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' ++ allow_undefined_flag_CXX=unsupported ++ always_export_symbols_CXX=no ++ enable_shared_with_static_runtimes_CXX=yes ++ ++ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then ++ archive_cmds_CXX='$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' ++ # If the export-symbols file already is a .def file (1st line ++ # is EXPORTS), use it as is; otherwise, prepend... ++ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ cp $export_symbols $output_objdir/$soname.def; ++ else ++ echo EXPORTS > $output_objdir/$soname.def; ++ cat $export_symbols >> $output_objdir/$soname.def; ++ fi~ ++ $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' ++ else ++ ld_shlibs_CXX=no ++ fi ++ ;; ++ esac ++ ;; + darwin* | rhapsody*) + + +@@ -13116,7 +13855,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + ;; + *) + if test "$GXX" = yes; then +- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' ++ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no +@@ -13187,10 +13926,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) +- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ++ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) +- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ++ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi +@@ -13231,9 +13970,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then +- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else +- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' ++ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + link_all_deplibs_CXX=yes +@@ -13303,20 +14042,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ +- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' ++ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ +- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ ++ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' ++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' +@@ -13511,7 +14250,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) +- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + +@@ -13557,7 +14296,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' +@@ -13598,9 +14337,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then +- archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' ++ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when +@@ -13735,6 +14474,13 @@ private: + }; + _LT_EOF + ++ ++_lt_libdeps_save_CFLAGS=$CFLAGS ++case "$CC $CFLAGS " in #( ++*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; ++*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; ++esac ++ + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -13748,7 +14494,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do +- case $p in ++ case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. +@@ -13757,13 +14503,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + test $p = "-R"; then + prev=$p + continue +- else +- prev= + fi + ++ # Expand the sysroot to ease extracting the directories later. ++ if test -z "$prev"; then ++ case $p in ++ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; ++ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; ++ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; ++ esac ++ fi ++ case $p in ++ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; ++ esac + if test "$pre_test_object_deps_done" = no; then +- case $p in +- -L* | -R*) ++ case ${prev} in ++ -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. +@@ -13783,8 +14538,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi ++ prev= + ;; + ++ *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. +@@ -13820,6 +14577,7 @@ else + fi + + $RM -f confest.$objext ++CFLAGS=$_lt_libdeps_save_CFLAGS + + # PORTME: override above test on systems where it is broken + case $host_os in +@@ -13855,7 +14613,7 @@ linux*) + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as +@@ -13920,8 +14678,6 @@ fi + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then +@@ -14026,6 +14782,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + ;; + esac + ;; ++ mingw* | cygwin* | os2* | pw32* | cegcc*) ++ # This hack is so that the source file can tell whether it is being ++ # built for inclusion in a dll (and should export symbols for example). ++ lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ++ ;; + dgux*) + case $cc_basename in + ec++*) +@@ -14178,7 +14939,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + ;; + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' +@@ -14243,10 +15004,17 @@ case $host_os in + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 +-$as_echo "$lt_prog_compiler_pic_CXX" >&6; } +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if ${lt_cv_prog_compiler_pic_CXX+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 ++$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } ++lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + + # + # Check to make sure the PIC flag actually works. +@@ -14304,6 +15072,8 @@ fi + + + ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -14481,6 +15251,7 @@ fi + $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. +@@ -14495,15 +15266,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" +- ;; ++ ;; + cygwin* | mingw* | cegcc*) +- export_symbols_cmds_CXX='$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' +- ;; ++ case $cc_basename in ++ cl*) ;; ++ *) ++ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ++ ;; ++ esac ++ ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +- ;; ++ ;; + esac +- exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 + $as_echo "$ld_shlibs_CXX" >&6; } +@@ -14766,8 +15542,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -14799,13 +15576,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -14896,7 +15731,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -15355,6 +16190,7 @@ fi + fi # test -n "$compiler" + + CC=$lt_save_CC ++ CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC +@@ -18477,13 +19313,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -18498,14 +19341,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -18538,12 +19384,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -18582,8 +19428,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote + compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' + GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' + archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +@@ -18610,12 +19456,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_ + hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' + inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' + link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path_CXX='`$ECHO "$fix_srcfile_path_CXX" | $SED "$delay_single_quote_subst"`' + always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' + exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' + include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' + prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' ++postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' + file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' + hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' + compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +@@ -18653,8 +19499,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -18664,12 +19515,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -18685,7 +19538,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -18707,8 +19559,8 @@ LD_CXX \ + reload_flag_CXX \ + compiler_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ +-lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ ++lt_prog_compiler_wl_CXX \ + lt_prog_compiler_static_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + export_dynamic_flag_spec_CXX \ +@@ -18720,7 +19572,6 @@ no_undefined_flag_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ +-fix_srcfile_path_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX \ + file_list_spec_CXX \ +@@ -18754,6 +19605,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -18768,7 +19620,8 @@ archive_expsym_cmds_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + export_symbols_cmds_CXX \ +-prelink_cmds_CXX; do ++prelink_cmds_CXX \ ++postlink_cmds_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" +@@ -19533,7 +20386,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -19636,19 +20490,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -19678,6 +20555,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -19687,6 +20570,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -19801,12 +20687,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -19893,9 +20779,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -19911,6 +20794,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -19957,210 +20843,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +@@ -20188,12 +21033,12 @@ with_gcc=$GCC_CXX + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl_CXX +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic_CXX + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl_CXX ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static_CXX + +@@ -20280,9 +21125,6 @@ inherit_rpath=$inherit_rpath_CXX + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs_CXX + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path_CXX +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols_CXX + +@@ -20298,6 +21140,9 @@ include_expsyms=$lt_include_expsyms_CXX + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds_CXX + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds_CXX ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec_CXX + +diff --git a/libctf/configure b/libctf/configure +index e5493b31691..9977e4f7a42 100755 +--- a/libctf/configure ++++ b/libctf/configure +@@ -663,6 +663,8 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -778,6 +780,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_largefile + enable_werror_always +@@ -1436,6 +1439,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-system-zlib use installed libz + + Some influential environment variables: +@@ -5324,8 +5329,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5436,7 +5441,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -6122,8 +6127,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6172,6 +6177,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if ${lt_cv_to_host_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if ${lt_cv_to_tool_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if ${lt_cv_ld_reload_flag+:} false; then : +@@ -6188,6 +6267,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6356,7 +6440,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6510,6 +6595,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6525,9 +6625,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_AR+:} false; then : +@@ -6543,7 +6796,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6563,11 +6816,15 @@ $as_echo "no" >&6; } + fi + + ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_ac_ct_AR+:} false; then : +@@ -6583,7 +6840,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6602,6 +6859,10 @@ else + $as_echo "no" >&6; } + fi + ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6613,16 +6874,72 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi + +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if ${lt_cv_ar_at_file+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } + ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi + + + +@@ -6964,8 +7281,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -7001,6 +7318,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -7042,6 +7360,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -7053,7 +7383,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -7079,8 +7409,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -7090,8 +7420,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi +@@ -7128,6 +7458,16 @@ else + $as_echo "ok" >&6; } + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ + + + +@@ -7144,6 +7484,45 @@ fi + + + ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + + + +@@ -7355,6 +7734,123 @@ esac + + need_locks="$enable_libtool_lock" + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if ${lt_cv_path_mainfest_tool+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + + case $host_os in + rhapsody* | darwin*) +@@ -7918,6 +8414,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -8083,7 +8581,8 @@ fi + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + + + +@@ -8172,7 +8671,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8470,8 +8969,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8637,6 +9134,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8699,7 +9202,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8756,13 +9259,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if ${lt_cv_prog_compiler_pic+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8823,6 +9330,11 @@ fi + + + ++ ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -9173,7 +9685,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9272,12 +9785,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -9291,8 +9804,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9310,8 +9823,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9357,8 +9870,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9488,7 +10001,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9501,22 +10020,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9528,7 +10054,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + else + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9541,22 +10073,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9601,20 +10140,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9675,7 +10257,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9683,7 +10265,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -9699,7 +10281,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9723,10 +10305,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9805,23 +10387,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if ${lt_cv_irix_exported_symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -9906,7 +10501,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9925,9 +10520,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10503,8 +11098,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10537,13 +11133,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10635,7 +11289,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -11431,7 +12085,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11434 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11475,10 +12129,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11537,7 +12191,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11540 "configure" ++#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11581,10 +12235,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -13994,13 +14648,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -14015,14 +14676,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -14055,12 +14719,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -14115,8 +14779,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -14126,12 +14795,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -14147,7 +14818,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -14183,6 +14853,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -14939,7 +15610,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -15042,19 +15714,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP + ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method + +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd + ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS + ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP + +@@ -15084,6 +15779,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir + +@@ -15093,6 +15794,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks + ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL + +@@ -15207,12 +15911,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic + ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static + +@@ -15299,9 +16003,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs + +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols + +@@ -15317,6 +16018,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds + ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec + +@@ -15349,210 +16053,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +diff --git a/libtool.m4 b/libtool.m4 +index 434530059fa..e45fdc6998c 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -1,7 +1,8 @@ + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is free software; the Free Software Foundation gives +@@ -10,7 +11,8 @@ + + m4_define([_LT_COPYING], [dnl + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + ]) + +-# serial 56 LT_INIT ++# serial 57 LT_INIT + + + # LT_PREREQ(VERSION) +@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1]) + LIBTOOL_DEPS="$ltmain" + + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" + AC_SUBST(LIBTOOL)dnl + + _LT_SETUP +@@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl + dnl + m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_CHECK_SHELL_FEATURES])dnl ++m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl + m4_require([_LT_CMD_RELOAD])dnl + m4_require([_LT_CHECK_MAGIC_METHOD])dnl ++m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl + m4_require([_LT_CMD_OLD_ARCHIVE])dnl + m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl ++m4_require([_LT_WITH_SYSROOT])dnl + + _LT_CONFIG_LIBTOOL_INIT([ + # See if we are running on zsh, and set the options which allow our +@@ -199,7 +205,7 @@ aix3*) + esac + + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl + m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) + configured by $[0], generated by m4_PACKAGE_STRING. + +-Copyright (C) 2009 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This config.lt script is free software; the Free Software Foundation + gives unlimited permision to copy, distribute and modify it." + +@@ -746,15 +752,12 @@ _LT_EOF + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) + +- _LT_PROG_XSI_SHELLFNS ++ _LT_PROG_REPLACE_SHELLFNS + +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + ], +@@ -980,6 +983,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD ++ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD ++ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -1069,30 +1074,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], + fi + ]) + +-# _LT_SYS_MODULE_PATH_AIX +-# ----------------------- ++# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) ++# ---------------------------------- + # Links a minimal program and checks the executable + # for the system default hardcoded library path. In most cases, + # this is /usr/lib:/lib, but when the MPI compilers are used + # the location of the communication and MPI libs are included too. + # If we don't find anything, use the default library path according + # to the aix ld manual. ++# Store the results from the different compilers for each TAGNAME. ++# Allow to override them for all tags through lt_cv_aix_libpath. + m4_defun([_LT_SYS_MODULE_PATH_AIX], + [m4_require([_LT_DECL_SED])dnl +-AC_LINK_IFELSE([AC_LANG_SOURCE([AC_LANG_PROGRAM])],[ +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi],[]) +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], ++ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ ++ lt_aix_libpath_sed='[ ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }]' ++ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then ++ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi],[]) ++ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then ++ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" ++ fi ++ ]) ++ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) ++fi + ])# _LT_SYS_MODULE_PATH_AIX + + +@@ -1117,7 +1133,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + + AC_MSG_CHECKING([how to print strings]) + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -1161,6 +1177,39 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) + ])# _LT_PROG_ECHO_BACKSLASH + + ++# _LT_WITH_SYSROOT ++# ---------------- ++AC_DEFUN([_LT_WITH_SYSROOT], ++[AC_MSG_CHECKING([for sysroot]) ++AC_ARG_WITH([libtool-sysroot], ++[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified).], ++[], [with_libtool_sysroot=no]) ++ ++dnl lt_sysroot will always be passed unquoted. We quote it here ++dnl in case the user passed a directory name. ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ AC_MSG_RESULT([${with_libtool_sysroot}]) ++ AC_MSG_ERROR([The sysroot must be an absolute path.]) ++ ;; ++esac ++ ++ AC_MSG_RESULT([${lt_sysroot:-no}]) ++_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl ++[dependent libraries, and in which our libraries should be installed.])]) ++ + # _LT_ENABLE_LOCK + # --------------- + m4_defun([_LT_ENABLE_LOCK], +@@ -1320,14 +1369,47 @@ need_locks="$enable_libtool_lock" + ])# _LT_ENABLE_LOCK + + ++# _LT_PROG_AR ++# ----------- ++m4_defun([_LT_PROG_AR], ++[AC_CHECK_TOOLS(AR, [ar], false) ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++_LT_DECL([], [AR], [1], [The archiver]) ++_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) ++ ++AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], ++ [lt_cv_ar_at_file=no ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM], ++ [echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' ++ AC_TRY_EVAL([lt_ar_try]) ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ AC_TRY_EVAL([lt_ar_try]) ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a ++ ]) ++ ]) ++ ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi ++_LT_DECL([], [archiver_list_spec], [1], ++ [How to feed a file listing to the archiver]) ++])# _LT_PROG_AR ++ ++ + # _LT_CMD_OLD_ARCHIVE + # ------------------- + m4_defun([_LT_CMD_OLD_ARCHIVE], +-[AC_CHECK_TOOL(AR, ar, false) +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru +-_LT_DECL([], [AR], [1], [The archiver]) +-_LT_DECL([], [AR_FLAGS], [1]) ++[_LT_PROG_AR + + AC_CHECK_TOOL(STRIP, strip, :) + test -z "$STRIP" && STRIP=: +@@ -1623,7 +1705,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-[#line __oline__ "configure" ++[#line $LINENO "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -1667,10 +1749,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif + +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -2210,8 +2292,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no + +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -2244,13 +2327,71 @@ m4_if([$1], [],[ + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; + + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -2342,7 +2483,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +@@ -2950,6 +3091,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -3016,7 +3162,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -3167,6 +3314,21 @@ tpf*) + ;; + esac + ]) ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -3174,7 +3336,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + _LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) + _LT_DECL([], [file_magic_cmd], [1], +- [Command to use when deplibs_check_method == "file_magic"]) ++ [Command to use when deplibs_check_method = "file_magic"]) ++_LT_DECL([], [file_magic_glob], [1], ++ [How to find potential files when deplibs_check_method = "file_magic"]) ++_LT_DECL([], [want_nocaseglob], [1], ++ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) + ])# _LT_CHECK_MAGIC_METHOD + + +@@ -3277,6 +3443,67 @@ dnl aclocal-1.4 backwards compatibility: + dnl AC_DEFUN([AM_PROG_NM], []) + dnl AC_DEFUN([AC_PROG_NM], []) + ++# _LT_CHECK_SHAREDLIB_FROM_LINKLIB ++# -------------------------------- ++# how to determine the name of the shared library ++# associated with a specific link library. ++# -- PORTME fill in with the dynamic library characteristics ++m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], ++[m4_require([_LT_DECL_EGREP]) ++m4_require([_LT_DECL_OBJDUMP]) ++m4_require([_LT_DECL_DLLTOOL]) ++AC_CACHE_CHECK([how to associate runtime and link libraries], ++lt_cv_sharedlib_from_linklib_cmd, ++[lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++]) ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++_LT_DECL([], [sharedlib_from_linklib_cmd], [1], ++ [Command to associate shared and link libraries]) ++])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB ++ ++ ++# _LT_PATH_MANIFEST_TOOL ++# ---------------------- ++# locate the manifest tool ++m4_defun([_LT_PATH_MANIFEST_TOOL], ++[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], ++ [lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&AS_MESSAGE_LOG_FD ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest*]) ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ++])# _LT_PATH_MANIFEST_TOOL ++ + + # LT_LIB_M + # -------- +@@ -3403,8 +3630,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + + # Handle CRLF in mingw tool chain + opt_cr= +@@ -3440,6 +3667,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no +@@ -3473,6 +3701,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT@&t@_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT@&t@_DLSYM_CONST ++#else ++# define LT@&t@_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -3484,7 +3724,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext + + /* The mapping between symbol names and symbols. */ +-const struct { ++LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -3510,15 +3750,15 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi +@@ -3551,6 +3791,13 @@ else + AC_MSG_RESULT(ok) + fi + ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ + _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) + _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], +@@ -3561,6 +3808,8 @@ _LT_DECL([global_symbol_to_c_name_address], + _LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) ++_LT_DECL([], [nm_file_list_spec], [1], ++ [Specify filename containing input files for $NM]) + ]) # _LT_CMD_GLOBAL_SYMBOLS + + +@@ -3572,7 +3821,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)= + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)= + +-AC_MSG_CHECKING([for $compiler option to produce PIC]) + m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then +@@ -3678,6 +3926,12 @@ m4_if([$1], [CXX], [ + ;; + esac + ;; ++ mingw* | cygwin* | os2* | pw32* | cegcc*) ++ # This hack is so that the source file can tell whether it is being ++ # built for inclusion in a dll (and should export symbols for example). ++ m4_if([$1], [GCJ], [], ++ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ++ ;; + dgux*) + case $cc_basename in + ec++*) +@@ -3830,7 +4084,7 @@ m4_if([$1], [CXX], [ + ;; + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +@@ -4053,6 +4307,12 @@ m4_if([$1], [CXX], [ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' ++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ++ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -4115,7 +4375,7 @@ m4_if([$1], [CXX], [ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; +@@ -4172,9 +4432,11 @@ case $host_os in + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; + esac +-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], +- [How to pass a linker flag through the compiler]) ++ ++AC_CACHE_CHECK([for $compiler option to produce PIC], ++ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], ++ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) ++_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + + # + # Check to make sure the PIC flag actually works. +@@ -4193,6 +4455,8 @@ fi + _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + ++_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], ++ [How to pass a linker flag through the compiler]) + # + # Check to make sure the static flag actually works. + # +@@ -4213,6 +4477,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + m4_defun([_LT_LINKER_SHLIBS], + [AC_REQUIRE([LT_PATH_LD])dnl + AC_REQUIRE([LT_PATH_NM])dnl ++m4_require([_LT_PATH_MANIFEST_TOOL])dnl + m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_DECL_EGREP])dnl + m4_require([_LT_DECL_SED])dnl +@@ -4221,6 +4486,7 @@ m4_require([_LT_TAG_COMPILER])dnl + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ++ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. +@@ -4235,15 +4501,20 @@ m4_if([$1], [CXX], [ + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" +- ;; ++ ;; + cygwin* | mingw* | cegcc*) +- _LT_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' +- ;; ++ case $cc_basename in ++ cl*) ;; ++ *) ++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ++ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ++ ;; ++ esac ++ ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' +- ;; ++ ;; + esac +- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + ], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= +@@ -4411,7 +4682,8 @@ _LT_EOF + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes +- _LT_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' ++ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ++ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -4510,12 +4782,12 @@ _LT_EOF + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' +- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac +@@ -4529,8 +4801,8 @@ _LT_EOF + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -4548,8 +4820,8 @@ _LT_EOF + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +@@ -4595,8 +4867,8 @@ _LT_EOF + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +@@ -4726,7 +4998,7 @@ _LT_EOF + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else +@@ -4737,7 +5009,7 @@ _LT_EOF + else + # Determine the default libpath from the value encoded in an + # empty executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. +@@ -4781,20 +5053,63 @@ _LT_EOF + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' +- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' +- # FIXME: Should let the user specify the lib program. +- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' +- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' +- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ _LT_TAGVAR(always_export_symbols, $1)=yes ++ _LT_TAGVAR(file_list_spec, $1)='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ _LT_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' ++ # Don't use ranlib ++ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' ++ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ # FIXME: Should let the user specify the lib program. ++ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -4828,7 +5143,7 @@ _LT_EOF + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no +@@ -4836,7 +5151,7 @@ _LT_EOF + + hpux9*) + if test "$GCC" = yes; then +- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi +@@ -4852,7 +5167,7 @@ _LT_EOF + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -4876,10 +5191,10 @@ _LT_EOF + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -4926,16 +5241,31 @@ _LT_EOF + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- AC_LINK_IFELSE([AC_LANG_SOURCE([int foo(void) {}])], +- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ) +- LDFLAGS="$save_LDFLAGS" ++ # This should be the same for all languages, so no per-tag cache variable. ++ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], ++ [lt_cv_irix_exported_symbol], ++ [save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ AC_LINK_IFELSE( ++ [AC_LANG_SOURCE( ++ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], ++ [C++], [[int foo (void) { return 0; }]], ++ [Fortran 77], [[ ++ subroutine foo ++ end]], ++ [Fortran], [[ ++ subroutine foo ++ end]])])], ++ [lt_cv_irix_exported_symbol=yes], ++ [lt_cv_irix_exported_symbol=no]) ++ LDFLAGS="$save_LDFLAGS"]) ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -5020,7 +5350,7 @@ _LT_EOF + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' +@@ -5039,9 +5369,9 @@ _LT_EOF + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -5313,8 +5643,6 @@ _LT_TAGDECL([], [inherit_rpath], [0], + to runtime path list]) + _LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +-_LT_TAGDECL([], [fix_srcfile_path], [1], +- [Fix the shell variable $srcfile for the compiler]) + _LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) + _LT_TAGDECL([], [export_symbols_cmds], [2], +@@ -5325,6 +5653,8 @@ _LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) + _LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) ++_LT_TAGDECL([], [postlink_cmds], [2], ++ [Commands necessary for finishing linking programs]) + _LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) + dnl FIXME: Not yet implemented +@@ -5426,6 +5756,7 @@ CC="$lt_save_CC" + m4_defun([_LT_LANG_CXX_CONFIG], + [m4_require([_LT_FILEUTILS_DEFAULTS])dnl + m4_require([_LT_DECL_EGREP])dnl ++m4_require([_LT_PATH_MANIFEST_TOOL])dnl + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then +@@ -5487,6 +5818,7 @@ if test "$_lt_caught_CXX_error" != yes; then + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC ++ lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX +@@ -5504,6 +5836,7 @@ if test "$_lt_caught_CXX_error" != yes; then + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} ++ CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) +@@ -5667,7 +6000,7 @@ if test "$_lt_caught_CXX_error" != yes; then + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -5679,7 +6012,7 @@ if test "$_lt_caught_CXX_error" != yes; then + else + # Determine the default libpath from the value encoded in an + # empty executable. +- _LT_SYS_MODULE_PATH_AIX ++ _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. +@@ -5721,29 +6054,75 @@ if test "$_lt_caught_CXX_error" != yes; then + ;; + + cygwin* | mingw* | pw32* | cegcc*) +- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, +- # as there is no search path for DLLs. +- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' +- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported +- _LT_TAGVAR(always_export_symbols, $1)=no +- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes +- +- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then +- _LT_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' +- # If the export-symbols file already is a .def file (1st line +- # is EXPORTS), use it as is; otherwise, prepend... +- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then +- cp $export_symbols $output_objdir/$soname.def; +- else +- echo EXPORTS > $output_objdir/$soname.def; +- cat $export_symbols >> $output_objdir/$soname.def; +- fi~ +- $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' +- else +- _LT_TAGVAR(ld_shlibs, $1)=no +- fi +- ;; ++ case $GXX,$cc_basename in ++ ,cl* | no,cl*) ++ # Native MSVC ++ # hardcode_libdir_flag_spec is actually meaningless, as there is ++ # no search path for DLLs. ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ _LT_TAGVAR(always_export_symbols, $1)=yes ++ _LT_TAGVAR(file_list_spec, $1)='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ # Don't use ranlib ++ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' ++ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ func_to_tool_file "$lt_outputfile"~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # g++ ++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, ++ # as there is no search path for DLLs. ++ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ++ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' ++ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported ++ _LT_TAGVAR(always_export_symbols, $1)=no ++ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ++ ++ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then ++ _LT_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' ++ # If the export-symbols file already is a .def file (1st line ++ # is EXPORTS), use it as is; otherwise, prepend... ++ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ cp $export_symbols $output_objdir/$soname.def; ++ else ++ echo EXPORTS > $output_objdir/$soname.def; ++ cat $export_symbols >> $output_objdir/$soname.def; ++ fi~ ++ $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' ++ else ++ _LT_TAGVAR(ld_shlibs, $1)=no ++ fi ++ ;; ++ esac ++ ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; +@@ -5818,7 +6197,7 @@ if test "$_lt_caught_CXX_error" != yes; then + ;; + *) + if test "$GXX" = yes; then +- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' ++ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no +@@ -5889,10 +6268,10 @@ if test "$_lt_caught_CXX_error" != yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) +- _LT_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' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi +@@ -5933,9 +6312,9 @@ if test "$_lt_caught_CXX_error" != yes; then + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes +@@ -6005,20 +6384,20 @@ if test "$_lt_caught_CXX_error" != yes; then + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ +- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' ++ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ +- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ ++ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' ++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ +- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ++ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' +@@ -6213,7 +6592,7 @@ if test "$_lt_caught_CXX_error" != yes; then + _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) +- _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + +@@ -6259,7 +6638,7 @@ if test "$_lt_caught_CXX_error" != yes; then + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' +@@ -6300,9 +6679,9 @@ if test "$_lt_caught_CXX_error" != yes; then + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then +- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' ++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when +@@ -6431,6 +6810,7 @@ if test "$_lt_caught_CXX_error" != yes; then + fi # test -n "$compiler" + + CC=$lt_save_CC ++ CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC +@@ -6445,6 +6825,29 @@ AC_LANG_POP + ])# _LT_LANG_CXX_CONFIG + + ++# _LT_FUNC_STRIPNAME_CNF ++# ---------------------- ++# func_stripname_cnf prefix suffix name ++# strip PREFIX and SUFFIX off of NAME. ++# PREFIX and SUFFIX must not contain globbing or regex special ++# characters, hashes, percent signs, but SUFFIX may contain a leading ++# dot (in which case that matches only a dot). ++# ++# This function is identical to the (non-XSI) version of func_stripname, ++# except this one can be used by m4 code that may be executed by configure, ++# rather than the libtool script. ++m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl ++AC_REQUIRE([_LT_DECL_SED]) ++AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) ++func_stripname_cnf () ++{ ++ case ${2} in ++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; ++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; ++ esac ++} # func_stripname_cnf ++])# _LT_FUNC_STRIPNAME_CNF ++ + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) + # --------------------------------- + # Figure out "hidden" library dependencies from verbose +@@ -6453,6 +6856,7 @@ AC_LANG_POP + # objects, libraries and library flags. + m4_defun([_LT_SYS_HIDDEN_LIBDEPS], + [m4_require([_LT_FILEUTILS_DEFAULTS])dnl ++AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl + # Dependencies to place before and after the object being linked: + _LT_TAGVAR(predep_objects, $1)= + _LT_TAGVAR(postdep_objects, $1)= +@@ -6503,6 +6907,13 @@ public class foo { + }; + _LT_EOF + ]) ++ ++_lt_libdeps_save_CFLAGS=$CFLAGS ++case "$CC $CFLAGS " in #( ++*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; ++*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; ++esac ++ + dnl Parse the compiler output and extract the necessary + dnl objects, libraries and library flags. + if AC_TRY_EVAL(ac_compile); then +@@ -6514,7 +6925,7 @@ if AC_TRY_EVAL(ac_compile); then + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do +- case $p in ++ case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. +@@ -6523,13 +6934,22 @@ if AC_TRY_EVAL(ac_compile); then + test $p = "-R"; then + prev=$p + continue +- else +- prev= + fi + ++ # Expand the sysroot to ease extracting the directories later. ++ if test -z "$prev"; then ++ case $p in ++ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; ++ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; ++ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; ++ esac ++ fi ++ case $p in ++ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; ++ esac + if test "$pre_test_object_deps_done" = no; then +- case $p in +- -L* | -R*) ++ case ${prev} in ++ -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. +@@ -6549,8 +6969,10 @@ if AC_TRY_EVAL(ac_compile); then + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi ++ prev= + ;; + ++ *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. +@@ -6586,6 +7008,7 @@ else + fi + + $RM -f confest.$objext ++CFLAGS=$_lt_libdeps_save_CFLAGS + + # PORTME: override above test on systems where it is broken + m4_if([$1], [CXX], +@@ -6622,7 +7045,7 @@ linux*) + + solaris*) + case $cc_basename in +- CC*) ++ CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as +@@ -6735,7 +7158,9 @@ if test "$_lt_disable_F77" != yes; then + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC ++ lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} ++ CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) +@@ -6789,6 +7214,7 @@ if test "$_lt_disable_F77" != yes; then + + GCC=$lt_save_GCC + CC="$lt_save_CC" ++ CFLAGS="$lt_save_CFLAGS" + fi # test "$_lt_disable_F77" != yes + + AC_LANG_POP +@@ -6865,7 +7291,9 @@ if test "$_lt_disable_FC" != yes; then + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC ++ lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} ++ CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + +@@ -6921,7 +7349,8 @@ if test "$_lt_disable_FC" != yes; then + fi # test -n "$compiler" + + GCC=$lt_save_GCC +- CC="$lt_save_CC" ++ CC=$lt_save_CC ++ CFLAGS=$lt_save_CFLAGS + fi # test "$_lt_disable_FC" != yes + + AC_LANG_POP +@@ -6958,10 +7387,12 @@ _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. +-lt_save_CC="$CC" ++lt_save_CC=$CC ++lt_save_CFLAGS=$CFLAGS + lt_save_GCC=$GCC + GCC=yes + CC=${GCJ-"gcj"} ++CFLAGS=$GCJFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_TAGVAR(LD, $1)="$LD" +@@ -6992,7 +7423,8 @@ fi + AC_LANG_RESTORE + + GCC=$lt_save_GCC +-CC="$lt_save_CC" ++CC=$lt_save_CC ++CFLAGS=$lt_save_CFLAGS + ])# _LT_LANG_GCJ_CONFIG + + +@@ -7027,9 +7459,11 @@ _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" ++lt_save_CFLAGS=$CFLAGS + lt_save_GCC=$GCC + GCC= + CC=${RC-"windres"} ++CFLAGS= + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) +@@ -7042,7 +7476,8 @@ fi + + GCC=$lt_save_GCC + AC_LANG_RESTORE +-CC="$lt_save_CC" ++CC=$lt_save_CC ++CFLAGS=$lt_save_CFLAGS + ])# _LT_LANG_RC_CONFIG + + +@@ -7101,6 +7536,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) + AC_SUBST([OBJDUMP]) + ]) + ++# _LT_DECL_DLLTOOL ++# ---------------- ++# Ensure DLLTOOL variable is set. ++m4_defun([_LT_DECL_DLLTOOL], ++[AC_CHECK_TOOL(DLLTOOL, dlltool, false) ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) ++AC_SUBST([DLLTOOL]) ++]) + + # _LT_DECL_SED + # ------------ +@@ -7194,8 +7638,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -7234,206 +7678,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl + ])# _LT_CHECK_SHELL_FEATURES + + +-# _LT_PROG_XSI_SHELLFNS +-# --------------------- +-# Bourne and XSI compatible variants of some useful shell functions. +-m4_defun([_LT_PROG_XSI_SHELLFNS], +-[case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $[*] )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} ++# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) ++# ------------------------------------------------------ ++# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and ++# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. ++m4_defun([_LT_PROG_FUNCTION_REPLACE], ++[dnl { ++sed -e '/^$1 ()$/,/^} # $1 /c\ ++$1 ()\ ++{\ ++m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) ++} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++]) + +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" + +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} ++# _LT_PROG_REPLACE_SHELLFNS ++# ------------------------- ++# Replace existing portable implementations of several shell functions with ++# equivalent extended shell implementations where those features are available.. ++m4_defun([_LT_PROG_REPLACE_SHELLFNS], ++[if test x"$xsi_shell" = xyes; then ++ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl ++ case ${1} in ++ */*) func_dirname_result="${1%/*}${2}" ;; ++ * ) func_dirname_result="${3}" ;; ++ esac]) ++ ++ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl ++ func_basename_result="${1##*/}"]) ++ ++ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl ++ case ${1} in ++ */*) func_dirname_result="${1%/*}${2}" ;; ++ * ) func_dirname_result="${3}" ;; ++ esac ++ func_basename_result="${1##*/}"]) + +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl ++ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are ++ # positional parameters, so assign one to ordinary parameter first. ++ func_stripname_result=${3} ++ func_stripname_result=${func_stripname_result#"${1}"} ++ func_stripname_result=${func_stripname_result%"${2}"}]) + +-dnl func_dirname_and_basename +-dnl A portable version of this function is already defined in general.m4sh +-dnl so there is no need for it here. ++ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl ++ func_split_long_opt_name=${1%%=*} ++ func_split_long_opt_arg=${1#*=}]) + +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} ++ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl ++ func_split_short_opt_arg=${1#??} ++ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + +-# sed scripts: +-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[[^=]]*=//' ++ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl ++ case ${1} in ++ *.lo) func_lo2o_result=${1%.lo}.${objext} ;; ++ *) func_lo2o_result=${1} ;; ++ esac]) + +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) ++fi + +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$[@]"` +-} ++if test x"$lt_shell_append" = xyes; then ++ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +-} ++ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl ++ func_quote_for_eval "${2}" ++dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ ++ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + +-_LT_EOF +-esac ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi + +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" ++if test x"$_lt_function_replace_fail" = x":"; then ++ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) ++fi ++]) + +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$[1]+=\$[2]" +-} +-_LT_EOF ++# _LT_PATH_CONVERSION_FUNCTIONS ++# ----------------------------- ++# Determine which file name conversion functions should be used by ++# func_to_host_file (and, implicitly, by func_to_host_path). These are needed ++# for certain cross-compile configurations and native mingw. ++m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], ++[AC_REQUIRE([AC_CANONICAL_HOST])dnl ++AC_REQUIRE([AC_CANONICAL_BUILD])dnl ++AC_MSG_CHECKING([how to convert $build file names to $host format]) ++AC_CACHE_VAL(lt_cv_to_host_file_cmd, ++[case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac + ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$[1]=\$$[1]\$[2]" +-} +- +-_LT_EOF ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac + ;; +- esac ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++]) ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) ++_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], ++ [0], [convert $build file names to $host format])dnl ++ ++AC_MSG_CHECKING([how to convert $build file names to toolchain format]) ++AC_CACHE_VAL(lt_cv_to_tool_file_cmd, ++[#assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac + ]) ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) ++_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], ++ [0], [convert $build files to toolchain format])dnl ++])# _LT_PATH_CONVERSION_FUNCTIONS +diff --git a/ltmain.sh b/ltmain.sh +index 9503ec85d70..70e856e0659 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -1,10 +1,9 @@ +-# Generated from ltmain.m4sh. + +-# libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a ++# libtool (GNU libtool) 2.4 + # Written by Gordon Matzigkeit , 1996 + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +-# 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + # This is free software; see the source for copying conditions. There is NO + # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +@@ -38,7 +37,6 @@ + # -n, --dry-run display commands without modifying any files + # --features display basic configuration information and exit + # --mode=MODE use operation mode MODE +-# --no-finish let install mode avoid finish commands + # --preserve-dup-deps don't remove duplicate dependency libraries + # --quiet, --silent don't print informational messages + # --no-quiet, --no-silent +@@ -71,17 +69,19 @@ + # compiler: $LTCC + # compiler flags: $LTCFLAGS + # linker: $LD (gnu? $with_gnu_ld) +-# $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a ++# $progname: (GNU libtool) 2.4 + # automake: $automake_version + # autoconf: $autoconf_version + # + # Report bugs to . ++# GNU libtool home page: . ++# General help using GNU software: . + + PROGRAM=libtool + PACKAGE=libtool +-VERSION=2.2.7a +-TIMESTAMP=" 1.3134 2009-11-29" +-package_revision=1.3134 ++VERSION=2.4 ++TIMESTAMP="" ++package_revision=1.3293 + + # Be Bourne compatible + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +@@ -106,9 +106,6 @@ _LTECHO_EOF' + } + + # NLS nuisances: We save the old values to restore during execute mode. +-# Only set LANG and LC_ALL to C if already set. +-# These must not be set unconditionally because not all systems understand +-# e.g. LANG=C (notably SCO). + lt_user_locale= + lt_safe_locale= + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +@@ -121,15 +118,13 @@ do + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" + done ++LC_ALL=C ++LANGUAGE=C ++export LANGUAGE LC_ALL + + $lt_unset CDPATH + + +- +- +- +- +- + # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh + # is ksh but when the shell is invoked as "sh" and the current value of + # the _XPG environment variable is not equal to 1 (one), the special +@@ -140,7 +135,7 @@ progpath="$0" + + + : ${CP="cp -f"} +-: ${ECHO=$as_echo} ++test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} + : ${EGREP="/bin/grep -E"} + : ${FGREP="/bin/grep -F"} + : ${GREP="/bin/grep"} +@@ -149,7 +144,7 @@ progpath="$0" + : ${MKDIR="mkdir"} + : ${MV="mv -f"} + : ${RM="rm -f"} +-: ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"} ++: ${SED="/bin/sed"} + : ${SHELL="${CONFIG_SHELL-/bin/sh}"} + : ${Xsed="$SED -e 1s/^X//"} + +@@ -169,6 +164,27 @@ IFS=" $lt_nl" + dirname="s,/[^/]*$,," + basename="s,^.*/,," + ++# func_dirname file append nondir_replacement ++# Compute the dirname of FILE. If nonempty, add APPEND to the result, ++# otherwise set result to NONDIR_REPLACEMENT. ++func_dirname () ++{ ++ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` ++ if test "X$func_dirname_result" = "X${1}"; then ++ func_dirname_result="${3}" ++ else ++ func_dirname_result="$func_dirname_result${2}" ++ fi ++} # func_dirname may be replaced by extended shell implementation ++ ++ ++# func_basename file ++func_basename () ++{ ++ func_basename_result=`$ECHO "${1}" | $SED "$basename"` ++} # func_basename may be replaced by extended shell implementation ++ ++ + # func_dirname_and_basename file append nondir_replacement + # perform func_basename and func_dirname in a single function + # call: +@@ -183,17 +199,31 @@ basename="s,^.*/,," + # those functions but instead duplicate the functionality here. + func_dirname_and_basename () + { +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +-} ++ # Extract subdirectory from the argument. ++ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` ++ if test "X$func_dirname_result" = "X${1}"; then ++ func_dirname_result="${3}" ++ else ++ func_dirname_result="$func_dirname_result${2}" ++ fi ++ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` ++} # func_dirname_and_basename may be replaced by extended shell implementation ++ ++ ++# func_stripname prefix suffix name ++# strip PREFIX and SUFFIX off of NAME. ++# PREFIX and SUFFIX must not contain globbing or regex special ++# characters, hashes, percent signs, but SUFFIX may contain a leading ++# dot (in which case that matches only a dot). ++# func_strip_suffix prefix name ++func_stripname () ++{ ++ case ${2} in ++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; ++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; ++ esac ++} # func_stripname may be replaced by extended shell implementation + +-# Generated shell functions inserted here. + + # These SED scripts presuppose an absolute path with a trailing slash. + pathcar='s,^/\([^/]*\).*$,\1,' +@@ -376,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + # Same as above, but do not quote variable references. + double_quote_subst='s/\(["`\\]\)/\\\1/g' + ++# Sed substitution that turns a string into a regex matching for the ++# string literally. ++sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' ++ ++# Sed substitution that converts a w32 file name or path ++# which contains forward slashes, into one that contains ++# (escaped) backslashes. A very naive implementation. ++lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' ++ + # Re-`\' parameter expansions in output of double_quote_subst that were + # `\'-ed in input to the same. If an odd number of `\' preceded a '$' + # in input to double_quote_subst, that '$' was protected from expansion. +@@ -404,7 +443,7 @@ opt_warning=: + # name if it has been set yet. + func_echo () + { +- $ECHO "$progname${mode+: }$mode: $*" ++ $ECHO "$progname: ${opt_mode+$opt_mode: }$*" + } + + # func_verbose arg... +@@ -430,14 +469,14 @@ func_echo_all () + # Echo program name prefixed message to standard error. + func_error () + { +- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 ++ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 + } + + # func_warning arg... + # Echo program name prefixed warning message to standard error. + func_warning () + { +- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 ++ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +@@ -656,19 +695,35 @@ func_show_eval_locale () + fi + } + +- +- ++# func_tr_sh ++# Turn $1 into a string suitable for a shell variable name. ++# Result is stored in $func_tr_sh_result. All characters ++# not in the set a-zA-Z0-9_ are replaced with '_'. Further, ++# if $1 begins with a digit, a '_' is prepended as well. ++func_tr_sh () ++{ ++ case $1 in ++ [0-9]* | *[!a-zA-Z0-9_]*) ++ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ++ ;; ++ * ) ++ func_tr_sh_result=$1 ++ ;; ++ esac ++} + + + # func_version + # Echo version message to standard output and exit. + func_version () + { ++ $opt_debug ++ + $SED -n '/(C)/!b go + :more + /\./!{ + N +- s/\n# // ++ s/\n# / / + b more + } + :go +@@ -685,7 +740,9 @@ func_version () + # Echo short help message to standard output and exit. + func_usage () + { +- $SED -n '/^# Usage:/,/^# *-h/ { ++ $opt_debug ++ ++ $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ +@@ -701,7 +758,10 @@ func_usage () + # unless 'noexit' is passed as argument. + func_help () + { ++ $opt_debug ++ + $SED -n '/^# Usage:/,/# Report bugs to/ { ++ :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* +@@ -714,7 +774,11 @@ func_help () + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p +- }' < "$progpath" ++ d ++ } ++ /^# .* home page:/b print ++ /^# General help using/b print ++ ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret +@@ -726,12 +790,39 @@ func_help () + # exit_cmd. + func_missing_arg () + { +- func_error "missing argument for $1" ++ $opt_debug ++ ++ func_error "missing argument for $1." + exit_cmd=exit + } + +-exit_cmd=: + ++# func_split_short_opt shortopt ++# Set func_split_short_opt_name and func_split_short_opt_arg shell ++# variables after splitting SHORTOPT after the 2nd character. ++func_split_short_opt () ++{ ++ my_sed_short_opt='1s/^\(..\).*$/\1/;q' ++ my_sed_short_rest='1s/^..\(.*\)$/\1/;q' ++ ++ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` ++ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` ++} # func_split_short_opt may be replaced by extended shell implementation ++ ++ ++# func_split_long_opt longopt ++# Set func_split_long_opt_name and func_split_long_opt_arg shell ++# variables after splitting LONGOPT at the `=' sign. ++func_split_long_opt () ++{ ++ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' ++ my_sed_long_arg='1s/^--[^=]*=//' ++ ++ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` ++ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` ++} # func_split_long_opt may be replaced by extended shell implementation ++ ++exit_cmd=: + + + +@@ -741,26 +832,64 @@ magic="%%%MAGIC variable%%%" + magic_exe="%%%MAGIC EXE variable%%%" + + # Global variables. +-# $mode is unset + nonopt= +-execute_dlfiles= + preserve_args= + lo2o="s/\\.lo\$/.${objext}/" + o2lo="s/\\.${objext}\$/.lo/" + extracted_archives= + extracted_serial=0 + +-opt_dry_run=false +-opt_finish=: +-opt_duplicate_deps=false +-opt_silent=false +-opt_debug=: +- + # If this variable is set in any of the actions, the command in it + # will be execed at the end. This prevents here-documents from being + # left over by shells. + exec_cmd= + ++# func_append var value ++# Append VALUE to the end of shell variable VAR. ++func_append () ++{ ++ eval "${1}=\$${1}\${2}" ++} # func_append may be replaced by extended shell implementation ++ ++# func_append_quoted var value ++# Quote VALUE and append to the end of shell variable VAR, separated ++# by a space. ++func_append_quoted () ++{ ++ func_quote_for_eval "${2}" ++ eval "${1}=\$${1}\\ \$func_quote_for_eval_result" ++} # func_append_quoted may be replaced by extended shell implementation ++ ++ ++# func_arith arithmetic-term... ++func_arith () ++{ ++ func_arith_result=`expr "${@}"` ++} # func_arith may be replaced by extended shell implementation ++ ++ ++# func_len string ++# STRING may not start with a hyphen. ++func_len () ++{ ++ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` ++} # func_len may be replaced by extended shell implementation ++ ++ ++# func_lo2o object ++func_lo2o () ++{ ++ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` ++} # func_lo2o may be replaced by extended shell implementation ++ ++ ++# func_xform libobj-or-source ++func_xform () ++{ ++ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` ++} # func_xform may be replaced by extended shell implementation ++ ++ + # func_fatal_configuration arg... + # Echo program name prefixed message to standard error, followed by + # a configuration failure hint, and exit. +@@ -850,130 +979,204 @@ func_enable_tag () + esac + } + +-# Parse options once, thoroughly. This comes as soon as possible in +-# the script to make things like `libtool --version' happen quickly. ++# func_check_version_match ++# Ensure that we are using m4 macros, and libtool script from the same ++# release of libtool. ++func_check_version_match () + { ++ if test "$package_revision" != "$macro_revision"; then ++ if test "$VERSION" != "$macro_version"; then ++ if test -z "$macro_version"; then ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the ++$progname: definition of this LT_INIT comes from an older release. ++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION ++$progname: and run autoconf again. ++_LT_EOF ++ else ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the ++$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. ++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION ++$progname: and run autoconf again. ++_LT_EOF ++ fi ++ else ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, ++$progname: but the definition of this LT_INIT comes from revision $macro_revision. ++$progname: You should recreate aclocal.m4 with macros from revision $package_revision ++$progname: of $PACKAGE $VERSION and run autoconf again. ++_LT_EOF ++ fi + +- # Shorthand for --mode=foo, only valid as the first argument +- case $1 in +- clean|clea|cle|cl) +- shift; set dummy --mode clean ${1+"$@"}; shift +- ;; +- compile|compil|compi|comp|com|co|c) +- shift; set dummy --mode compile ${1+"$@"}; shift +- ;; +- execute|execut|execu|exec|exe|ex|e) +- shift; set dummy --mode execute ${1+"$@"}; shift +- ;; +- finish|finis|fini|fin|fi|f) +- shift; set dummy --mode finish ${1+"$@"}; shift +- ;; +- install|instal|insta|inst|ins|in|i) +- shift; set dummy --mode install ${1+"$@"}; shift +- ;; +- link|lin|li|l) +- shift; set dummy --mode link ${1+"$@"}; shift +- ;; +- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) +- shift; set dummy --mode uninstall ${1+"$@"}; shift +- ;; +- esac ++ exit $EXIT_MISMATCH ++ fi ++} ++ ++ ++# Shorthand for --mode=foo, only valid as the first argument ++case $1 in ++clean|clea|cle|cl) ++ shift; set dummy --mode clean ${1+"$@"}; shift ++ ;; ++compile|compil|compi|comp|com|co|c) ++ shift; set dummy --mode compile ${1+"$@"}; shift ++ ;; ++execute|execut|execu|exec|exe|ex|e) ++ shift; set dummy --mode execute ${1+"$@"}; shift ++ ;; ++finish|finis|fini|fin|fi|f) ++ shift; set dummy --mode finish ${1+"$@"}; shift ++ ;; ++install|instal|insta|inst|ins|in|i) ++ shift; set dummy --mode install ${1+"$@"}; shift ++ ;; ++link|lin|li|l) ++ shift; set dummy --mode link ${1+"$@"}; shift ++ ;; ++uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) ++ shift; set dummy --mode uninstall ${1+"$@"}; shift ++ ;; ++esac + +- # Parse non-mode specific arguments: +- while test "$#" -gt 0; do ++ ++ ++# Option defaults: ++opt_debug=: ++opt_dry_run=false ++opt_config=false ++opt_preserve_dup_deps=false ++opt_features=false ++opt_finish=false ++opt_help=false ++opt_help_all=false ++opt_silent=: ++opt_verbose=: ++opt_silent=false ++opt_verbose=false ++ ++ ++# Parse options once, thoroughly. This comes as soon as possible in the ++# script to make things like `--version' happen as quickly as we can. ++{ ++ # this just eases exit handling ++ while test $# -gt 0; do + opt="$1" + shift +- + case $opt in +- --config) func_config ;; +- +- --debug) preserve_args="$preserve_args $opt" ++ --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" +- opt_debug='set -x' + $opt_debug + ;; +- +- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break +- execute_dlfiles="$execute_dlfiles $1" +- shift ++ --dry-run|--dryrun|-n) ++ opt_dry_run=: + ;; +- +- --dry-run | -n) opt_dry_run=: ;; +- --features) func_features ;; +- --finish) mode="finish" ;; +- --no-finish) opt_finish=false ;; +- +- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break +- case $1 in +- # Valid mode arguments: +- clean) ;; +- compile) ;; +- execute) ;; +- finish) ;; +- install) ;; +- link) ;; +- relink) ;; +- uninstall) ;; +- +- # Catch anything else as an error +- *) func_error "invalid argument for $opt" +- exit_cmd=exit +- break +- ;; +- esac +- +- mode="$1" ++ --config) ++ opt_config=: ++func_config ++ ;; ++ --dlopen|-dlopen) ++ optarg="$1" ++ opt_dlopen="${opt_dlopen+$opt_dlopen ++}$optarg" + shift + ;; +- + --preserve-dup-deps) +- opt_duplicate_deps=: ;; +- +- --quiet|--silent) preserve_args="$preserve_args $opt" +- opt_silent=: +- opt_verbose=false ++ opt_preserve_dup_deps=: + ;; +- +- --no-quiet|--no-silent) +- preserve_args="$preserve_args $opt" +- opt_silent=false ++ --features) ++ opt_features=: ++func_features + ;; +- +- --verbose| -v) preserve_args="$preserve_args $opt" ++ --finish) ++ opt_finish=: ++set dummy --mode finish ${1+"$@"}; shift ++ ;; ++ --help) ++ opt_help=: ++ ;; ++ --help-all) ++ opt_help_all=: ++opt_help=': help-all' ++ ;; ++ --mode) ++ test $# = 0 && func_missing_arg $opt && break ++ optarg="$1" ++ opt_mode="$optarg" ++case $optarg in ++ # Valid mode arguments: ++ clean|compile|execute|finish|install|link|relink|uninstall) ;; ++ ++ # Catch anything else as an error ++ *) func_error "invalid argument for $opt" ++ exit_cmd=exit ++ break ++ ;; ++esac ++ shift ++ ;; ++ --no-silent|--no-quiet) + opt_silent=false +- opt_verbose=: ++func_append preserve_args " $opt" + ;; +- +- --no-verbose) preserve_args="$preserve_args $opt" ++ --no-verbose) + opt_verbose=false ++func_append preserve_args " $opt" + ;; +- +- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break +- preserve_args="$preserve_args $opt $1" +- func_enable_tag "$1" # tagname is set here ++ --silent|--quiet) ++ opt_silent=: ++func_append preserve_args " $opt" ++ opt_verbose=false ++ ;; ++ --verbose|-v) ++ opt_verbose=: ++func_append preserve_args " $opt" ++opt_silent=false ++ ;; ++ --tag) ++ test $# = 0 && func_missing_arg $opt && break ++ optarg="$1" ++ opt_tag="$optarg" ++func_append preserve_args " $opt $optarg" ++func_enable_tag "$optarg" + shift + ;; + ++ -\?|-h) func_usage ;; ++ --help) func_help ;; ++ --version) func_version ;; ++ + # Separate optargs to long options: +- -dlopen=*|--mode=*|--tag=*) +- func_opt_split "$opt" +- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} ++ --*=*) ++ func_split_long_opt "$opt" ++ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + +- -\?|-h) func_usage ;; +- --help) opt_help=: ;; +- --help-all) opt_help=': help-all' ;; +- --version) func_version ;; +- +- -*) func_fatal_help "unrecognized option \`$opt'" ;; +- +- *) nonopt="$opt" +- break ++ # Separate non-argument short options: ++ -\?*|-h*|-n*|-v*) ++ func_split_short_opt "$opt" ++ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} ++ shift + ;; ++ ++ --) break ;; ++ -*) func_fatal_help "unrecognized option \`$opt'" ;; ++ *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + ++ # Validate options: ++ ++ # save first non-option argument ++ if test "$#" -gt 0; then ++ nonopt="$opt" ++ shift ++ fi ++ ++ # preserve --debug ++ test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* ) +@@ -981,82 +1184,44 @@ func_enable_tag () + opt_duplicate_compiler_generated_deps=: + ;; + *) +- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ++ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + +- # Having warned about all mis-specified options, bail out if +- # anything was wrong. +- $exit_cmd $EXIT_FAILURE +-} ++ $opt_help || { ++ # Sanity checks first: ++ func_check_version_match + +-# func_check_version_match +-# Ensure that we are using m4 macros, and libtool script from the same +-# release of libtool. +-func_check_version_match () +-{ +- if test "$package_revision" != "$macro_revision"; then +- if test "$VERSION" != "$macro_version"; then +- if test -z "$macro_version"; then +- cat >&2 <<_LT_EOF +-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +-$progname: definition of this LT_INIT comes from an older release. +-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +-$progname: and run autoconf again. +-_LT_EOF +- else +- cat >&2 <<_LT_EOF +-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +-$progname: and run autoconf again. +-_LT_EOF +- fi +- else +- cat >&2 <<_LT_EOF +-$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +-$progname: but the definition of this LT_INIT comes from revision $macro_revision. +-$progname: You should recreate aclocal.m4 with macros from revision $package_revision +-$progname: of $PACKAGE $VERSION and run autoconf again. +-_LT_EOF ++ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then ++ func_fatal_configuration "not configured to build any kind of library" + fi + +- exit $EXIT_MISMATCH +- fi +-} +- ++ # Darwin sucks ++ eval std_shrext=\"$shrext_cmds\" + +-## ----------- ## +-## Main. ## +-## ----------- ## +- +-$opt_help || { +- # Sanity checks first: +- func_check_version_match +- +- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then +- func_fatal_configuration "not configured to build any kind of library" +- fi ++ # Only execute mode is allowed to have -dlopen flags. ++ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then ++ func_error "unrecognized option \`-dlopen'" ++ $ECHO "$help" 1>&2 ++ exit $EXIT_FAILURE ++ fi + +- test -z "$mode" && func_fatal_error "error: you must specify a MODE." ++ # Change the help message to a mode-specific one. ++ generic_help="$help" ++ help="Try \`$progname --help --mode=$opt_mode' for more information." ++ } + + +- # Darwin sucks +- eval "std_shrext=\"$shrext_cmds\"" ++ # Bail if the options were screwed ++ $exit_cmd $EXIT_FAILURE ++} + + +- # Only execute mode is allowed to have -dlopen flags. +- if test -n "$execute_dlfiles" && test "$mode" != execute; then +- func_error "unrecognized option \`-dlopen'" +- $ECHO "$help" 1>&2 +- exit $EXIT_FAILURE +- fi + +- # Change the help message to a mode-specific one. +- generic_help="$help" +- help="Try \`$progname --help --mode=$mode' for more information." +-} + ++## ----------- ## ++## Main. ## ++## ----------- ## + + # func_lalib_p file + # True iff FILE is a libtool `.la' library or `.lo' object file. +@@ -1121,12 +1286,9 @@ func_ltwrapper_executable_p () + # temporary ltwrapper_script. + func_ltwrapper_scriptname () + { +- func_ltwrapper_scriptname_result="" +- if func_ltwrapper_executable_p "$1"; then +- func_dirname_and_basename "$1" "" "." +- func_stripname '' '.exe' "$func_basename_result" +- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +- fi ++ func_dirname_and_basename "$1" "" "." ++ func_stripname '' '.exe' "$func_basename_result" ++ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + } + + # func_ltwrapper_p file +@@ -1149,7 +1311,7 @@ func_execute_cmds () + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs +- eval "cmd=\"$cmd\"" ++ eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +@@ -1172,6 +1334,37 @@ func_source () + } + + ++# func_resolve_sysroot PATH ++# Replace a leading = in PATH with a sysroot. Store the result into ++# func_resolve_sysroot_result ++func_resolve_sysroot () ++{ ++ func_resolve_sysroot_result=$1 ++ case $func_resolve_sysroot_result in ++ =*) ++ func_stripname '=' '' "$func_resolve_sysroot_result" ++ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ++ ;; ++ esac ++} ++ ++# func_replace_sysroot PATH ++# If PATH begins with the sysroot, replace it with = and ++# store the result into func_replace_sysroot_result. ++func_replace_sysroot () ++{ ++ case "$lt_sysroot:$1" in ++ ?*:"$lt_sysroot"*) ++ func_stripname "$lt_sysroot" '' "$1" ++ func_replace_sysroot_result="=$func_stripname_result" ++ ;; ++ *) ++ # Including no sysroot. ++ func_replace_sysroot_result=$1 ++ ;; ++ esac ++} ++ + # func_infer_tag arg + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. +@@ -1184,8 +1377,7 @@ func_infer_tag () + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do +- func_quote_for_eval "$arg" +- CC_quoted="$CC_quoted $func_quote_for_eval_result" ++ func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` +@@ -1204,8 +1396,7 @@ func_infer_tag () + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. +- func_quote_for_eval "$arg" +- CC_quoted="$CC_quoted $func_quote_for_eval_result" ++ func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` +@@ -1274,6 +1465,486 @@ EOF + } + } + ++ ++################################################## ++# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # ++################################################## ++ ++# func_convert_core_file_wine_to_w32 ARG ++# Helper function used by file name conversion functions when $build is *nix, ++# and $host is mingw, cygwin, or some other w32 environment. Relies on a ++# correctly configured wine environment available, with the winepath program ++# in $build's $PATH. ++# ++# ARG is the $build file name to be converted to w32 format. ++# Result is available in $func_convert_core_file_wine_to_w32_result, and will ++# be empty on error (or when ARG is empty) ++func_convert_core_file_wine_to_w32 () ++{ ++ $opt_debug ++ func_convert_core_file_wine_to_w32_result="$1" ++ if test -n "$1"; then ++ # Unfortunately, winepath does not exit with a non-zero error code, so we ++ # are forced to check the contents of stdout. On the other hand, if the ++ # command is not found, the shell will set an exit code of 127 and print ++ # *an error message* to stdout. So we must check for both error code of ++ # zero AND non-empty stdout, which explains the odd construction: ++ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` ++ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then ++ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | ++ $SED -e "$lt_sed_naive_backslashify"` ++ else ++ func_convert_core_file_wine_to_w32_result= ++ fi ++ fi ++} ++# end: func_convert_core_file_wine_to_w32 ++ ++ ++# func_convert_core_path_wine_to_w32 ARG ++# Helper function used by path conversion functions when $build is *nix, and ++# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly ++# configured wine environment available, with the winepath program in $build's ++# $PATH. Assumes ARG has no leading or trailing path separator characters. ++# ++# ARG is path to be converted from $build format to win32. ++# Result is available in $func_convert_core_path_wine_to_w32_result. ++# Unconvertible file (directory) names in ARG are skipped; if no directory names ++# are convertible, then the result may be empty. ++func_convert_core_path_wine_to_w32 () ++{ ++ $opt_debug ++ # unfortunately, winepath doesn't convert paths, only file names ++ func_convert_core_path_wine_to_w32_result="" ++ if test -n "$1"; then ++ oldIFS=$IFS ++ IFS=: ++ for func_convert_core_path_wine_to_w32_f in $1; do ++ IFS=$oldIFS ++ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" ++ if test -n "$func_convert_core_file_wine_to_w32_result" ; then ++ if test -z "$func_convert_core_path_wine_to_w32_result"; then ++ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" ++ else ++ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" ++ fi ++ fi ++ done ++ IFS=$oldIFS ++ fi ++} ++# end: func_convert_core_path_wine_to_w32 ++ ++ ++# func_cygpath ARGS... ++# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when ++# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) ++# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or ++# (2), returns the Cygwin file name or path in func_cygpath_result (input ++# file name or path is assumed to be in w32 format, as previously converted ++# from $build's *nix or MSYS format). In case (3), returns the w32 file name ++# or path in func_cygpath_result (input file name or path is assumed to be in ++# Cygwin format). Returns an empty string on error. ++# ++# ARGS are passed to cygpath, with the last one being the file name or path to ++# be converted. ++# ++# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH ++# environment variable; do not put it in $PATH. ++func_cygpath () ++{ ++ $opt_debug ++ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then ++ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` ++ if test "$?" -ne 0; then ++ # on failure, ensure result is empty ++ func_cygpath_result= ++ fi ++ else ++ func_cygpath_result= ++ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" ++ fi ++} ++#end: func_cygpath ++ ++ ++# func_convert_core_msys_to_w32 ARG ++# Convert file name or path ARG from MSYS format to w32 format. Return ++# result in func_convert_core_msys_to_w32_result. ++func_convert_core_msys_to_w32 () ++{ ++ $opt_debug ++ # awkward: cmd appends spaces to result ++ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | ++ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` ++} ++#end: func_convert_core_msys_to_w32 ++ ++ ++# func_convert_file_check ARG1 ARG2 ++# Verify that ARG1 (a file name in $build format) was converted to $host ++# format in ARG2. Otherwise, emit an error message, but continue (resetting ++# func_to_host_file_result to ARG1). ++func_convert_file_check () ++{ ++ $opt_debug ++ if test -z "$2" && test -n "$1" ; then ++ func_error "Could not determine host file name corresponding to" ++ func_error " \`$1'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback: ++ func_to_host_file_result="$1" ++ fi ++} ++# end func_convert_file_check ++ ++ ++# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH ++# Verify that FROM_PATH (a path in $build format) was converted to $host ++# format in TO_PATH. Otherwise, emit an error message, but continue, resetting ++# func_to_host_file_result to a simplistic fallback value (see below). ++func_convert_path_check () ++{ ++ $opt_debug ++ if test -z "$4" && test -n "$3"; then ++ func_error "Could not determine the host path corresponding to" ++ func_error " \`$3'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback. This is a deliberately simplistic "conversion" and ++ # should not be "improved". See libtool.info. ++ if test "x$1" != "x$2"; then ++ lt_replace_pathsep_chars="s|$1|$2|g" ++ func_to_host_path_result=`echo "$3" | ++ $SED -e "$lt_replace_pathsep_chars"` ++ else ++ func_to_host_path_result="$3" ++ fi ++ fi ++} ++# end func_convert_path_check ++ ++ ++# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG ++# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT ++# and appending REPL if ORIG matches BACKPAT. ++func_convert_path_front_back_pathsep () ++{ ++ $opt_debug ++ case $4 in ++ $1 ) func_to_host_path_result="$3$func_to_host_path_result" ++ ;; ++ esac ++ case $4 in ++ $2 ) func_append func_to_host_path_result "$3" ++ ;; ++ esac ++} ++# end func_convert_path_front_back_pathsep ++ ++ ++################################################## ++# $build to $host FILE NAME CONVERSION FUNCTIONS # ++################################################## ++# invoked via `$to_host_file_cmd ARG' ++# ++# In each case, ARG is the path to be converted from $build to $host format. ++# Result will be available in $func_to_host_file_result. ++ ++ ++# func_to_host_file ARG ++# Converts the file name ARG from $build format to $host format. Return result ++# in func_to_host_file_result. ++func_to_host_file () ++{ ++ $opt_debug ++ $to_host_file_cmd "$1" ++} ++# end func_to_host_file ++ ++ ++# func_to_tool_file ARG LAZY ++# converts the file name ARG from $build format to toolchain format. Return ++# result in func_to_tool_file_result. If the conversion in use is listed ++# in (the comma separated) LAZY, no conversion takes place. ++func_to_tool_file () ++{ ++ $opt_debug ++ case ,$2, in ++ *,"$to_tool_file_cmd",*) ++ func_to_tool_file_result=$1 ++ ;; ++ *) ++ $to_tool_file_cmd "$1" ++ func_to_tool_file_result=$func_to_host_file_result ++ ;; ++ esac ++} ++# end func_to_tool_file ++ ++ ++# func_convert_file_noop ARG ++# Copy ARG to func_to_host_file_result. ++func_convert_file_noop () ++{ ++ func_to_host_file_result="$1" ++} ++# end func_convert_file_noop ++ ++ ++# func_convert_file_msys_to_w32 ARG ++# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic ++# conversion to w32 is not available inside the cwrapper. Returns result in ++# func_to_host_file_result. ++func_convert_file_msys_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_msys_to_w32 "$1" ++ func_to_host_file_result="$func_convert_core_msys_to_w32_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_msys_to_w32 ++ ++ ++# func_convert_file_cygwin_to_w32 ARG ++# Convert file name ARG from Cygwin to w32 format. Returns result in ++# func_to_host_file_result. ++func_convert_file_cygwin_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use ++ # LT_CYGPATH in this case. ++ func_to_host_file_result=`cygpath -m "$1"` ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_cygwin_to_w32 ++ ++ ++# func_convert_file_nix_to_w32 ARG ++# Convert file name ARG from *nix to w32 format. Requires a wine environment ++# and a working winepath. Returns result in func_to_host_file_result. ++func_convert_file_nix_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_file_wine_to_w32 "$1" ++ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_nix_to_w32 ++ ++ ++# func_convert_file_msys_to_cygwin ARG ++# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. ++# Returns result in func_to_host_file_result. ++func_convert_file_msys_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_msys_to_w32 "$1" ++ func_cygpath -u "$func_convert_core_msys_to_w32_result" ++ func_to_host_file_result="$func_cygpath_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_msys_to_cygwin ++ ++ ++# func_convert_file_nix_to_cygwin ARG ++# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed ++# in a wine environment, working winepath, and LT_CYGPATH set. Returns result ++# in func_to_host_file_result. ++func_convert_file_nix_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. ++ func_convert_core_file_wine_to_w32 "$1" ++ func_cygpath -u "$func_convert_core_file_wine_to_w32_result" ++ func_to_host_file_result="$func_cygpath_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_nix_to_cygwin ++ ++ ++############################################# ++# $build to $host PATH CONVERSION FUNCTIONS # ++############################################# ++# invoked via `$to_host_path_cmd ARG' ++# ++# In each case, ARG is the path to be converted from $build to $host format. ++# The result will be available in $func_to_host_path_result. ++# ++# Path separators are also converted from $build format to $host format. If ++# ARG begins or ends with a path separator character, it is preserved (but ++# converted to $host format) on output. ++# ++# All path conversion functions are named using the following convention: ++# file name conversion function : func_convert_file_X_to_Y () ++# path conversion function : func_convert_path_X_to_Y () ++# where, for any given $build/$host combination the 'X_to_Y' value is the ++# same. If conversion functions are added for new $build/$host combinations, ++# the two new functions must follow this pattern, or func_init_to_host_path_cmd ++# will break. ++ ++ ++# func_init_to_host_path_cmd ++# Ensures that function "pointer" variable $to_host_path_cmd is set to the ++# appropriate value, based on the value of $to_host_file_cmd. ++to_host_path_cmd= ++func_init_to_host_path_cmd () ++{ ++ $opt_debug ++ if test -z "$to_host_path_cmd"; then ++ func_stripname 'func_convert_file_' '' "$to_host_file_cmd" ++ to_host_path_cmd="func_convert_path_${func_stripname_result}" ++ fi ++} ++ ++ ++# func_to_host_path ARG ++# Converts the path ARG from $build format to $host format. Return result ++# in func_to_host_path_result. ++func_to_host_path () ++{ ++ $opt_debug ++ func_init_to_host_path_cmd ++ $to_host_path_cmd "$1" ++} ++# end func_to_host_path ++ ++ ++# func_convert_path_noop ARG ++# Copy ARG to func_to_host_path_result. ++func_convert_path_noop () ++{ ++ func_to_host_path_result="$1" ++} ++# end func_convert_path_noop ++ ++ ++# func_convert_path_msys_to_w32 ARG ++# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic ++# conversion to w32 is not available inside the cwrapper. Returns result in ++# func_to_host_path_result. ++func_convert_path_msys_to_w32 () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # Remove leading and trailing path separator characters from ARG. MSYS ++ # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; ++ # and winepath ignores them completely. ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" ++ func_to_host_path_result="$func_convert_core_msys_to_w32_result" ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi ++} ++# end func_convert_path_msys_to_w32 ++ ++ ++# func_convert_path_cygwin_to_w32 ARG ++# Convert path ARG from Cygwin to w32 format. Returns result in ++# func_to_host_file_result. ++func_convert_path_cygwin_to_w32 () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi ++} ++# end func_convert_path_cygwin_to_w32 ++ ++ ++# func_convert_path_nix_to_w32 ARG ++# Convert path ARG from *nix to w32 format. Requires a wine environment and ++# a working winepath. Returns result in func_to_host_file_result. ++func_convert_path_nix_to_w32 () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" ++ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi ++} ++# end func_convert_path_nix_to_w32 ++ ++ ++# func_convert_path_msys_to_cygwin ARG ++# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. ++# Returns result in func_to_host_file_result. ++func_convert_path_msys_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" ++ func_cygpath -u -p "$func_convert_core_msys_to_w32_result" ++ func_to_host_path_result="$func_cygpath_result" ++ func_convert_path_check : : \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" : "$1" ++ fi ++} ++# end func_convert_path_msys_to_cygwin ++ ++ ++# func_convert_path_nix_to_cygwin ARG ++# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a ++# a wine environment, working winepath, and LT_CYGPATH set. Returns result in ++# func_to_host_file_result. ++func_convert_path_nix_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # Remove leading and trailing path separator characters from ++ # ARG. msys behavior is inconsistent here, cygpath turns them ++ # into '.;' and ';.', and winepath ignores them completely. ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" ++ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" ++ func_to_host_path_result="$func_cygpath_result" ++ func_convert_path_check : : \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" : "$1" ++ fi ++} ++# end func_convert_path_nix_to_cygwin ++ ++ + # func_mode_compile arg... + func_mode_compile () + { +@@ -1314,12 +1985,12 @@ func_mode_compile () + ;; + + -pie | -fpie | -fPIE) +- pie_flag="$pie_flag $arg" ++ func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) +- later="$later $arg" ++ func_append later " $arg" + continue + ;; + +@@ -1340,15 +2011,14 @@ func_mode_compile () + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" +- func_quote_for_eval "$arg" +- lastarg="$lastarg $func_quote_for_eval_result" ++ func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. +- base_compile="$base_compile $lastarg" ++ func_append base_compile " $lastarg" + continue + ;; + +@@ -1364,8 +2034,7 @@ func_mode_compile () + esac # case $arg_mode + + # Aesthetically quote the previous argument. +- func_quote_for_eval "$lastarg" +- base_compile="$base_compile $func_quote_for_eval_result" ++ func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in +@@ -1496,17 +2165,16 @@ compiler." + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi +- removelist="$removelist $output_obj" ++ func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist +- removelist="$removelist $lockfile" ++ func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + +- if test -n "$fix_srcfile_path"; then +- eval "srcfile=\"$fix_srcfile_path\"" +- fi ++ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 ++ srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + +@@ -1526,7 +2194,7 @@ compiler." + + if test -z "$output_obj"; then + # Place PIC objects in $objdir +- command="$command -o $lobj" ++ func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ +@@ -1573,11 +2241,11 @@ compiler." + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then +- command="$command -o $obj" ++ func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. +- command="$command$suppress_output" ++ func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + +@@ -1622,13 +2290,13 @@ compiler." + } + + $opt_help || { +- test "$mode" = compile && func_mode_compile ${1+"$@"} ++ test "$opt_mode" = compile && func_mode_compile ${1+"$@"} + } + + func_mode_help () + { + # We need to display help for each of the modes. +- case $mode in ++ case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. +@@ -1659,8 +2327,8 @@ This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes +- -prefer-pic try to building PIC objects only +- -prefer-non-pic try to building non-PIC objects only ++ -prefer-pic try to build PIC objects only ++ -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler +@@ -1804,7 +2472,7 @@ Otherwise, only FILE itself is deleted using RM." + ;; + + *) +- func_fatal_help "invalid operation mode \`$mode'" ++ func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + +@@ -1819,13 +2487,13 @@ if $opt_help; then + else + { + func_help noexit +- for mode in compile link execute install finish uninstall clean; do ++ for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit +- for mode in compile link execute install finish uninstall clean; do ++ for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done +@@ -1854,13 +2522,16 @@ func_mode_execute () + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. +- for file in $execute_dlfiles; do ++ for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) ++ func_resolve_sysroot "$file" ++ file=$func_resolve_sysroot_result ++ + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" +@@ -1882,7 +2553,7 @@ func_mode_execute () + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then +- dir="$dir/$objdir" ++ func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" +@@ -1907,10 +2578,10 @@ func_mode_execute () + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. +- if eval test -z \"\$$shlibpath_var\"; then +- eval $shlibpath_var=\$dir ++ if eval "test -z \"\$$shlibpath_var\""; then ++ eval "$shlibpath_var=\"\$dir\"" + else +- eval $shlibpath_var=\$dir:\$$shlibpath_var ++ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + +@@ -1939,8 +2610,7 @@ func_mode_execute () + ;; + esac + # Quote arguments (to preserve shell metacharacters). +- func_quote_for_eval "$file" +- args="$args $func_quote_for_eval_result" ++ func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then +@@ -1972,22 +2642,59 @@ func_mode_execute () + fi + } + +-test "$mode" = execute && func_mode_execute ${1+"$@"} ++test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + + # func_mode_finish arg... + func_mode_finish () + { + $opt_debug +- libdirs="$nonopt" ++ libs= ++ libdirs= + admincmds= + +- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then +- for dir +- do +- libdirs="$libdirs $dir" +- done ++ for opt in "$nonopt" ${1+"$@"} ++ do ++ if test -d "$opt"; then ++ func_append libdirs " $opt" + ++ elif test -f "$opt"; then ++ if func_lalib_unsafe_p "$opt"; then ++ func_append libs " $opt" ++ else ++ func_warning "\`$opt' is not a valid libtool archive" ++ fi ++ ++ else ++ func_fatal_error "invalid argument \`$opt'" ++ fi ++ done ++ ++ if test -n "$libs"; then ++ if test -n "$lt_sysroot"; then ++ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` ++ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" ++ else ++ sysroot_cmd= ++ fi ++ ++ # Remove sysroot references ++ if $opt_dry_run; then ++ for lib in $libs; do ++ echo "removing references to $lt_sysroot and \`=' prefixes from $lib" ++ done ++ else ++ tmpdir=`func_mktempdir` ++ for lib in $libs; do ++ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ ++ > $tmpdir/tmp-la ++ mv -f $tmpdir/tmp-la $lib ++ done ++ ${RM}r "$tmpdir" ++ fi ++ fi ++ ++ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. +@@ -1997,7 +2704,7 @@ func_mode_finish () + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" +- $opt_dry_run || eval "$cmds" || admincmds="$admincmds ++ $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done +@@ -2006,53 +2713,55 @@ func_mode_finish () + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + +- echo "----------------------------------------------------------------------" +- echo "Libraries have been installed in:" +- for libdir in $libdirs; do +- $ECHO " $libdir" +- done +- echo +- echo "If you ever happen to want to link against installed libraries" +- echo "in a given directory, LIBDIR, you must either use libtool, and" +- echo "specify the full pathname of the library, or use the \`-LLIBDIR'" +- echo "flag during linking and do at least one of the following:" +- if test -n "$shlibpath_var"; then +- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" +- echo " during execution" +- fi +- if test -n "$runpath_var"; then +- echo " - add LIBDIR to the \`$runpath_var' environment variable" +- echo " during linking" +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval "flag=\"$hardcode_libdir_flag_spec\"" ++ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then ++ echo "----------------------------------------------------------------------" ++ echo "Libraries have been installed in:" ++ for libdir in $libdirs; do ++ $ECHO " $libdir" ++ done ++ echo ++ echo "If you ever happen to want to link against installed libraries" ++ echo "in a given directory, LIBDIR, you must either use libtool, and" ++ echo "specify the full pathname of the library, or use the \`-LLIBDIR'" ++ echo "flag during linking and do at least one of the following:" ++ if test -n "$shlibpath_var"; then ++ echo " - add LIBDIR to the \`$shlibpath_var' environment variable" ++ echo " during execution" ++ fi ++ if test -n "$runpath_var"; then ++ echo " - add LIBDIR to the \`$runpath_var' environment variable" ++ echo " during linking" ++ fi ++ if test -n "$hardcode_libdir_flag_spec"; then ++ libdir=LIBDIR ++ eval flag=\"$hardcode_libdir_flag_spec\" + +- $ECHO " - use the \`$flag' linker flag" +- fi +- if test -n "$admincmds"; then +- $ECHO " - have your system administrator run these commands:$admincmds" +- fi +- if test -f /etc/ld.so.conf; then +- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" +- fi +- echo ++ $ECHO " - use the \`$flag' linker flag" ++ fi ++ if test -n "$admincmds"; then ++ $ECHO " - have your system administrator run these commands:$admincmds" ++ fi ++ if test -f /etc/ld.so.conf; then ++ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" ++ fi ++ echo + +- echo "See any operating system documentation about shared libraries for" +- case $host in +- solaris2.[6789]|solaris2.1[0-9]) +- echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" +- echo "pages." +- ;; +- *) +- echo "more information, such as the ld(1) and ld.so(8) manual pages." +- ;; +- esac +- echo "----------------------------------------------------------------------" ++ echo "See any operating system documentation about shared libraries for" ++ case $host in ++ solaris2.[6789]|solaris2.1[0-9]) ++ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" ++ echo "pages." ++ ;; ++ *) ++ echo "more information, such as the ld(1) and ld.so(8) manual pages." ++ ;; ++ esac ++ echo "----------------------------------------------------------------------" ++ fi + exit $EXIT_SUCCESS + } + +-test "$mode" = finish && func_mode_finish ${1+"$@"} ++test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + + # func_mode_install arg... +@@ -2077,7 +2786,7 @@ func_mode_install () + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" +- install_prog="$install_prog$func_quote_for_eval_result" ++ func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; +@@ -2097,7 +2806,7 @@ func_mode_install () + do + arg2= + if test -n "$dest"; then +- files="$files $dest" ++ func_append files " $dest" + dest=$arg + continue + fi +@@ -2135,11 +2844,11 @@ func_mode_install () + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" +- install_prog="$install_prog $func_quote_for_eval_result" ++ func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi +- install_shared_prog="$install_shared_prog $func_quote_for_eval_result" ++ func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ +@@ -2151,7 +2860,7 @@ func_mode_install () + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" +- install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" ++ func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + +@@ -2209,10 +2918,13 @@ func_mode_install () + case $file in + *.$libext) + # Do the static libraries later. +- staticlibs="$staticlibs $file" ++ func_append staticlibs " $file" + ;; + + *.la) ++ func_resolve_sysroot "$file" ++ file=$func_resolve_sysroot_result ++ + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" +@@ -2226,23 +2938,30 @@ func_mode_install () + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; +- *) current_libdirs="$current_libdirs $libdir" ;; ++ *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; +- *) future_libdirs="$future_libdirs $libdir" ;; ++ *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" +- dir="$dir$objdir" ++ func_append dir "$objdir" + + if test -n "$relink_command"; then ++ # Strip any trailing slash from the destination. ++ func_stripname '' '/' "$libdir" ++ destlibdir=$func_stripname_result ++ ++ func_stripname '' '/' "$destdir" ++ s_destdir=$func_stripname_result ++ + # Determine the prefix the user has applied to our future dir. +- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` ++ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that +@@ -2315,7 +3034,7 @@ func_mode_install () + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. +- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ++ test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) +@@ -2503,7 +3222,7 @@ func_mode_install () + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + +- if test -n "$current_libdirs" && $opt_finish; then ++ if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' +@@ -2512,7 +3231,7 @@ func_mode_install () + fi + } + +-test "$mode" = install && func_mode_install ${1+"$@"} ++test "$opt_mode" = install && func_mode_install ${1+"$@"} + + + # func_generate_dlsyms outputname originator pic_p +@@ -2559,6 +3278,18 @@ extern \"C\" { + #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" + #endif + ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + /* External symbol declarations for the compiler. */\ + " + +@@ -2570,21 +3301,22 @@ extern \"C\" { + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do +- func_verbose "extracting global C symbols from \`$progfile'" +- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" ++ func_to_tool_file "$progfile" func_convert_file_msys_to_w32 ++ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" ++ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { +- $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T +- $MV "$nlist"T "$nlist" ++ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' ++ eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { +- $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T +- $MV "$nlist"T "$nlist" ++ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' ++ eval '$MV "$nlist"T "$nlist"' + } + fi + +@@ -2593,23 +3325,23 @@ extern \"C\" { + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols +- ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols" ++ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) +- echo EXPORTS > "$output_objdir/$outputname.def" +- cat "$export_symbols" >> "$output_objdir/$outputname.def" ++ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ++ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { +- ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp" +- $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T +- $MV "$nlist"T "$nlist" ++ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' ++ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' ++ eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) +- echo EXPORTS > "$output_objdir/$outputname.def" +- cat "$nlist" >> "$output_objdir/$outputname.def" ++ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' ++ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } +@@ -2620,10 +3352,52 @@ extern \"C\" { + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" +- $opt_dry_run || { +- $ECHO ": $name " >> "$nlist" +- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" +- } ++ case $host in ++ *cygwin* | *mingw* | *cegcc* ) ++ # if an import library, we need to obtain dlname ++ if func_win32_import_lib_p "$dlprefile"; then ++ func_tr_sh "$dlprefile" ++ eval "curr_lafile=\$libfile_$func_tr_sh_result" ++ dlprefile_dlbasename="" ++ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then ++ # Use subshell, to avoid clobbering current variable values ++ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` ++ if test -n "$dlprefile_dlname" ; then ++ func_basename "$dlprefile_dlname" ++ dlprefile_dlbasename="$func_basename_result" ++ else ++ # no lafile. user explicitly requested -dlpreopen . ++ $sharedlib_from_linklib_cmd "$dlprefile" ++ dlprefile_dlbasename=$sharedlib_from_linklib_result ++ fi ++ fi ++ $opt_dry_run || { ++ if test -n "$dlprefile_dlbasename" ; then ++ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' ++ else ++ func_warning "Could not compute DLL name from $name" ++ eval '$ECHO ": $name " >> "$nlist"' ++ fi ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | ++ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" ++ } ++ else # not an import lib ++ $opt_dry_run || { ++ eval '$ECHO ": $name " >> "$nlist"' ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" ++ } ++ fi ++ ;; ++ *) ++ $opt_dry_run || { ++ eval '$ECHO ": $name " >> "$nlist"' ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" ++ } ++ ;; ++ esac + done + + $opt_dry_run || { +@@ -2661,26 +3435,9 @@ typedef struct { + const char *name; + void *address; + } lt_dlsymlist; +-" +- case $host in +- *cygwin* | *mingw* | *cegcc* ) +- echo >> "$output_objdir/$my_dlsyms" "\ +-/* DATA imports from DLLs on WIN32 con't be const, because +- runtime relocations are performed -- see ld's documentation +- on pseudo-relocs. */" +- lt_dlsym_const= ;; +- *osf5*) +- echo >> "$output_objdir/$my_dlsyms" "\ +-/* This system does not cope well with relocations in const data */" +- lt_dlsym_const= ;; +- *) +- lt_dlsym_const=const ;; +- esac +- +- echo >> "$output_objdir/$my_dlsyms" "\ +-extern $lt_dlsym_const lt_dlsymlist ++extern LT_DLSYM_CONST lt_dlsymlist + lt_${my_prefix}_LTX_preloaded_symbols[]; +-$lt_dlsym_const lt_dlsymlist ++LT_DLSYM_CONST lt_dlsymlist + lt_${my_prefix}_LTX_preloaded_symbols[] = + {\ + { \"$my_originator\", (void *) 0 }," +@@ -2736,7 +3493,7 @@ static const void *lt_preloaded_setup() { + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; +- *) symtab_cflags="$symtab_cflags $arg" ;; ++ *) func_append symtab_cflags " $arg" ;; + esac + done + +@@ -2796,9 +3553,11 @@ func_win32_libid () + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static +- if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null | +- $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then +- win32_nmres=`$NM -f posix -A "$1" | ++ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. ++ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | ++ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ +@@ -2827,6 +3586,131 @@ func_win32_libid () + $ECHO "$win32_libid_type" + } + ++# func_cygming_dll_for_implib ARG ++# ++# Platform-specific function to extract the ++# name of the DLL associated with the specified ++# import library ARG. ++# Invoked by eval'ing the libtool variable ++# $sharedlib_from_linklib_cmd ++# Result is available in the variable ++# $sharedlib_from_linklib_result ++func_cygming_dll_for_implib () ++{ ++ $opt_debug ++ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` ++} ++ ++# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs ++# ++# The is the core of a fallback implementation of a ++# platform-specific function to extract the name of the ++# DLL associated with the specified import library LIBNAME. ++# ++# SECTION_NAME is either .idata$6 or .idata$7, depending ++# on the platform and compiler that created the implib. ++# ++# Echos the name of the DLL associated with the ++# specified import library. ++func_cygming_dll_for_implib_fallback_core () ++{ ++ $opt_debug ++ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` ++ $OBJDUMP -s --section "$1" "$2" 2>/dev/null | ++ $SED '/^Contents of section '"$match_literal"':/{ ++ # Place marker at beginning of archive member dllname section ++ s/.*/====MARK====/ ++ p ++ d ++ } ++ # These lines can sometimes be longer than 43 characters, but ++ # are always uninteresting ++ /:[ ]*file format pe[i]\{,1\}-/d ++ /^In archive [^:]*:/d ++ # Ensure marker is printed ++ /^====MARK====/p ++ # Remove all lines with less than 43 characters ++ /^.\{43\}/!d ++ # From remaining lines, remove first 43 characters ++ s/^.\{43\}//' | ++ $SED -n ' ++ # Join marker and all lines until next marker into a single line ++ /^====MARK====/ b para ++ H ++ $ b para ++ b ++ :para ++ x ++ s/\n//g ++ # Remove the marker ++ s/^====MARK====// ++ # Remove trailing dots and whitespace ++ s/[\. \t]*$// ++ # Print ++ /./p' | ++ # we now have a list, one entry per line, of the stringified ++ # contents of the appropriate section of all members of the ++ # archive which possess that section. Heuristic: eliminate ++ # all those which have a first or second character that is ++ # a '.' (that is, objdump's representation of an unprintable ++ # character.) This should work for all archives with less than ++ # 0x302f exports -- but will fail for DLLs whose name actually ++ # begins with a literal '.' or a single character followed by ++ # a '.'. ++ # ++ # Of those that remain, print the first one. ++ $SED -e '/^\./d;/^.\./d;q' ++} ++ ++# func_cygming_gnu_implib_p ARG ++# This predicate returns with zero status (TRUE) if ++# ARG is a GNU/binutils-style import library. Returns ++# with nonzero status (FALSE) otherwise. ++func_cygming_gnu_implib_p () ++{ ++ $opt_debug ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` ++ test -n "$func_cygming_gnu_implib_tmp" ++} ++ ++# func_cygming_ms_implib_p ARG ++# This predicate returns with zero status (TRUE) if ++# ARG is an MS-style import library. Returns ++# with nonzero status (FALSE) otherwise. ++func_cygming_ms_implib_p () ++{ ++ $opt_debug ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` ++ test -n "$func_cygming_ms_implib_tmp" ++} ++ ++# func_cygming_dll_for_implib_fallback ARG ++# Platform-specific function to extract the ++# name of the DLL associated with the specified ++# import library ARG. ++# ++# This fallback implementation is for use when $DLLTOOL ++# does not support the --identify-strict option. ++# Invoked by eval'ing the libtool variable ++# $sharedlib_from_linklib_cmd ++# Result is available in the variable ++# $sharedlib_from_linklib_result ++func_cygming_dll_for_implib_fallback () ++{ ++ $opt_debug ++ if func_cygming_gnu_implib_p "$1" ; then ++ # binutils import library ++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` ++ elif func_cygming_ms_implib_p "$1" ; then ++ # ms-generated import library ++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` ++ else ++ # unknown ++ sharedlib_from_linklib_result="" ++ fi ++} + + + # func_extract_an_archive dir oldlib +@@ -2917,7 +3801,7 @@ func_extract_archives () + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do +- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` ++ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ +@@ -2932,7 +3816,7 @@ func_extract_archives () + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac +- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` ++ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +@@ -3014,7 +3898,110 @@ func_fallback_echo () + _LTECHO_EOF' + } + ECHO=\"$qECHO\" +- fi\ ++ fi ++ ++# Very basic option parsing. These options are (a) specific to ++# the libtool wrapper, (b) are identical between the wrapper ++# /script/ and the wrapper /executable/ which is used only on ++# windows platforms, and (c) all begin with the string "--lt-" ++# (application programs are unlikely to have options which match ++# this pattern). ++# ++# There are only two supported options: --lt-debug and ++# --lt-dump-script. There is, deliberately, no --lt-help. ++# ++# The first argument to this parsing function should be the ++# script's $0 value, followed by "$@". ++lt_option_debug= ++func_parse_lt_options () ++{ ++ lt_script_arg0=\$0 ++ shift ++ for lt_opt ++ do ++ case \"\$lt_opt\" in ++ --lt-debug) lt_option_debug=1 ;; ++ --lt-dump-script) ++ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` ++ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. ++ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` ++ cat \"\$lt_dump_D/\$lt_dump_F\" ++ exit 0 ++ ;; ++ --lt-*) ++ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 ++ exit 1 ++ ;; ++ esac ++ done ++ ++ # Print the debug banner immediately: ++ if test -n \"\$lt_option_debug\"; then ++ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 ++ fi ++} ++ ++# Used when --lt-debug. Prints its arguments to stdout ++# (redirection is the responsibility of the caller) ++func_lt_dump_args () ++{ ++ lt_dump_args_N=1; ++ for lt_arg ++ do ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" ++ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` ++ done ++} ++ ++# Core function for launching the target application ++func_exec_program_core () ++{ ++" ++ case $host in ++ # Backslashes separate directories on plain windows ++ *-*-mingw | *-*-os2* | *-cegcc*) ++ $ECHO "\ ++ if test -n \"\$lt_option_debug\"; then ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 ++ func_lt_dump_args \${1+\"\$@\"} 1>&2 ++ fi ++ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} ++" ++ ;; ++ ++ *) ++ $ECHO "\ ++ if test -n \"\$lt_option_debug\"; then ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 ++ func_lt_dump_args \${1+\"\$@\"} 1>&2 ++ fi ++ exec \"\$progdir/\$program\" \${1+\"\$@\"} ++" ++ ;; ++ esac ++ $ECHO "\ ++ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 ++ exit 1 ++} ++ ++# A function to encapsulate launching the target application ++# Strips options in the --lt-* namespace from \$@ and ++# launches target application with the remaining arguments. ++func_exec_program () ++{ ++ for lt_wr_arg ++ do ++ case \$lt_wr_arg in ++ --lt-*) ;; ++ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; ++ esac ++ shift ++ done ++ func_exec_program_core \${1+\"\$@\"} ++} ++ ++ # Parse options ++ func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` +@@ -3078,7 +4065,7 @@ _LTECHO_EOF' + + # relink executable if necessary + if test -n \"\$relink_command\"; then +- if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then : ++ if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" +@@ -3102,6 +4089,18 @@ _LTECHO_EOF' + + if test -f \"\$progdir/\$program\"; then" + ++ # fixup the dll searchpath if we need to. ++ # ++ # Fix the DLL searchpath if we need to. Do this before prepending ++ # to shlibpath, because on Windows, both are PATH and uninstalled ++ # libraries must come first. ++ if test -n "$dllsearchpath"; then ++ $ECHO "\ ++ # Add the dll search path components to the executable PATH ++ PATH=$dllsearchpath:\$PATH ++" ++ fi ++ + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ +@@ -3116,35 +4115,10 @@ _LTECHO_EOF' + " + fi + +- # fixup the dll searchpath if we need to. +- if test -n "$dllsearchpath"; then +- $ECHO "\ +- # Add the dll search path components to the executable PATH +- PATH=$dllsearchpath:\$PATH +-" +- fi +- + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +-" +- case $host in +- # Backslashes separate directories on plain windows +- *-*-mingw | *-*-os2* | *-cegcc*) +- $ECHO "\ +- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +-" +- ;; +- +- *) +- $ECHO "\ +- exec \"\$progdir/\$program\" \${1+\"\$@\"} +-" +- ;; +- esac +- $ECHO "\ +- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 +- exit 1 ++ func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. +@@ -3158,166 +4132,6 @@ fi\ + } + + +-# func_to_host_path arg +-# +-# Convert paths to host format when used with build tools. +-# Intended for use with "native" mingw (where libtool itself +-# is running under the msys shell), or in the following cross- +-# build environments: +-# $build $host +-# mingw (msys) mingw [e.g. native] +-# cygwin mingw +-# *nix + wine mingw +-# where wine is equipped with the `winepath' executable. +-# In the native mingw case, the (msys) shell automatically +-# converts paths for any non-msys applications it launches, +-# but that facility isn't available from inside the cwrapper. +-# Similar accommodations are necessary for $host mingw and +-# $build cygwin. Calling this function does no harm for other +-# $host/$build combinations not listed above. +-# +-# ARG is the path (on $build) that should be converted to +-# the proper representation for $host. The result is stored +-# in $func_to_host_path_result. +-func_to_host_path () +-{ +- func_to_host_path_result="$1" +- if test -n "$1"; then +- case $host in +- *mingw* ) +- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' +- case $build in +- *mingw* ) # actually, msys +- # awkward: cmd appends spaces to result +- func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | +- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +- ;; +- *cygwin* ) +- func_to_host_path_result=`cygpath -w "$1" | +- $SED -e "$lt_sed_naive_backslashify"` +- ;; +- * ) +- # Unfortunately, winepath does not exit with a non-zero +- # error code, so we are forced to check the contents of +- # stdout. On the other hand, if the command is not +- # found, the shell will set an exit code of 127 and print +- # *an error message* to stdout. So we must check for both +- # error code of zero AND non-empty stdout, which explains +- # the odd construction: +- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` +- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then +- func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | +- $SED -e "$lt_sed_naive_backslashify"` +- else +- # Allow warning below. +- func_to_host_path_result= +- fi +- ;; +- esac +- if test -z "$func_to_host_path_result" ; then +- func_error "Could not determine host path corresponding to" +- func_error " \`$1'" +- func_error "Continuing, but uninstalled executables may not work." +- # Fallback: +- func_to_host_path_result="$1" +- fi +- ;; +- esac +- fi +-} +-# end: func_to_host_path +- +-# func_to_host_pathlist arg +-# +-# Convert pathlists to host format when used with build tools. +-# See func_to_host_path(), above. This function supports the +-# following $build/$host combinations (but does no harm for +-# combinations not listed here): +-# $build $host +-# mingw (msys) mingw [e.g. native] +-# cygwin mingw +-# *nix + wine mingw +-# +-# Path separators are also converted from $build format to +-# $host format. If ARG begins or ends with a path separator +-# character, it is preserved (but converted to $host format) +-# on output. +-# +-# ARG is a pathlist (on $build) that should be converted to +-# the proper representation on $host. The result is stored +-# in $func_to_host_pathlist_result. +-func_to_host_pathlist () +-{ +- func_to_host_pathlist_result="$1" +- if test -n "$1"; then +- case $host in +- *mingw* ) +- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' +- # Remove leading and trailing path separator characters from +- # ARG. msys behavior is inconsistent here, cygpath turns them +- # into '.;' and ';.', and winepath ignores them completely. +- func_stripname : : "$1" +- func_to_host_pathlist_tmp1=$func_stripname_result +- case $build in +- *mingw* ) # Actually, msys. +- # Awkward: cmd appends spaces to result. +- func_to_host_pathlist_result=` +- ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | +- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +- ;; +- *cygwin* ) +- func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | +- $SED -e "$lt_sed_naive_backslashify"` +- ;; +- * ) +- # unfortunately, winepath doesn't convert pathlists +- func_to_host_pathlist_result="" +- func_to_host_pathlist_oldIFS=$IFS +- IFS=: +- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do +- IFS=$func_to_host_pathlist_oldIFS +- if test -n "$func_to_host_pathlist_f" ; then +- func_to_host_path "$func_to_host_pathlist_f" +- if test -n "$func_to_host_path_result" ; then +- if test -z "$func_to_host_pathlist_result" ; then +- func_to_host_pathlist_result="$func_to_host_path_result" +- else +- func_append func_to_host_pathlist_result ";$func_to_host_path_result" +- fi +- fi +- fi +- done +- IFS=$func_to_host_pathlist_oldIFS +- ;; +- esac +- if test -z "$func_to_host_pathlist_result"; then +- func_error "Could not determine the host path(s) corresponding to" +- func_error " \`$1'" +- func_error "Continuing, but uninstalled executables may not work." +- # Fallback. This may break if $1 contains DOS-style drive +- # specifications. The fix is not to complicate the expression +- # below, but for the user to provide a working wine installation +- # with winepath so that path translation in the cross-to-mingw +- # case works properly. +- lt_replace_pathsep_nix_to_dos="s|:|;|g" +- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ +- $SED -e "$lt_replace_pathsep_nix_to_dos"` +- fi +- # Now, add the leading and trailing path separators back +- case "$1" in +- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" +- ;; +- esac +- case "$1" in +- *: ) func_append func_to_host_pathlist_result ";" +- ;; +- esac +- ;; +- esac +- fi +-} +-# end: func_to_host_pathlist +- + # func_emit_cwrapperexe_src + # emit the source code for a wrapper executable on stdout + # Must ONLY be called from within func_mode_link because +@@ -3334,10 +4148,6 @@ func_emit_cwrapperexe_src () + + This wrapper executable should never be moved out of the build directory. + If it is, it will not operate correctly. +- +- Currently, it simply execs the wrapper *script* "$SHELL $output", +- but could eventually absorb all of the scripts functionality and +- exec $objdir/$outputname directly. + */ + EOF + cat <<"EOF" +@@ -3462,22 +4272,13 @@ int setenv (const char *, const char *, int); + if (stale) { free ((void *) stale); stale = 0; } \ + } while (0) + +-#undef LTWRAPPER_DEBUGPRINTF +-#if defined LT_DEBUGWRAPPER +-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +-static void +-ltwrapper_debugprintf (const char *fmt, ...) +-{ +- va_list args; +- va_start (args, fmt); +- (void) vfprintf (stderr, fmt, args); +- va_end (args); +-} ++#if defined(LT_DEBUGWRAPPER) ++static int lt_debug = 1; + #else +-# define LTWRAPPER_DEBUGPRINTF(args) ++static int lt_debug = 0; + #endif + +-const char *program_name = NULL; ++const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + + void *xmalloc (size_t num); + char *xstrdup (const char *string); +@@ -3487,7 +4288,10 @@ char *chase_symlinks (const char *pathspec); + int make_executable (const char *path); + int check_executable (const char *path); + char *strendzap (char *str, const char *pat); +-void lt_fatal (const char *message, ...); ++void lt_debugprintf (const char *file, int line, const char *fmt, ...); ++void lt_fatal (const char *file, int line, const char *message, ...); ++static const char *nonnull (const char *s); ++static const char *nonempty (const char *s); + void lt_setenv (const char *name, const char *value); + char *lt_extend_str (const char *orig_value, const char *add, int to_end); + void lt_update_exe_path (const char *name, const char *value); +@@ -3497,14 +4301,14 @@ void lt_dump_script (FILE *f); + EOF + + cat <"))); ++ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", ++ nonnull (lt_argv_zero)); + for (i = 0; i < newargc; i++) + { +- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); ++ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", ++ i, nonnull (newargz[i])); + } + + EOF +@@ -3706,7 +4529,9 @@ EOF + if (rval == -1) + { + /* failed to start process */ +- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(main) failed to launch target \"%s\": %s\n", ++ lt_argv_zero, nonnull (strerror (errno))); + return 127; + } + return rval; +@@ -3728,7 +4553,7 @@ xmalloc (size_t num) + { + void *p = (void *) malloc (num); + if (!p) +- lt_fatal ("Memory exhausted"); ++ lt_fatal (__FILE__, __LINE__, "memory exhausted"); + + return p; + } +@@ -3762,8 +4587,8 @@ check_executable (const char *path) + { + struct stat st; + +- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", +- path ? (*path ? path : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", ++ nonempty (path)); + if ((!path) || (!*path)) + return 0; + +@@ -3780,8 +4605,8 @@ make_executable (const char *path) + int rval = 0; + struct stat st; + +- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", +- path ? (*path ? path : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", ++ nonempty (path)); + if ((!path) || (!*path)) + return 0; + +@@ -3807,8 +4632,8 @@ find_executable (const char *wrapper) + int tmp_len; + char *concat_name; + +- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", +- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", ++ nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; +@@ -3861,7 +4686,8 @@ find_executable (const char *wrapper) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) +- lt_fatal ("getcwd failed"); ++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", ++ nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); +@@ -3886,7 +4712,8 @@ find_executable (const char *wrapper) + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) +- lt_fatal ("getcwd failed"); ++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", ++ nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); +@@ -3912,8 +4739,9 @@ chase_symlinks (const char *pathspec) + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { +- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", +- tmp_pathspec)); ++ lt_debugprintf (__FILE__, __LINE__, ++ "checking path component for symlinks: %s\n", ++ tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) +@@ -3935,8 +4763,9 @@ chase_symlinks (const char *pathspec) + } + else + { +- char *errstr = strerror (errno); +- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); ++ lt_fatal (__FILE__, __LINE__, ++ "error accessing file \"%s\": %s", ++ tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); +@@ -3949,7 +4778,8 @@ chase_symlinks (const char *pathspec) + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { +- lt_fatal ("Could not follow symlinks for %s", pathspec); ++ lt_fatal (__FILE__, __LINE__, ++ "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); + #endif +@@ -3975,11 +4805,25 @@ strendzap (char *str, const char *pat) + return str; + } + ++void ++lt_debugprintf (const char *file, int line, const char *fmt, ...) ++{ ++ va_list args; ++ if (lt_debug) ++ { ++ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); ++ va_start (args, fmt); ++ (void) vfprintf (stderr, fmt, args); ++ va_end (args); ++ } ++} ++ + static void +-lt_error_core (int exit_status, const char *mode, ++lt_error_core (int exit_status, const char *file, ++ int line, const char *mode, + const char *message, va_list ap) + { +- fprintf (stderr, "%s: %s: ", program_name, mode); ++ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + +@@ -3988,20 +4832,32 @@ lt_error_core (int exit_status, const char *mode, + } + + void +-lt_fatal (const char *message, ...) ++lt_fatal (const char *file, int line, const char *message, ...) + { + va_list ap; + va_start (ap, message); +- lt_error_core (EXIT_FAILURE, "FATAL", message, ap); ++ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); + } + ++static const char * ++nonnull (const char *s) ++{ ++ return s ? s : "(null)"; ++} ++ ++static const char * ++nonempty (const char *s) ++{ ++ return (s && !*s) ? "(empty)" : nonnull (s); ++} ++ + void + lt_setenv (const char *name, const char *value) + { +- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", +- (name ? name : ""), +- (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_setenv) setting '%s' to '%s'\n", ++ nonnull (name), nonnull (value)); + { + #ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ +@@ -4049,9 +4905,9 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) + void + lt_update_exe_path (const char *name, const char *value) + { +- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", +- (name ? name : ""), +- (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", ++ nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { +@@ -4070,9 +4926,9 @@ lt_update_exe_path (const char *name, const char *value) + void + lt_update_lib_path (const char *name, const char *value) + { +- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", +- (name ? name : ""), +- (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", ++ nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { +@@ -4222,7 +5078,7 @@ EOF + func_win32_import_lib_p () + { + $opt_debug +- case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in ++ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +@@ -4401,9 +5257,9 @@ func_mode_link () + ;; + *) + if test "$prev" = dlfiles; then +- dlfiles="$dlfiles $arg" ++ func_append dlfiles " $arg" + else +- dlprefiles="$dlprefiles $arg" ++ func_append dlprefiles " $arg" + fi + prev= + continue +@@ -4427,7 +5283,7 @@ func_mode_link () + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; +- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ++ *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; +@@ -4446,7 +5302,7 @@ func_mode_link () + moreargs= + for fil in `cat "$save_arg"` + do +-# moreargs="$moreargs $fil" ++# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + +@@ -4475,7 +5331,7 @@ func_mode_link () + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then +- dlfiles="$dlfiles $pic_object" ++ func_append dlfiles " $pic_object" + prev= + continue + else +@@ -4487,7 +5343,7 @@ func_mode_link () + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. +- dlprefiles="$dlprefiles $pic_object" ++ func_append dlprefiles " $pic_object" + prev= + fi + +@@ -4557,12 +5413,12 @@ func_mode_link () + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; +- *) rpath="$rpath $arg" ;; ++ *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; +- *) xrpath="$xrpath $arg" ;; ++ *) func_append xrpath " $arg" ;; + esac + fi + prev= +@@ -4574,28 +5430,28 @@ func_mode_link () + continue + ;; + weak) +- weak_libs="$weak_libs $arg" ++ func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) +- linker_flags="$linker_flags $qarg" +- compiler_flags="$compiler_flags $qarg" ++ func_append linker_flags " $qarg" ++ func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) +- compiler_flags="$compiler_flags $qarg" ++ func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) +- linker_flags="$linker_flags $qarg" +- compiler_flags="$compiler_flags $wl$qarg" ++ func_append linker_flags " $qarg" ++ func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" +@@ -4686,15 +5542,16 @@ func_mode_link () + ;; + + -L*) +- func_stripname '-L' '' "$arg" +- dir=$func_stripname_result +- if test -z "$dir"; then ++ func_stripname "-L" '' "$arg" ++ if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi ++ func_resolve_sysroot "$func_stripname_result" ++ dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; +@@ -4706,10 +5563,16 @@ func_mode_link () + ;; + esac + case "$deplibs " in +- *" -L$dir "*) ;; ++ *" -L$dir "* | *" $arg "*) ++ # Will only happen for absolute or sysroot arguments ++ ;; + *) +- deplibs="$deplibs -L$dir" +- lib_search_path="$lib_search_path $dir" ++ # Preserve sysroot, but never include relative directories ++ case $dir in ++ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; ++ *) func_append deplibs " -L$dir" ;; ++ esac ++ func_append lib_search_path " $dir" + ;; + esac + case $host in +@@ -4718,12 +5581,12 @@ func_mode_link () + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; +- *) dllsearchpath="$dllsearchpath:$dir";; ++ *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; +- *) dllsearchpath="$dllsearchpath:$testbindir";; ++ *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac +@@ -4747,7 +5610,7 @@ func_mode_link () + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework +- deplibs="$deplibs System.ltframework" ++ func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) +@@ -4758,9 +5621,6 @@ func_mode_link () + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; +- *-*-linux*) +- test "X$arg" = "X-lc" && continue +- ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in +@@ -4770,7 +5630,7 @@ func_mode_link () + ;; + esac + fi +- deplibs="$deplibs $arg" ++ func_append deplibs " $arg" + continue + ;; + +@@ -4782,8 +5642,8 @@ func_mode_link () + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. +- -model|-arch|-isysroot) +- compiler_flags="$compiler_flags $arg" ++ -model|-arch|-isysroot|--sysroot) ++ func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler +@@ -4791,12 +5651,12 @@ func_mode_link () + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" func_append compile_command " $arg" @@ -5015,1069 +17218,1536 @@ index 9503ec85d7..70e856e065 100644 esac continue ;; -@@ -4863,13 +5723,17 @@ func_mode_link () - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; -+ =*) -+ func_stripname '=' '' "$dir" -+ dir=$lt_sysroot$func_stripname_result -+ ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; -- *) xrpath="$xrpath $dir" ;; -+ *) func_append xrpath " $dir" ;; +@@ -4863,13 +5723,17 @@ func_mode_link () + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; ++ =*) ++ func_stripname '=' '' "$dir" ++ dir=$lt_sysroot$func_stripname_result ++ ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; +- *) xrpath="$xrpath $dir" ;; ++ *) func_append xrpath " $dir" ;; + esac + continue + ;; +@@ -4922,8 +5786,8 @@ func_mode_link () + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" +- arg="$arg $func_quote_for_eval_result" +- compiler_flags="$compiler_flags $func_quote_for_eval_result" ++ func_append arg " $func_quote_for_eval_result" ++ func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" +@@ -4938,9 +5802,9 @@ func_mode_link () + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" +- arg="$arg $wl$func_quote_for_eval_result" +- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" +- linker_flags="$linker_flags $func_quote_for_eval_result" ++ func_append arg " $wl$func_quote_for_eval_result" ++ func_append compiler_flags " $wl$func_quote_for_eval_result" ++ func_append linker_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" +@@ -4968,24 +5832,27 @@ func_mode_link () + arg="$func_quote_for_eval_result" + ;; + +- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler +- # -r[0-9][0-9]* specifies the processor on the SGI compiler +- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler +- # +DA*, +DD* enable 64-bit mode on the HP compiler +- # -q* pass through compiler args for the IBM compiler +- # -m*, -t[45]*, -txscale* pass through architecture-specific +- # compiler args for GCC +- # -F/path gives path to uninstalled frameworks, gcc on darwin +- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC +- # @file GCC response files +- # -tp=* Portland pgcc target processor selection ++ # Flags to be passed through unchanged, with rationale: ++ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler ++ # -r[0-9][0-9]* specify processor for the SGI compiler ++ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler ++ # +DA*, +DD* enable 64-bit mode for the HP compiler ++ # -q* compiler args for the IBM compiler ++ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC ++ # -F/path path to uninstalled frameworks, gcc on darwin ++ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC ++ # @file GCC response files ++ # -tp=* Portland pgcc target processor selection ++ # --sysroot=* for sysroot support ++ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ ++ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" +- compiler_flags="$compiler_flags $arg" ++ func_append compiler_flags " $arg" + continue + ;; + +@@ -4997,7 +5864,7 @@ func_mode_link () + + *.$objext) + # A standard object. +- objs="$objs $arg" ++ func_append objs " $arg" + ;; + + *.lo) +@@ -5028,7 +5895,7 @@ func_mode_link () + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then +- dlfiles="$dlfiles $pic_object" ++ func_append dlfiles " $pic_object" + prev= + continue + else +@@ -5040,7 +5907,7 @@ func_mode_link () + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. +- dlprefiles="$dlprefiles $pic_object" ++ func_append dlprefiles " $pic_object" + prev= + fi + +@@ -5085,24 +5952,25 @@ func_mode_link () + + *.$libext) + # An archive. +- deplibs="$deplibs $arg" +- old_deplibs="$old_deplibs $arg" ++ func_append deplibs " $arg" ++ func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + ++ func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. +- dlfiles="$dlfiles $arg" ++ func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. +- dlprefiles="$dlprefiles $arg" ++ func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else +- deplibs="$deplibs $arg" ++ func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; +@@ -5127,7 +5995,7 @@ func_mode_link () + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then +- eval "arg=\"$export_dynamic_flag_spec\"" ++ eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi +@@ -5144,11 +6012,13 @@ func_mode_link () + else + shlib_search_path= + fi +- eval "sys_lib_search_path=\"$sys_lib_search_path_spec\"" +- eval "sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"" ++ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" ++ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" ++ func_to_tool_file "$output_objdir/" ++ tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + +@@ -5169,12 +6039,12 @@ func_mode_link () + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do +- if $opt_duplicate_deps ; then ++ if $opt_preserve_dup_deps ; then + case "$libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac - continue - ;; -@@ -4922,8 +5786,8 @@ func_mode_link () - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" -- arg="$arg $func_quote_for_eval_result" -- compiler_flags="$compiler_flags $func_quote_for_eval_result" -+ func_append arg " $func_quote_for_eval_result" -+ func_append compiler_flags " $func_quote_for_eval_result" + fi +- libs="$libs $deplib" ++ func_append libs " $deplib" + done + + if test "$linkmode" = lib; then +@@ -5187,9 +6057,9 @@ func_mode_link () + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in +- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; ++ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac +- pre_post_deps="$pre_post_deps $pre_post_dep" ++ func_append pre_post_deps " $pre_post_dep" done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" -@@ -4938,9 +5802,9 @@ func_mode_link () - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" -- arg="$arg $wl$func_quote_for_eval_result" -- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" -- linker_flags="$linker_flags $func_quote_for_eval_result" -+ func_append arg " $wl$func_quote_for_eval_result" -+ func_append compiler_flags " $wl$func_quote_for_eval_result" -+ func_append linker_flags " $func_quote_for_eval_result" + fi + pre_post_deps= +@@ -5256,8 +6126,9 @@ func_mode_link () + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= ++ func_resolve_sysroot "$lib" + case $lib in +- *.la) func_source "$lib" ;; ++ *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library +@@ -5267,7 +6138,7 @@ func_mode_link () + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; +- *) deplibs="$deplibs $deplib" ;; ++ *) func_append deplibs " $deplib" ;; + esac + done done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" -@@ -4968,24 +5832,27 @@ func_mode_link () - arg="$func_quote_for_eval_result" - ;; +@@ -5288,11 +6159,11 @@ func_mode_link () + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else +- compiler_flags="$compiler_flags $deplib" ++ func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; +- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; ++ * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi +@@ -5377,7 +6248,7 @@ func_mode_link () + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; +- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; ++ * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi +@@ -5390,7 +6261,8 @@ func_mode_link () + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" +- newlib_search_path="$newlib_search_path $func_stripname_result" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then +@@ -5404,7 +6276,8 @@ func_mode_link () + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" +- newlib_search_path="$newlib_search_path $func_stripname_result" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" +@@ -5415,17 +6288,21 @@ func_mode_link () + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" +- dir=$func_stripname_result ++ func_resolve_sysroot "$func_stripname_result" ++ dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; +- *) xrpath="$xrpath $dir" ;; ++ *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; +- *.la) lib="$deplib" ;; ++ *.la) ++ func_resolve_sysroot "$deplib" ++ lib=$func_resolve_sysroot_result ++ ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" +@@ -5488,11 +6365,11 @@ func_mode_link () + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. +- newdlprefiles="$newdlprefiles $deplib" ++ func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else +- newdlfiles="$newdlfiles $deplib" ++ func_append newdlfiles " $deplib" + fi + fi + continue +@@ -5538,7 +6415,7 @@ func_mode_link () + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; +- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; ++ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi +@@ -5546,8 +6423,8 @@ func_mode_link () + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then +- test -n "$dlopen" && dlfiles="$dlfiles $dlopen" +- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" ++ test -n "$dlopen" && func_append dlfiles " $dlopen" ++ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then +@@ -5558,20 +6435,20 @@ func_mode_link () + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. +- convenience="$convenience $ladir/$objdir/$old_library" +- old_convenience="$old_convenience $ladir/$objdir/$old_library" ++ func_append convenience " $ladir/$objdir/$old_library" ++ func_append old_convenience " $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" +- if $opt_duplicate_deps ; then ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi +- tmp_libs="$tmp_libs $deplib" ++ func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv +@@ -5579,9 +6456,15 @@ func_mode_link () + + # Get the name of the library we link against. + linklib= +- for l in $old_library $library_names; do +- linklib="$l" +- done ++ if test -n "$old_library" && ++ { test "$prefer_static_libs" = yes || ++ test "$prefer_static_libs,$installed" = "built,no"; }; then ++ linklib=$old_library ++ else ++ for l in $old_library $library_names; do ++ linklib="$l" ++ done ++ fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi +@@ -5598,9 +6481,9 @@ func_mode_link () + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. +- dlprefiles="$dlprefiles $lib $dependency_libs" ++ func_append dlprefiles " $lib $dependency_libs" + else +- newdlfiles="$newdlfiles $lib" ++ func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen +@@ -5622,14 +6505,14 @@ func_mode_link () -- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler -- # -r[0-9][0-9]* specifies the processor on the SGI compiler -- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -- # +DA*, +DD* enable 64-bit mode on the HP compiler -- # -q* pass through compiler args for the IBM compiler -- # -m*, -t[45]*, -txscale* pass through architecture-specific -- # compiler args for GCC -- # -F/path gives path to uninstalled frameworks, gcc on darwin -- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC -- # @file GCC response files -- # -tp=* Portland pgcc target processor selection -+ # Flags to be passed through unchanged, with rationale: -+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler -+ # -r[0-9][0-9]* specify processor for the SGI compiler -+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler -+ # +DA*, +DD* enable 64-bit mode for the HP compiler -+ # -q* compiler args for the IBM compiler -+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC -+ # -F/path path to uninstalled frameworks, gcc on darwin -+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC -+ # @file GCC response files -+ # -tp=* Portland pgcc target processor selection -+ # --sysroot=* for sysroot support -+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" -- compiler_flags="$compiler_flags $arg" -+ func_append compiler_flags " $arg" - continue - ;; + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then +- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then ++ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ dir="$lt_sysroot$libdir" ++ absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +@@ -5637,12 +6520,12 @@ func_mode_link () + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later +- notinst_path="$notinst_path $abs_ladir" ++ func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later +- notinst_path="$notinst_path $abs_ladir" ++ func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" +@@ -5653,20 +6536,46 @@ func_mode_link () + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi +- # Prefer using a static library (so that no silly _DYNAMIC symbols +- # are required to link). +- if test -n "$old_library"; then +- newdlprefiles="$newdlprefiles $dir/$old_library" +- # Keep a list of preopened convenience libraries to check +- # that they are being used correctly in the link pass. +- test -z "$libdir" && \ +- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" +- # Otherwise, use the dlname, so that lt_dlopen finds it. +- elif test -n "$dlname"; then +- newdlprefiles="$newdlprefiles $dir/$dlname" +- else +- newdlprefiles="$newdlprefiles $dir/$linklib" +- fi ++ case "$host" in ++ # special handling for platforms with PE-DLLs. ++ *cygwin* | *mingw* | *cegcc* ) ++ # Linker will automatically link against shared library if both ++ # static and shared are present. Therefore, ensure we extract ++ # symbols from the import library if a shared library is present ++ # (otherwise, the dlopen module name will be incorrect). We do ++ # this by putting the import library name into $newdlprefiles. ++ # We recover the dlopen module name by 'saving' the la file ++ # name in a special purpose variable, and (later) extracting the ++ # dlname from the la file. ++ if test -n "$dlname"; then ++ func_tr_sh "$dir/$linklib" ++ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" ++ func_append newdlprefiles " $dir/$linklib" ++ else ++ func_append newdlprefiles " $dir/$old_library" ++ # Keep a list of preopened convenience libraries to check ++ # that they are being used correctly in the link pass. ++ test -z "$libdir" && \ ++ func_append dlpreconveniencelibs " $dir/$old_library" ++ fi ++ ;; ++ * ) ++ # Prefer using a static library (so that no silly _DYNAMIC symbols ++ # are required to link). ++ if test -n "$old_library"; then ++ func_append newdlprefiles " $dir/$old_library" ++ # Keep a list of preopened convenience libraries to check ++ # that they are being used correctly in the link pass. ++ test -z "$libdir" && \ ++ func_append dlpreconveniencelibs " $dir/$old_library" ++ # Otherwise, use the dlname, so that lt_dlopen finds it. ++ elif test -n "$dlname"; then ++ func_append newdlprefiles " $dir/$dlname" ++ else ++ func_append newdlprefiles " $dir/$linklib" ++ fi ++ ;; ++ esac + fi # $pass = dlpreopen -@@ -4997,7 +5864,7 @@ func_mode_link () + if test -z "$libdir"; then +@@ -5684,7 +6593,7 @@ func_mode_link () + + + if test "$linkmode" = prog && test "$pass" != link; then +- newlib_search_path="$newlib_search_path $ladir" ++ func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no +@@ -5697,7 +6606,8 @@ func_mode_link () + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" +- newlib_search_path="$newlib_search_path $func_stripname_result" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? +@@ -5708,12 +6618,12 @@ func_mode_link () + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi +- if $opt_duplicate_deps ; then ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi +- tmp_libs="$tmp_libs $deplib" ++ func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... +@@ -5728,7 +6638,7 @@ func_mode_link () + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; +- *) temp_rpath="$temp_rpath$absdir:" ;; ++ *) func_append temp_rpath "$absdir:" ;; + esac + fi + +@@ -5740,7 +6650,7 @@ func_mode_link () + *) + case "$compile_rpath " in + *" $absdir "*) ;; +- *) compile_rpath="$compile_rpath $absdir" ++ *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac +@@ -5749,7 +6659,7 @@ func_mode_link () + *) + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ++ *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac +@@ -5774,12 +6684,12 @@ func_mode_link () + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded +- notinst_deplibs="$notinst_deplibs $lib" ++ func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then +- notinst_deplibs="$notinst_deplibs $lib" ++ func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; +@@ -5814,7 +6724,7 @@ func_mode_link () + *) + case "$compile_rpath " in + *" $absdir "*) ;; +- *) compile_rpath="$compile_rpath $absdir" ++ *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac +@@ -5823,7 +6733,7 @@ func_mode_link () + *) + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ++ *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac +@@ -5835,7 +6745,7 @@ func_mode_link () + shift + realname="$1" + shift +- eval "libname=\"$libname_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" +@@ -5848,7 +6758,7 @@ func_mode_link () + versuffix="-$major" + ;; + esac +- eval "soname=\"$soname_spec\"" ++ eval soname=\"$soname_spec\" + else + soname="$realname" + fi +@@ -5877,7 +6787,7 @@ func_mode_link () + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" - *.$objext) - # A standard object. -- objs="$objs $arg" -+ func_append objs " $arg" - ;; +- if test "$linkmode" = prog || test "$mode" != relink; then ++ if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= +@@ -5933,7 +6843,7 @@ func_mode_link () + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi +@@ -5955,7 +6865,7 @@ func_mode_link () + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; +- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; ++ *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then +@@ -5969,13 +6879,13 @@ func_mode_link () + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; +- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; ++ *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi - *.lo) -@@ -5028,7 +5895,7 @@ func_mode_link () +- if test "$linkmode" = prog || test "$mode" = relink; then ++ if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= +@@ -5989,7 +6899,7 @@ func_mode_link () + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; +- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; ++ *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then +@@ -6001,12 +6911,12 @@ func_mode_link () + fi + else + # We cannot seem to hardcode it, guess we'll fake it. +- add_dir="-L$libdir" ++ add_dir="-L$lt_sysroot$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi +@@ -6083,27 +6993,33 @@ func_mode_link () + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; +- *) xrpath="$xrpath $temp_xrpath";; ++ *) func_append xrpath " $temp_xrpath";; + esac;; +- *) temp_deplibs="$temp_deplibs $libdir";; ++ *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -- dlfiles="$dlfiles $pic_object" -+ func_append dlfiles " $pic_object" - prev= - continue - else -@@ -5040,7 +5907,7 @@ func_mode_link () - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. -- dlprefiles="$dlprefiles $pic_object" -+ func_append dlprefiles " $pic_object" - prev= +- newlib_search_path="$newlib_search_path $absdir" ++ func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" +- if $opt_duplicate_deps ; then ++ case $deplib in ++ -L*) func_stripname '-L' '' "$deplib" ++ func_resolve_sysroot "$func_stripname_result";; ++ *) func_resolve_sysroot "$deplib" ;; ++ esac ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $func_resolve_sysroot_result "*) ++ func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac fi +- tmp_libs="$tmp_libs $deplib" ++ func_append tmp_libs " $func_resolve_sysroot_result" + done -@@ -5085,24 +5952,25 @@ func_mode_link () + if test "$link_all_deplibs" != no; then +@@ -6113,8 +7029,10 @@ func_mode_link () + case $deplib in + -L*) path="$deplib" ;; + *.la) ++ func_resolve_sysroot "$deplib" ++ deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." +- dir="$func_dirname_result" ++ dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; +@@ -6130,7 +7048,7 @@ func_mode_link () + case $host in + *-*-darwin*) + depdepl= +- deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` ++ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp +@@ -6141,8 +7059,8 @@ func_mode_link () + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi +- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" +- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" ++ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" ++ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi +@@ -6152,7 +7070,7 @@ func_mode_link () + ;; + esac + else +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ +@@ -6192,7 +7110,7 @@ func_mode_link () + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; +- *) lib_search_path="$lib_search_path $dir" ;; ++ *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= +@@ -6205,7 +7123,7 @@ func_mode_link () + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order +- eval tmp_libs=\$$var ++ eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so +@@ -6250,13 +7168,13 @@ func_mode_link () + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; +- *) tmp_libs="$tmp_libs $deplib" ;; ++ *) func_append tmp_libs " $deplib" ;; + esac + ;; +- *) tmp_libs="$tmp_libs $deplib" ;; ++ *) func_append tmp_libs " $deplib" ;; + esac + done +- eval $var=\$tmp_libs ++ eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs +@@ -6269,7 +7187,7 @@ func_mode_link () + ;; + esac + if test -n "$i" ; then +- tmp_libs="$tmp_libs $i" ++ func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs +@@ -6310,7 +7228,7 @@ func_mode_link () + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" +- objs="$objs$old_deplibs" ++ func_append objs "$old_deplibs" + ;; - *.$libext) - # An archive. -- deplibs="$deplibs $arg" -- old_deplibs="$old_deplibs $arg" -+ func_append deplibs " $arg" -+ func_append old_deplibs " $arg" - continue + lib) +@@ -6319,8 +7237,8 @@ func_mode_link () + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result +- eval "shared_ext=\"$shrext_cmds\"" +- eval "libname=\"$libname_spec\"" ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" ;; - - *.la) - # A libtool-controlled library. - -+ func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. -- dlfiles="$dlfiles $arg" -+ func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. -- dlprefiles="$dlprefiles $arg" -+ func_append dlprefiles " $func_resolve_sysroot_result" - prev= + *) + test "$module" = no && \ +@@ -6330,8 +7248,8 @@ func_mode_link () + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result +- eval "shared_ext=\"$shrext_cmds\"" +- eval "libname=\"$libname_spec\"" ++ eval shared_ext=\"$shrext_cmds\" ++ eval libname=\"$libname_spec\" else -- deplibs="$deplibs $arg" -+ func_append deplibs " $func_resolve_sysroot_result" + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result +@@ -6346,7 +7264,7 @@ func_mode_link () + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" +- libobjs="$libobjs $objs" ++ func_append libobjs " $objs" fi - continue - ;; -@@ -5127,7 +5995,7 @@ func_mode_link () - func_fatal_help "the \`$prevarg' option requires an argument" + fi - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -- eval "arg=\"$export_dynamic_flag_spec\"" -+ eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi -@@ -5144,11 +6012,13 @@ func_mode_link () - else - shlib_search_path= - fi -- eval "sys_lib_search_path=\"$sys_lib_search_path_spec\"" -- eval "sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"" -+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\" -+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" +@@ -6544,7 +7462,7 @@ func_mode_link () + done - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" -+ func_to_tool_file "$output_objdir/" -+ tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" + # Make executables depend on our current version. +- verstring="$verstring:${current}.0" ++ func_append verstring ":${current}.0" + ;; -@@ -5169,12 +6039,12 @@ func_mode_link () - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do -- if $opt_duplicate_deps ; then -+ if $opt_preserve_dup_deps ; then - case "$libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac + qnx) +@@ -6612,10 +7530,10 @@ func_mode_link () fi -- libs="$libs $deplib" -+ func_append libs " $deplib" - done - if test "$linkmode" = lib; then -@@ -5187,9 +6057,9 @@ func_mode_link () - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in -- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; -+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + func_generate_dlsyms "$libname" "$libname" "yes" +- libobjs="$libobjs $symfileobj" ++ func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + +- if test "$mode" != relink; then ++ if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= +@@ -6631,7 +7549,7 @@ func_mode_link () + continue + fi + fi +- removelist="$removelist $p" ++ func_append removelist " $p" + ;; + *) ;; esac -- pre_post_deps="$pre_post_deps $pre_post_dep" -+ func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= -@@ -5256,8 +6126,9 @@ func_mode_link () - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= -+ func_resolve_sysroot "$lib" - case $lib in -- *.la) func_source "$lib" ;; -+ *.la) func_source "$func_resolve_sysroot_result" ;; +@@ -6642,7 +7560,7 @@ func_mode_link () + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then +- oldlibs="$oldlibs $output_objdir/$libname.$libext" ++ func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` +@@ -6659,10 +7577,11 @@ func_mode_link () + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do +- temp_xrpath="$temp_xrpath -R$libdir" ++ func_replace_sysroot "$libdir" ++ func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ;; ++ *) func_append finalize_rpath " $libdir" ;; esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then +@@ -6676,7 +7595,7 @@ func_mode_link () + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; +- *) dlfiles="$dlfiles $lib" ;; ++ *) func_append dlfiles " $lib" ;; + esac + done - # Collect preopened libtool deplibs, except any this library -@@ -5267,7 +6138,7 @@ func_mode_link () - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; -- *) deplibs="$deplibs $deplib" ;; -+ *) func_append deplibs " $deplib" ;; +@@ -6686,7 +7605,7 @@ func_mode_link () + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; +- *) dlprefiles="$dlprefiles $lib" ;; ++ *) func_append dlprefiles " $lib" ;; + esac + done + +@@ -6698,7 +7617,7 @@ func_mode_link () + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework +- deplibs="$deplibs System.ltframework" ++ func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. +@@ -6715,7 +7634,7 @@ func_mode_link () + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then +- deplibs="$deplibs -lc" ++ func_append deplibs " -lc" + fi + ;; + esac +@@ -6764,18 +7683,18 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + i="" + ;; + esac + fi + if test -n "$i" ; then +- eval "libname=\"$libname_spec\"" +- eval "deplib_matches=\"$library_names_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + else + droppeddeps=yes + echo +@@ -6789,7 +7708,7 @@ EOF + fi + ;; + *) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + ;; + esac + done +@@ -6807,18 +7726,18 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + i="" + ;; + esac + fi + if test -n "$i" ; then +- eval "libname=\"$libname_spec\"" +- eval "deplib_matches=\"$library_names_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` + set dummy $deplib_matches; shift + deplib_match=$1 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + else + droppeddeps=yes + echo +@@ -6840,7 +7759,7 @@ EOF + fi + ;; + *) +- newdeplibs="$newdeplibs $i" ++ func_append newdeplibs " $i" + ;; + esac + done +@@ -6857,15 +7776,27 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then +- eval "libname=\"$libname_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ if test -n "$file_magic_glob"; then ++ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` ++ else ++ libnameglob=$libname ++ fi ++ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do +- potential_libs=`ls $i/$libname[.-]* 2>/dev/null` ++ if test "$want_nocaseglob" = yes; then ++ shopt -s nocaseglob ++ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ $nocaseglob ++ else ++ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | +@@ -6885,10 +7816,10 @@ EOF + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done +- if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null | ++ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi +@@ -6913,7 +7844,7 @@ EOF + ;; + *) + # Add a -L argument. +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + ;; esac - done - done -@@ -5288,11 +6159,11 @@ func_mode_link () - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else -- compiler_flags="$compiler_flags $deplib" -+ func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; -- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; -+ * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi -@@ -5377,7 +6248,7 @@ func_mode_link () - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; -- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; -+ * ) func_append new_inherited_linker_flags " $deplib" ;; + done # Gone through all deplibs. +@@ -6929,20 +7860,20 @@ EOF + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + ;; esac - fi - fi -@@ -5390,7 +6261,8 @@ func_mode_link () - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" -- newlib_search_path="$newlib_search_path $func_stripname_result" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test "$pass" = conv; then -@@ -5404,7 +6276,8 @@ func_mode_link () - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" -- newlib_search_path="$newlib_search_path $func_stripname_result" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" -@@ -5415,17 +6288,21 @@ func_mode_link () - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" -- dir=$func_stripname_result -+ func_resolve_sysroot "$func_stripname_result" -+ dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; -- *) xrpath="$xrpath $dir" ;; -+ *) func_append xrpath " $dir" ;; + fi + if test -n "$a_deplib" ; then +- eval "libname=\"$libname_spec\"" ++ libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi +@@ -6967,7 +7898,7 @@ EOF + ;; + *) + # Add a -L argument. +- newdeplibs="$newdeplibs $a_deplib" ++ func_append newdeplibs " $a_deplib" + ;; esac - fi - deplibs="$deplib $deplibs" - continue + done # Gone through all deplibs. +@@ -7071,7 +8002,7 @@ EOF + *) + case " $deplibs " in + *" -L$path/$objdir "*) +- new_libs="$new_libs -L$path/$objdir" ;; ++ func_append new_libs " -L$path/$objdir" ;; + esac ;; -- *.la) lib="$deplib" ;; -+ *.la) -+ func_resolve_sysroot "$deplib" -+ lib=$func_resolve_sysroot_result -+ ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" -@@ -5488,11 +6365,11 @@ func_mode_link () - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. -- newdlprefiles="$newdlprefiles $deplib" -+ func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else -- newdlfiles="$newdlfiles $deplib" -+ func_append newdlfiles " $deplib" - fi - fi - continue -@@ -5538,7 +6415,7 @@ func_mode_link () - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; -- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; -+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi -@@ -5546,8 +6423,8 @@ func_mode_link () - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then -- test -n "$dlopen" && dlfiles="$dlfiles $dlopen" -- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" -+ test -n "$dlopen" && func_append dlfiles " $dlopen" -+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test "$pass" = conv; then -@@ -5558,20 +6435,20 @@ func_mode_link () - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. -- convenience="$convenience $ladir/$objdir/$old_library" -- old_convenience="$old_convenience $ladir/$objdir/$old_library" -+ func_append convenience " $ladir/$objdir/$old_library" -+ func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" -- if $opt_duplicate_deps ; then -+ if $opt_preserve_dup_deps ; then - case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi -- tmp_libs="$tmp_libs $deplib" -+ func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv -@@ -5579,9 +6456,15 @@ func_mode_link () - - # Get the name of the library we link against. - linklib= -- for l in $old_library $library_names; do -- linklib="$l" -- done -+ if test -n "$old_library" && -+ { test "$prefer_static_libs" = yes || -+ test "$prefer_static_libs,$installed" = "built,no"; }; then -+ linklib=$old_library -+ else -+ for l in $old_library $library_names; do -+ linklib="$l" -+ done -+ fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi -@@ -5598,9 +6481,9 @@ func_mode_link () - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. -- dlprefiles="$dlprefiles $lib $dependency_libs" -+ func_append dlprefiles " $lib $dependency_libs" - else -- newdlfiles="$newdlfiles $lib" -+ func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen -@@ -5622,14 +6505,14 @@ func_mode_link () - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then -- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then -+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ dir="$lt_sysroot$libdir" -+ absdir="$lt_sysroot$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -5637,12 +6520,12 @@ func_mode_link () - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -+ func_append notinst_path " $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -+ func_append notinst_path " $abs_ladir" + esac +@@ -7081,10 +8012,10 @@ EOF + -L*) + case " $new_libs " in + *" $deplib "*) ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + ;; +- *) new_libs="$new_libs $deplib" ;; ++ *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" +@@ -7101,10 +8032,12 @@ EOF + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" +- test "$mode" != relink && rpath="$compile_rpath$rpath" ++ test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else +@@ -7113,18 +8046,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else +- eval "flag=\"$hardcode_libdir_flag_spec\"" +- dep_rpath="$dep_rpath $flag" ++ eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) perm_rpath="$perm_rpath $libdir" ;; ++ *) func_apped perm_rpath " $libdir" ;; + esac + fi + done +@@ -7133,40 +8066,38 @@ EOF + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then +- eval "dep_rpath=\"$hardcode_libdir_flag_spec_ld\"" ++ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else +- eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" ++ eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" -@@ -5653,20 +6536,46 @@ func_mode_link () - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done +- eval $runpath_var=\$rpath\$$runpath_var +- export $runpath_var ++ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi -- # Prefer using a static library (so that no silly _DYNAMIC symbols -- # are required to link). -- if test -n "$old_library"; then -- newdlprefiles="$newdlprefiles $dir/$old_library" -- # Keep a list of preopened convenience libraries to check -- # that they are being used correctly in the link pass. -- test -z "$libdir" && \ -- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" -- # Otherwise, use the dlname, so that lt_dlopen finds it. -- elif test -n "$dlname"; then -- newdlprefiles="$newdlprefiles $dir/$dlname" -- else -- newdlprefiles="$newdlprefiles $dir/$linklib" -- fi -+ case "$host" in -+ # special handling for platforms with PE-DLLs. -+ *cygwin* | *mingw* | *cegcc* ) -+ # Linker will automatically link against shared library if both -+ # static and shared are present. Therefore, ensure we extract -+ # symbols from the import library if a shared library is present -+ # (otherwise, the dlopen module name will be incorrect). We do -+ # this by putting the import library name into $newdlprefiles. -+ # We recover the dlopen module name by 'saving' the la file -+ # name in a special purpose variable, and (later) extracting the -+ # dlname from the la file. -+ if test -n "$dlname"; then -+ func_tr_sh "$dir/$linklib" -+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" -+ func_append newdlprefiles " $dir/$linklib" -+ else -+ func_append newdlprefiles " $dir/$old_library" -+ # Keep a list of preopened convenience libraries to check -+ # that they are being used correctly in the link pass. -+ test -z "$libdir" && \ -+ func_append dlpreconveniencelibs " $dir/$old_library" -+ fi -+ ;; -+ * ) -+ # Prefer using a static library (so that no silly _DYNAMIC symbols -+ # are required to link). -+ if test -n "$old_library"; then -+ func_append newdlprefiles " $dir/$old_library" -+ # Keep a list of preopened convenience libraries to check -+ # that they are being used correctly in the link pass. -+ test -z "$libdir" && \ -+ func_append dlpreconveniencelibs " $dir/$old_library" -+ # Otherwise, use the dlname, so that lt_dlopen finds it. -+ elif test -n "$dlname"; then -+ func_append newdlprefiles " $dir/$dlname" -+ else -+ func_append newdlprefiles " $dir/$linklib" -+ fi -+ ;; -+ esac - fi # $pass = dlpreopen + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi - if test -z "$libdir"; then -@@ -5684,7 +6593,7 @@ func_mode_link () + shlibpath="$finalize_shlibpath" +- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" ++ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then +- eval $shlibpath_var=\$shlibpath\$$shlibpath_var +- export $shlibpath_var ++ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + # Get the real and link names of the library. +- eval "shared_ext=\"$shrext_cmds\"" +- eval "library_names=\"$library_names_spec\"" ++ eval shared_ext=\"$shrext_cmds\" ++ eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift - if test "$linkmode" = prog && test "$pass" != link; then -- newlib_search_path="$newlib_search_path $ladir" -+ func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" + if test -n "$soname_spec"; then +- eval "soname=\"$soname_spec\"" ++ eval soname=\"$soname_spec\" + else + soname="$realname" + fi +@@ -7178,7 +8109,7 @@ EOF + linknames= + for link + do +- linknames="$linknames $link" ++ func_append linknames " $link" + done - linkalldeplibs=no -@@ -5697,7 +6606,8 @@ func_mode_link () - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" -- newlib_search_path="$newlib_search_path $func_stripname_result" -+ func_resolve_sysroot "$func_stripname_result" -+ func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? -@@ -5708,12 +6618,12 @@ func_mode_link () - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi -- if $opt_duplicate_deps ; then -+ if $opt_preserve_dup_deps ; then - case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi -- tmp_libs="$tmp_libs $deplib" -+ func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... -@@ -5728,7 +6638,7 @@ func_mode_link () - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; -- *) temp_rpath="$temp_rpath$absdir:" ;; -+ *) func_append temp_rpath "$absdir:" ;; - esac - fi + # Use standard objects if they are pic +@@ -7189,7 +8120,7 @@ EOF + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" +- delfiles="$delfiles $export_symbols" ++ func_append delfiles " $export_symbols" + fi + + orig_export_symbols= +@@ -7220,13 +8151,45 @@ EOF + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' +- for cmd in $cmds; do ++ for cmd1 in $cmds; do + IFS="$save_ifs" +- eval "cmd=\"$cmd\"" +- func_len " $cmd" +- len=$func_len_result +- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then ++ # Take the normal branch if the nm_file_list_spec branch ++ # doesn't work or if tool conversion is not needed. ++ case $nm_file_list_spec~$to_tool_file_cmd in ++ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) ++ try_normal_branch=yes ++ eval cmd=\"$cmd1\" ++ func_len " $cmd" ++ len=$func_len_result ++ ;; ++ *) ++ try_normal_branch=no ++ ;; ++ esac ++ if test "$try_normal_branch" = yes \ ++ && { test "$len" -lt "$max_cmd_len" \ ++ || test "$max_cmd_len" -le -1; } ++ then ++ func_show_eval "$cmd" 'exit $?' ++ skipped_export=false ++ elif test -n "$nm_file_list_spec"; then ++ func_basename "$output" ++ output_la=$func_basename_result ++ save_libobjs=$libobjs ++ save_output=$output ++ output=${output_objdir}/${output_la}.nm ++ func_to_tool_file "$output" ++ libobjs=$nm_file_list_spec$func_to_tool_file_result ++ func_append delfiles " $output" ++ func_verbose "creating $NM input file list: $output" ++ for obj in $save_libobjs; do ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" ++ done > "$output" ++ eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' ++ output=$save_output ++ libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. +@@ -7248,7 +8211,7 @@ EOF + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" +- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" ++ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi -@@ -5740,7 +6650,7 @@ func_mode_link () - *) - case "$compile_rpath " in - *" $absdir "*) ;; -- *) compile_rpath="$compile_rpath $absdir" -+ *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac -@@ -5749,7 +6659,7 @@ func_mode_link () - *) - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" -+ *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac -@@ -5774,12 +6684,12 @@ func_mode_link () - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded -- notinst_deplibs="$notinst_deplibs $lib" -+ func_append notinst_deplibs " $lib" - need_relink=no - ;; + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then +@@ -7260,7 +8223,7 @@ EOF + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter +- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" ++ func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi +@@ -7270,7 +8233,7 @@ EOF + case " $convenience " in + *" $test_deplib "*) ;; *) - if test "$installed" = no; then -- notinst_deplibs="$notinst_deplibs $lib" -+ func_append notinst_deplibs " $lib" - need_relink=yes - fi +- tmp_deplibs="$tmp_deplibs $test_deplib" ++ func_append tmp_deplibs " $test_deplib" ;; -@@ -5814,7 +6724,7 @@ func_mode_link () - *) - case "$compile_rpath " in - *" $absdir "*) ;; -- *) compile_rpath="$compile_rpath $absdir" -+ *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac -@@ -5823,7 +6733,7 @@ func_mode_link () - *) - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" -+ *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac -@@ -5835,7 +6745,7 @@ func_mode_link () - shift - realname="$1" - shift -- eval "libname=\"$libname_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" -@@ -5848,7 +6758,7 @@ func_mode_link () - versuffix="-$major" - ;; - esac -- eval "soname=\"$soname_spec\"" -+ eval soname=\"$soname_spec\" - else - soname="$realname" - fi -@@ -5877,7 +6787,7 @@ func_mode_link () - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" + esac + done +@@ -7286,43 +8249,43 @@ EOF + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs +- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" ++ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" -- if test "$linkmode" = prog || test "$mode" != relink; then -+ if test "$linkmode" = prog || test "$opt_mode" != relink; then - add_shlibpath= - add_dir= - add= -@@ -5933,7 +6843,7 @@ func_mode_link () - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) -- add_dir="$add_dir -L$inst_prefix_dir$libdir" -+ func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi -@@ -5955,7 +6865,7 @@ func_mode_link () - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; -- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; -+ *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then -@@ -5969,13 +6879,13 @@ func_mode_link () - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; -- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -+ *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi + func_extract_archives $gentop $convenience +- libobjs="$libobjs $func_extract_archives_result" ++ func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= fi + fi -- if test "$linkmode" = prog || test "$mode" = relink; then -+ if test "$linkmode" = prog || test "$opt_mode" = relink; then - add_shlibpath= - add_dir= - add= -@@ -5989,7 +6899,7 @@ func_mode_link () - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; -- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; -+ *) func_append finalize_shlibpath "$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then -@@ -6001,12 +6911,12 @@ func_mode_link () + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then +- eval "flag=\"$thread_safe_flag_spec\"" +- linker_flags="$linker_flags $flag" ++ eval flag=\"$thread_safe_flag_spec\" ++ func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking +- if test "$mode" = relink; then +- $opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $? ++ if test "$opt_mode" = relink; then ++ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then +- eval "test_cmds=\"$module_expsym_cmds\"" ++ eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else +- eval "test_cmds=\"$module_cmds\"" ++ eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then +- eval "test_cmds=\"$archive_expsym_cmds\"" ++ eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else +- eval "test_cmds=\"$archive_cmds\"" ++ eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi +@@ -7366,10 +8329,13 @@ EOF + echo 'INPUT (' > $output + for obj in $save_libobjs + do +- $ECHO "$obj" >> $output ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output +- delfiles="$delfiles $output" ++ func_append delfiles " $output" ++ func_to_tool_file "$output" ++ output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" +@@ -7383,15 +8349,17 @@ EOF + fi + for obj + do +- $ECHO "$obj" >> $output ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" >> $output + done +- delfiles="$delfiles $output" +- output=$firstobj\"$file_list_spec$output\" ++ func_append delfiles " $output" ++ func_to_tool_file "$output" ++ output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext +- eval "test_cmds=\"$reload_cmds\"" ++ eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 +@@ -7411,12 +8379,12 @@ EOF + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist +- eval "concat_cmds=\"$reload_cmds\"" ++ eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" +- eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"" ++ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 +@@ -7433,11 +8401,11 @@ EOF + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" +- eval "concat_cmds=\"\${concat_cmds}$reload_cmds\"" ++ eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then +- eval "concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"" ++ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi +- delfiles="$delfiles $output" ++ func_append delfiles " $output" + else - # We cannot seem to hardcode it, guess we'll fake it. -- add_dir="-L$libdir" -+ add_dir="-L$lt_sysroot$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) -- add_dir="$add_dir -L$inst_prefix_dir$libdir" -+ func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac + output= +@@ -7450,9 +8418,9 @@ EOF + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ +- eval "concat_cmds=\"\$concat_cmds$export_symbols_cmds\"" ++ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then +- eval "concat_cmds=\"\$concat_cmds~\$RM $last_robj\"" ++ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi -@@ -6083,27 +6993,33 @@ func_mode_link () - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; -- *) xrpath="$xrpath $temp_xrpath";; -+ *) func_append xrpath " $temp_xrpath";; - esac;; -- *) temp_deplibs="$temp_deplibs $libdir";; -+ *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi + fi -- newlib_search_path="$newlib_search_path $absdir" -+ func_append newlib_search_path " $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" -- if $opt_duplicate_deps ; then -+ case $deplib in -+ -L*) func_stripname '-L' '' "$deplib" -+ func_resolve_sysroot "$func_stripname_result";; -+ *) func_resolve_sysroot "$deplib" ;; -+ esac -+ if $opt_preserve_dup_deps ; then - case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ *" $func_resolve_sysroot_result "*) -+ func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac +@@ -7471,7 +8439,7 @@ EOF + lt_exit=$? + + # Restore the uninstalled library and exit +- if test "$mode" = relink; then ++ if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) +@@ -7492,7 +8460,7 @@ EOF + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" +- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" ++ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi -- tmp_libs="$tmp_libs $deplib" -+ func_append tmp_libs " $func_resolve_sysroot_result" - done - if test "$link_all_deplibs" != no; then -@@ -6113,8 +7029,10 @@ func_mode_link () - case $deplib in - -L*) path="$deplib" ;; - *.la) -+ func_resolve_sysroot "$deplib" -+ deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." -- dir="$func_dirname_result" -+ dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; -@@ -6130,7 +7048,7 @@ func_mode_link () - case $host in - *-*-darwin*) - depdepl= -- deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` -+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp -@@ -6141,8 +7059,8 @@ func_mode_link () - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi -- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" -- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" -+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" -+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi -@@ -6152,7 +7070,7 @@ func_mode_link () - ;; - esac - else -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ -@@ -6192,7 +7110,7 @@ func_mode_link () - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; -- *) lib_search_path="$lib_search_path $dir" ;; -+ *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= -@@ -6205,7 +7123,7 @@ func_mode_link () - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order -- eval tmp_libs=\$$var -+ eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so -@@ -6250,13 +7168,13 @@ func_mode_link () - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; -- *) tmp_libs="$tmp_libs $deplib" ;; -+ *) func_append tmp_libs " $deplib" ;; - esac - ;; -- *) tmp_libs="$tmp_libs $deplib" ;; -+ *) func_append tmp_libs " $deplib" ;; - esac - done -- eval $var=\$tmp_libs -+ eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs -@@ -6269,7 +7187,7 @@ func_mode_link () - ;; - esac - if test -n "$i" ; then -- tmp_libs="$tmp_libs $i" -+ func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs -@@ -6310,7 +7228,7 @@ func_mode_link () - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" -- objs="$objs$old_deplibs" -+ func_append objs "$old_deplibs" - ;; + if test -n "$orig_export_symbols"; then +@@ -7504,7 +8472,7 @@ EOF + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter +- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" ++ func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi +@@ -7515,7 +8483,7 @@ EOF + output=$save_output - lib) -@@ -6319,8 +7237,8 @@ func_mode_link () - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result -- eval "shared_ext=\"$shrext_cmds\"" -- eval "libname=\"$libname_spec\"" -+ eval shared_ext=\"$shrext_cmds\" -+ eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ -@@ -6330,8 +7248,8 @@ func_mode_link () - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result -- eval "shared_ext=\"$shrext_cmds\"" -- eval "libname=\"$libname_spec\"" -+ eval shared_ext=\"$shrext_cmds\" -+ eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result -@@ -6346,7 +7264,7 @@ func_mode_link () - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" -- libobjs="$libobjs $objs" -+ func_append libobjs " $objs" + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then +- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" ++ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the +@@ -7539,23 +8507,23 @@ EOF + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. +- eval "cmds=\"\$cmds~\$RM $delfiles\"" ++ eval cmds=\"\$cmds~\$RM $delfiles\" fi - fi -@@ -6544,7 +7462,7 @@ func_mode_link () - done + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" - # Make executables depend on our current version. -- verstring="$verstring:${current}.0" -+ func_append verstring ":${current}.0" - ;; + func_extract_archives $gentop $dlprefiles +- libobjs="$libobjs $func_extract_archives_result" ++ func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi - qnx) -@@ -6612,10 +7530,10 @@ func_mode_link () - fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" +- eval "cmd=\"$cmd\"" ++ eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" +@@ -7564,7 +8532,7 @@ EOF + lt_exit=$? + + # Restore the uninstalled library and exit +- if test "$mode" = relink; then ++ if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) +@@ -7576,8 +8544,8 @@ EOF + IFS="$save_ifs" - func_generate_dlsyms "$libname" "$libname" "yes" -- libobjs="$libobjs $symfileobj" -+ func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= + # Restore the uninstalled library and exit +- if test "$mode" = relink; then +- $opt_dry_run || (cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname) || exit $? ++ if test "$opt_mode" = relink; then ++ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? -- if test "$mode" != relink; then -+ if test "$opt_mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= -@@ -6631,7 +7549,7 @@ func_mode_link () - continue - fi - fi -- removelist="$removelist $p" -+ func_append removelist " $p" - ;; - *) ;; - esac -@@ -6642,7 +7560,7 @@ func_mode_link () + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then +@@ -7656,17 +8624,20 @@ EOF - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then -- oldlibs="$oldlibs $output_objdir/$libname.$libext" -+ func_append oldlibs " $output_objdir/$libname.$libext" + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then +- eval "tmp_whole_archive_flags=\"$whole_archive_flag_spec\"" ++ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` -@@ -6659,10 +7577,11 @@ func_mode_link () - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do -- temp_xrpath="$temp_xrpath -R$libdir" -+ func_replace_sysroot "$libdir" -+ func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" ;; -+ *) func_append finalize_rpath " $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then -@@ -6676,7 +7595,7 @@ func_mode_link () - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; -- *) dlfiles="$dlfiles $lib" ;; -+ *) func_append dlfiles " $lib" ;; - esac - done + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi -@@ -6686,7 +7605,7 @@ func_mode_link () - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; -- *) dlprefiles="$dlprefiles $lib" ;; -+ *) func_append dlprefiles " $lib" ;; - esac - done ++ # If we're not building shared, we need to use non_pic_objs ++ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" ++ + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test -@@ -6698,7 +7617,7 @@ func_mode_link () - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework -- deplibs="$deplibs System.ltframework" -+ func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. -@@ -6715,7 +7634,7 @@ func_mode_link () - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then -- deplibs="$deplibs -lc" -+ func_append deplibs " -lc" - fi - ;; - esac -@@ -6764,18 +7683,18 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $i "*) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - i="" - ;; - esac - fi - if test -n "$i" ; then -- eval "libname=\"$libname_spec\"" -- eval "deplib_matches=\"$library_names_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` - set dummy $deplib_matches; shift - deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - else - droppeddeps=yes - echo -@@ -6789,7 +7708,7 @@ EOF - fi - ;; - *) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - ;; - esac - done -@@ -6807,18 +7726,18 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $i "*) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - i="" - ;; - esac - fi - if test -n "$i" ; then -- eval "libname=\"$libname_spec\"" -- eval "deplib_matches=\"$library_names_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` - set dummy $deplib_matches; shift - deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - else - droppeddeps=yes - echo -@@ -6840,7 +7759,7 @@ EOF - fi - ;; - *) -- newdeplibs="$newdeplibs $i" -+ func_append newdeplibs " $i" - ;; - esac - done -@@ -6857,15 +7776,27 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then -- eval "libname=\"$libname_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ if test -n "$file_magic_glob"; then -+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` -+ else -+ libnameglob=$libname -+ fi -+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do -- potential_libs=`ls $i/$libname[.-]* 2>/dev/null` -+ if test "$want_nocaseglob" = yes; then -+ shopt -s nocaseglob -+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` -+ $nocaseglob -+ else -+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` -+ fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | -@@ -6885,10 +7816,10 @@ EOF - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done -- if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null | -+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi -@@ -6913,7 +7844,7 @@ EOF - ;; - *) - # Add a -L argument. -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. -@@ -6929,20 +7860,20 @@ EOF - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then -- eval "libname=\"$libname_spec\"" -+ libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi -@@ -6967,7 +7898,7 @@ EOF - ;; - *) - # Add a -L argument. -- newdeplibs="$newdeplibs $a_deplib" -+ func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. -@@ -7071,7 +8002,7 @@ EOF +@@ -7690,7 +8661,7 @@ EOF + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" +- # $opt_dry_run || echo timestamp > $libobj || exit $? ++ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + +@@ -7740,8 +8711,8 @@ EOF + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) +- compile_command="$compile_command ${wl}-bind_at_load" +- finalize_command="$finalize_command ${wl}-bind_at_load" ++ func_append compile_command " ${wl}-bind_at_load" ++ func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi +@@ -7761,7 +8732,7 @@ EOF *) - case " $deplibs " in + case " $compile_deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac -@@ -7081,10 +8012,10 @@ EOF +@@ -7771,17 +8742,17 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; @@ -6089,1027 +18759,2476 @@ index 9503ec85d7..70e856e065 100644 + *) func_append new_libs " $deplib" ;; esac done - deplibs="$new_libs" -@@ -7101,10 +8032,12 @@ EOF - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" -- test "$mode" != relink && rpath="$compile_rpath$rpath" -+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else -@@ -7113,18 +8046,18 @@ EOF - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else -- eval "flag=\"$hardcode_libdir_flag_spec\"" -- dep_rpath="$dep_rpath $flag" -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append dep_rpath " $flag" + compile_deplibs="$new_libs" + + +- compile_command="$compile_command $compile_deplibs" +- finalize_command="$finalize_command $finalize_deplibs" ++ func_append compile_command " $compile_deplibs" ++ func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. +@@ -7789,7 +8760,7 @@ EOF + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ;; ++ *) func_append finalize_rpath " $libdir" ;; + esac + done + fi +@@ -7808,18 +8779,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else +- eval "flag=\"$hardcode_libdir_flag_spec\"" +- rpath="$rpath $flag" ++ eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) perm_rpath="$perm_rpath $libdir" ;; ++ *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in +@@ -7828,12 +8799,12 @@ EOF + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; +- *) dllsearchpath="$dllsearchpath:$libdir";; ++ *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; +- *) dllsearchpath="$dllsearchpath:$testbindir";; ++ *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac +@@ -7842,7 +8813,7 @@ EOF + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" +- eval "rpath=\" $hardcode_libdir_flag_spec\"" ++ eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + +@@ -7859,18 +8830,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else +- eval "flag=\"$hardcode_libdir_flag_spec\"" +- rpath="$rpath $flag" ++ eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; +- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; ++ *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done +@@ -7878,7 +8849,7 @@ EOF + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" +- eval "rpath=\" $hardcode_libdir_flag_spec\"" ++ eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + +@@ -7921,6 +8892,12 @@ EOF + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' +@@ -7943,7 +8920,7 @@ EOF + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi +@@ -7951,7 +8928,7 @@ EOF + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi +@@ -7966,6 +8943,13 @@ EOF + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' ++ ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ + exit $EXIT_SUCCESS + fi + +@@ -7999,6 +8983,12 @@ EOF + + func_show_eval "$link_command" 'exit $?' + ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output_objdir/$outputname" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ + # Now create the wrapper script. + func_verbose "creating $output" + +@@ -8096,7 +9086,7 @@ EOF + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then +- oldobjs="$oldobjs $symfileobj" ++ func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" +@@ -8104,10 +9094,10 @@ EOF + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $addlibs +- oldobjs="$oldobjs $func_extract_archives_result" ++ func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. +@@ -8118,10 +9108,10 @@ EOF + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles +- oldobjs="$oldobjs $func_extract_archives_result" ++ func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have +@@ -8139,7 +9129,7 @@ EOF + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" +- generated="$generated $gentop" ++ func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= +@@ -8163,18 +9153,28 @@ EOF + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" +- oldobjs="$oldobjs $gentop/$newobj" ++ func_append oldobjs " $gentop/$newobj" + ;; +- *) oldobjs="$oldobjs $obj" ;; ++ *) func_append oldobjs " $obj" ;; + esac + done + fi +- eval "cmds=\"$old_archive_cmds\"" ++ eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds ++ elif test -n "$archiver_list_spec"; then ++ func_verbose "using command file archive linking..." ++ for obj in $oldobjs ++ do ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" ++ done > $output_objdir/$libname.libcmd ++ func_to_tool_file "$output_objdir/$libname.libcmd" ++ oldobjs=" $archiver_list_spec$func_to_tool_file_result" ++ cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." +@@ -8189,7 +9189,7 @@ EOF + do + last_oldobj=$obj + done +- eval "test_cmds=\"$old_archive_cmds\"" ++ eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 +@@ -8208,7 +9208,7 @@ EOF + RANLIB=$save_RANLIB fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; -- *) perm_rpath="$perm_rpath $libdir" ;; -+ *) func_apped perm_rpath " $libdir" ;; - esac + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ +- eval "concat_cmds=\"\${concat_cmds}$old_archive_cmds\"" ++ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 fi +@@ -8216,9 +9216,9 @@ EOF + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then +- eval "cmds=\"\$concat_cmds\"" ++ eval cmds=\"\$concat_cmds\" + else +- eval "cmds=\"\$concat_cmds~\$old_archive_cmds\"" ++ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi +@@ -8268,12 +9268,23 @@ EOF + *.la) + func_basename "$deplib" + name="$func_basename_result" +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++ func_resolve_sysroot "$deplib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" +- newdependency_libs="$newdependency_libs $libdir/$name" ++ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ++ ;; ++ -L*) ++ func_stripname -L '' "$deplib" ++ func_replace_sysroot "$func_stripname_result" ++ func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; +- *) newdependency_libs="$newdependency_libs $deplib" ;; ++ -R*) ++ func_stripname -R '' "$deplib" ++ func_replace_sysroot "$func_stripname_result" ++ func_append newdependency_libs " -R$func_replace_sysroot_result" ++ ;; ++ *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" +@@ -8284,12 +9295,14 @@ EOF + *.la) + func_basename "$lib" + name="$func_basename_result" +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` ++ func_resolve_sysroot "$lib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` ++ + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" +- newdlfiles="$newdlfiles $libdir/$name" ++ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; +- *) newdlfiles="$newdlfiles $lib" ;; ++ *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" +@@ -8303,10 +9316,11 @@ EOF + # the library: + func_basename "$lib" + name="$func_basename_result" +- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` ++ func_resolve_sysroot "$lib" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" +- newdlprefiles="$newdlprefiles $libdir/$name" ++ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done +@@ -8318,7 +9332,7 @@ EOF + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac +- newdlfiles="$newdlfiles $abs" ++ func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= +@@ -8327,7 +9341,7 @@ EOF + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac +- newdlprefiles="$newdlprefiles $abs" ++ func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi +@@ -8412,7 +9426,7 @@ relink_command=\"$relink_command\"" + exit $EXIT_SUCCESS + } + +-{ test "$mode" = link || test "$mode" = relink; } && ++{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +@@ -8432,9 +9446,9 @@ func_mode_uninstall () + for arg + do + case $arg in +- -f) RM="$RM $arg"; rmforce=yes ;; +- -*) RM="$RM $arg" ;; +- *) files="$files $arg" ;; ++ -f) func_append RM " $arg"; rmforce=yes ;; ++ -*) func_append RM " $arg" ;; ++ *) func_append files " $arg" ;; + esac + done + +@@ -8443,24 +9457,23 @@ func_mode_uninstall () + + rmdirs= + +- origobjdir="$objdir" + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then +- objdir="$origobjdir" ++ odir="$objdir" + else +- objdir="$dir/$origobjdir" ++ odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" +- test "$mode" = uninstall && objdir="$dir" ++ test "$opt_mode" = uninstall && odir="$dir" + +- # Remember objdir for removal later, being careful to avoid duplicates +- if test "$mode" = clean; then ++ # Remember odir for removal later, being careful to avoid duplicates ++ if test "$opt_mode" = clean; then + case " $rmdirs " in +- *" $objdir "*) ;; +- *) rmdirs="$rmdirs $objdir" ;; ++ *" $odir "*) ;; ++ *) func_append rmdirs " $odir" ;; + esac + fi + +@@ -8486,18 +9499,17 @@ func_mode_uninstall () + + # Delete the libtool libraries and symlinks. + for n in $library_names; do +- rmfiles="$rmfiles $objdir/$n" ++ func_append rmfiles " $odir/$n" done -@@ -7133,40 +8066,38 @@ EOF - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then -- eval "dep_rpath=\"$hardcode_libdir_flag_spec_ld\"" -+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" +- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" ++ test -n "$old_library" && func_append rmfiles " $odir/$old_library" + +- case "$mode" in ++ case "$opt_mode" in + clean) +- case " $library_names " in +- # " " in the beginning catches empty $dlname ++ case " $library_names " in + *" $dlname "*) ;; +- *) rmfiles="$rmfiles $objdir/$dlname" ;; ++ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac +- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ++ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then +@@ -8525,19 +9537,19 @@ func_mode_uninstall () + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then +- rmfiles="$rmfiles $dir/$pic_object" ++ func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then +- rmfiles="$rmfiles $dir/$non_pic_object" ++ func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) +- if test "$mode" = clean ; then ++ if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) +@@ -8547,7 +9559,7 @@ func_mode_uninstall () + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe +- rmfiles="$rmfiles $file" ++ func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. +@@ -8556,7 +9568,7 @@ func_mode_uninstall () + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result +- rmfiles="$rmfiles $func_ltwrapper_scriptname_result" ++ func_append rmfiles " $func_ltwrapper_scriptname_result" else -- eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" -+ eval dep_rpath=\"$hardcode_libdir_flag_spec\" + relink_command= + func_source $dir/$noexename +@@ -8564,12 +9576,12 @@ func_mode_uninstall () + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles +- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" ++ func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then +- rmfiles="$rmfiles $objdir/lt-$name" ++ func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then +- rmfiles="$rmfiles $objdir/lt-${noexename}.c" ++ func_append rmfiles " $odir/lt-${noexename}.c" fi fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do -- rpath="$rpath$dir:" -+ func_append rpath "$dir:" - done -- eval $runpath_var=\$rpath\$$runpath_var -- export $runpath_var -+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi +@@ -8577,7 +9589,6 @@ func_mode_uninstall () + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done +- objdir="$origobjdir" - shlibpath="$finalize_shlibpath" -- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" -+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then -- eval $shlibpath_var=\$shlibpath\$$shlibpath_var -- export $shlibpath_var -+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do +@@ -8589,16 +9600,16 @@ func_mode_uninstall () + exit $exit_status + } + +-{ test "$mode" = uninstall || test "$mode" = clean; } && ++{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +-test -z "$mode" && { ++test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" + } + + test -z "$exec_cmd" && \ +- func_fatal_help "invalid operation mode \`$mode'" ++ func_fatal_help "invalid operation mode \`$opt_mode'" + + if test -n "$exec_cmd"; then + eval exec "$exec_cmd" +diff --git a/ltoptions.m4 b/ltoptions.m4 +index 5ef12ced2a8..17cfd51c0b3 100644 +--- a/ltoptions.m4 ++++ b/ltoptions.m4 +@@ -8,7 +8,7 @@ + # unlimited permission to copy and/or distribute it, with or without + # modifications, as long as this notice is preserved. + +-# serial 6 ltoptions.m4 ++# serial 7 ltoptions.m4 + + # This is to help aclocal find these macros, as it can't see m4_define. + AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) +diff --git a/ltversion.m4 b/ltversion.m4 +index bf87f77132d..9c7b5d41185 100644 +--- a/ltversion.m4 ++++ b/ltversion.m4 +@@ -7,17 +7,17 @@ + # unlimited permission to copy and/or distribute it, with or without + # modifications, as long as this notice is preserved. + +-# Generated from ltversion.in. ++# @configure_input@ + +-# serial 3134 ltversion.m4 ++# serial 3293 ltversion.m4 + # This file is part of GNU Libtool + +-m4_define([LT_PACKAGE_VERSION], [2.2.7a]) +-m4_define([LT_PACKAGE_REVISION], [1.3134]) ++m4_define([LT_PACKAGE_VERSION], [2.4]) ++m4_define([LT_PACKAGE_REVISION], [1.3293]) + + AC_DEFUN([LTVERSION_VERSION], +-[macro_version='2.2.7a' +-macro_revision='1.3134' ++[macro_version='2.4' ++macro_revision='1.3293' + _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) + _LT_DECL(, macro_revision, 0) + ]) +diff --git a/lt~obsolete.m4 b/lt~obsolete.m4 +index bf92b5e0790..c573da90c5c 100644 +--- a/lt~obsolete.m4 ++++ b/lt~obsolete.m4 +@@ -7,7 +7,7 @@ + # unlimited permission to copy and/or distribute it, with or without + # modifications, as long as this notice is preserved. + +-# serial 4 lt~obsolete.m4 ++# serial 5 lt~obsolete.m4 + + # These exist entirely to fool aclocal when bootstrapping libtool. + # +diff --git a/opcodes/configure b/opcodes/configure +index 4723dcdc1e8..006ccdaa458 100755 +--- a/opcodes/configure ++++ b/opcodes/configure +@@ -680,6 +680,9 @@ OTOOL + LIPO + NMEDIT + DSYMUTIL ++MANIFEST_TOOL ++ac_ct_AR ++DLLTOOL + OBJDUMP + LN_S + NM +@@ -798,6 +801,7 @@ enable_static + with_pic + enable_fast_install + with_gnu_ld ++with_libtool_sysroot + enable_libtool_lock + enable_targets + enable_werror +@@ -1462,6 +1466,8 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-libtool-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + + Some influential environment variables: + CC C compiler command +@@ -5403,8 +5409,8 @@ esac + + + +-macro_version='2.2.7a' +-macro_revision='1.3134' ++macro_version='2.4' ++macro_revision='1.3293' + + + +@@ -5444,7 +5450,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 + $as_echo_n "checking how to print strings... " >&6; } + # Test print first, because it will be a builtin if present. +-if test "X`print -r -- -n 2>/dev/null`" = X-n && \ ++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' + elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then +@@ -6130,8 +6136,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; + # Try some XSI features + xsi_shell=no + ( _lt_dummy="a/b/c" +- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ +- = c,a/b,, \ ++ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ ++ = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +@@ -6180,6 +6186,80 @@ esac + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 ++$as_echo_n "checking how to convert $build file names to $host format... " >&6; } ++if ${lt_cv_to_host_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ++ ;; ++ esac ++ ;; ++ *-*-cygwin* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ++ ;; ++ *-*-cygwin* ) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++ * ) # otherwise, assume *nix ++ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ++ ;; ++ esac ++ ;; ++ * ) # unhandled hosts (and "normal" native builds) ++ lt_cv_to_host_file_cmd=func_convert_file_noop ++ ;; ++esac ++ ++fi ++ ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 ++$as_echo "$lt_cv_to_host_file_cmd" >&6; } ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 ++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } ++if ${lt_cv_to_tool_file_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ #assume ordinary cross tools, or native build. ++lt_cv_to_tool_file_cmd=func_convert_file_noop ++case $host in ++ *-*-mingw* ) ++ case $build in ++ *-*-mingw* ) # actually msys ++ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ++ ;; ++ esac ++ ;; ++esac ++ ++fi ++ ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 ++$as_echo "$lt_cv_to_tool_file_cmd" >&6; } ++ ++ ++ ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 + $as_echo_n "checking for $LD option to reload object files... " >&6; } + if ${lt_cv_ld_reload_flag+:} false; then : +@@ -6196,6 +6276,11 @@ case $reload_flag in + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in ++ cygwin* | mingw* | pw32* | cegcc*) ++ if test "$GCC" != yes; then ++ reload_cmds=false ++ fi ++ ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' +@@ -6364,7 +6449,8 @@ mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else +- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' ++ # Keep this pattern in sync with the one in func_win32_libid. ++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; +@@ -6518,6 +6604,21 @@ esac + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 + $as_echo "$lt_cv_deplibs_check_method" >&6; } ++ ++file_magic_glob= ++want_nocaseglob=no ++if test "$build" = "$host"; then ++ case $host_os in ++ mingw* | pw32*) ++ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then ++ want_nocaseglob=yes ++ else ++ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` ++ fi ++ ;; ++ esac ++fi ++ + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown +@@ -6531,11 +6632,164 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ - # Get the real and link names of the library. -- eval "shared_ext=\"$shrext_cmds\"" -- eval "library_names=\"$library_names_spec\"" -+ eval shared_ext=\"$shrext_cmds\" -+ eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - if test -n "$soname_spec"; then -- eval "soname=\"$soname_spec\"" -+ eval soname=\"$soname_spec\" - else - soname="$realname" - fi -@@ -7178,7 +8109,7 @@ EOF - linknames= - for link - do -- linknames="$linknames $link" -+ func_append linknames " $link" - done + if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +-set dummy ${ac_tool_prefix}ar; ac_word=$2 ++ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. ++set dummy ${ac_tool_prefix}dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$DLLTOOL"; then ++ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++DLLTOOL=$ac_cv_prog_DLLTOOL ++if test -n "$DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 ++$as_echo "$DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_DLLTOOL"; then ++ ac_ct_DLLTOOL=$DLLTOOL ++ # Extract the first word of "dlltool", so it can be a program name with args. ++set dummy dlltool; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_DLLTOOL"; then ++ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_DLLTOOL="dlltool" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL ++if test -n "$ac_ct_DLLTOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 ++$as_echo "$ac_ct_DLLTOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_DLLTOOL" = x; then ++ DLLTOOL="false" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ DLLTOOL=$ac_ct_DLLTOOL ++ fi ++else ++ DLLTOOL="$ac_cv_prog_DLLTOOL" ++fi ++ ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 ++$as_echo_n "checking how to associate runtime and link libraries... " >&6; } ++if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_sharedlib_from_linklib_cmd='unknown' ++ ++case $host_os in ++cygwin* | mingw* | pw32* | cegcc*) ++ # two different shell functions defined in ltmain.sh ++ # decide which to use based on capabilities of $DLLTOOL ++ case `$DLLTOOL --help 2>&1` in ++ *--identify-strict*) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ++ ;; ++ *) ++ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ++ ;; ++ esac ++ ;; ++*) ++ # fallback: assume linklib IS sharedlib ++ lt_cv_sharedlib_from_linklib_cmd="$ECHO" ++ ;; ++esac ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 ++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } ++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd ++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO ++ ++ ++ ++ ++ ++ ++ ++if test -n "$ac_tool_prefix"; then ++ for ac_prog in ar ++ do ++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ++set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_AR+:} false; then : +@@ -6551,7 +6805,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_AR="${ac_tool_prefix}ar" ++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6571,11 +6825,15 @@ $as_echo "no" >&6; } + fi - # Use standard objects if they are pic -@@ -7189,7 +8120,7 @@ EOF - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" -- delfiles="$delfiles $export_symbols" -+ func_append delfiles " $export_symbols" - fi - orig_export_symbols= -@@ -7220,13 +8151,45 @@ EOF - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -+ for cmd1 in $cmds; do - IFS="$save_ifs" -- eval "cmd=\"$cmd\"" -- func_len " $cmd" -- len=$func_len_result -- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then -+ # Take the normal branch if the nm_file_list_spec branch -+ # doesn't work or if tool conversion is not needed. -+ case $nm_file_list_spec~$to_tool_file_cmd in -+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) -+ try_normal_branch=yes -+ eval cmd=\"$cmd1\" -+ func_len " $cmd" -+ len=$func_len_result -+ ;; -+ *) -+ try_normal_branch=no -+ ;; -+ esac -+ if test "$try_normal_branch" = yes \ -+ && { test "$len" -lt "$max_cmd_len" \ -+ || test "$max_cmd_len" -le -1; } -+ then -+ func_show_eval "$cmd" 'exit $?' -+ skipped_export=false -+ elif test -n "$nm_file_list_spec"; then -+ func_basename "$output" -+ output_la=$func_basename_result -+ save_libobjs=$libobjs -+ save_output=$output -+ output=${output_objdir}/${output_la}.nm -+ func_to_tool_file "$output" -+ libobjs=$nm_file_list_spec$func_to_tool_file_result -+ func_append delfiles " $output" -+ func_verbose "creating $NM input file list: $output" -+ for obj in $save_libobjs; do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" -+ done > "$output" -+ eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' -+ output=$save_output -+ libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. -@@ -7248,7 +8211,7 @@ EOF - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" -- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" -+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi ++ test -n "$AR" && break ++ done + fi +-if test -z "$ac_cv_prog_AR"; then ++if test -z "$AR"; then + ac_ct_AR=$AR +- # Extract the first word of "ar", so it can be a program name with args. +-set dummy ar; ac_word=$2 ++ for ac_prog in ar ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_ac_ct_AR+:} false; then : +@@ -6591,7 +6849,7 @@ do + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_AR="ar" ++ ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -6610,6 +6868,10 @@ else + $as_echo "no" >&6; } + fi - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then -@@ -7260,7 +8223,7 @@ EOF - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter -- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" -+ func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi -@@ -7270,7 +8233,7 @@ EOF - case " $convenience " in - *" $test_deplib "*) ;; - *) -- tmp_deplibs="$tmp_deplibs $test_deplib" -+ func_append tmp_deplibs " $test_deplib" - ;; - esac - done -@@ -7286,43 +8249,43 @@ EOF - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs -- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" -+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" ++ ++ test -n "$ac_ct_AR" && break ++done ++ + if test "x$ac_ct_AR" = x; then + AR="false" + else +@@ -6621,16 +6883,72 @@ ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi +-else +- AR="$ac_cv_prog_AR" + fi - func_extract_archives $gentop $convenience -- libobjs="$libobjs $func_extract_archives_result" -+ func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi +-test -z "$AR" && AR=ar +-test -z "$AR_FLAGS" && AR_FLAGS=cru ++: ${AR=ar} ++: ${AR_FLAGS=cru} ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 ++$as_echo_n "checking for archiver @FILE support... " >&6; } ++if ${lt_cv_ar_at_file+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_ar_at_file=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then -- eval "flag=\"$thread_safe_flag_spec\"" -- linker_flags="$linker_flags $flag" -+ eval flag=\"$thread_safe_flag_spec\" -+ func_append linker_flags " $flag" - fi ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ echo conftest.$ac_objext > conftest.lst ++ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -eq 0; then ++ # Ensure the archiver fails upon bogus file names. ++ rm -f conftest.$ac_objext libconftest.a ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 ++ (eval $lt_ar_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if test "$ac_status" -ne 0; then ++ lt_cv_ar_at_file=@ ++ fi ++ fi ++ rm -f conftest.* libconftest.a - # Make a backup of the uninstalled library when relinking -- if test "$mode" = relink; then -- $opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $? -+ if test "$opt_mode" = relink; then -+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 ++$as_echo "$lt_cv_ar_at_file" >&6; } + ++if test "x$lt_cv_ar_at_file" = xno; then ++ archiver_list_spec= ++else ++ archiver_list_spec=$lt_cv_ar_at_file ++fi - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -- eval "test_cmds=\"$module_expsym_cmds\"" -+ eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else -- eval "test_cmds=\"$module_cmds\"" -+ eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval "test_cmds=\"$archive_expsym_cmds\"" -+ eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else -- eval "test_cmds=\"$archive_cmds\"" -+ eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi -@@ -7366,10 +8329,13 @@ EOF - echo 'INPUT (' > $output - for obj in $save_libobjs - do -- $ECHO "$obj" >> $output -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output -- delfiles="$delfiles $output" -+ func_append delfiles " $output" -+ func_to_tool_file "$output" -+ output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" -@@ -7383,15 +8349,17 @@ EOF - fi - for obj - do -- $ECHO "$obj" >> $output -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" >> $output - done -- delfiles="$delfiles $output" -- output=$firstobj\"$file_list_spec$output\" -+ func_append delfiles " $output" -+ func_to_tool_file "$output" -+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext -- eval "test_cmds=\"$reload_cmds\"" -+ eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 -@@ -7411,12 +8379,12 @@ EOF - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist -- eval "concat_cmds=\"$reload_cmds\"" -+ eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" -- eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"" -+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 -@@ -7433,11 +8401,11 @@ EOF - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" -- eval "concat_cmds=\"\${concat_cmds}$reload_cmds\"" -+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then -- eval "concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"" -+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi -- delfiles="$delfiles $output" -+ func_append delfiles " $output" - else - output= -@@ -7450,9 +8418,9 @@ EOF - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -- eval "concat_cmds=\"\$concat_cmds$export_symbols_cmds\"" -+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then -- eval "concat_cmds=\"\$concat_cmds~\$RM $last_robj\"" -+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi -@@ -7471,7 +8439,7 @@ EOF - lt_exit=$? +@@ -6972,8 +7290,8 @@ esac + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - # Restore the uninstalled library and exit -- if test "$mode" = relink; then -+ if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) -@@ -7492,7 +8460,7 @@ EOF - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" -- $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" -+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi + # Transform an extracted symbol line into symbol name and symbol address +-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" ++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - if test -n "$orig_export_symbols"; then -@@ -7504,7 +8472,7 @@ EOF - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter -- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" -+ func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi -@@ -7515,7 +8483,7 @@ EOF - output=$save_output + # Handle CRLF in mingw tool chain + opt_cr= +@@ -7009,6 +7327,7 @@ for ac_symprfx in "" "_"; do + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi ++ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then -- eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" -+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the -@@ -7539,23 +8507,23 @@ EOF + # Check to see that the pipe works correctly. + pipe_works=no +@@ -7050,6 +7369,18 @@ _LT_EOF + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -7061,7 +7392,7 @@ _LT_EOF + cat <<_LT_EOF >> conftest.$ac_ext - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. -- eval "cmds=\"\$cmds~\$RM $delfiles\"" -+ eval cmds=\"\$cmds~\$RM $delfiles\" + /* The mapping between symbol names and symbols. */ +-const struct { ++LT_DLSYM_CONST struct { + const char *name; + void *address; + } +@@ -7087,8 +7418,8 @@ static const void *lt_preloaded_setup() { + _LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext +- lt_save_LIBS="$LIBS" +- lt_save_CFLAGS="$CFLAGS" ++ lt_globsym_save_LIBS=$LIBS ++ lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 +@@ -7098,8 +7429,8 @@ _LT_EOF + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi +- LIBS="$lt_save_LIBS" +- CFLAGS="$lt_save_CFLAGS" ++ LIBS=$lt_globsym_save_LIBS ++ CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 fi +@@ -7136,6 +7467,16 @@ else + $as_echo "ok" >&6; } + fi - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" ++# Response file support. ++if test "$lt_cv_nm_interface" = "MS dumpbin"; then ++ nm_file_list_spec='@' ++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then ++ nm_file_list_spec='@' ++fi ++ ++ ++ ++ - func_extract_archives $gentop $dlprefiles -- libobjs="$libobjs $func_extract_archives_result" -+ func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -- eval "cmd=\"$cmd\"" -+ eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" -@@ -7564,7 +8532,7 @@ EOF - lt_exit=$? - # Restore the uninstalled library and exit -- if test "$mode" = relink; then -+ if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) -@@ -7576,8 +8544,8 @@ EOF - IFS="$save_ifs" +@@ -7152,6 +7493,45 @@ fi - # Restore the uninstalled library and exit -- if test "$mode" = relink; then -- $opt_dry_run || (cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname) || exit $? -+ if test "$opt_mode" = relink; then -+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then -@@ -7656,17 +8624,20 @@ EOF - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then -- eval "tmp_whole_archive_flags=\"$whole_archive_flag_spec\"" -+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" ++ ++ ++ ++ ++ ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 ++$as_echo_n "checking for sysroot... " >&6; } ++ ++# Check whether --with-libtool-sysroot was given. ++if test "${with_libtool_sysroot+set}" = set; then : ++ withval=$with_libtool_sysroot; ++else ++ with_libtool_sysroot=no ++fi ++ ++ ++lt_sysroot= ++case ${with_libtool_sysroot} in #( ++ yes) ++ if test "$GCC" = yes; then ++ lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ fi ++ ;; #( ++ /*) ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` ++ ;; #( ++ no|'') ++ ;; #( ++ *) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5 ++$as_echo "${with_libtool_sysroot}" >&6; } ++ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ++ ;; ++esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 ++$as_echo "${lt_sysroot:-no}" >&6; } + - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi -+ # If we're not building shared, we need to use non_pic_objs -+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" -+ - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test +@@ -7363,6 +7743,123 @@ esac -@@ -7690,7 +8661,7 @@ EOF - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" -- # $opt_dry_run || echo timestamp > $libobj || exit $? -+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi + need_locks="$enable_libtool_lock" -@@ -7740,8 +8711,8 @@ EOF - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) -- compile_command="$compile_command ${wl}-bind_at_load" -- finalize_command="$finalize_command ${wl}-bind_at_load" -+ func_append compile_command " ${wl}-bind_at_load" -+ func_append finalize_command " ${wl}-bind_at_load" - ;; - esac - fi -@@ -7761,7 +8732,7 @@ EOF - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) -- new_libs="$new_libs -L$path/$objdir" ;; -+ func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac -@@ -7771,17 +8742,17 @@ EOF - -L*) - case " $new_libs " in - *" $deplib "*) ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - ;; -- *) new_libs="$new_libs $deplib" ;; -+ *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs="$new_libs" ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. ++set dummy ${ac_tool_prefix}mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$MANIFEST_TOOL"; then ++ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL ++if test -n "$MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 ++$as_echo "$MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ++ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL ++ # Extract the first word of "mt", so it can be a program name with args. ++set dummy mt; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_MANIFEST_TOOL"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL ++if test -n "$ac_ct_MANIFEST_TOOL"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 ++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_MANIFEST_TOOL" = x; then ++ MANIFEST_TOOL=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL ++ fi ++else ++ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" ++fi ++ ++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 ++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } ++if ${lt_cv_path_mainfest_tool+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_path_mainfest_tool=no ++ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 ++ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out ++ cat conftest.err >&5 ++ if $GREP 'Manifest Tool' conftest.out > /dev/null; then ++ lt_cv_path_mainfest_tool=yes ++ fi ++ rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 ++$as_echo "$lt_cv_path_mainfest_tool" >&6; } ++if test "x$lt_cv_path_mainfest_tool" != xyes; then ++ MANIFEST_TOOL=: ++fi ++ ++ ++ ++ ++ + case $host_os in + rhapsody* | darwin*) +@@ -7926,6 +8423,8 @@ _LT_EOF + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 ++ echo "$RANLIB libconftest.a" >&5 ++ $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF + int main() { return 0;} + _LT_EOF +@@ -8091,7 +8590,8 @@ fi + LIBTOOL_DEPS="$ltmain" -- compile_command="$compile_command $compile_deplibs" -- finalize_command="$finalize_command $finalize_deplibs" -+ func_append compile_command " $compile_deplibs" -+ func_append finalize_command " $finalize_deplibs" + # Always use our own libtool. +-LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++LIBTOOL='$(SHELL) $(top_builddir)' ++LIBTOOL="$LIBTOOL/${host_alias}-libtool" - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. -@@ -7789,7 +8760,7 @@ EOF - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; -- *) finalize_rpath="$finalize_rpath $libdir" ;; -+ *) func_append finalize_rpath " $libdir" ;; - esac - done - fi -@@ -7808,18 +8779,18 @@ EOF - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else -- eval "flag=\"$hardcode_libdir_flag_spec\"" -- rpath="$rpath $flag" -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; -- *) perm_rpath="$perm_rpath $libdir" ;; -+ *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in -@@ -7828,12 +8799,12 @@ EOF - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; -- *) dllsearchpath="$dllsearchpath:$libdir";; -+ *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; -- *) dllsearchpath="$dllsearchpath:$testbindir";; -+ *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac -@@ -7842,7 +8813,7 @@ EOF - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" -- eval "rpath=\" $hardcode_libdir_flag_spec\"" -+ eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" -@@ -7859,18 +8830,18 @@ EOF - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) -- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" -+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else -- eval "flag=\"$hardcode_libdir_flag_spec\"" -- rpath="$rpath $flag" -+ eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; -- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; -+ *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done -@@ -7878,7 +8849,7 @@ EOF - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" -- eval "rpath=\" $hardcode_libdir_flag_spec\"" -+ eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" -@@ -7921,6 +8892,12 @@ EOF - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' +@@ -8180,7 +8680,7 @@ aix3*) + esac -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi -+ - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' -@@ -7943,7 +8920,7 @@ EOF - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do -- rpath="$rpath$dir:" -+ func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi -@@ -7951,7 +8928,7 @@ EOF - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do -- rpath="$rpath$dir:" -+ func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi -@@ -7966,6 +8943,13 @@ EOF - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' -+ -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi -+ - exit $EXIT_SUCCESS - fi + # Global variables: +-ofile=libtool ++ofile=${host_alias}-libtool + can_build_shared=yes + + # All known linkers require a `.a' archive for static linking (except MSVC, +@@ -8478,8 +8978,6 @@ fi + lt_prog_compiler_pic= + lt_prog_compiler_static= + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +-$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' +@@ -8645,6 +9143,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; ++ nagfor*) ++ # NAG Fortran compiler ++ lt_prog_compiler_wl='-Wl,-Wl,,' ++ lt_prog_compiler_pic='-PIC' ++ lt_prog_compiler_static='-Bstatic' ++ ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) +@@ -8707,7 +9211,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in +- f77* | f90* | f95*) ++ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; +@@ -8764,13 +9268,17 @@ case $host_os in + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; + esac +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +-$as_echo "$lt_prog_compiler_pic" >&6; } +- +- +- +- + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 ++$as_echo_n "checking for $compiler option to produce PIC... " >&6; } ++if ${lt_cv_prog_compiler_pic+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 ++$as_echo "$lt_cv_prog_compiler_pic" >&6; } ++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + + # + # Check to make sure the PIC flag actually works. +@@ -8831,6 +9339,11 @@ fi -@@ -7999,6 +8983,12 @@ EOF - func_show_eval "$link_command" 'exit $?' -+ if test -n "$postlink_cmds"; then -+ func_to_tool_file "$output_objdir/$outputname" -+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` -+ func_execute_cmds "$postlink_cmds" 'exit $?' -+ fi + - # Now create the wrapper script. - func_verbose "creating $output" ++ ++ ++ ++ + # + # Check to make sure the static flag actually works. + # +@@ -9181,7 +9694,8 @@ _LT_EOF + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes +- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ++ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' -@@ -8096,7 +9086,7 @@ EOF - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then -- oldobjs="$oldobjs $symfileobj" -+ func_append oldobjs " $symfileobj" + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' +@@ -9280,12 +9794,12 @@ _LT_EOF + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' +- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' ++ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' ++ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi - fi - addlibs="$old_convenience" -@@ -8104,10 +9094,10 @@ EOF + ;; + esac +@@ -9299,8 +9813,8 @@ _LT_EOF + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" +@@ -9318,8 +9832,8 @@ _LT_EOF - func_extract_archives $gentop $addlibs -- oldobjs="$oldobjs $func_extract_archives_result" -+ func_append oldobjs " $func_extract_archives_result" + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no fi +@@ -9365,8 +9879,8 @@ _LT_EOF - # Do each command in the archive commands. -@@ -8118,10 +9108,10 @@ EOF - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9496,7 +10010,13 @@ _LT_EOF + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ - func_extract_archives $gentop $dlprefiles -- oldobjs="$oldobjs $func_extract_archives_result" -+ func_append oldobjs " $func_extract_archives_result" - fi + int +@@ -9509,22 +10029,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : - # POSIX demands no paths to be encoded in archives. We have -@@ -8139,7 +9129,7 @@ EOF - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" -- generated="$generated $gentop" -+ func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= -@@ -8163,18 +9153,28 @@ EOF - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" -- oldobjs="$oldobjs $gentop/$newobj" -+ func_append oldobjs " $gentop/$newobj" - ;; -- *) oldobjs="$oldobjs $obj" ;; -+ *) func_append oldobjs " $obj" ;; - esac - done - fi -- eval "cmds=\"$old_archive_cmds\"" -+ eval cmds=\"$old_archive_cmds\" +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds -+ elif test -n "$archiver_list_spec"; then -+ func_verbose "using command file archive linking..." -+ for obj in $oldobjs -+ do -+ func_to_tool_file "$obj" -+ $ECHO "$func_to_tool_file_result" -+ done > $output_objdir/$libname.libcmd -+ func_to_tool_file "$output_objdir/$libname.libcmd" -+ oldobjs=" $archiver_list_spec$func_to_tool_file_result" -+ cmds=$old_archive_cmds + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +@@ -9536,7 +10063,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." -@@ -8189,7 +9189,7 @@ EOF - do - last_oldobj=$obj - done -- eval "test_cmds=\"$old_archive_cmds\"" -+ eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 -@@ -8208,7 +9208,7 @@ EOF - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -- eval "concat_cmds=\"\${concat_cmds}$old_archive_cmds\"" -+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi -@@ -8216,9 +9216,9 @@ EOF - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then -- eval "cmds=\"\$concat_cmds\"" -+ eval cmds=\"\$concat_cmds\" - else -- eval "cmds=\"\$concat_cmds~\$old_archive_cmds\"" -+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi + # Determine the default libpath from the value encoded in an + # empty executable. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ if test "${lt_cv_aix_libpath+set}" = set; then ++ aix_libpath=$lt_cv_aix_libpath ++else ++ if ${lt_cv_aix_libpath_+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -9549,22 +10082,29 @@ main () + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + +-lt_aix_libpath_sed=' +- /Import File Strings/,/^$/ { +- /^0/ { +- s/^0 *\(.*\)$/\1/ +- p +- } +- }' +-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-# Check for a 64-bit object if we didn't find anything. +-if test -z "$aix_libpath"; then +- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +-fi ++ lt_aix_libpath_sed=' ++ /Import File Strings/,/^$/ { ++ /^0/ { ++ s/^0 *\([^ ]*\) *$/\1/ ++ p ++ } ++ }' ++ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ # Check for a 64-bit object if we didn't find anything. ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` ++ fi + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ++ if test -z "$lt_cv_aix_libpath_"; then ++ lt_cv_aix_libpath_="/usr/lib:/lib" ++ fi ++ ++fi ++ ++ aix_libpath=$lt_cv_aix_libpath_ ++fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, +@@ -9609,20 +10149,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. +- hardcode_libdir_flag_spec=' ' +- allow_undefined_flag=unsupported +- # Tell ltmain to make .lib files, not .a files. +- libext=lib +- # Tell ltmain to make .dll files, not .so files. +- shrext_cmds=".dll" +- # FIXME: Setting linknames here is a bad hack. +- archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' +- # The linker will automatically build a .lib file if we build a DLL. +- old_archive_from_new_cmds='true' +- # FIXME: Should let the user specify the lib program. +- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' +- fix_srcfile_path='`cygpath -w "$srcfile"`' +- enable_shared_with_static_runtimes=yes ++ case $cc_basename in ++ cl*) ++ # Native MSVC ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ always_export_symbols=yes ++ file_list_spec='@' ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' ++ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; ++ else ++ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; ++ fi~ ++ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ ++ linknames=' ++ # The linker will not automatically build a static lib if we build a DLL. ++ # _LT_TAGVAR(old_archive_from_new_cmds, )='true' ++ enable_shared_with_static_runtimes=yes ++ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ++ # Don't use ranlib ++ old_postinstall_cmds='chmod 644 $oldlib' ++ postlink_cmds='lt_outputfile="@OUTPUT@"~ ++ lt_tool_outputfile="@TOOL_OUTPUT@"~ ++ case $lt_outputfile in ++ *.exe|*.EXE) ;; ++ *) ++ lt_outputfile="$lt_outputfile.exe" ++ lt_tool_outputfile="$lt_tool_outputfile.exe" ++ ;; ++ esac~ ++ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then ++ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; ++ $RM "$lt_outputfile.manifest"; ++ fi' ++ ;; ++ *) ++ # Assume MSVC wrapper ++ hardcode_libdir_flag_spec=' ' ++ allow_undefined_flag=unsupported ++ # Tell ltmain to make .lib files, not .a files. ++ libext=lib ++ # Tell ltmain to make .dll files, not .so files. ++ shrext_cmds=".dll" ++ # FIXME: Setting linknames here is a bad hack. ++ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' ++ # The linker will automatically build a .lib file if we build a DLL. ++ old_archive_from_new_cmds='true' ++ # FIXME: Should let the user specify the lib program. ++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' ++ enable_shared_with_static_runtimes=yes ++ ;; ++ esac + ;; + + darwin* | rhapsody*) +@@ -9683,7 +10266,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) +- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no +@@ -9691,7 +10274,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hpux9*) + if test "$GCC" = yes; then +- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi -@@ -8268,12 +9268,23 @@ EOF - *.la) - func_basename "$deplib" - name="$func_basename_result" -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ func_resolve_sysroot "$deplib" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" -- newdependency_libs="$newdependency_libs $libdir/$name" -+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" -+ ;; -+ -L*) -+ func_stripname -L '' "$deplib" -+ func_replace_sysroot "$func_stripname_result" -+ func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; -- *) newdependency_libs="$newdependency_libs $deplib" ;; -+ -R*) -+ func_stripname -R '' "$deplib" -+ func_replace_sysroot "$func_stripname_result" -+ func_append newdependency_libs " -R$func_replace_sysroot_result" -+ ;; -+ *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" -@@ -8284,12 +9295,14 @@ EOF - *.la) - func_basename "$lib" - name="$func_basename_result" -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ func_resolve_sysroot "$lib" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` -+ - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" -- newdlfiles="$newdlfiles $libdir/$name" -+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; -- *) newdlfiles="$newdlfiles $lib" ;; -+ *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles="$newdlfiles" -@@ -8303,10 +9316,11 @@ EOF - # the library: - func_basename "$lib" - name="$func_basename_result" -- libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ func_resolve_sysroot "$lib" -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" -- newdlprefiles="$newdlprefiles $libdir/$name" -+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done -@@ -8318,7 +9332,7 @@ EOF - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac -- newdlfiles="$newdlfiles $abs" -+ func_append newdlfiles " $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= -@@ -8327,7 +9341,7 @@ EOF - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac -- newdlprefiles="$newdlprefiles $abs" -+ func_append newdlprefiles " $abs" - done - dlprefiles="$newdlprefiles" - fi -@@ -8412,7 +9426,7 @@ relink_command=\"$relink_command\"" - exit $EXIT_SUCCESS - } +@@ -9707,7 +10290,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi --{ test "$mode" = link || test "$mode" = relink; } && -+{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi +@@ -9731,10 +10314,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) +- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else +@@ -9813,23 +10396,36 @@ fi + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +- save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ # This should be the same for all languages, so no per-tag cache variable. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 ++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } ++if ${lt_cv_irix_exported_symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int foo(void) {} ++int foo (void) { return 0; } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' +- ++ lt_cv_irix_exported_symbol=yes ++else ++ lt_cv_irix_exported_symbol=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 ++$as_echo "$lt_cv_irix_exported_symbol" >&6; } ++ if test "$lt_cv_irix_exported_symbol" = yes; then ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ++ fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' +@@ -9914,7 +10510,7 @@ rm -f core conftest.err conftest.$ac_objext \ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -9933,9 +10529,9 @@ rm -f core conftest.err conftest.$ac_objext \ + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' +- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ +- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ++ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) +@@ -10511,8 +11107,9 @@ cygwin* | mingw* | pw32* | cegcc*) + need_version=no + need_lib_prefix=no +- case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ case $GCC,$cc_basename in ++ yes,*) ++ # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10545,13 +11142,71 @@ cygwin* | mingw* | pw32* | cegcc*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac ++ dynamic_linker='Win32 ld.exe' ++ ;; ++ ++ *,cl*) ++ # Native MSVC ++ libname_spec='$name' ++ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ library_names_spec='${libname}.dll.lib' ++ ++ case $build_os in ++ mingw*) ++ sys_lib_search_path_spec= ++ lt_save_ifs=$IFS ++ IFS=';' ++ for lt_path in $LIB ++ do ++ IFS=$lt_save_ifs ++ # Let DOS variable expansion print the short 8.3 style file name. ++ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` ++ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" ++ done ++ IFS=$lt_save_ifs ++ # Convert to MSYS style. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ++ ;; ++ cygwin*) ++ # Convert to unix form, then to dos form, then back to unix form ++ # but this time dos style (no spaces!) so that the unix form looks ++ # like /cygdrive/c/PROGRA~1:/cygdr... ++ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` ++ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` ++ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ ;; ++ *) ++ sys_lib_search_path_spec="$LIB" ++ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then ++ # It is most probably a Windows format PATH. ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` ++ else ++ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ++ fi ++ # FIXME: find the short name or the path components, as spaces are ++ # common. (e.g. "Program Files" -> "PROGRA~1") ++ ;; ++ esac ++ ++ # DLL is installed to $(libdir)/../bin by postinstall_cmds ++ postinstall_cmds='base_file=`basename \${file}`~ ++ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ ++ dldir=$destdir/`dirname \$dlpath`~ ++ test -d \$dldir || mkdir -p \$dldir~ ++ $install_prog $dir/$dlname \$dldir/$dlname' ++ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ ++ dlpath=$dir/\$dldll~ ++ $RM \$dlpath' ++ shlibpath_overrides_runpath=yes ++ dynamic_linker='Win32 link.exe' + ;; -@@ -8432,9 +9446,9 @@ func_mode_uninstall () - for arg - do - case $arg in -- -f) RM="$RM $arg"; rmforce=yes ;; -- -*) RM="$RM $arg" ;; -- *) files="$files $arg" ;; -+ -f) func_append RM " $arg"; rmforce=yes ;; -+ -*) func_append RM " $arg" ;; -+ *) func_append files " $arg" ;; - esac - done + *) ++ # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ++ dynamic_linker='Win32 ld.exe' + ;; + esac +- dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +@@ -10643,7 +11298,7 @@ haiku*) + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes +- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' ++ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; -@@ -8443,24 +9457,23 @@ func_mode_uninstall () +@@ -11439,7 +12094,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11442 "configure" ++#line $LINENO "configure" + #include "confdefs.h" - rmdirs= + #if HAVE_DLFCN_H +@@ -11483,10 +12138,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif -- origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then -- objdir="$origobjdir" -+ odir="$objdir" - else -- objdir="$dir/$origobjdir" -+ odir="$dir/$objdir" - fi - func_basename "$file" - name="$func_basename_result" -- test "$mode" = uninstall && objdir="$dir" -+ test "$opt_mode" = uninstall && odir="$dir" +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -11545,7 +12200,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11548 "configure" ++#line $LINENO "configure" + #include "confdefs.h" -- # Remember objdir for removal later, being careful to avoid duplicates -- if test "$mode" = clean; then -+ # Remember odir for removal later, being careful to avoid duplicates -+ if test "$opt_mode" = clean; then - case " $rmdirs " in -- *" $objdir "*) ;; -- *) rmdirs="$rmdirs $objdir" ;; -+ *" $odir "*) ;; -+ *) func_append rmdirs " $odir" ;; - esac - fi + #if HAVE_DLFCN_H +@@ -11589,10 +12244,10 @@ else + /* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ + #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +-void fnord () __attribute__((visibility("default"))); ++int fnord () __attribute__((visibility("default"))); + #endif -@@ -8486,18 +9499,17 @@ func_mode_uninstall () +-void fnord () { int i=42; } ++int fnord () { return 42; } + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); +@@ -13756,13 +14411,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' + lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' + lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' + lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' ++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' + reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' + reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' + OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' + deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' + file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' ++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' ++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' ++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' ++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' + AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' + AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' ++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' + STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' + RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' + old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +@@ -13777,14 +14439,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de + lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' ++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' ++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' + objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' + MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' ++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' + lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' + lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' + need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' ++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' + DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' + NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' + LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +@@ -13817,12 +14482,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q + hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' + inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' + link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' + always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' + export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' + exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' + include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' + prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' ++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' + file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' + variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' + need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +@@ -13877,8 +14542,13 @@ reload_flag \ + OBJDUMP \ + deplibs_check_method \ + file_magic_cmd \ ++file_magic_glob \ ++want_nocaseglob \ ++DLLTOOL \ ++sharedlib_from_linklib_cmd \ + AR \ + AR_FLAGS \ ++archiver_list_spec \ + STRIP \ + RANLIB \ + CC \ +@@ -13888,12 +14558,14 @@ lt_cv_sys_global_symbol_pipe \ + lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ ++nm_file_list_spec \ + lt_prog_compiler_no_builtin_flag \ +-lt_prog_compiler_wl \ + lt_prog_compiler_pic \ ++lt_prog_compiler_wl \ + lt_prog_compiler_static \ + lt_cv_prog_compiler_c_o \ + need_locks \ ++MANIFEST_TOOL \ + DSYMUTIL \ + NMEDIT \ + LIPO \ +@@ -13909,7 +14581,6 @@ no_undefined_flag \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ +-fix_srcfile_path \ + exclude_expsyms \ + include_expsyms \ + file_list_spec \ +@@ -13945,6 +14616,7 @@ module_cmds \ + module_expsym_cmds \ + export_symbols_cmds \ + prelink_cmds \ ++postlink_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + finish_cmds \ +@@ -14710,7 +15382,8 @@ $as_echo X"$file" | + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ++# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, ++# Inc. + # Written by Gordon Matzigkeit, 1996 + # + # This file is part of GNU Libtool. +@@ -14813,19 +15486,42 @@ SP2NL=$lt_lt_SP2NL + # turn newlines into spaces. + NL2SP=$lt_lt_NL2SP - # Delete the libtool libraries and symlinks. - for n in $library_names; do -- rmfiles="$rmfiles $objdir/$n" -+ func_append rmfiles " $odir/$n" - done -- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" -+ test -n "$old_library" && func_append rmfiles " $odir/$old_library" ++# convert \$build file names to \$host format. ++to_host_file_cmd=$lt_cv_to_host_file_cmd ++ ++# convert \$build files to toolchain format. ++to_tool_file_cmd=$lt_cv_to_tool_file_cmd ++ + # An object symbol dumper. + OBJDUMP=$lt_OBJDUMP -- case "$mode" in -+ case "$opt_mode" in - clean) -- case " $library_names " in -- # " " in the beginning catches empty $dlname -+ case " $library_names " in - *" $dlname "*) ;; -- *) rmfiles="$rmfiles $objdir/$dlname" ;; -+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac -- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" -+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then -@@ -8525,19 +9537,19 @@ func_mode_uninstall () - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then -- rmfiles="$rmfiles $dir/$pic_object" -+ func_append rmfiles " $dir/$pic_object" - fi + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then -- rmfiles="$rmfiles $dir/$non_pic_object" -+ func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; +-# Command to use when deplibs_check_method == "file_magic". ++# Command to use when deplibs_check_method = "file_magic". + file_magic_cmd=$lt_file_magic_cmd - *) -- if test "$mode" = clean ; then -+ if test "$opt_mode" = clean ; then - noexename=$name - case $file in - *.exe) -@@ -8547,7 +9559,7 @@ func_mode_uninstall () - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe -- rmfiles="$rmfiles $file" -+ func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. -@@ -8556,7 +9568,7 @@ func_mode_uninstall () - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result -- rmfiles="$rmfiles $func_ltwrapper_scriptname_result" -+ func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename -@@ -8564,12 +9576,12 @@ func_mode_uninstall () ++# How to find potential files when deplibs_check_method = "file_magic". ++file_magic_glob=$lt_file_magic_glob ++ ++# Find potential files using nocaseglob when deplibs_check_method = "file_magic". ++want_nocaseglob=$lt_want_nocaseglob ++ ++# DLL creation program. ++DLLTOOL=$lt_DLLTOOL ++ ++# Command to associate shared and link libraries. ++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd ++ + # The archiver. + AR=$lt_AR ++ ++# Flags to create an archive. + AR_FLAGS=$lt_AR_FLAGS - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles -- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" -+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then -- rmfiles="$rmfiles $objdir/lt-$name" -+ func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then -- rmfiles="$rmfiles $objdir/lt-${noexename}.c" -+ func_append rmfiles " $odir/lt-${noexename}.c" - fi - fi - fi -@@ -8577,7 +9589,6 @@ func_mode_uninstall () - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done -- objdir="$origobjdir" ++# How to feed a file listing to the archiver. ++archiver_list_spec=$lt_archiver_list_spec ++ + # A symbol stripping program. + STRIP=$lt_STRIP - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do -@@ -8589,16 +9600,16 @@ func_mode_uninstall () - exit $exit_status - } +@@ -14855,6 +15551,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # Transform the output of nm in a C name address pair when lib prefix is needed. + global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix --{ test "$mode" = uninstall || test "$mode" = clean; } && -+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} ++# Specify filename containing input files for \$NM. ++nm_file_list_spec=$lt_nm_file_list_spec ++ ++# The root where to search for dependent libraries,and in which our libraries should be installed. ++lt_sysroot=$lt_sysroot ++ + # The name of the directory that contains temporary libtool files. + objdir=$objdir --test -z "$mode" && { -+test -z "$opt_mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" - } +@@ -14864,6 +15566,9 @@ MAGIC_CMD=$MAGIC_CMD + # Must we lock files when doing compilation? + need_locks=$lt_need_locks - test -z "$exec_cmd" && \ -- func_fatal_help "invalid operation mode \`$mode'" -+ func_fatal_help "invalid operation mode \`$opt_mode'" ++# Manifest tool. ++MANIFEST_TOOL=$lt_MANIFEST_TOOL ++ + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. + DSYMUTIL=$lt_DSYMUTIL - if test -n "$exec_cmd"; then - eval exec "$exec_cmd" -diff --git a/ltoptions.m4 b/ltoptions.m4 -index 5ef12ced2a..17cfd51c0b 100644 ---- a/ltoptions.m4 -+++ b/ltoptions.m4 -@@ -8,7 +8,7 @@ - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. +@@ -14978,12 +15683,12 @@ with_gcc=$GCC + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag --# serial 6 ltoptions.m4 -+# serial 7 ltoptions.m4 +-# How to pass a linker flag through the compiler. +-wl=$lt_lt_prog_compiler_wl +- + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic - # This is to help aclocal find these macros, as it can't see m4_define. - AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) -diff --git a/ltversion.m4 b/ltversion.m4 -index bf87f77132..9c7b5d4118 100644 ---- a/ltversion.m4 -+++ b/ltversion.m4 -@@ -7,17 +7,17 @@ - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. ++# How to pass a linker flag through the compiler. ++wl=$lt_lt_prog_compiler_wl ++ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static --# Generated from ltversion.in. -+# @configure_input@ +@@ -15070,9 +15775,6 @@ inherit_rpath=$inherit_rpath + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs --# serial 3134 ltversion.m4 -+# serial 3293 ltversion.m4 - # This file is part of GNU Libtool +-# Fix the shell variable \$srcfile for the compiler. +-fix_srcfile_path=$lt_fix_srcfile_path +- + # Set to "yes" if exported symbols are required. + always_export_symbols=$always_export_symbols --m4_define([LT_PACKAGE_VERSION], [2.2.7a]) --m4_define([LT_PACKAGE_REVISION], [1.3134]) -+m4_define([LT_PACKAGE_VERSION], [2.4]) -+m4_define([LT_PACKAGE_REVISION], [1.3293]) +@@ -15088,6 +15790,9 @@ include_expsyms=$lt_include_expsyms + # Commands necessary for linking programs (against libraries) with templates. + prelink_cmds=$lt_prelink_cmds - AC_DEFUN([LTVERSION_VERSION], --[macro_version='2.2.7a' --macro_revision='1.3134' -+[macro_version='2.4' -+macro_revision='1.3293' - _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) - _LT_DECL(, macro_revision, 0) - ]) -diff --git a/lt~obsolete.m4 b/lt~obsolete.m4 -index bf92b5e079..c573da90c5 100644 ---- a/lt~obsolete.m4 -+++ b/lt~obsolete.m4 -@@ -7,7 +7,7 @@ - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. ++# Commands necessary for finishing linking programs. ++postlink_cmds=$lt_postlink_cmds ++ + # Specify filename containing input files. + file_list_spec=$lt_file_list_spec --# serial 4 lt~obsolete.m4 -+# serial 5 lt~obsolete.m4 +@@ -15120,210 +15825,169 @@ ltmain="$ac_aux_dir/ltmain.sh" + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? +- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- case $xsi_shell in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result="${1##*/}" +-} +- +-# func_dirname_and_basename file append nondir_replacement +-# perform func_basename and func_dirname in a single function +-# call: +-# dirname: Compute the dirname of FILE. If nonempty, +-# add APPEND to the result, otherwise set result +-# to NONDIR_REPLACEMENT. +-# value returned in "$func_dirname_result" +-# basename: Compute filename of FILE. +-# value retuned in "$func_basename_result" +-# Implementation must be kept synchronized with func_dirname +-# and func_basename. For efficiency, we do not delegate to +-# those functions but instead duplicate the functionality here. +-func_dirname_and_basename () +-{ +- case ${1} in +- */*) func_dirname_result="${1%/*}${2}" ;; +- * ) func_dirname_result="${3}" ;; +- esac +- func_basename_result="${1##*/}" +-} +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-func_stripname () +-{ +- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are +- # positional parameters, so assign one to ordinary parameter first. +- func_stripname_result=${3} +- func_stripname_result=${func_stripname_result#"${1}"} +- func_stripname_result=${func_stripname_result%"${2}"} +-} +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=${1%%=*} +- func_opt_split_arg=${1#*=} +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- case ${1} in +- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; +- *) func_lo2o_result=${1} ;; +- esac +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=${1%.*}.lo +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=$(( $* )) +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=${#1} +-} +- +-_LT_EOF +- ;; +- *) # Bourne compatible functions. +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_dirname file append nondir_replacement +-# Compute the dirname of FILE. If nonempty, add APPEND to the result, +-# otherwise set result to NONDIR_REPLACEMENT. +-func_dirname () +-{ +- # Extract subdirectory from the argument. +- func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` +- if test "X$func_dirname_result" = "X${1}"; then +- func_dirname_result="${3}" +- else +- func_dirname_result="$func_dirname_result${2}" +- fi +-} +- +-# func_basename file +-func_basename () +-{ +- func_basename_result=`$ECHO "${1}" | $SED "$basename"` +-} +- +- +-# func_stripname prefix suffix name +-# strip PREFIX and SUFFIX off of NAME. +-# PREFIX and SUFFIX must not contain globbing or regex special +-# characters, hashes, percent signs, but SUFFIX may contain a leading +-# dot (in which case that matches only a dot). +-# func_strip_suffix prefix name +-func_stripname () +-{ +- case ${2} in +- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; +- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; +- esac +-} +- +-# sed scripts: +-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +-my_sed_long_arg='1s/^-[^=]*=//' +- +-# func_opt_split +-func_opt_split () +-{ +- func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` +- func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` +-} +- +-# func_lo2o object +-func_lo2o () +-{ +- func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +-} +- +-# func_xform libobj-or-source +-func_xform () +-{ +- func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +-} +- +-# func_arith arithmetic-term... +-func_arith () +-{ +- func_arith_result=`expr "$@"` +-} +- +-# func_len string +-# STRING may not start with a hyphen. +-func_len () +-{ +- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +-} +- +-_LT_EOF +-esac +- +-case $lt_shell_append in +- yes) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1+=\$2" +-} +-_LT_EOF +- ;; +- *) +- cat << \_LT_EOF >> "$cfgfile" +- +-# func_append var value +-# Append VALUE to the end of shell variable VAR. +-func_append () +-{ +- eval "$1=\$$1\$2" +-} +- +-_LT_EOF +- ;; +- esac +- +- +- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ +- || (rm -f "$cfgfile"; exit 1) +- +- mv -f "$cfgfile" "$ofile" || ++ sed '$q' "$ltmain" >> "$cfgfile" \ ++ || (rm -f "$cfgfile"; exit 1) ++ ++ if test x"$xsi_shell" = xyes; then ++ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ ++func_dirname ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_basename ()$/,/^} # func_basename /c\ ++func_basename ()\ ++{\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ ++func_dirname_and_basename ()\ ++{\ ++\ case ${1} in\ ++\ */*) func_dirname_result="${1%/*}${2}" ;;\ ++\ * ) func_dirname_result="${3}" ;;\ ++\ esac\ ++\ func_basename_result="${1##*/}"\ ++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ ++func_stripname ()\ ++{\ ++\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ ++\ # positional parameters, so assign one to ordinary parameter first.\ ++\ func_stripname_result=${3}\ ++\ func_stripname_result=${func_stripname_result#"${1}"}\ ++\ func_stripname_result=${func_stripname_result%"${2}"}\ ++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ ++func_split_long_opt ()\ ++{\ ++\ func_split_long_opt_name=${1%%=*}\ ++\ func_split_long_opt_arg=${1#*=}\ ++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ ++func_split_short_opt ()\ ++{\ ++\ func_split_short_opt_arg=${1#??}\ ++\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ ++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ ++func_lo2o ()\ ++{\ ++\ case ${1} in\ ++\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ ++\ *) func_lo2o_result=${1} ;;\ ++\ esac\ ++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_xform ()$/,/^} # func_xform /c\ ++func_xform ()\ ++{\ ++ func_xform_result=${1%.*}.lo\ ++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_arith ()$/,/^} # func_arith /c\ ++func_arith ()\ ++{\ ++ func_arith_result=$(( $* ))\ ++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_len ()$/,/^} # func_len /c\ ++func_len ()\ ++{\ ++ func_len_result=${#1}\ ++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++fi ++ ++if test x"$lt_shell_append" = xyes; then ++ sed -e '/^func_append ()$/,/^} # func_append /c\ ++func_append ()\ ++{\ ++ eval "${1}+=\\${2}"\ ++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ ++func_append_quoted ()\ ++{\ ++\ func_quote_for_eval "${2}"\ ++\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ ++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++test 0 -eq $? || _lt_function_replace_fail=: ++ ++ ++ # Save a `func_append' function call where possible by direct use of '+=' ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++else ++ # Save a `func_append' function call even when '+=' is not available ++ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ ++ && mv -f "$cfgfile.tmp" "$cfgfile" \ ++ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") ++ test 0 -eq $? || _lt_function_replace_fail=: ++fi ++ ++if test x"$_lt_function_replace_fail" = x":"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 ++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} ++fi ++ ++ ++ mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" - # These exist entirely to fool aclocal when bootstrapping libtool. - # +-- +2.26.0 + -- cgit 1.2.3-korg