1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ipc/chromium/src/third_party/libevent/ltmain.sh Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,9655 @@ 1.4 + 1.5 +# libtool (GNU libtool) 2.4.2 1.6 +# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 1.7 + 1.8 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 1.9 +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. 1.10 +# This is free software; see the source for copying conditions. There is NO 1.11 +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 1.12 + 1.13 +# GNU Libtool is free software; you can redistribute it and/or modify 1.14 +# it under the terms of the GNU General Public License as published by 1.15 +# the Free Software Foundation; either version 2 of the License, or 1.16 +# (at your option) any later version. 1.17 +# 1.18 +# As a special exception to the GNU General Public License, 1.19 +# if you distribute this file as part of a program or library that 1.20 +# is built using GNU Libtool, you may include this file under the 1.21 +# same distribution terms that you use for the rest of that program. 1.22 +# 1.23 +# GNU Libtool is distributed in the hope that it will be useful, but 1.24 +# WITHOUT ANY WARRANTY; without even the implied warranty of 1.25 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1.26 +# General Public License for more details. 1.27 +# 1.28 +# You should have received a copy of the GNU General Public License 1.29 +# along with GNU Libtool; see the file COPYING. If not, a copy 1.30 +# can be downloaded from http://www.gnu.org/licenses/gpl.html, 1.31 +# or obtained by writing to the Free Software Foundation, Inc., 1.32 +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1.33 + 1.34 +# Usage: $progname [OPTION]... [MODE-ARG]... 1.35 +# 1.36 +# Provide generalized library-building support services. 1.37 +# 1.38 +# --config show all configuration variables 1.39 +# --debug enable verbose shell tracing 1.40 +# -n, --dry-run display commands without modifying any files 1.41 +# --features display basic configuration information and exit 1.42 +# --mode=MODE use operation mode MODE 1.43 +# --preserve-dup-deps don't remove duplicate dependency libraries 1.44 +# --quiet, --silent don't print informational messages 1.45 +# --no-quiet, --no-silent 1.46 +# print informational messages (default) 1.47 +# --no-warn don't display warning messages 1.48 +# --tag=TAG use configuration variables from tag TAG 1.49 +# -v, --verbose print more informational messages than default 1.50 +# --no-verbose don't print the extra informational messages 1.51 +# --version print version information 1.52 +# -h, --help, --help-all print short, long, or detailed help message 1.53 +# 1.54 +# MODE must be one of the following: 1.55 +# 1.56 +# clean remove files from the build directory 1.57 +# compile compile a source file into a libtool object 1.58 +# execute automatically set library path, then run a program 1.59 +# finish complete the installation of libtool libraries 1.60 +# install install libraries or executables 1.61 +# link create a library or an executable 1.62 +# uninstall remove libraries from an installed directory 1.63 +# 1.64 +# MODE-ARGS vary depending on the MODE. When passed as first option, 1.65 +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. 1.66 +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. 1.67 +# 1.68 +# When reporting a bug, please describe a test case to reproduce it and 1.69 +# include the following information: 1.70 +# 1.71 +# host-triplet: $host 1.72 +# shell: $SHELL 1.73 +# compiler: $LTCC 1.74 +# compiler flags: $LTCFLAGS 1.75 +# linker: $LD (gnu? $with_gnu_ld) 1.76 +# $progname: (GNU libtool) 2.4.2 1.77 +# automake: $automake_version 1.78 +# autoconf: $autoconf_version 1.79 +# 1.80 +# Report bugs to <bug-libtool@gnu.org>. 1.81 +# GNU libtool home page: <http://www.gnu.org/software/libtool/>. 1.82 +# General help using GNU software: <http://www.gnu.org/gethelp/>. 1.83 + 1.84 +PROGRAM=libtool 1.85 +PACKAGE=libtool 1.86 +VERSION=2.4.2 1.87 +TIMESTAMP="" 1.88 +package_revision=1.3337 1.89 + 1.90 +# Be Bourne compatible 1.91 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 1.92 + emulate sh 1.93 + NULLCMD=: 1.94 + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 1.95 + # is contrary to our usage. Disable this feature. 1.96 + alias -g '${1+"$@"}'='"$@"' 1.97 + setopt NO_GLOB_SUBST 1.98 +else 1.99 + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac 1.100 +fi 1.101 +BIN_SH=xpg4; export BIN_SH # for Tru64 1.102 +DUALCASE=1; export DUALCASE # for MKS sh 1.103 + 1.104 +# A function that is used when there is no print builtin or printf. 1.105 +func_fallback_echo () 1.106 +{ 1.107 + eval 'cat <<_LTECHO_EOF 1.108 +$1 1.109 +_LTECHO_EOF' 1.110 +} 1.111 + 1.112 +# NLS nuisances: We save the old values to restore during execute mode. 1.113 +lt_user_locale= 1.114 +lt_safe_locale= 1.115 +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES 1.116 +do 1.117 + eval "if test \"\${$lt_var+set}\" = set; then 1.118 + save_$lt_var=\$$lt_var 1.119 + $lt_var=C 1.120 + export $lt_var 1.121 + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" 1.122 + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" 1.123 + fi" 1.124 +done 1.125 +LC_ALL=C 1.126 +LANGUAGE=C 1.127 +export LANGUAGE LC_ALL 1.128 + 1.129 +$lt_unset CDPATH 1.130 + 1.131 + 1.132 +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh 1.133 +# is ksh but when the shell is invoked as "sh" and the current value of 1.134 +# the _XPG environment variable is not equal to 1 (one), the special 1.135 +# positional parameter $0, within a function call, is the name of the 1.136 +# function. 1.137 +progpath="$0" 1.138 + 1.139 + 1.140 + 1.141 +: ${CP="cp -f"} 1.142 +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} 1.143 +: ${MAKE="make"} 1.144 +: ${MKDIR="mkdir"} 1.145 +: ${MV="mv -f"} 1.146 +: ${RM="rm -f"} 1.147 +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} 1.148 +: ${Xsed="$SED -e 1s/^X//"} 1.149 + 1.150 +# Global variables: 1.151 +EXIT_SUCCESS=0 1.152 +EXIT_FAILURE=1 1.153 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. 1.154 +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. 1.155 + 1.156 +exit_status=$EXIT_SUCCESS 1.157 + 1.158 +# Make sure IFS has a sensible default 1.159 +lt_nl=' 1.160 +' 1.161 +IFS=" $lt_nl" 1.162 + 1.163 +dirname="s,/[^/]*$,," 1.164 +basename="s,^.*/,," 1.165 + 1.166 +# func_dirname file append nondir_replacement 1.167 +# Compute the dirname of FILE. If nonempty, add APPEND to the result, 1.168 +# otherwise set result to NONDIR_REPLACEMENT. 1.169 +func_dirname () 1.170 +{ 1.171 + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 1.172 + if test "X$func_dirname_result" = "X${1}"; then 1.173 + func_dirname_result="${3}" 1.174 + else 1.175 + func_dirname_result="$func_dirname_result${2}" 1.176 + fi 1.177 +} # func_dirname may be replaced by extended shell implementation 1.178 + 1.179 + 1.180 +# func_basename file 1.181 +func_basename () 1.182 +{ 1.183 + func_basename_result=`$ECHO "${1}" | $SED "$basename"` 1.184 +} # func_basename may be replaced by extended shell implementation 1.185 + 1.186 + 1.187 +# func_dirname_and_basename file append nondir_replacement 1.188 +# perform func_basename and func_dirname in a single function 1.189 +# call: 1.190 +# dirname: Compute the dirname of FILE. If nonempty, 1.191 +# add APPEND to the result, otherwise set result 1.192 +# to NONDIR_REPLACEMENT. 1.193 +# value returned in "$func_dirname_result" 1.194 +# basename: Compute filename of FILE. 1.195 +# value retuned in "$func_basename_result" 1.196 +# Implementation must be kept synchronized with func_dirname 1.197 +# and func_basename. For efficiency, we do not delegate to 1.198 +# those functions but instead duplicate the functionality here. 1.199 +func_dirname_and_basename () 1.200 +{ 1.201 + # Extract subdirectory from the argument. 1.202 + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` 1.203 + if test "X$func_dirname_result" = "X${1}"; then 1.204 + func_dirname_result="${3}" 1.205 + else 1.206 + func_dirname_result="$func_dirname_result${2}" 1.207 + fi 1.208 + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` 1.209 +} # func_dirname_and_basename may be replaced by extended shell implementation 1.210 + 1.211 + 1.212 +# func_stripname prefix suffix name 1.213 +# strip PREFIX and SUFFIX off of NAME. 1.214 +# PREFIX and SUFFIX must not contain globbing or regex special 1.215 +# characters, hashes, percent signs, but SUFFIX may contain a leading 1.216 +# dot (in which case that matches only a dot). 1.217 +# func_strip_suffix prefix name 1.218 +func_stripname () 1.219 +{ 1.220 + case ${2} in 1.221 + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 1.222 + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 1.223 + esac 1.224 +} # func_stripname may be replaced by extended shell implementation 1.225 + 1.226 + 1.227 +# These SED scripts presuppose an absolute path with a trailing slash. 1.228 +pathcar='s,^/\([^/]*\).*$,\1,' 1.229 +pathcdr='s,^/[^/]*,,' 1.230 +removedotparts=':dotsl 1.231 + s@/\./@/@g 1.232 + t dotsl 1.233 + s,/\.$,/,' 1.234 +collapseslashes='s@/\{1,\}@/@g' 1.235 +finalslash='s,/*$,/,' 1.236 + 1.237 +# func_normal_abspath PATH 1.238 +# Remove doubled-up and trailing slashes, "." path components, 1.239 +# and cancel out any ".." path components in PATH after making 1.240 +# it an absolute path. 1.241 +# value returned in "$func_normal_abspath_result" 1.242 +func_normal_abspath () 1.243 +{ 1.244 + # Start from root dir and reassemble the path. 1.245 + func_normal_abspath_result= 1.246 + func_normal_abspath_tpath=$1 1.247 + func_normal_abspath_altnamespace= 1.248 + case $func_normal_abspath_tpath in 1.249 + "") 1.250 + # Empty path, that just means $cwd. 1.251 + func_stripname '' '/' "`pwd`" 1.252 + func_normal_abspath_result=$func_stripname_result 1.253 + return 1.254 + ;; 1.255 + # The next three entries are used to spot a run of precisely 1.256 + # two leading slashes without using negated character classes; 1.257 + # we take advantage of case's first-match behaviour. 1.258 + ///*) 1.259 + # Unusual form of absolute path, do nothing. 1.260 + ;; 1.261 + //*) 1.262 + # Not necessarily an ordinary path; POSIX reserves leading '//' 1.263 + # and for example Cygwin uses it to access remote file shares 1.264 + # over CIFS/SMB, so we conserve a leading double slash if found. 1.265 + func_normal_abspath_altnamespace=/ 1.266 + ;; 1.267 + /*) 1.268 + # Absolute path, do nothing. 1.269 + ;; 1.270 + *) 1.271 + # Relative path, prepend $cwd. 1.272 + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath 1.273 + ;; 1.274 + esac 1.275 + # Cancel out all the simple stuff to save iterations. We also want 1.276 + # the path to end with a slash for ease of parsing, so make sure 1.277 + # there is one (and only one) here. 1.278 + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ 1.279 + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` 1.280 + while :; do 1.281 + # Processed it all yet? 1.282 + if test "$func_normal_abspath_tpath" = / ; then 1.283 + # If we ascended to the root using ".." the result may be empty now. 1.284 + if test -z "$func_normal_abspath_result" ; then 1.285 + func_normal_abspath_result=/ 1.286 + fi 1.287 + break 1.288 + fi 1.289 + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ 1.290 + -e "$pathcar"` 1.291 + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ 1.292 + -e "$pathcdr"` 1.293 + # Figure out what to do with it 1.294 + case $func_normal_abspath_tcomponent in 1.295 + "") 1.296 + # Trailing empty path component, ignore it. 1.297 + ;; 1.298 + ..) 1.299 + # Parent dir; strip last assembled component from result. 1.300 + func_dirname "$func_normal_abspath_result" 1.301 + func_normal_abspath_result=$func_dirname_result 1.302 + ;; 1.303 + *) 1.304 + # Actual path component, append it. 1.305 + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent 1.306 + ;; 1.307 + esac 1.308 + done 1.309 + # Restore leading double-slash if one was found on entry. 1.310 + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result 1.311 +} 1.312 + 1.313 +# func_relative_path SRCDIR DSTDIR 1.314 +# generates a relative path from SRCDIR to DSTDIR, with a trailing 1.315 +# slash if non-empty, suitable for immediately appending a filename 1.316 +# without needing to append a separator. 1.317 +# value returned in "$func_relative_path_result" 1.318 +func_relative_path () 1.319 +{ 1.320 + func_relative_path_result= 1.321 + func_normal_abspath "$1" 1.322 + func_relative_path_tlibdir=$func_normal_abspath_result 1.323 + func_normal_abspath "$2" 1.324 + func_relative_path_tbindir=$func_normal_abspath_result 1.325 + 1.326 + # Ascend the tree starting from libdir 1.327 + while :; do 1.328 + # check if we have found a prefix of bindir 1.329 + case $func_relative_path_tbindir in 1.330 + $func_relative_path_tlibdir) 1.331 + # found an exact match 1.332 + func_relative_path_tcancelled= 1.333 + break 1.334 + ;; 1.335 + $func_relative_path_tlibdir*) 1.336 + # found a matching prefix 1.337 + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" 1.338 + func_relative_path_tcancelled=$func_stripname_result 1.339 + if test -z "$func_relative_path_result"; then 1.340 + func_relative_path_result=. 1.341 + fi 1.342 + break 1.343 + ;; 1.344 + *) 1.345 + func_dirname $func_relative_path_tlibdir 1.346 + func_relative_path_tlibdir=${func_dirname_result} 1.347 + if test "x$func_relative_path_tlibdir" = x ; then 1.348 + # Have to descend all the way to the root! 1.349 + func_relative_path_result=../$func_relative_path_result 1.350 + func_relative_path_tcancelled=$func_relative_path_tbindir 1.351 + break 1.352 + fi 1.353 + func_relative_path_result=../$func_relative_path_result 1.354 + ;; 1.355 + esac 1.356 + done 1.357 + 1.358 + # Now calculate path; take care to avoid doubling-up slashes. 1.359 + func_stripname '' '/' "$func_relative_path_result" 1.360 + func_relative_path_result=$func_stripname_result 1.361 + func_stripname '/' '/' "$func_relative_path_tcancelled" 1.362 + if test "x$func_stripname_result" != x ; then 1.363 + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} 1.364 + fi 1.365 + 1.366 + # Normalisation. If bindir is libdir, return empty string, 1.367 + # else relative path ending with a slash; either way, target 1.368 + # file name can be directly appended. 1.369 + if test ! -z "$func_relative_path_result"; then 1.370 + func_stripname './' '' "$func_relative_path_result/" 1.371 + func_relative_path_result=$func_stripname_result 1.372 + fi 1.373 +} 1.374 + 1.375 +# The name of this program: 1.376 +func_dirname_and_basename "$progpath" 1.377 +progname=$func_basename_result 1.378 + 1.379 +# Make sure we have an absolute path for reexecution: 1.380 +case $progpath in 1.381 + [\\/]*|[A-Za-z]:\\*) ;; 1.382 + *[\\/]*) 1.383 + progdir=$func_dirname_result 1.384 + progdir=`cd "$progdir" && pwd` 1.385 + progpath="$progdir/$progname" 1.386 + ;; 1.387 + *) 1.388 + save_IFS="$IFS" 1.389 + IFS=${PATH_SEPARATOR-:} 1.390 + for progdir in $PATH; do 1.391 + IFS="$save_IFS" 1.392 + test -x "$progdir/$progname" && break 1.393 + done 1.394 + IFS="$save_IFS" 1.395 + test -n "$progdir" || progdir=`pwd` 1.396 + progpath="$progdir/$progname" 1.397 + ;; 1.398 +esac 1.399 + 1.400 +# Sed substitution that helps us do robust quoting. It backslashifies 1.401 +# metacharacters that are still active within double-quoted strings. 1.402 +Xsed="${SED}"' -e 1s/^X//' 1.403 +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' 1.404 + 1.405 +# Same as above, but do not quote variable references. 1.406 +double_quote_subst='s/\(["`\\]\)/\\\1/g' 1.407 + 1.408 +# Sed substitution that turns a string into a regex matching for the 1.409 +# string literally. 1.410 +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' 1.411 + 1.412 +# Sed substitution that converts a w32 file name or path 1.413 +# which contains forward slashes, into one that contains 1.414 +# (escaped) backslashes. A very naive implementation. 1.415 +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' 1.416 + 1.417 +# Re-`\' parameter expansions in output of double_quote_subst that were 1.418 +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' 1.419 +# in input to double_quote_subst, that '$' was protected from expansion. 1.420 +# Since each input `\' is now two `\'s, look for any number of runs of 1.421 +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. 1.422 +bs='\\' 1.423 +bs2='\\\\' 1.424 +bs4='\\\\\\\\' 1.425 +dollar='\$' 1.426 +sed_double_backslash="\ 1.427 + s/$bs4/&\\ 1.428 +/g 1.429 + s/^$bs2$dollar/$bs&/ 1.430 + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g 1.431 + s/\n//g" 1.432 + 1.433 +# Standard options: 1.434 +opt_dry_run=false 1.435 +opt_help=false 1.436 +opt_quiet=false 1.437 +opt_verbose=false 1.438 +opt_warning=: 1.439 + 1.440 +# func_echo arg... 1.441 +# Echo program name prefixed message, along with the current mode 1.442 +# name if it has been set yet. 1.443 +func_echo () 1.444 +{ 1.445 + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" 1.446 +} 1.447 + 1.448 +# func_verbose arg... 1.449 +# Echo program name prefixed message in verbose mode only. 1.450 +func_verbose () 1.451 +{ 1.452 + $opt_verbose && func_echo ${1+"$@"} 1.453 + 1.454 + # A bug in bash halts the script if the last line of a function 1.455 + # fails when set -e is in force, so we need another command to 1.456 + # work around that: 1.457 + : 1.458 +} 1.459 + 1.460 +# func_echo_all arg... 1.461 +# Invoke $ECHO with all args, space-separated. 1.462 +func_echo_all () 1.463 +{ 1.464 + $ECHO "$*" 1.465 +} 1.466 + 1.467 +# func_error arg... 1.468 +# Echo program name prefixed message to standard error. 1.469 +func_error () 1.470 +{ 1.471 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 1.472 +} 1.473 + 1.474 +# func_warning arg... 1.475 +# Echo program name prefixed warning message to standard error. 1.476 +func_warning () 1.477 +{ 1.478 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 1.479 + 1.480 + # bash bug again: 1.481 + : 1.482 +} 1.483 + 1.484 +# func_fatal_error arg... 1.485 +# Echo program name prefixed message to standard error, and exit. 1.486 +func_fatal_error () 1.487 +{ 1.488 + func_error ${1+"$@"} 1.489 + exit $EXIT_FAILURE 1.490 +} 1.491 + 1.492 +# func_fatal_help arg... 1.493 +# Echo program name prefixed message to standard error, followed by 1.494 +# a help hint, and exit. 1.495 +func_fatal_help () 1.496 +{ 1.497 + func_error ${1+"$@"} 1.498 + func_fatal_error "$help" 1.499 +} 1.500 +help="Try \`$progname --help' for more information." ## default 1.501 + 1.502 + 1.503 +# func_grep expression filename 1.504 +# Check whether EXPRESSION matches any line of FILENAME, without output. 1.505 +func_grep () 1.506 +{ 1.507 + $GREP "$1" "$2" >/dev/null 2>&1 1.508 +} 1.509 + 1.510 + 1.511 +# func_mkdir_p directory-path 1.512 +# Make sure the entire path to DIRECTORY-PATH is available. 1.513 +func_mkdir_p () 1.514 +{ 1.515 + my_directory_path="$1" 1.516 + my_dir_list= 1.517 + 1.518 + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then 1.519 + 1.520 + # Protect directory names starting with `-' 1.521 + case $my_directory_path in 1.522 + -*) my_directory_path="./$my_directory_path" ;; 1.523 + esac 1.524 + 1.525 + # While some portion of DIR does not yet exist... 1.526 + while test ! -d "$my_directory_path"; do 1.527 + # ...make a list in topmost first order. Use a colon delimited 1.528 + # list incase some portion of path contains whitespace. 1.529 + my_dir_list="$my_directory_path:$my_dir_list" 1.530 + 1.531 + # If the last portion added has no slash in it, the list is done 1.532 + case $my_directory_path in */*) ;; *) break ;; esac 1.533 + 1.534 + # ...otherwise throw away the child directory and loop 1.535 + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` 1.536 + done 1.537 + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` 1.538 + 1.539 + save_mkdir_p_IFS="$IFS"; IFS=':' 1.540 + for my_dir in $my_dir_list; do 1.541 + IFS="$save_mkdir_p_IFS" 1.542 + # mkdir can fail with a `File exist' error if two processes 1.543 + # try to create one of the directories concurrently. Don't 1.544 + # stop in that case! 1.545 + $MKDIR "$my_dir" 2>/dev/null || : 1.546 + done 1.547 + IFS="$save_mkdir_p_IFS" 1.548 + 1.549 + # Bail out if we (or some other process) failed to create a directory. 1.550 + test -d "$my_directory_path" || \ 1.551 + func_fatal_error "Failed to create \`$1'" 1.552 + fi 1.553 +} 1.554 + 1.555 + 1.556 +# func_mktempdir [string] 1.557 +# Make a temporary directory that won't clash with other running 1.558 +# libtool processes, and avoids race conditions if possible. If 1.559 +# given, STRING is the basename for that directory. 1.560 +func_mktempdir () 1.561 +{ 1.562 + my_template="${TMPDIR-/tmp}/${1-$progname}" 1.563 + 1.564 + if test "$opt_dry_run" = ":"; then 1.565 + # Return a directory name, but don't create it in dry-run mode 1.566 + my_tmpdir="${my_template}-$$" 1.567 + else 1.568 + 1.569 + # If mktemp works, use that first and foremost 1.570 + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` 1.571 + 1.572 + if test ! -d "$my_tmpdir"; then 1.573 + # Failing that, at least try and use $RANDOM to avoid a race 1.574 + my_tmpdir="${my_template}-${RANDOM-0}$$" 1.575 + 1.576 + save_mktempdir_umask=`umask` 1.577 + umask 0077 1.578 + $MKDIR "$my_tmpdir" 1.579 + umask $save_mktempdir_umask 1.580 + fi 1.581 + 1.582 + # If we're not in dry-run mode, bomb out on failure 1.583 + test -d "$my_tmpdir" || \ 1.584 + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" 1.585 + fi 1.586 + 1.587 + $ECHO "$my_tmpdir" 1.588 +} 1.589 + 1.590 + 1.591 +# func_quote_for_eval arg 1.592 +# Aesthetically quote ARG to be evaled later. 1.593 +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT 1.594 +# is double-quoted, suitable for a subsequent eval, whereas 1.595 +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters 1.596 +# which are still active within double quotes backslashified. 1.597 +func_quote_for_eval () 1.598 +{ 1.599 + case $1 in 1.600 + *[\\\`\"\$]*) 1.601 + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; 1.602 + *) 1.603 + func_quote_for_eval_unquoted_result="$1" ;; 1.604 + esac 1.605 + 1.606 + case $func_quote_for_eval_unquoted_result in 1.607 + # Double-quote args containing shell metacharacters to delay 1.608 + # word splitting, command substitution and and variable 1.609 + # expansion for a subsequent eval. 1.610 + # Many Bourne shells cannot handle close brackets correctly 1.611 + # in scan sets, so we specify it separately. 1.612 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1.613 + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" 1.614 + ;; 1.615 + *) 1.616 + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" 1.617 + esac 1.618 +} 1.619 + 1.620 + 1.621 +# func_quote_for_expand arg 1.622 +# Aesthetically quote ARG to be evaled later; same as above, 1.623 +# but do not quote variable references. 1.624 +func_quote_for_expand () 1.625 +{ 1.626 + case $1 in 1.627 + *[\\\`\"]*) 1.628 + my_arg=`$ECHO "$1" | $SED \ 1.629 + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; 1.630 + *) 1.631 + my_arg="$1" ;; 1.632 + esac 1.633 + 1.634 + case $my_arg in 1.635 + # Double-quote args containing shell metacharacters to delay 1.636 + # word splitting and command substitution for a subsequent eval. 1.637 + # Many Bourne shells cannot handle close brackets correctly 1.638 + # in scan sets, so we specify it separately. 1.639 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1.640 + my_arg="\"$my_arg\"" 1.641 + ;; 1.642 + esac 1.643 + 1.644 + func_quote_for_expand_result="$my_arg" 1.645 +} 1.646 + 1.647 + 1.648 +# func_show_eval cmd [fail_exp] 1.649 +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is 1.650 +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP 1.651 +# is given, then evaluate it. 1.652 +func_show_eval () 1.653 +{ 1.654 + my_cmd="$1" 1.655 + my_fail_exp="${2-:}" 1.656 + 1.657 + ${opt_silent-false} || { 1.658 + func_quote_for_expand "$my_cmd" 1.659 + eval "func_echo $func_quote_for_expand_result" 1.660 + } 1.661 + 1.662 + if ${opt_dry_run-false}; then :; else 1.663 + eval "$my_cmd" 1.664 + my_status=$? 1.665 + if test "$my_status" -eq 0; then :; else 1.666 + eval "(exit $my_status); $my_fail_exp" 1.667 + fi 1.668 + fi 1.669 +} 1.670 + 1.671 + 1.672 +# func_show_eval_locale cmd [fail_exp] 1.673 +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is 1.674 +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP 1.675 +# is given, then evaluate it. Use the saved locale for evaluation. 1.676 +func_show_eval_locale () 1.677 +{ 1.678 + my_cmd="$1" 1.679 + my_fail_exp="${2-:}" 1.680 + 1.681 + ${opt_silent-false} || { 1.682 + func_quote_for_expand "$my_cmd" 1.683 + eval "func_echo $func_quote_for_expand_result" 1.684 + } 1.685 + 1.686 + if ${opt_dry_run-false}; then :; else 1.687 + eval "$lt_user_locale 1.688 + $my_cmd" 1.689 + my_status=$? 1.690 + eval "$lt_safe_locale" 1.691 + if test "$my_status" -eq 0; then :; else 1.692 + eval "(exit $my_status); $my_fail_exp" 1.693 + fi 1.694 + fi 1.695 +} 1.696 + 1.697 +# func_tr_sh 1.698 +# Turn $1 into a string suitable for a shell variable name. 1.699 +# Result is stored in $func_tr_sh_result. All characters 1.700 +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, 1.701 +# if $1 begins with a digit, a '_' is prepended as well. 1.702 +func_tr_sh () 1.703 +{ 1.704 + case $1 in 1.705 + [0-9]* | *[!a-zA-Z0-9_]*) 1.706 + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` 1.707 + ;; 1.708 + * ) 1.709 + func_tr_sh_result=$1 1.710 + ;; 1.711 + esac 1.712 +} 1.713 + 1.714 + 1.715 +# func_version 1.716 +# Echo version message to standard output and exit. 1.717 +func_version () 1.718 +{ 1.719 + $opt_debug 1.720 + 1.721 + $SED -n '/(C)/!b go 1.722 + :more 1.723 + /\./!{ 1.724 + N 1.725 + s/\n# / / 1.726 + b more 1.727 + } 1.728 + :go 1.729 + /^# '$PROGRAM' (GNU /,/# warranty; / { 1.730 + s/^# // 1.731 + s/^# *$// 1.732 + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ 1.733 + p 1.734 + }' < "$progpath" 1.735 + exit $? 1.736 +} 1.737 + 1.738 +# func_usage 1.739 +# Echo short help message to standard output and exit. 1.740 +func_usage () 1.741 +{ 1.742 + $opt_debug 1.743 + 1.744 + $SED -n '/^# Usage:/,/^# *.*--help/ { 1.745 + s/^# // 1.746 + s/^# *$// 1.747 + s/\$progname/'$progname'/ 1.748 + p 1.749 + }' < "$progpath" 1.750 + echo 1.751 + $ECHO "run \`$progname --help | more' for full usage" 1.752 + exit $? 1.753 +} 1.754 + 1.755 +# func_help [NOEXIT] 1.756 +# Echo long help message to standard output and exit, 1.757 +# unless 'noexit' is passed as argument. 1.758 +func_help () 1.759 +{ 1.760 + $opt_debug 1.761 + 1.762 + $SED -n '/^# Usage:/,/# Report bugs to/ { 1.763 + :print 1.764 + s/^# // 1.765 + s/^# *$// 1.766 + s*\$progname*'$progname'* 1.767 + s*\$host*'"$host"'* 1.768 + s*\$SHELL*'"$SHELL"'* 1.769 + s*\$LTCC*'"$LTCC"'* 1.770 + s*\$LTCFLAGS*'"$LTCFLAGS"'* 1.771 + s*\$LD*'"$LD"'* 1.772 + s/\$with_gnu_ld/'"$with_gnu_ld"'/ 1.773 + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ 1.774 + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ 1.775 + p 1.776 + d 1.777 + } 1.778 + /^# .* home page:/b print 1.779 + /^# General help using/b print 1.780 + ' < "$progpath" 1.781 + ret=$? 1.782 + if test -z "$1"; then 1.783 + exit $ret 1.784 + fi 1.785 +} 1.786 + 1.787 +# func_missing_arg argname 1.788 +# Echo program name prefixed message to standard error and set global 1.789 +# exit_cmd. 1.790 +func_missing_arg () 1.791 +{ 1.792 + $opt_debug 1.793 + 1.794 + func_error "missing argument for $1." 1.795 + exit_cmd=exit 1.796 +} 1.797 + 1.798 + 1.799 +# func_split_short_opt shortopt 1.800 +# Set func_split_short_opt_name and func_split_short_opt_arg shell 1.801 +# variables after splitting SHORTOPT after the 2nd character. 1.802 +func_split_short_opt () 1.803 +{ 1.804 + my_sed_short_opt='1s/^\(..\).*$/\1/;q' 1.805 + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' 1.806 + 1.807 + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` 1.808 + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` 1.809 +} # func_split_short_opt may be replaced by extended shell implementation 1.810 + 1.811 + 1.812 +# func_split_long_opt longopt 1.813 +# Set func_split_long_opt_name and func_split_long_opt_arg shell 1.814 +# variables after splitting LONGOPT at the `=' sign. 1.815 +func_split_long_opt () 1.816 +{ 1.817 + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' 1.818 + my_sed_long_arg='1s/^--[^=]*=//' 1.819 + 1.820 + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` 1.821 + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` 1.822 +} # func_split_long_opt may be replaced by extended shell implementation 1.823 + 1.824 +exit_cmd=: 1.825 + 1.826 + 1.827 + 1.828 + 1.829 + 1.830 +magic="%%%MAGIC variable%%%" 1.831 +magic_exe="%%%MAGIC EXE variable%%%" 1.832 + 1.833 +# Global variables. 1.834 +nonopt= 1.835 +preserve_args= 1.836 +lo2o="s/\\.lo\$/.${objext}/" 1.837 +o2lo="s/\\.${objext}\$/.lo/" 1.838 +extracted_archives= 1.839 +extracted_serial=0 1.840 + 1.841 +# If this variable is set in any of the actions, the command in it 1.842 +# will be execed at the end. This prevents here-documents from being 1.843 +# left over by shells. 1.844 +exec_cmd= 1.845 + 1.846 +# func_append var value 1.847 +# Append VALUE to the end of shell variable VAR. 1.848 +func_append () 1.849 +{ 1.850 + eval "${1}=\$${1}\${2}" 1.851 +} # func_append may be replaced by extended shell implementation 1.852 + 1.853 +# func_append_quoted var value 1.854 +# Quote VALUE and append to the end of shell variable VAR, separated 1.855 +# by a space. 1.856 +func_append_quoted () 1.857 +{ 1.858 + func_quote_for_eval "${2}" 1.859 + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" 1.860 +} # func_append_quoted may be replaced by extended shell implementation 1.861 + 1.862 + 1.863 +# func_arith arithmetic-term... 1.864 +func_arith () 1.865 +{ 1.866 + func_arith_result=`expr "${@}"` 1.867 +} # func_arith may be replaced by extended shell implementation 1.868 + 1.869 + 1.870 +# func_len string 1.871 +# STRING may not start with a hyphen. 1.872 +func_len () 1.873 +{ 1.874 + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` 1.875 +} # func_len may be replaced by extended shell implementation 1.876 + 1.877 + 1.878 +# func_lo2o object 1.879 +func_lo2o () 1.880 +{ 1.881 + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 1.882 +} # func_lo2o may be replaced by extended shell implementation 1.883 + 1.884 + 1.885 +# func_xform libobj-or-source 1.886 +func_xform () 1.887 +{ 1.888 + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` 1.889 +} # func_xform may be replaced by extended shell implementation 1.890 + 1.891 + 1.892 +# func_fatal_configuration arg... 1.893 +# Echo program name prefixed message to standard error, followed by 1.894 +# a configuration failure hint, and exit. 1.895 +func_fatal_configuration () 1.896 +{ 1.897 + func_error ${1+"$@"} 1.898 + func_error "See the $PACKAGE documentation for more information." 1.899 + func_fatal_error "Fatal configuration error." 1.900 +} 1.901 + 1.902 + 1.903 +# func_config 1.904 +# Display the configuration for all the tags in this script. 1.905 +func_config () 1.906 +{ 1.907 + re_begincf='^# ### BEGIN LIBTOOL' 1.908 + re_endcf='^# ### END LIBTOOL' 1.909 + 1.910 + # Default configuration. 1.911 + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" 1.912 + 1.913 + # Now print the configurations for the tags. 1.914 + for tagname in $taglist; do 1.915 + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" 1.916 + done 1.917 + 1.918 + exit $? 1.919 +} 1.920 + 1.921 +# func_features 1.922 +# Display the features supported by this script. 1.923 +func_features () 1.924 +{ 1.925 + echo "host: $host" 1.926 + if test "$build_libtool_libs" = yes; then 1.927 + echo "enable shared libraries" 1.928 + else 1.929 + echo "disable shared libraries" 1.930 + fi 1.931 + if test "$build_old_libs" = yes; then 1.932 + echo "enable static libraries" 1.933 + else 1.934 + echo "disable static libraries" 1.935 + fi 1.936 + 1.937 + exit $? 1.938 +} 1.939 + 1.940 +# func_enable_tag tagname 1.941 +# Verify that TAGNAME is valid, and either flag an error and exit, or 1.942 +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist 1.943 +# variable here. 1.944 +func_enable_tag () 1.945 +{ 1.946 + # Global variable: 1.947 + tagname="$1" 1.948 + 1.949 + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" 1.950 + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" 1.951 + sed_extractcf="/$re_begincf/,/$re_endcf/p" 1.952 + 1.953 + # Validate tagname. 1.954 + case $tagname in 1.955 + *[!-_A-Za-z0-9,/]*) 1.956 + func_fatal_error "invalid tag name: $tagname" 1.957 + ;; 1.958 + esac 1.959 + 1.960 + # Don't test for the "default" C tag, as we know it's 1.961 + # there but not specially marked. 1.962 + case $tagname in 1.963 + CC) ;; 1.964 + *) 1.965 + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then 1.966 + taglist="$taglist $tagname" 1.967 + 1.968 + # Evaluate the configuration. Be careful to quote the path 1.969 + # and the sed script, to avoid splitting on whitespace, but 1.970 + # also don't use non-portable quotes within backquotes within 1.971 + # quotes we have to do it in 2 steps: 1.972 + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` 1.973 + eval "$extractedcf" 1.974 + else 1.975 + func_error "ignoring unknown tag $tagname" 1.976 + fi 1.977 + ;; 1.978 + esac 1.979 +} 1.980 + 1.981 +# func_check_version_match 1.982 +# Ensure that we are using m4 macros, and libtool script from the same 1.983 +# release of libtool. 1.984 +func_check_version_match () 1.985 +{ 1.986 + if test "$package_revision" != "$macro_revision"; then 1.987 + if test "$VERSION" != "$macro_version"; then 1.988 + if test -z "$macro_version"; then 1.989 + cat >&2 <<_LT_EOF 1.990 +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the 1.991 +$progname: definition of this LT_INIT comes from an older release. 1.992 +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION 1.993 +$progname: and run autoconf again. 1.994 +_LT_EOF 1.995 + else 1.996 + cat >&2 <<_LT_EOF 1.997 +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the 1.998 +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. 1.999 +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION 1.1000 +$progname: and run autoconf again. 1.1001 +_LT_EOF 1.1002 + fi 1.1003 + else 1.1004 + cat >&2 <<_LT_EOF 1.1005 +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, 1.1006 +$progname: but the definition of this LT_INIT comes from revision $macro_revision. 1.1007 +$progname: You should recreate aclocal.m4 with macros from revision $package_revision 1.1008 +$progname: of $PACKAGE $VERSION and run autoconf again. 1.1009 +_LT_EOF 1.1010 + fi 1.1011 + 1.1012 + exit $EXIT_MISMATCH 1.1013 + fi 1.1014 +} 1.1015 + 1.1016 + 1.1017 +# Shorthand for --mode=foo, only valid as the first argument 1.1018 +case $1 in 1.1019 +clean|clea|cle|cl) 1.1020 + shift; set dummy --mode clean ${1+"$@"}; shift 1.1021 + ;; 1.1022 +compile|compil|compi|comp|com|co|c) 1.1023 + shift; set dummy --mode compile ${1+"$@"}; shift 1.1024 + ;; 1.1025 +execute|execut|execu|exec|exe|ex|e) 1.1026 + shift; set dummy --mode execute ${1+"$@"}; shift 1.1027 + ;; 1.1028 +finish|finis|fini|fin|fi|f) 1.1029 + shift; set dummy --mode finish ${1+"$@"}; shift 1.1030 + ;; 1.1031 +install|instal|insta|inst|ins|in|i) 1.1032 + shift; set dummy --mode install ${1+"$@"}; shift 1.1033 + ;; 1.1034 +link|lin|li|l) 1.1035 + shift; set dummy --mode link ${1+"$@"}; shift 1.1036 + ;; 1.1037 +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) 1.1038 + shift; set dummy --mode uninstall ${1+"$@"}; shift 1.1039 + ;; 1.1040 +esac 1.1041 + 1.1042 + 1.1043 + 1.1044 +# Option defaults: 1.1045 +opt_debug=: 1.1046 +opt_dry_run=false 1.1047 +opt_config=false 1.1048 +opt_preserve_dup_deps=false 1.1049 +opt_features=false 1.1050 +opt_finish=false 1.1051 +opt_help=false 1.1052 +opt_help_all=false 1.1053 +opt_silent=: 1.1054 +opt_warning=: 1.1055 +opt_verbose=: 1.1056 +opt_silent=false 1.1057 +opt_verbose=false 1.1058 + 1.1059 + 1.1060 +# Parse options once, thoroughly. This comes as soon as possible in the 1.1061 +# script to make things like `--version' happen as quickly as we can. 1.1062 +{ 1.1063 + # this just eases exit handling 1.1064 + while test $# -gt 0; do 1.1065 + opt="$1" 1.1066 + shift 1.1067 + case $opt in 1.1068 + --debug|-x) opt_debug='set -x' 1.1069 + func_echo "enabling shell trace mode" 1.1070 + $opt_debug 1.1071 + ;; 1.1072 + --dry-run|--dryrun|-n) 1.1073 + opt_dry_run=: 1.1074 + ;; 1.1075 + --config) 1.1076 + opt_config=: 1.1077 +func_config 1.1078 + ;; 1.1079 + --dlopen|-dlopen) 1.1080 + optarg="$1" 1.1081 + opt_dlopen="${opt_dlopen+$opt_dlopen 1.1082 +}$optarg" 1.1083 + shift 1.1084 + ;; 1.1085 + --preserve-dup-deps) 1.1086 + opt_preserve_dup_deps=: 1.1087 + ;; 1.1088 + --features) 1.1089 + opt_features=: 1.1090 +func_features 1.1091 + ;; 1.1092 + --finish) 1.1093 + opt_finish=: 1.1094 +set dummy --mode finish ${1+"$@"}; shift 1.1095 + ;; 1.1096 + --help) 1.1097 + opt_help=: 1.1098 + ;; 1.1099 + --help-all) 1.1100 + opt_help_all=: 1.1101 +opt_help=': help-all' 1.1102 + ;; 1.1103 + --mode) 1.1104 + test $# = 0 && func_missing_arg $opt && break 1.1105 + optarg="$1" 1.1106 + opt_mode="$optarg" 1.1107 +case $optarg in 1.1108 + # Valid mode arguments: 1.1109 + clean|compile|execute|finish|install|link|relink|uninstall) ;; 1.1110 + 1.1111 + # Catch anything else as an error 1.1112 + *) func_error "invalid argument for $opt" 1.1113 + exit_cmd=exit 1.1114 + break 1.1115 + ;; 1.1116 +esac 1.1117 + shift 1.1118 + ;; 1.1119 + --no-silent|--no-quiet) 1.1120 + opt_silent=false 1.1121 +func_append preserve_args " $opt" 1.1122 + ;; 1.1123 + --no-warning|--no-warn) 1.1124 + opt_warning=false 1.1125 +func_append preserve_args " $opt" 1.1126 + ;; 1.1127 + --no-verbose) 1.1128 + opt_verbose=false 1.1129 +func_append preserve_args " $opt" 1.1130 + ;; 1.1131 + --silent|--quiet) 1.1132 + opt_silent=: 1.1133 +func_append preserve_args " $opt" 1.1134 + opt_verbose=false 1.1135 + ;; 1.1136 + --verbose|-v) 1.1137 + opt_verbose=: 1.1138 +func_append preserve_args " $opt" 1.1139 +opt_silent=false 1.1140 + ;; 1.1141 + --tag) 1.1142 + test $# = 0 && func_missing_arg $opt && break 1.1143 + optarg="$1" 1.1144 + opt_tag="$optarg" 1.1145 +func_append preserve_args " $opt $optarg" 1.1146 +func_enable_tag "$optarg" 1.1147 + shift 1.1148 + ;; 1.1149 + 1.1150 + -\?|-h) func_usage ;; 1.1151 + --help) func_help ;; 1.1152 + --version) func_version ;; 1.1153 + 1.1154 + # Separate optargs to long options: 1.1155 + --*=*) 1.1156 + func_split_long_opt "$opt" 1.1157 + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} 1.1158 + shift 1.1159 + ;; 1.1160 + 1.1161 + # Separate non-argument short options: 1.1162 + -\?*|-h*|-n*|-v*) 1.1163 + func_split_short_opt "$opt" 1.1164 + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} 1.1165 + shift 1.1166 + ;; 1.1167 + 1.1168 + --) break ;; 1.1169 + -*) func_fatal_help "unrecognized option \`$opt'" ;; 1.1170 + *) set dummy "$opt" ${1+"$@"}; shift; break ;; 1.1171 + esac 1.1172 + done 1.1173 + 1.1174 + # Validate options: 1.1175 + 1.1176 + # save first non-option argument 1.1177 + if test "$#" -gt 0; then 1.1178 + nonopt="$opt" 1.1179 + shift 1.1180 + fi 1.1181 + 1.1182 + # preserve --debug 1.1183 + test "$opt_debug" = : || func_append preserve_args " --debug" 1.1184 + 1.1185 + case $host in 1.1186 + *cygwin* | *mingw* | *pw32* | *cegcc*) 1.1187 + # don't eliminate duplications in $postdeps and $predeps 1.1188 + opt_duplicate_compiler_generated_deps=: 1.1189 + ;; 1.1190 + *) 1.1191 + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps 1.1192 + ;; 1.1193 + esac 1.1194 + 1.1195 + $opt_help || { 1.1196 + # Sanity checks first: 1.1197 + func_check_version_match 1.1198 + 1.1199 + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then 1.1200 + func_fatal_configuration "not configured to build any kind of library" 1.1201 + fi 1.1202 + 1.1203 + # Darwin sucks 1.1204 + eval std_shrext=\"$shrext_cmds\" 1.1205 + 1.1206 + # Only execute mode is allowed to have -dlopen flags. 1.1207 + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then 1.1208 + func_error "unrecognized option \`-dlopen'" 1.1209 + $ECHO "$help" 1>&2 1.1210 + exit $EXIT_FAILURE 1.1211 + fi 1.1212 + 1.1213 + # Change the help message to a mode-specific one. 1.1214 + generic_help="$help" 1.1215 + help="Try \`$progname --help --mode=$opt_mode' for more information." 1.1216 + } 1.1217 + 1.1218 + 1.1219 + # Bail if the options were screwed 1.1220 + $exit_cmd $EXIT_FAILURE 1.1221 +} 1.1222 + 1.1223 + 1.1224 + 1.1225 + 1.1226 +## ----------- ## 1.1227 +## Main. ## 1.1228 +## ----------- ## 1.1229 + 1.1230 +# func_lalib_p file 1.1231 +# True iff FILE is a libtool `.la' library or `.lo' object file. 1.1232 +# This function is only a basic sanity check; it will hardly flush out 1.1233 +# determined imposters. 1.1234 +func_lalib_p () 1.1235 +{ 1.1236 + test -f "$1" && 1.1237 + $SED -e 4q "$1" 2>/dev/null \ 1.1238 + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 1.1239 +} 1.1240 + 1.1241 +# func_lalib_unsafe_p file 1.1242 +# True iff FILE is a libtool `.la' library or `.lo' object file. 1.1243 +# This function implements the same check as func_lalib_p without 1.1244 +# resorting to external programs. To this end, it redirects stdin and 1.1245 +# closes it afterwards, without saving the original file descriptor. 1.1246 +# As a safety measure, use it only where a negative result would be 1.1247 +# fatal anyway. Works if `file' does not exist. 1.1248 +func_lalib_unsafe_p () 1.1249 +{ 1.1250 + lalib_p=no 1.1251 + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then 1.1252 + for lalib_p_l in 1 2 3 4 1.1253 + do 1.1254 + read lalib_p_line 1.1255 + case "$lalib_p_line" in 1.1256 + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; 1.1257 + esac 1.1258 + done 1.1259 + exec 0<&5 5<&- 1.1260 + fi 1.1261 + test "$lalib_p" = yes 1.1262 +} 1.1263 + 1.1264 +# func_ltwrapper_script_p file 1.1265 +# True iff FILE is a libtool wrapper script 1.1266 +# This function is only a basic sanity check; it will hardly flush out 1.1267 +# determined imposters. 1.1268 +func_ltwrapper_script_p () 1.1269 +{ 1.1270 + func_lalib_p "$1" 1.1271 +} 1.1272 + 1.1273 +# func_ltwrapper_executable_p file 1.1274 +# True iff FILE is a libtool wrapper executable 1.1275 +# This function is only a basic sanity check; it will hardly flush out 1.1276 +# determined imposters. 1.1277 +func_ltwrapper_executable_p () 1.1278 +{ 1.1279 + func_ltwrapper_exec_suffix= 1.1280 + case $1 in 1.1281 + *.exe) ;; 1.1282 + *) func_ltwrapper_exec_suffix=.exe ;; 1.1283 + esac 1.1284 + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 1.1285 +} 1.1286 + 1.1287 +# func_ltwrapper_scriptname file 1.1288 +# Assumes file is an ltwrapper_executable 1.1289 +# uses $file to determine the appropriate filename for a 1.1290 +# temporary ltwrapper_script. 1.1291 +func_ltwrapper_scriptname () 1.1292 +{ 1.1293 + func_dirname_and_basename "$1" "" "." 1.1294 + func_stripname '' '.exe' "$func_basename_result" 1.1295 + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" 1.1296 +} 1.1297 + 1.1298 +# func_ltwrapper_p file 1.1299 +# True iff FILE is a libtool wrapper script or wrapper executable 1.1300 +# This function is only a basic sanity check; it will hardly flush out 1.1301 +# determined imposters. 1.1302 +func_ltwrapper_p () 1.1303 +{ 1.1304 + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" 1.1305 +} 1.1306 + 1.1307 + 1.1308 +# func_execute_cmds commands fail_cmd 1.1309 +# Execute tilde-delimited COMMANDS. 1.1310 +# If FAIL_CMD is given, eval that upon failure. 1.1311 +# FAIL_CMD may read-access the current command in variable CMD! 1.1312 +func_execute_cmds () 1.1313 +{ 1.1314 + $opt_debug 1.1315 + save_ifs=$IFS; IFS='~' 1.1316 + for cmd in $1; do 1.1317 + IFS=$save_ifs 1.1318 + eval cmd=\"$cmd\" 1.1319 + func_show_eval "$cmd" "${2-:}" 1.1320 + done 1.1321 + IFS=$save_ifs 1.1322 +} 1.1323 + 1.1324 + 1.1325 +# func_source file 1.1326 +# Source FILE, adding directory component if necessary. 1.1327 +# Note that it is not necessary on cygwin/mingw to append a dot to 1.1328 +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe 1.1329 +# behavior happens only for exec(3), not for open(2)! Also, sourcing 1.1330 +# `FILE.' does not work on cygwin managed mounts. 1.1331 +func_source () 1.1332 +{ 1.1333 + $opt_debug 1.1334 + case $1 in 1.1335 + */* | *\\*) . "$1" ;; 1.1336 + *) . "./$1" ;; 1.1337 + esac 1.1338 +} 1.1339 + 1.1340 + 1.1341 +# func_resolve_sysroot PATH 1.1342 +# Replace a leading = in PATH with a sysroot. Store the result into 1.1343 +# func_resolve_sysroot_result 1.1344 +func_resolve_sysroot () 1.1345 +{ 1.1346 + func_resolve_sysroot_result=$1 1.1347 + case $func_resolve_sysroot_result in 1.1348 + =*) 1.1349 + func_stripname '=' '' "$func_resolve_sysroot_result" 1.1350 + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result 1.1351 + ;; 1.1352 + esac 1.1353 +} 1.1354 + 1.1355 +# func_replace_sysroot PATH 1.1356 +# If PATH begins with the sysroot, replace it with = and 1.1357 +# store the result into func_replace_sysroot_result. 1.1358 +func_replace_sysroot () 1.1359 +{ 1.1360 + case "$lt_sysroot:$1" in 1.1361 + ?*:"$lt_sysroot"*) 1.1362 + func_stripname "$lt_sysroot" '' "$1" 1.1363 + func_replace_sysroot_result="=$func_stripname_result" 1.1364 + ;; 1.1365 + *) 1.1366 + # Including no sysroot. 1.1367 + func_replace_sysroot_result=$1 1.1368 + ;; 1.1369 + esac 1.1370 +} 1.1371 + 1.1372 +# func_infer_tag arg 1.1373 +# Infer tagged configuration to use if any are available and 1.1374 +# if one wasn't chosen via the "--tag" command line option. 1.1375 +# Only attempt this if the compiler in the base compile 1.1376 +# command doesn't match the default compiler. 1.1377 +# arg is usually of the form 'gcc ...' 1.1378 +func_infer_tag () 1.1379 +{ 1.1380 + $opt_debug 1.1381 + if test -n "$available_tags" && test -z "$tagname"; then 1.1382 + CC_quoted= 1.1383 + for arg in $CC; do 1.1384 + func_append_quoted CC_quoted "$arg" 1.1385 + done 1.1386 + CC_expanded=`func_echo_all $CC` 1.1387 + CC_quoted_expanded=`func_echo_all $CC_quoted` 1.1388 + case $@ in 1.1389 + # Blanks in the command may have been stripped by the calling shell, 1.1390 + # but not from the CC environment variable when configure was run. 1.1391 + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ 1.1392 + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; 1.1393 + # Blanks at the start of $base_compile will cause this to fail 1.1394 + # if we don't check for them as well. 1.1395 + *) 1.1396 + for z in $available_tags; do 1.1397 + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then 1.1398 + # Evaluate the configuration. 1.1399 + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" 1.1400 + CC_quoted= 1.1401 + for arg in $CC; do 1.1402 + # Double-quote args containing other shell metacharacters. 1.1403 + func_append_quoted CC_quoted "$arg" 1.1404 + done 1.1405 + CC_expanded=`func_echo_all $CC` 1.1406 + CC_quoted_expanded=`func_echo_all $CC_quoted` 1.1407 + case "$@ " in 1.1408 + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ 1.1409 + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) 1.1410 + # The compiler in the base compile command matches 1.1411 + # the one in the tagged configuration. 1.1412 + # Assume this is the tagged configuration we want. 1.1413 + tagname=$z 1.1414 + break 1.1415 + ;; 1.1416 + esac 1.1417 + fi 1.1418 + done 1.1419 + # If $tagname still isn't set, then no tagged configuration 1.1420 + # was found and let the user know that the "--tag" command 1.1421 + # line option must be used. 1.1422 + if test -z "$tagname"; then 1.1423 + func_echo "unable to infer tagged configuration" 1.1424 + func_fatal_error "specify a tag with \`--tag'" 1.1425 +# else 1.1426 +# func_verbose "using $tagname tagged configuration" 1.1427 + fi 1.1428 + ;; 1.1429 + esac 1.1430 + fi 1.1431 +} 1.1432 + 1.1433 + 1.1434 + 1.1435 +# func_write_libtool_object output_name pic_name nonpic_name 1.1436 +# Create a libtool object file (analogous to a ".la" file), 1.1437 +# but don't create it if we're doing a dry run. 1.1438 +func_write_libtool_object () 1.1439 +{ 1.1440 + write_libobj=${1} 1.1441 + if test "$build_libtool_libs" = yes; then 1.1442 + write_lobj=\'${2}\' 1.1443 + else 1.1444 + write_lobj=none 1.1445 + fi 1.1446 + 1.1447 + if test "$build_old_libs" = yes; then 1.1448 + write_oldobj=\'${3}\' 1.1449 + else 1.1450 + write_oldobj=none 1.1451 + fi 1.1452 + 1.1453 + $opt_dry_run || { 1.1454 + cat >${write_libobj}T <<EOF 1.1455 +# $write_libobj - a libtool object file 1.1456 +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION 1.1457 +# 1.1458 +# Please DO NOT delete this file! 1.1459 +# It is necessary for linking the library. 1.1460 + 1.1461 +# Name of the PIC object. 1.1462 +pic_object=$write_lobj 1.1463 + 1.1464 +# Name of the non-PIC object 1.1465 +non_pic_object=$write_oldobj 1.1466 + 1.1467 +EOF 1.1468 + $MV "${write_libobj}T" "${write_libobj}" 1.1469 + } 1.1470 +} 1.1471 + 1.1472 + 1.1473 +################################################## 1.1474 +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # 1.1475 +################################################## 1.1476 + 1.1477 +# func_convert_core_file_wine_to_w32 ARG 1.1478 +# Helper function used by file name conversion functions when $build is *nix, 1.1479 +# and $host is mingw, cygwin, or some other w32 environment. Relies on a 1.1480 +# correctly configured wine environment available, with the winepath program 1.1481 +# in $build's $PATH. 1.1482 +# 1.1483 +# ARG is the $build file name to be converted to w32 format. 1.1484 +# Result is available in $func_convert_core_file_wine_to_w32_result, and will 1.1485 +# be empty on error (or when ARG is empty) 1.1486 +func_convert_core_file_wine_to_w32 () 1.1487 +{ 1.1488 + $opt_debug 1.1489 + func_convert_core_file_wine_to_w32_result="$1" 1.1490 + if test -n "$1"; then 1.1491 + # Unfortunately, winepath does not exit with a non-zero error code, so we 1.1492 + # are forced to check the contents of stdout. On the other hand, if the 1.1493 + # command is not found, the shell will set an exit code of 127 and print 1.1494 + # *an error message* to stdout. So we must check for both error code of 1.1495 + # zero AND non-empty stdout, which explains the odd construction: 1.1496 + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` 1.1497 + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then 1.1498 + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | 1.1499 + $SED -e "$lt_sed_naive_backslashify"` 1.1500 + else 1.1501 + func_convert_core_file_wine_to_w32_result= 1.1502 + fi 1.1503 + fi 1.1504 +} 1.1505 +# end: func_convert_core_file_wine_to_w32 1.1506 + 1.1507 + 1.1508 +# func_convert_core_path_wine_to_w32 ARG 1.1509 +# Helper function used by path conversion functions when $build is *nix, and 1.1510 +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly 1.1511 +# configured wine environment available, with the winepath program in $build's 1.1512 +# $PATH. Assumes ARG has no leading or trailing path separator characters. 1.1513 +# 1.1514 +# ARG is path to be converted from $build format to win32. 1.1515 +# Result is available in $func_convert_core_path_wine_to_w32_result. 1.1516 +# Unconvertible file (directory) names in ARG are skipped; if no directory names 1.1517 +# are convertible, then the result may be empty. 1.1518 +func_convert_core_path_wine_to_w32 () 1.1519 +{ 1.1520 + $opt_debug 1.1521 + # unfortunately, winepath doesn't convert paths, only file names 1.1522 + func_convert_core_path_wine_to_w32_result="" 1.1523 + if test -n "$1"; then 1.1524 + oldIFS=$IFS 1.1525 + IFS=: 1.1526 + for func_convert_core_path_wine_to_w32_f in $1; do 1.1527 + IFS=$oldIFS 1.1528 + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" 1.1529 + if test -n "$func_convert_core_file_wine_to_w32_result" ; then 1.1530 + if test -z "$func_convert_core_path_wine_to_w32_result"; then 1.1531 + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" 1.1532 + else 1.1533 + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" 1.1534 + fi 1.1535 + fi 1.1536 + done 1.1537 + IFS=$oldIFS 1.1538 + fi 1.1539 +} 1.1540 +# end: func_convert_core_path_wine_to_w32 1.1541 + 1.1542 + 1.1543 +# func_cygpath ARGS... 1.1544 +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when 1.1545 +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) 1.1546 +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or 1.1547 +# (2), returns the Cygwin file name or path in func_cygpath_result (input 1.1548 +# file name or path is assumed to be in w32 format, as previously converted 1.1549 +# from $build's *nix or MSYS format). In case (3), returns the w32 file name 1.1550 +# or path in func_cygpath_result (input file name or path is assumed to be in 1.1551 +# Cygwin format). Returns an empty string on error. 1.1552 +# 1.1553 +# ARGS are passed to cygpath, with the last one being the file name or path to 1.1554 +# be converted. 1.1555 +# 1.1556 +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH 1.1557 +# environment variable; do not put it in $PATH. 1.1558 +func_cygpath () 1.1559 +{ 1.1560 + $opt_debug 1.1561 + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then 1.1562 + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` 1.1563 + if test "$?" -ne 0; then 1.1564 + # on failure, ensure result is empty 1.1565 + func_cygpath_result= 1.1566 + fi 1.1567 + else 1.1568 + func_cygpath_result= 1.1569 + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" 1.1570 + fi 1.1571 +} 1.1572 +#end: func_cygpath 1.1573 + 1.1574 + 1.1575 +# func_convert_core_msys_to_w32 ARG 1.1576 +# Convert file name or path ARG from MSYS format to w32 format. Return 1.1577 +# result in func_convert_core_msys_to_w32_result. 1.1578 +func_convert_core_msys_to_w32 () 1.1579 +{ 1.1580 + $opt_debug 1.1581 + # awkward: cmd appends spaces to result 1.1582 + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | 1.1583 + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` 1.1584 +} 1.1585 +#end: func_convert_core_msys_to_w32 1.1586 + 1.1587 + 1.1588 +# func_convert_file_check ARG1 ARG2 1.1589 +# Verify that ARG1 (a file name in $build format) was converted to $host 1.1590 +# format in ARG2. Otherwise, emit an error message, but continue (resetting 1.1591 +# func_to_host_file_result to ARG1). 1.1592 +func_convert_file_check () 1.1593 +{ 1.1594 + $opt_debug 1.1595 + if test -z "$2" && test -n "$1" ; then 1.1596 + func_error "Could not determine host file name corresponding to" 1.1597 + func_error " \`$1'" 1.1598 + func_error "Continuing, but uninstalled executables may not work." 1.1599 + # Fallback: 1.1600 + func_to_host_file_result="$1" 1.1601 + fi 1.1602 +} 1.1603 +# end func_convert_file_check 1.1604 + 1.1605 + 1.1606 +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH 1.1607 +# Verify that FROM_PATH (a path in $build format) was converted to $host 1.1608 +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting 1.1609 +# func_to_host_file_result to a simplistic fallback value (see below). 1.1610 +func_convert_path_check () 1.1611 +{ 1.1612 + $opt_debug 1.1613 + if test -z "$4" && test -n "$3"; then 1.1614 + func_error "Could not determine the host path corresponding to" 1.1615 + func_error " \`$3'" 1.1616 + func_error "Continuing, but uninstalled executables may not work." 1.1617 + # Fallback. This is a deliberately simplistic "conversion" and 1.1618 + # should not be "improved". See libtool.info. 1.1619 + if test "x$1" != "x$2"; then 1.1620 + lt_replace_pathsep_chars="s|$1|$2|g" 1.1621 + func_to_host_path_result=`echo "$3" | 1.1622 + $SED -e "$lt_replace_pathsep_chars"` 1.1623 + else 1.1624 + func_to_host_path_result="$3" 1.1625 + fi 1.1626 + fi 1.1627 +} 1.1628 +# end func_convert_path_check 1.1629 + 1.1630 + 1.1631 +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG 1.1632 +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT 1.1633 +# and appending REPL if ORIG matches BACKPAT. 1.1634 +func_convert_path_front_back_pathsep () 1.1635 +{ 1.1636 + $opt_debug 1.1637 + case $4 in 1.1638 + $1 ) func_to_host_path_result="$3$func_to_host_path_result" 1.1639 + ;; 1.1640 + esac 1.1641 + case $4 in 1.1642 + $2 ) func_append func_to_host_path_result "$3" 1.1643 + ;; 1.1644 + esac 1.1645 +} 1.1646 +# end func_convert_path_front_back_pathsep 1.1647 + 1.1648 + 1.1649 +################################################## 1.1650 +# $build to $host FILE NAME CONVERSION FUNCTIONS # 1.1651 +################################################## 1.1652 +# invoked via `$to_host_file_cmd ARG' 1.1653 +# 1.1654 +# In each case, ARG is the path to be converted from $build to $host format. 1.1655 +# Result will be available in $func_to_host_file_result. 1.1656 + 1.1657 + 1.1658 +# func_to_host_file ARG 1.1659 +# Converts the file name ARG from $build format to $host format. Return result 1.1660 +# in func_to_host_file_result. 1.1661 +func_to_host_file () 1.1662 +{ 1.1663 + $opt_debug 1.1664 + $to_host_file_cmd "$1" 1.1665 +} 1.1666 +# end func_to_host_file 1.1667 + 1.1668 + 1.1669 +# func_to_tool_file ARG LAZY 1.1670 +# converts the file name ARG from $build format to toolchain format. Return 1.1671 +# result in func_to_tool_file_result. If the conversion in use is listed 1.1672 +# in (the comma separated) LAZY, no conversion takes place. 1.1673 +func_to_tool_file () 1.1674 +{ 1.1675 + $opt_debug 1.1676 + case ,$2, in 1.1677 + *,"$to_tool_file_cmd",*) 1.1678 + func_to_tool_file_result=$1 1.1679 + ;; 1.1680 + *) 1.1681 + $to_tool_file_cmd "$1" 1.1682 + func_to_tool_file_result=$func_to_host_file_result 1.1683 + ;; 1.1684 + esac 1.1685 +} 1.1686 +# end func_to_tool_file 1.1687 + 1.1688 + 1.1689 +# func_convert_file_noop ARG 1.1690 +# Copy ARG to func_to_host_file_result. 1.1691 +func_convert_file_noop () 1.1692 +{ 1.1693 + func_to_host_file_result="$1" 1.1694 +} 1.1695 +# end func_convert_file_noop 1.1696 + 1.1697 + 1.1698 +# func_convert_file_msys_to_w32 ARG 1.1699 +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic 1.1700 +# conversion to w32 is not available inside the cwrapper. Returns result in 1.1701 +# func_to_host_file_result. 1.1702 +func_convert_file_msys_to_w32 () 1.1703 +{ 1.1704 + $opt_debug 1.1705 + func_to_host_file_result="$1" 1.1706 + if test -n "$1"; then 1.1707 + func_convert_core_msys_to_w32 "$1" 1.1708 + func_to_host_file_result="$func_convert_core_msys_to_w32_result" 1.1709 + fi 1.1710 + func_convert_file_check "$1" "$func_to_host_file_result" 1.1711 +} 1.1712 +# end func_convert_file_msys_to_w32 1.1713 + 1.1714 + 1.1715 +# func_convert_file_cygwin_to_w32 ARG 1.1716 +# Convert file name ARG from Cygwin to w32 format. Returns result in 1.1717 +# func_to_host_file_result. 1.1718 +func_convert_file_cygwin_to_w32 () 1.1719 +{ 1.1720 + $opt_debug 1.1721 + func_to_host_file_result="$1" 1.1722 + if test -n "$1"; then 1.1723 + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use 1.1724 + # LT_CYGPATH in this case. 1.1725 + func_to_host_file_result=`cygpath -m "$1"` 1.1726 + fi 1.1727 + func_convert_file_check "$1" "$func_to_host_file_result" 1.1728 +} 1.1729 +# end func_convert_file_cygwin_to_w32 1.1730 + 1.1731 + 1.1732 +# func_convert_file_nix_to_w32 ARG 1.1733 +# Convert file name ARG from *nix to w32 format. Requires a wine environment 1.1734 +# and a working winepath. Returns result in func_to_host_file_result. 1.1735 +func_convert_file_nix_to_w32 () 1.1736 +{ 1.1737 + $opt_debug 1.1738 + func_to_host_file_result="$1" 1.1739 + if test -n "$1"; then 1.1740 + func_convert_core_file_wine_to_w32 "$1" 1.1741 + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" 1.1742 + fi 1.1743 + func_convert_file_check "$1" "$func_to_host_file_result" 1.1744 +} 1.1745 +# end func_convert_file_nix_to_w32 1.1746 + 1.1747 + 1.1748 +# func_convert_file_msys_to_cygwin ARG 1.1749 +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. 1.1750 +# Returns result in func_to_host_file_result. 1.1751 +func_convert_file_msys_to_cygwin () 1.1752 +{ 1.1753 + $opt_debug 1.1754 + func_to_host_file_result="$1" 1.1755 + if test -n "$1"; then 1.1756 + func_convert_core_msys_to_w32 "$1" 1.1757 + func_cygpath -u "$func_convert_core_msys_to_w32_result" 1.1758 + func_to_host_file_result="$func_cygpath_result" 1.1759 + fi 1.1760 + func_convert_file_check "$1" "$func_to_host_file_result" 1.1761 +} 1.1762 +# end func_convert_file_msys_to_cygwin 1.1763 + 1.1764 + 1.1765 +# func_convert_file_nix_to_cygwin ARG 1.1766 +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed 1.1767 +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result 1.1768 +# in func_to_host_file_result. 1.1769 +func_convert_file_nix_to_cygwin () 1.1770 +{ 1.1771 + $opt_debug 1.1772 + func_to_host_file_result="$1" 1.1773 + if test -n "$1"; then 1.1774 + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. 1.1775 + func_convert_core_file_wine_to_w32 "$1" 1.1776 + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" 1.1777 + func_to_host_file_result="$func_cygpath_result" 1.1778 + fi 1.1779 + func_convert_file_check "$1" "$func_to_host_file_result" 1.1780 +} 1.1781 +# end func_convert_file_nix_to_cygwin 1.1782 + 1.1783 + 1.1784 +############################################# 1.1785 +# $build to $host PATH CONVERSION FUNCTIONS # 1.1786 +############################################# 1.1787 +# invoked via `$to_host_path_cmd ARG' 1.1788 +# 1.1789 +# In each case, ARG is the path to be converted from $build to $host format. 1.1790 +# The result will be available in $func_to_host_path_result. 1.1791 +# 1.1792 +# Path separators are also converted from $build format to $host format. If 1.1793 +# ARG begins or ends with a path separator character, it is preserved (but 1.1794 +# converted to $host format) on output. 1.1795 +# 1.1796 +# All path conversion functions are named using the following convention: 1.1797 +# file name conversion function : func_convert_file_X_to_Y () 1.1798 +# path conversion function : func_convert_path_X_to_Y () 1.1799 +# where, for any given $build/$host combination the 'X_to_Y' value is the 1.1800 +# same. If conversion functions are added for new $build/$host combinations, 1.1801 +# the two new functions must follow this pattern, or func_init_to_host_path_cmd 1.1802 +# will break. 1.1803 + 1.1804 + 1.1805 +# func_init_to_host_path_cmd 1.1806 +# Ensures that function "pointer" variable $to_host_path_cmd is set to the 1.1807 +# appropriate value, based on the value of $to_host_file_cmd. 1.1808 +to_host_path_cmd= 1.1809 +func_init_to_host_path_cmd () 1.1810 +{ 1.1811 + $opt_debug 1.1812 + if test -z "$to_host_path_cmd"; then 1.1813 + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" 1.1814 + to_host_path_cmd="func_convert_path_${func_stripname_result}" 1.1815 + fi 1.1816 +} 1.1817 + 1.1818 + 1.1819 +# func_to_host_path ARG 1.1820 +# Converts the path ARG from $build format to $host format. Return result 1.1821 +# in func_to_host_path_result. 1.1822 +func_to_host_path () 1.1823 +{ 1.1824 + $opt_debug 1.1825 + func_init_to_host_path_cmd 1.1826 + $to_host_path_cmd "$1" 1.1827 +} 1.1828 +# end func_to_host_path 1.1829 + 1.1830 + 1.1831 +# func_convert_path_noop ARG 1.1832 +# Copy ARG to func_to_host_path_result. 1.1833 +func_convert_path_noop () 1.1834 +{ 1.1835 + func_to_host_path_result="$1" 1.1836 +} 1.1837 +# end func_convert_path_noop 1.1838 + 1.1839 + 1.1840 +# func_convert_path_msys_to_w32 ARG 1.1841 +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic 1.1842 +# conversion to w32 is not available inside the cwrapper. Returns result in 1.1843 +# func_to_host_path_result. 1.1844 +func_convert_path_msys_to_w32 () 1.1845 +{ 1.1846 + $opt_debug 1.1847 + func_to_host_path_result="$1" 1.1848 + if test -n "$1"; then 1.1849 + # Remove leading and trailing path separator characters from ARG. MSYS 1.1850 + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; 1.1851 + # and winepath ignores them completely. 1.1852 + func_stripname : : "$1" 1.1853 + func_to_host_path_tmp1=$func_stripname_result 1.1854 + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" 1.1855 + func_to_host_path_result="$func_convert_core_msys_to_w32_result" 1.1856 + func_convert_path_check : ";" \ 1.1857 + "$func_to_host_path_tmp1" "$func_to_host_path_result" 1.1858 + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" 1.1859 + fi 1.1860 +} 1.1861 +# end func_convert_path_msys_to_w32 1.1862 + 1.1863 + 1.1864 +# func_convert_path_cygwin_to_w32 ARG 1.1865 +# Convert path ARG from Cygwin to w32 format. Returns result in 1.1866 +# func_to_host_file_result. 1.1867 +func_convert_path_cygwin_to_w32 () 1.1868 +{ 1.1869 + $opt_debug 1.1870 + func_to_host_path_result="$1" 1.1871 + if test -n "$1"; then 1.1872 + # See func_convert_path_msys_to_w32: 1.1873 + func_stripname : : "$1" 1.1874 + func_to_host_path_tmp1=$func_stripname_result 1.1875 + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` 1.1876 + func_convert_path_check : ";" \ 1.1877 + "$func_to_host_path_tmp1" "$func_to_host_path_result" 1.1878 + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" 1.1879 + fi 1.1880 +} 1.1881 +# end func_convert_path_cygwin_to_w32 1.1882 + 1.1883 + 1.1884 +# func_convert_path_nix_to_w32 ARG 1.1885 +# Convert path ARG from *nix to w32 format. Requires a wine environment and 1.1886 +# a working winepath. Returns result in func_to_host_file_result. 1.1887 +func_convert_path_nix_to_w32 () 1.1888 +{ 1.1889 + $opt_debug 1.1890 + func_to_host_path_result="$1" 1.1891 + if test -n "$1"; then 1.1892 + # See func_convert_path_msys_to_w32: 1.1893 + func_stripname : : "$1" 1.1894 + func_to_host_path_tmp1=$func_stripname_result 1.1895 + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" 1.1896 + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" 1.1897 + func_convert_path_check : ";" \ 1.1898 + "$func_to_host_path_tmp1" "$func_to_host_path_result" 1.1899 + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" 1.1900 + fi 1.1901 +} 1.1902 +# end func_convert_path_nix_to_w32 1.1903 + 1.1904 + 1.1905 +# func_convert_path_msys_to_cygwin ARG 1.1906 +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. 1.1907 +# Returns result in func_to_host_file_result. 1.1908 +func_convert_path_msys_to_cygwin () 1.1909 +{ 1.1910 + $opt_debug 1.1911 + func_to_host_path_result="$1" 1.1912 + if test -n "$1"; then 1.1913 + # See func_convert_path_msys_to_w32: 1.1914 + func_stripname : : "$1" 1.1915 + func_to_host_path_tmp1=$func_stripname_result 1.1916 + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" 1.1917 + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" 1.1918 + func_to_host_path_result="$func_cygpath_result" 1.1919 + func_convert_path_check : : \ 1.1920 + "$func_to_host_path_tmp1" "$func_to_host_path_result" 1.1921 + func_convert_path_front_back_pathsep ":*" "*:" : "$1" 1.1922 + fi 1.1923 +} 1.1924 +# end func_convert_path_msys_to_cygwin 1.1925 + 1.1926 + 1.1927 +# func_convert_path_nix_to_cygwin ARG 1.1928 +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a 1.1929 +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in 1.1930 +# func_to_host_file_result. 1.1931 +func_convert_path_nix_to_cygwin () 1.1932 +{ 1.1933 + $opt_debug 1.1934 + func_to_host_path_result="$1" 1.1935 + if test -n "$1"; then 1.1936 + # Remove leading and trailing path separator characters from 1.1937 + # ARG. msys behavior is inconsistent here, cygpath turns them 1.1938 + # into '.;' and ';.', and winepath ignores them completely. 1.1939 + func_stripname : : "$1" 1.1940 + func_to_host_path_tmp1=$func_stripname_result 1.1941 + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" 1.1942 + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" 1.1943 + func_to_host_path_result="$func_cygpath_result" 1.1944 + func_convert_path_check : : \ 1.1945 + "$func_to_host_path_tmp1" "$func_to_host_path_result" 1.1946 + func_convert_path_front_back_pathsep ":*" "*:" : "$1" 1.1947 + fi 1.1948 +} 1.1949 +# end func_convert_path_nix_to_cygwin 1.1950 + 1.1951 + 1.1952 +# func_mode_compile arg... 1.1953 +func_mode_compile () 1.1954 +{ 1.1955 + $opt_debug 1.1956 + # Get the compilation command and the source file. 1.1957 + base_compile= 1.1958 + srcfile="$nonopt" # always keep a non-empty value in "srcfile" 1.1959 + suppress_opt=yes 1.1960 + suppress_output= 1.1961 + arg_mode=normal 1.1962 + libobj= 1.1963 + later= 1.1964 + pie_flag= 1.1965 + 1.1966 + for arg 1.1967 + do 1.1968 + case $arg_mode in 1.1969 + arg ) 1.1970 + # do not "continue". Instead, add this to base_compile 1.1971 + lastarg="$arg" 1.1972 + arg_mode=normal 1.1973 + ;; 1.1974 + 1.1975 + target ) 1.1976 + libobj="$arg" 1.1977 + arg_mode=normal 1.1978 + continue 1.1979 + ;; 1.1980 + 1.1981 + normal ) 1.1982 + # Accept any command-line options. 1.1983 + case $arg in 1.1984 + -o) 1.1985 + test -n "$libobj" && \ 1.1986 + func_fatal_error "you cannot specify \`-o' more than once" 1.1987 + arg_mode=target 1.1988 + continue 1.1989 + ;; 1.1990 + 1.1991 + -pie | -fpie | -fPIE) 1.1992 + func_append pie_flag " $arg" 1.1993 + continue 1.1994 + ;; 1.1995 + 1.1996 + -shared | -static | -prefer-pic | -prefer-non-pic) 1.1997 + func_append later " $arg" 1.1998 + continue 1.1999 + ;; 1.2000 + 1.2001 + -no-suppress) 1.2002 + suppress_opt=no 1.2003 + continue 1.2004 + ;; 1.2005 + 1.2006 + -Xcompiler) 1.2007 + arg_mode=arg # the next one goes into the "base_compile" arg list 1.2008 + continue # The current "srcfile" will either be retained or 1.2009 + ;; # replaced later. I would guess that would be a bug. 1.2010 + 1.2011 + -Wc,*) 1.2012 + func_stripname '-Wc,' '' "$arg" 1.2013 + args=$func_stripname_result 1.2014 + lastarg= 1.2015 + save_ifs="$IFS"; IFS=',' 1.2016 + for arg in $args; do 1.2017 + IFS="$save_ifs" 1.2018 + func_append_quoted lastarg "$arg" 1.2019 + done 1.2020 + IFS="$save_ifs" 1.2021 + func_stripname ' ' '' "$lastarg" 1.2022 + lastarg=$func_stripname_result 1.2023 + 1.2024 + # Add the arguments to base_compile. 1.2025 + func_append base_compile " $lastarg" 1.2026 + continue 1.2027 + ;; 1.2028 + 1.2029 + *) 1.2030 + # Accept the current argument as the source file. 1.2031 + # The previous "srcfile" becomes the current argument. 1.2032 + # 1.2033 + lastarg="$srcfile" 1.2034 + srcfile="$arg" 1.2035 + ;; 1.2036 + esac # case $arg 1.2037 + ;; 1.2038 + esac # case $arg_mode 1.2039 + 1.2040 + # Aesthetically quote the previous argument. 1.2041 + func_append_quoted base_compile "$lastarg" 1.2042 + done # for arg 1.2043 + 1.2044 + case $arg_mode in 1.2045 + arg) 1.2046 + func_fatal_error "you must specify an argument for -Xcompile" 1.2047 + ;; 1.2048 + target) 1.2049 + func_fatal_error "you must specify a target with \`-o'" 1.2050 + ;; 1.2051 + *) 1.2052 + # Get the name of the library object. 1.2053 + test -z "$libobj" && { 1.2054 + func_basename "$srcfile" 1.2055 + libobj="$func_basename_result" 1.2056 + } 1.2057 + ;; 1.2058 + esac 1.2059 + 1.2060 + # Recognize several different file suffixes. 1.2061 + # If the user specifies -o file.o, it is replaced with file.lo 1.2062 + case $libobj in 1.2063 + *.[cCFSifmso] | \ 1.2064 + *.ada | *.adb | *.ads | *.asm | \ 1.2065 + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ 1.2066 + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) 1.2067 + func_xform "$libobj" 1.2068 + libobj=$func_xform_result 1.2069 + ;; 1.2070 + esac 1.2071 + 1.2072 + case $libobj in 1.2073 + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; 1.2074 + *) 1.2075 + func_fatal_error "cannot determine name of library object from \`$libobj'" 1.2076 + ;; 1.2077 + esac 1.2078 + 1.2079 + func_infer_tag $base_compile 1.2080 + 1.2081 + for arg in $later; do 1.2082 + case $arg in 1.2083 + -shared) 1.2084 + test "$build_libtool_libs" != yes && \ 1.2085 + func_fatal_configuration "can not build a shared library" 1.2086 + build_old_libs=no 1.2087 + continue 1.2088 + ;; 1.2089 + 1.2090 + -static) 1.2091 + build_libtool_libs=no 1.2092 + build_old_libs=yes 1.2093 + continue 1.2094 + ;; 1.2095 + 1.2096 + -prefer-pic) 1.2097 + pic_mode=yes 1.2098 + continue 1.2099 + ;; 1.2100 + 1.2101 + -prefer-non-pic) 1.2102 + pic_mode=no 1.2103 + continue 1.2104 + ;; 1.2105 + esac 1.2106 + done 1.2107 + 1.2108 + func_quote_for_eval "$libobj" 1.2109 + test "X$libobj" != "X$func_quote_for_eval_result" \ 1.2110 + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ 1.2111 + && func_warning "libobj name \`$libobj' may not contain shell special characters." 1.2112 + func_dirname_and_basename "$obj" "/" "" 1.2113 + objname="$func_basename_result" 1.2114 + xdir="$func_dirname_result" 1.2115 + lobj=${xdir}$objdir/$objname 1.2116 + 1.2117 + test -z "$base_compile" && \ 1.2118 + func_fatal_help "you must specify a compilation command" 1.2119 + 1.2120 + # Delete any leftover library objects. 1.2121 + if test "$build_old_libs" = yes; then 1.2122 + removelist="$obj $lobj $libobj ${libobj}T" 1.2123 + else 1.2124 + removelist="$lobj $libobj ${libobj}T" 1.2125 + fi 1.2126 + 1.2127 + # On Cygwin there's no "real" PIC flag so we must build both object types 1.2128 + case $host_os in 1.2129 + cygwin* | mingw* | pw32* | os2* | cegcc*) 1.2130 + pic_mode=default 1.2131 + ;; 1.2132 + esac 1.2133 + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then 1.2134 + # non-PIC code in shared libraries is not supported 1.2135 + pic_mode=default 1.2136 + fi 1.2137 + 1.2138 + # Calculate the filename of the output object if compiler does 1.2139 + # not support -o with -c 1.2140 + if test "$compiler_c_o" = no; then 1.2141 + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} 1.2142 + lockfile="$output_obj.lock" 1.2143 + else 1.2144 + output_obj= 1.2145 + need_locks=no 1.2146 + lockfile= 1.2147 + fi 1.2148 + 1.2149 + # Lock this critical section if it is needed 1.2150 + # We use this script file to make the link, it avoids creating a new file 1.2151 + if test "$need_locks" = yes; then 1.2152 + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do 1.2153 + func_echo "Waiting for $lockfile to be removed" 1.2154 + sleep 2 1.2155 + done 1.2156 + elif test "$need_locks" = warn; then 1.2157 + if test -f "$lockfile"; then 1.2158 + $ECHO "\ 1.2159 +*** ERROR, $lockfile exists and contains: 1.2160 +`cat $lockfile 2>/dev/null` 1.2161 + 1.2162 +This indicates that another process is trying to use the same 1.2163 +temporary object file, and libtool could not work around it because 1.2164 +your compiler does not support \`-c' and \`-o' together. If you 1.2165 +repeat this compilation, it may succeed, by chance, but you had better 1.2166 +avoid parallel builds (make -j) in this platform, or get a better 1.2167 +compiler." 1.2168 + 1.2169 + $opt_dry_run || $RM $removelist 1.2170 + exit $EXIT_FAILURE 1.2171 + fi 1.2172 + func_append removelist " $output_obj" 1.2173 + $ECHO "$srcfile" > "$lockfile" 1.2174 + fi 1.2175 + 1.2176 + $opt_dry_run || $RM $removelist 1.2177 + func_append removelist " $lockfile" 1.2178 + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 1.2179 + 1.2180 + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 1.2181 + srcfile=$func_to_tool_file_result 1.2182 + func_quote_for_eval "$srcfile" 1.2183 + qsrcfile=$func_quote_for_eval_result 1.2184 + 1.2185 + # Only build a PIC object if we are building libtool libraries. 1.2186 + if test "$build_libtool_libs" = yes; then 1.2187 + # Without this assignment, base_compile gets emptied. 1.2188 + fbsd_hideous_sh_bug=$base_compile 1.2189 + 1.2190 + if test "$pic_mode" != no; then 1.2191 + command="$base_compile $qsrcfile $pic_flag" 1.2192 + else 1.2193 + # Don't build PIC code 1.2194 + command="$base_compile $qsrcfile" 1.2195 + fi 1.2196 + 1.2197 + func_mkdir_p "$xdir$objdir" 1.2198 + 1.2199 + if test -z "$output_obj"; then 1.2200 + # Place PIC objects in $objdir 1.2201 + func_append command " -o $lobj" 1.2202 + fi 1.2203 + 1.2204 + func_show_eval_locale "$command" \ 1.2205 + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' 1.2206 + 1.2207 + if test "$need_locks" = warn && 1.2208 + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 1.2209 + $ECHO "\ 1.2210 +*** ERROR, $lockfile contains: 1.2211 +`cat $lockfile 2>/dev/null` 1.2212 + 1.2213 +but it should contain: 1.2214 +$srcfile 1.2215 + 1.2216 +This indicates that another process is trying to use the same 1.2217 +temporary object file, and libtool could not work around it because 1.2218 +your compiler does not support \`-c' and \`-o' together. If you 1.2219 +repeat this compilation, it may succeed, by chance, but you had better 1.2220 +avoid parallel builds (make -j) in this platform, or get a better 1.2221 +compiler." 1.2222 + 1.2223 + $opt_dry_run || $RM $removelist 1.2224 + exit $EXIT_FAILURE 1.2225 + fi 1.2226 + 1.2227 + # Just move the object if needed, then go on to compile the next one 1.2228 + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then 1.2229 + func_show_eval '$MV "$output_obj" "$lobj"' \ 1.2230 + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' 1.2231 + fi 1.2232 + 1.2233 + # Allow error messages only from the first compilation. 1.2234 + if test "$suppress_opt" = yes; then 1.2235 + suppress_output=' >/dev/null 2>&1' 1.2236 + fi 1.2237 + fi 1.2238 + 1.2239 + # Only build a position-dependent object if we build old libraries. 1.2240 + if test "$build_old_libs" = yes; then 1.2241 + if test "$pic_mode" != yes; then 1.2242 + # Don't build PIC code 1.2243 + command="$base_compile $qsrcfile$pie_flag" 1.2244 + else 1.2245 + command="$base_compile $qsrcfile $pic_flag" 1.2246 + fi 1.2247 + if test "$compiler_c_o" = yes; then 1.2248 + func_append command " -o $obj" 1.2249 + fi 1.2250 + 1.2251 + # Suppress compiler output if we already did a PIC compilation. 1.2252 + func_append command "$suppress_output" 1.2253 + func_show_eval_locale "$command" \ 1.2254 + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1.2255 + 1.2256 + if test "$need_locks" = warn && 1.2257 + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 1.2258 + $ECHO "\ 1.2259 +*** ERROR, $lockfile contains: 1.2260 +`cat $lockfile 2>/dev/null` 1.2261 + 1.2262 +but it should contain: 1.2263 +$srcfile 1.2264 + 1.2265 +This indicates that another process is trying to use the same 1.2266 +temporary object file, and libtool could not work around it because 1.2267 +your compiler does not support \`-c' and \`-o' together. If you 1.2268 +repeat this compilation, it may succeed, by chance, but you had better 1.2269 +avoid parallel builds (make -j) in this platform, or get a better 1.2270 +compiler." 1.2271 + 1.2272 + $opt_dry_run || $RM $removelist 1.2273 + exit $EXIT_FAILURE 1.2274 + fi 1.2275 + 1.2276 + # Just move the object if needed 1.2277 + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then 1.2278 + func_show_eval '$MV "$output_obj" "$obj"' \ 1.2279 + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' 1.2280 + fi 1.2281 + fi 1.2282 + 1.2283 + $opt_dry_run || { 1.2284 + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" 1.2285 + 1.2286 + # Unlock the critical section if it was locked 1.2287 + if test "$need_locks" != no; then 1.2288 + removelist=$lockfile 1.2289 + $RM "$lockfile" 1.2290 + fi 1.2291 + } 1.2292 + 1.2293 + exit $EXIT_SUCCESS 1.2294 +} 1.2295 + 1.2296 +$opt_help || { 1.2297 + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} 1.2298 +} 1.2299 + 1.2300 +func_mode_help () 1.2301 +{ 1.2302 + # We need to display help for each of the modes. 1.2303 + case $opt_mode in 1.2304 + "") 1.2305 + # Generic help is extracted from the usage comments 1.2306 + # at the start of this file. 1.2307 + func_help 1.2308 + ;; 1.2309 + 1.2310 + clean) 1.2311 + $ECHO \ 1.2312 +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... 1.2313 + 1.2314 +Remove files from the build directory. 1.2315 + 1.2316 +RM is the name of the program to use to delete files associated with each FILE 1.2317 +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed 1.2318 +to RM. 1.2319 + 1.2320 +If FILE is a libtool library, object or program, all the files associated 1.2321 +with it are deleted. Otherwise, only FILE itself is deleted using RM." 1.2322 + ;; 1.2323 + 1.2324 + compile) 1.2325 + $ECHO \ 1.2326 +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE 1.2327 + 1.2328 +Compile a source file into a libtool library object. 1.2329 + 1.2330 +This mode accepts the following additional options: 1.2331 + 1.2332 + -o OUTPUT-FILE set the output file name to OUTPUT-FILE 1.2333 + -no-suppress do not suppress compiler output for multiple passes 1.2334 + -prefer-pic try to build PIC objects only 1.2335 + -prefer-non-pic try to build non-PIC objects only 1.2336 + -shared do not build a \`.o' file suitable for static linking 1.2337 + -static only build a \`.o' file suitable for static linking 1.2338 + -Wc,FLAG pass FLAG directly to the compiler 1.2339 + 1.2340 +COMPILE-COMMAND is a command to be used in creating a \`standard' object file 1.2341 +from the given SOURCEFILE. 1.2342 + 1.2343 +The output file name is determined by removing the directory component from 1.2344 +SOURCEFILE, then substituting the C source code suffix \`.c' with the 1.2345 +library object suffix, \`.lo'." 1.2346 + ;; 1.2347 + 1.2348 + execute) 1.2349 + $ECHO \ 1.2350 +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... 1.2351 + 1.2352 +Automatically set library path, then run a program. 1.2353 + 1.2354 +This mode accepts the following additional options: 1.2355 + 1.2356 + -dlopen FILE add the directory containing FILE to the library path 1.2357 + 1.2358 +This mode sets the library path environment variable according to \`-dlopen' 1.2359 +flags. 1.2360 + 1.2361 +If any of the ARGS are libtool executable wrappers, then they are translated 1.2362 +into their corresponding uninstalled binary, and any of their required library 1.2363 +directories are added to the library path. 1.2364 + 1.2365 +Then, COMMAND is executed, with ARGS as arguments." 1.2366 + ;; 1.2367 + 1.2368 + finish) 1.2369 + $ECHO \ 1.2370 +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... 1.2371 + 1.2372 +Complete the installation of libtool libraries. 1.2373 + 1.2374 +Each LIBDIR is a directory that contains libtool libraries. 1.2375 + 1.2376 +The commands that this mode executes may require superuser privileges. Use 1.2377 +the \`--dry-run' option if you just want to see what would be executed." 1.2378 + ;; 1.2379 + 1.2380 + install) 1.2381 + $ECHO \ 1.2382 +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... 1.2383 + 1.2384 +Install executables or libraries. 1.2385 + 1.2386 +INSTALL-COMMAND is the installation command. The first component should be 1.2387 +either the \`install' or \`cp' program. 1.2388 + 1.2389 +The following components of INSTALL-COMMAND are treated specially: 1.2390 + 1.2391 + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation 1.2392 + 1.2393 +The rest of the components are interpreted as arguments to that command (only 1.2394 +BSD-compatible install options are recognized)." 1.2395 + ;; 1.2396 + 1.2397 + link) 1.2398 + $ECHO \ 1.2399 +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... 1.2400 + 1.2401 +Link object files or libraries together to form another library, or to 1.2402 +create an executable program. 1.2403 + 1.2404 +LINK-COMMAND is a command using the C compiler that you would use to create 1.2405 +a program from several object files. 1.2406 + 1.2407 +The following components of LINK-COMMAND are treated specially: 1.2408 + 1.2409 + -all-static do not do any dynamic linking at all 1.2410 + -avoid-version do not add a version suffix if possible 1.2411 + -bindir BINDIR specify path to binaries directory (for systems where 1.2412 + libraries must be found in the PATH setting at runtime) 1.2413 + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime 1.2414 + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols 1.2415 + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) 1.2416 + -export-symbols SYMFILE 1.2417 + try to export only the symbols listed in SYMFILE 1.2418 + -export-symbols-regex REGEX 1.2419 + try to export only the symbols matching REGEX 1.2420 + -LLIBDIR search LIBDIR for required installed libraries 1.2421 + -lNAME OUTPUT-FILE requires the installed library libNAME 1.2422 + -module build a library that can dlopened 1.2423 + -no-fast-install disable the fast-install mode 1.2424 + -no-install link a not-installable executable 1.2425 + -no-undefined declare that a library does not refer to external symbols 1.2426 + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects 1.2427 + -objectlist FILE Use a list of object files found in FILE to specify objects 1.2428 + -precious-files-regex REGEX 1.2429 + don't remove output files matching REGEX 1.2430 + -release RELEASE specify package release information 1.2431 + -rpath LIBDIR the created library will eventually be installed in LIBDIR 1.2432 + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries 1.2433 + -shared only do dynamic linking of libtool libraries 1.2434 + -shrext SUFFIX override the standard shared library file extension 1.2435 + -static do not do any dynamic linking of uninstalled libtool libraries 1.2436 + -static-libtool-libs 1.2437 + do not do any dynamic linking of libtool libraries 1.2438 + -version-info CURRENT[:REVISION[:AGE]] 1.2439 + specify library version info [each variable defaults to 0] 1.2440 + -weak LIBNAME declare that the target provides the LIBNAME interface 1.2441 + -Wc,FLAG 1.2442 + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler 1.2443 + -Wl,FLAG 1.2444 + -Xlinker FLAG pass linker-specific FLAG directly to the linker 1.2445 + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 1.2446 + 1.2447 +All other options (arguments beginning with \`-') are ignored. 1.2448 + 1.2449 +Every other argument is treated as a filename. Files ending in \`.la' are 1.2450 +treated as uninstalled libtool libraries, other files are standard or library 1.2451 +object files. 1.2452 + 1.2453 +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, 1.2454 +only library objects (\`.lo' files) may be specified, and \`-rpath' is 1.2455 +required, except when creating a convenience library. 1.2456 + 1.2457 +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created 1.2458 +using \`ar' and \`ranlib', or on Windows using \`lib'. 1.2459 + 1.2460 +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file 1.2461 +is created, otherwise an executable program is created." 1.2462 + ;; 1.2463 + 1.2464 + uninstall) 1.2465 + $ECHO \ 1.2466 +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... 1.2467 + 1.2468 +Remove libraries from an installation directory. 1.2469 + 1.2470 +RM is the name of the program to use to delete files associated with each FILE 1.2471 +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed 1.2472 +to RM. 1.2473 + 1.2474 +If FILE is a libtool library, all the files associated with it are deleted. 1.2475 +Otherwise, only FILE itself is deleted using RM." 1.2476 + ;; 1.2477 + 1.2478 + *) 1.2479 + func_fatal_help "invalid operation mode \`$opt_mode'" 1.2480 + ;; 1.2481 + esac 1.2482 + 1.2483 + echo 1.2484 + $ECHO "Try \`$progname --help' for more information about other modes." 1.2485 +} 1.2486 + 1.2487 +# Now that we've collected a possible --mode arg, show help if necessary 1.2488 +if $opt_help; then 1.2489 + if test "$opt_help" = :; then 1.2490 + func_mode_help 1.2491 + else 1.2492 + { 1.2493 + func_help noexit 1.2494 + for opt_mode in compile link execute install finish uninstall clean; do 1.2495 + func_mode_help 1.2496 + done 1.2497 + } | sed -n '1p; 2,$s/^Usage:/ or: /p' 1.2498 + { 1.2499 + func_help noexit 1.2500 + for opt_mode in compile link execute install finish uninstall clean; do 1.2501 + echo 1.2502 + func_mode_help 1.2503 + done 1.2504 + } | 1.2505 + sed '1d 1.2506 + /^When reporting/,/^Report/{ 1.2507 + H 1.2508 + d 1.2509 + } 1.2510 + $x 1.2511 + /information about other modes/d 1.2512 + /more detailed .*MODE/d 1.2513 + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' 1.2514 + fi 1.2515 + exit $? 1.2516 +fi 1.2517 + 1.2518 + 1.2519 +# func_mode_execute arg... 1.2520 +func_mode_execute () 1.2521 +{ 1.2522 + $opt_debug 1.2523 + # The first argument is the command name. 1.2524 + cmd="$nonopt" 1.2525 + test -z "$cmd" && \ 1.2526 + func_fatal_help "you must specify a COMMAND" 1.2527 + 1.2528 + # Handle -dlopen flags immediately. 1.2529 + for file in $opt_dlopen; do 1.2530 + test -f "$file" \ 1.2531 + || func_fatal_help "\`$file' is not a file" 1.2532 + 1.2533 + dir= 1.2534 + case $file in 1.2535 + *.la) 1.2536 + func_resolve_sysroot "$file" 1.2537 + file=$func_resolve_sysroot_result 1.2538 + 1.2539 + # Check to see that this really is a libtool archive. 1.2540 + func_lalib_unsafe_p "$file" \ 1.2541 + || func_fatal_help "\`$lib' is not a valid libtool archive" 1.2542 + 1.2543 + # Read the libtool library. 1.2544 + dlname= 1.2545 + library_names= 1.2546 + func_source "$file" 1.2547 + 1.2548 + # Skip this library if it cannot be dlopened. 1.2549 + if test -z "$dlname"; then 1.2550 + # Warn if it was a shared library. 1.2551 + test -n "$library_names" && \ 1.2552 + func_warning "\`$file' was not linked with \`-export-dynamic'" 1.2553 + continue 1.2554 + fi 1.2555 + 1.2556 + func_dirname "$file" "" "." 1.2557 + dir="$func_dirname_result" 1.2558 + 1.2559 + if test -f "$dir/$objdir/$dlname"; then 1.2560 + func_append dir "/$objdir" 1.2561 + else 1.2562 + if test ! -f "$dir/$dlname"; then 1.2563 + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1.2564 + fi 1.2565 + fi 1.2566 + ;; 1.2567 + 1.2568 + *.lo) 1.2569 + # Just add the directory containing the .lo file. 1.2570 + func_dirname "$file" "" "." 1.2571 + dir="$func_dirname_result" 1.2572 + ;; 1.2573 + 1.2574 + *) 1.2575 + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" 1.2576 + continue 1.2577 + ;; 1.2578 + esac 1.2579 + 1.2580 + # Get the absolute pathname. 1.2581 + absdir=`cd "$dir" && pwd` 1.2582 + test -n "$absdir" && dir="$absdir" 1.2583 + 1.2584 + # Now add the directory to shlibpath_var. 1.2585 + if eval "test -z \"\$$shlibpath_var\""; then 1.2586 + eval "$shlibpath_var=\"\$dir\"" 1.2587 + else 1.2588 + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" 1.2589 + fi 1.2590 + done 1.2591 + 1.2592 + # This variable tells wrapper scripts just to set shlibpath_var 1.2593 + # rather than running their programs. 1.2594 + libtool_execute_magic="$magic" 1.2595 + 1.2596 + # Check if any of the arguments is a wrapper script. 1.2597 + args= 1.2598 + for file 1.2599 + do 1.2600 + case $file in 1.2601 + -* | *.la | *.lo ) ;; 1.2602 + *) 1.2603 + # Do a test to see if this is really a libtool program. 1.2604 + if func_ltwrapper_script_p "$file"; then 1.2605 + func_source "$file" 1.2606 + # Transform arg to wrapped name. 1.2607 + file="$progdir/$program" 1.2608 + elif func_ltwrapper_executable_p "$file"; then 1.2609 + func_ltwrapper_scriptname "$file" 1.2610 + func_source "$func_ltwrapper_scriptname_result" 1.2611 + # Transform arg to wrapped name. 1.2612 + file="$progdir/$program" 1.2613 + fi 1.2614 + ;; 1.2615 + esac 1.2616 + # Quote arguments (to preserve shell metacharacters). 1.2617 + func_append_quoted args "$file" 1.2618 + done 1.2619 + 1.2620 + if test "X$opt_dry_run" = Xfalse; then 1.2621 + if test -n "$shlibpath_var"; then 1.2622 + # Export the shlibpath_var. 1.2623 + eval "export $shlibpath_var" 1.2624 + fi 1.2625 + 1.2626 + # Restore saved environment variables 1.2627 + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES 1.2628 + do 1.2629 + eval "if test \"\${save_$lt_var+set}\" = set; then 1.2630 + $lt_var=\$save_$lt_var; export $lt_var 1.2631 + else 1.2632 + $lt_unset $lt_var 1.2633 + fi" 1.2634 + done 1.2635 + 1.2636 + # Now prepare to actually exec the command. 1.2637 + exec_cmd="\$cmd$args" 1.2638 + else 1.2639 + # Display what would be done. 1.2640 + if test -n "$shlibpath_var"; then 1.2641 + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" 1.2642 + echo "export $shlibpath_var" 1.2643 + fi 1.2644 + $ECHO "$cmd$args" 1.2645 + exit $EXIT_SUCCESS 1.2646 + fi 1.2647 +} 1.2648 + 1.2649 +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} 1.2650 + 1.2651 + 1.2652 +# func_mode_finish arg... 1.2653 +func_mode_finish () 1.2654 +{ 1.2655 + $opt_debug 1.2656 + libs= 1.2657 + libdirs= 1.2658 + admincmds= 1.2659 + 1.2660 + for opt in "$nonopt" ${1+"$@"} 1.2661 + do 1.2662 + if test -d "$opt"; then 1.2663 + func_append libdirs " $opt" 1.2664 + 1.2665 + elif test -f "$opt"; then 1.2666 + if func_lalib_unsafe_p "$opt"; then 1.2667 + func_append libs " $opt" 1.2668 + else 1.2669 + func_warning "\`$opt' is not a valid libtool archive" 1.2670 + fi 1.2671 + 1.2672 + else 1.2673 + func_fatal_error "invalid argument \`$opt'" 1.2674 + fi 1.2675 + done 1.2676 + 1.2677 + if test -n "$libs"; then 1.2678 + if test -n "$lt_sysroot"; then 1.2679 + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` 1.2680 + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" 1.2681 + else 1.2682 + sysroot_cmd= 1.2683 + fi 1.2684 + 1.2685 + # Remove sysroot references 1.2686 + if $opt_dry_run; then 1.2687 + for lib in $libs; do 1.2688 + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" 1.2689 + done 1.2690 + else 1.2691 + tmpdir=`func_mktempdir` 1.2692 + for lib in $libs; do 1.2693 + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ 1.2694 + > $tmpdir/tmp-la 1.2695 + mv -f $tmpdir/tmp-la $lib 1.2696 + done 1.2697 + ${RM}r "$tmpdir" 1.2698 + fi 1.2699 + fi 1.2700 + 1.2701 + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then 1.2702 + for libdir in $libdirs; do 1.2703 + if test -n "$finish_cmds"; then 1.2704 + # Do each command in the finish commands. 1.2705 + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds 1.2706 +'"$cmd"'"' 1.2707 + fi 1.2708 + if test -n "$finish_eval"; then 1.2709 + # Do the single finish_eval. 1.2710 + eval cmds=\"$finish_eval\" 1.2711 + $opt_dry_run || eval "$cmds" || func_append admincmds " 1.2712 + $cmds" 1.2713 + fi 1.2714 + done 1.2715 + fi 1.2716 + 1.2717 + # Exit here if they wanted silent mode. 1.2718 + $opt_silent && exit $EXIT_SUCCESS 1.2719 + 1.2720 + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then 1.2721 + echo "----------------------------------------------------------------------" 1.2722 + echo "Libraries have been installed in:" 1.2723 + for libdir in $libdirs; do 1.2724 + $ECHO " $libdir" 1.2725 + done 1.2726 + echo 1.2727 + echo "If you ever happen to want to link against installed libraries" 1.2728 + echo "in a given directory, LIBDIR, you must either use libtool, and" 1.2729 + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" 1.2730 + echo "flag during linking and do at least one of the following:" 1.2731 + if test -n "$shlibpath_var"; then 1.2732 + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" 1.2733 + echo " during execution" 1.2734 + fi 1.2735 + if test -n "$runpath_var"; then 1.2736 + echo " - add LIBDIR to the \`$runpath_var' environment variable" 1.2737 + echo " during linking" 1.2738 + fi 1.2739 + if test -n "$hardcode_libdir_flag_spec"; then 1.2740 + libdir=LIBDIR 1.2741 + eval flag=\"$hardcode_libdir_flag_spec\" 1.2742 + 1.2743 + $ECHO " - use the \`$flag' linker flag" 1.2744 + fi 1.2745 + if test -n "$admincmds"; then 1.2746 + $ECHO " - have your system administrator run these commands:$admincmds" 1.2747 + fi 1.2748 + if test -f /etc/ld.so.conf; then 1.2749 + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" 1.2750 + fi 1.2751 + echo 1.2752 + 1.2753 + echo "See any operating system documentation about shared libraries for" 1.2754 + case $host in 1.2755 + solaris2.[6789]|solaris2.1[0-9]) 1.2756 + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" 1.2757 + echo "pages." 1.2758 + ;; 1.2759 + *) 1.2760 + echo "more information, such as the ld(1) and ld.so(8) manual pages." 1.2761 + ;; 1.2762 + esac 1.2763 + echo "----------------------------------------------------------------------" 1.2764 + fi 1.2765 + exit $EXIT_SUCCESS 1.2766 +} 1.2767 + 1.2768 +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} 1.2769 + 1.2770 + 1.2771 +# func_mode_install arg... 1.2772 +func_mode_install () 1.2773 +{ 1.2774 + $opt_debug 1.2775 + # There may be an optional sh(1) argument at the beginning of 1.2776 + # install_prog (especially on Windows NT). 1.2777 + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || 1.2778 + # Allow the use of GNU shtool's install command. 1.2779 + case $nonopt in *shtool*) :;; *) false;; esac; then 1.2780 + # Aesthetically quote it. 1.2781 + func_quote_for_eval "$nonopt" 1.2782 + install_prog="$func_quote_for_eval_result " 1.2783 + arg=$1 1.2784 + shift 1.2785 + else 1.2786 + install_prog= 1.2787 + arg=$nonopt 1.2788 + fi 1.2789 + 1.2790 + # The real first argument should be the name of the installation program. 1.2791 + # Aesthetically quote it. 1.2792 + func_quote_for_eval "$arg" 1.2793 + func_append install_prog "$func_quote_for_eval_result" 1.2794 + install_shared_prog=$install_prog 1.2795 + case " $install_prog " in 1.2796 + *[\\\ /]cp\ *) install_cp=: ;; 1.2797 + *) install_cp=false ;; 1.2798 + esac 1.2799 + 1.2800 + # We need to accept at least all the BSD install flags. 1.2801 + dest= 1.2802 + files= 1.2803 + opts= 1.2804 + prev= 1.2805 + install_type= 1.2806 + isdir=no 1.2807 + stripme= 1.2808 + no_mode=: 1.2809 + for arg 1.2810 + do 1.2811 + arg2= 1.2812 + if test -n "$dest"; then 1.2813 + func_append files " $dest" 1.2814 + dest=$arg 1.2815 + continue 1.2816 + fi 1.2817 + 1.2818 + case $arg in 1.2819 + -d) isdir=yes ;; 1.2820 + -f) 1.2821 + if $install_cp; then :; else 1.2822 + prev=$arg 1.2823 + fi 1.2824 + ;; 1.2825 + -g | -m | -o) 1.2826 + prev=$arg 1.2827 + ;; 1.2828 + -s) 1.2829 + stripme=" -s" 1.2830 + continue 1.2831 + ;; 1.2832 + -*) 1.2833 + ;; 1.2834 + *) 1.2835 + # If the previous option needed an argument, then skip it. 1.2836 + if test -n "$prev"; then 1.2837 + if test "x$prev" = x-m && test -n "$install_override_mode"; then 1.2838 + arg2=$install_override_mode 1.2839 + no_mode=false 1.2840 + fi 1.2841 + prev= 1.2842 + else 1.2843 + dest=$arg 1.2844 + continue 1.2845 + fi 1.2846 + ;; 1.2847 + esac 1.2848 + 1.2849 + # Aesthetically quote the argument. 1.2850 + func_quote_for_eval "$arg" 1.2851 + func_append install_prog " $func_quote_for_eval_result" 1.2852 + if test -n "$arg2"; then 1.2853 + func_quote_for_eval "$arg2" 1.2854 + fi 1.2855 + func_append install_shared_prog " $func_quote_for_eval_result" 1.2856 + done 1.2857 + 1.2858 + test -z "$install_prog" && \ 1.2859 + func_fatal_help "you must specify an install program" 1.2860 + 1.2861 + test -n "$prev" && \ 1.2862 + func_fatal_help "the \`$prev' option requires an argument" 1.2863 + 1.2864 + if test -n "$install_override_mode" && $no_mode; then 1.2865 + if $install_cp; then :; else 1.2866 + func_quote_for_eval "$install_override_mode" 1.2867 + func_append install_shared_prog " -m $func_quote_for_eval_result" 1.2868 + fi 1.2869 + fi 1.2870 + 1.2871 + if test -z "$files"; then 1.2872 + if test -z "$dest"; then 1.2873 + func_fatal_help "no file or destination specified" 1.2874 + else 1.2875 + func_fatal_help "you must specify a destination" 1.2876 + fi 1.2877 + fi 1.2878 + 1.2879 + # Strip any trailing slash from the destination. 1.2880 + func_stripname '' '/' "$dest" 1.2881 + dest=$func_stripname_result 1.2882 + 1.2883 + # Check to see that the destination is a directory. 1.2884 + test -d "$dest" && isdir=yes 1.2885 + if test "$isdir" = yes; then 1.2886 + destdir="$dest" 1.2887 + destname= 1.2888 + else 1.2889 + func_dirname_and_basename "$dest" "" "." 1.2890 + destdir="$func_dirname_result" 1.2891 + destname="$func_basename_result" 1.2892 + 1.2893 + # Not a directory, so check to see that there is only one file specified. 1.2894 + set dummy $files; shift 1.2895 + test "$#" -gt 1 && \ 1.2896 + func_fatal_help "\`$dest' is not a directory" 1.2897 + fi 1.2898 + case $destdir in 1.2899 + [\\/]* | [A-Za-z]:[\\/]*) ;; 1.2900 + *) 1.2901 + for file in $files; do 1.2902 + case $file in 1.2903 + *.lo) ;; 1.2904 + *) 1.2905 + func_fatal_help "\`$destdir' must be an absolute directory name" 1.2906 + ;; 1.2907 + esac 1.2908 + done 1.2909 + ;; 1.2910 + esac 1.2911 + 1.2912 + # This variable tells wrapper scripts just to set variables rather 1.2913 + # than running their programs. 1.2914 + libtool_install_magic="$magic" 1.2915 + 1.2916 + staticlibs= 1.2917 + future_libdirs= 1.2918 + current_libdirs= 1.2919 + for file in $files; do 1.2920 + 1.2921 + # Do each installation. 1.2922 + case $file in 1.2923 + *.$libext) 1.2924 + # Do the static libraries later. 1.2925 + func_append staticlibs " $file" 1.2926 + ;; 1.2927 + 1.2928 + *.la) 1.2929 + func_resolve_sysroot "$file" 1.2930 + file=$func_resolve_sysroot_result 1.2931 + 1.2932 + # Check to see that this really is a libtool archive. 1.2933 + func_lalib_unsafe_p "$file" \ 1.2934 + || func_fatal_help "\`$file' is not a valid libtool archive" 1.2935 + 1.2936 + library_names= 1.2937 + old_library= 1.2938 + relink_command= 1.2939 + func_source "$file" 1.2940 + 1.2941 + # Add the libdir to current_libdirs if it is the destination. 1.2942 + if test "X$destdir" = "X$libdir"; then 1.2943 + case "$current_libdirs " in 1.2944 + *" $libdir "*) ;; 1.2945 + *) func_append current_libdirs " $libdir" ;; 1.2946 + esac 1.2947 + else 1.2948 + # Note the libdir as a future libdir. 1.2949 + case "$future_libdirs " in 1.2950 + *" $libdir "*) ;; 1.2951 + *) func_append future_libdirs " $libdir" ;; 1.2952 + esac 1.2953 + fi 1.2954 + 1.2955 + func_dirname "$file" "/" "" 1.2956 + dir="$func_dirname_result" 1.2957 + func_append dir "$objdir" 1.2958 + 1.2959 + if test -n "$relink_command"; then 1.2960 + # Determine the prefix the user has applied to our future dir. 1.2961 + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` 1.2962 + 1.2963 + # Don't allow the user to place us outside of our expected 1.2964 + # location b/c this prevents finding dependent libraries that 1.2965 + # are installed to the same prefix. 1.2966 + # At present, this check doesn't affect windows .dll's that 1.2967 + # are installed into $libdir/../bin (currently, that works fine) 1.2968 + # but it's something to keep an eye on. 1.2969 + test "$inst_prefix_dir" = "$destdir" && \ 1.2970 + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" 1.2971 + 1.2972 + if test -n "$inst_prefix_dir"; then 1.2973 + # Stick the inst_prefix_dir data into the link command. 1.2974 + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` 1.2975 + else 1.2976 + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` 1.2977 + fi 1.2978 + 1.2979 + func_warning "relinking \`$file'" 1.2980 + func_show_eval "$relink_command" \ 1.2981 + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' 1.2982 + fi 1.2983 + 1.2984 + # See the names of the shared library. 1.2985 + set dummy $library_names; shift 1.2986 + if test -n "$1"; then 1.2987 + realname="$1" 1.2988 + shift 1.2989 + 1.2990 + srcname="$realname" 1.2991 + test -n "$relink_command" && srcname="$realname"T 1.2992 + 1.2993 + # Install the shared library and build the symlinks. 1.2994 + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 1.2995 + 'exit $?' 1.2996 + tstripme="$stripme" 1.2997 + case $host_os in 1.2998 + cygwin* | mingw* | pw32* | cegcc*) 1.2999 + case $realname in 1.3000 + *.dll.a) 1.3001 + tstripme="" 1.3002 + ;; 1.3003 + esac 1.3004 + ;; 1.3005 + esac 1.3006 + if test -n "$tstripme" && test -n "$striplib"; then 1.3007 + func_show_eval "$striplib $destdir/$realname" 'exit $?' 1.3008 + fi 1.3009 + 1.3010 + if test "$#" -gt 0; then 1.3011 + # Delete the old symlinks, and create new ones. 1.3012 + # Try `ln -sf' first, because the `ln' binary might depend on 1.3013 + # the symlink we replace! Solaris /bin/ln does not understand -f, 1.3014 + # so we also need to try rm && ln -s. 1.3015 + for linkname 1.3016 + do 1.3017 + test "$linkname" != "$realname" \ 1.3018 + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" 1.3019 + done 1.3020 + fi 1.3021 + 1.3022 + # Do each command in the postinstall commands. 1.3023 + lib="$destdir/$realname" 1.3024 + func_execute_cmds "$postinstall_cmds" 'exit $?' 1.3025 + fi 1.3026 + 1.3027 + # Install the pseudo-library for information purposes. 1.3028 + func_basename "$file" 1.3029 + name="$func_basename_result" 1.3030 + instname="$dir/$name"i 1.3031 + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' 1.3032 + 1.3033 + # Maybe install the static library, too. 1.3034 + test -n "$old_library" && func_append staticlibs " $dir/$old_library" 1.3035 + ;; 1.3036 + 1.3037 + *.lo) 1.3038 + # Install (i.e. copy) a libtool object. 1.3039 + 1.3040 + # Figure out destination file name, if it wasn't already specified. 1.3041 + if test -n "$destname"; then 1.3042 + destfile="$destdir/$destname" 1.3043 + else 1.3044 + func_basename "$file" 1.3045 + destfile="$func_basename_result" 1.3046 + destfile="$destdir/$destfile" 1.3047 + fi 1.3048 + 1.3049 + # Deduce the name of the destination old-style object file. 1.3050 + case $destfile in 1.3051 + *.lo) 1.3052 + func_lo2o "$destfile" 1.3053 + staticdest=$func_lo2o_result 1.3054 + ;; 1.3055 + *.$objext) 1.3056 + staticdest="$destfile" 1.3057 + destfile= 1.3058 + ;; 1.3059 + *) 1.3060 + func_fatal_help "cannot copy a libtool object to \`$destfile'" 1.3061 + ;; 1.3062 + esac 1.3063 + 1.3064 + # Install the libtool object if requested. 1.3065 + test -n "$destfile" && \ 1.3066 + func_show_eval "$install_prog $file $destfile" 'exit $?' 1.3067 + 1.3068 + # Install the old object if enabled. 1.3069 + if test "$build_old_libs" = yes; then 1.3070 + # Deduce the name of the old-style object file. 1.3071 + func_lo2o "$file" 1.3072 + staticobj=$func_lo2o_result 1.3073 + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' 1.3074 + fi 1.3075 + exit $EXIT_SUCCESS 1.3076 + ;; 1.3077 + 1.3078 + *) 1.3079 + # Figure out destination file name, if it wasn't already specified. 1.3080 + if test -n "$destname"; then 1.3081 + destfile="$destdir/$destname" 1.3082 + else 1.3083 + func_basename "$file" 1.3084 + destfile="$func_basename_result" 1.3085 + destfile="$destdir/$destfile" 1.3086 + fi 1.3087 + 1.3088 + # If the file is missing, and there is a .exe on the end, strip it 1.3089 + # because it is most likely a libtool script we actually want to 1.3090 + # install 1.3091 + stripped_ext="" 1.3092 + case $file in 1.3093 + *.exe) 1.3094 + if test ! -f "$file"; then 1.3095 + func_stripname '' '.exe' "$file" 1.3096 + file=$func_stripname_result 1.3097 + stripped_ext=".exe" 1.3098 + fi 1.3099 + ;; 1.3100 + esac 1.3101 + 1.3102 + # Do a test to see if this is really a libtool program. 1.3103 + case $host in 1.3104 + *cygwin* | *mingw*) 1.3105 + if func_ltwrapper_executable_p "$file"; then 1.3106 + func_ltwrapper_scriptname "$file" 1.3107 + wrapper=$func_ltwrapper_scriptname_result 1.3108 + else 1.3109 + func_stripname '' '.exe' "$file" 1.3110 + wrapper=$func_stripname_result 1.3111 + fi 1.3112 + ;; 1.3113 + *) 1.3114 + wrapper=$file 1.3115 + ;; 1.3116 + esac 1.3117 + if func_ltwrapper_script_p "$wrapper"; then 1.3118 + notinst_deplibs= 1.3119 + relink_command= 1.3120 + 1.3121 + func_source "$wrapper" 1.3122 + 1.3123 + # Check the variables that should have been set. 1.3124 + test -z "$generated_by_libtool_version" && \ 1.3125 + func_fatal_error "invalid libtool wrapper script \`$wrapper'" 1.3126 + 1.3127 + finalize=yes 1.3128 + for lib in $notinst_deplibs; do 1.3129 + # Check to see that each library is installed. 1.3130 + libdir= 1.3131 + if test -f "$lib"; then 1.3132 + func_source "$lib" 1.3133 + fi 1.3134 + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test 1.3135 + if test -n "$libdir" && test ! -f "$libfile"; then 1.3136 + func_warning "\`$lib' has not been installed in \`$libdir'" 1.3137 + finalize=no 1.3138 + fi 1.3139 + done 1.3140 + 1.3141 + relink_command= 1.3142 + func_source "$wrapper" 1.3143 + 1.3144 + outputname= 1.3145 + if test "$fast_install" = no && test -n "$relink_command"; then 1.3146 + $opt_dry_run || { 1.3147 + if test "$finalize" = yes; then 1.3148 + tmpdir=`func_mktempdir` 1.3149 + func_basename "$file$stripped_ext" 1.3150 + file="$func_basename_result" 1.3151 + outputname="$tmpdir/$file" 1.3152 + # Replace the output file specification. 1.3153 + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` 1.3154 + 1.3155 + $opt_silent || { 1.3156 + func_quote_for_expand "$relink_command" 1.3157 + eval "func_echo $func_quote_for_expand_result" 1.3158 + } 1.3159 + if eval "$relink_command"; then : 1.3160 + else 1.3161 + func_error "error: relink \`$file' with the above command before installing it" 1.3162 + $opt_dry_run || ${RM}r "$tmpdir" 1.3163 + continue 1.3164 + fi 1.3165 + file="$outputname" 1.3166 + else 1.3167 + func_warning "cannot relink \`$file'" 1.3168 + fi 1.3169 + } 1.3170 + else 1.3171 + # Install the binary that we compiled earlier. 1.3172 + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` 1.3173 + fi 1.3174 + fi 1.3175 + 1.3176 + # remove .exe since cygwin /usr/bin/install will append another 1.3177 + # one anyway 1.3178 + case $install_prog,$host in 1.3179 + */usr/bin/install*,*cygwin*) 1.3180 + case $file:$destfile in 1.3181 + *.exe:*.exe) 1.3182 + # this is ok 1.3183 + ;; 1.3184 + *.exe:*) 1.3185 + destfile=$destfile.exe 1.3186 + ;; 1.3187 + *:*.exe) 1.3188 + func_stripname '' '.exe' "$destfile" 1.3189 + destfile=$func_stripname_result 1.3190 + ;; 1.3191 + esac 1.3192 + ;; 1.3193 + esac 1.3194 + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' 1.3195 + $opt_dry_run || if test -n "$outputname"; then 1.3196 + ${RM}r "$tmpdir" 1.3197 + fi 1.3198 + ;; 1.3199 + esac 1.3200 + done 1.3201 + 1.3202 + for file in $staticlibs; do 1.3203 + func_basename "$file" 1.3204 + name="$func_basename_result" 1.3205 + 1.3206 + # Set up the ranlib parameters. 1.3207 + oldlib="$destdir/$name" 1.3208 + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 1.3209 + tool_oldlib=$func_to_tool_file_result 1.3210 + 1.3211 + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' 1.3212 + 1.3213 + if test -n "$stripme" && test -n "$old_striplib"; then 1.3214 + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' 1.3215 + fi 1.3216 + 1.3217 + # Do each command in the postinstall commands. 1.3218 + func_execute_cmds "$old_postinstall_cmds" 'exit $?' 1.3219 + done 1.3220 + 1.3221 + test -n "$future_libdirs" && \ 1.3222 + func_warning "remember to run \`$progname --finish$future_libdirs'" 1.3223 + 1.3224 + if test -n "$current_libdirs"; then 1.3225 + # Maybe just do a dry run. 1.3226 + $opt_dry_run && current_libdirs=" -n$current_libdirs" 1.3227 + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' 1.3228 + else 1.3229 + exit $EXIT_SUCCESS 1.3230 + fi 1.3231 +} 1.3232 + 1.3233 +test "$opt_mode" = install && func_mode_install ${1+"$@"} 1.3234 + 1.3235 + 1.3236 +# func_generate_dlsyms outputname originator pic_p 1.3237 +# Extract symbols from dlprefiles and create ${outputname}S.o with 1.3238 +# a dlpreopen symbol table. 1.3239 +func_generate_dlsyms () 1.3240 +{ 1.3241 + $opt_debug 1.3242 + my_outputname="$1" 1.3243 + my_originator="$2" 1.3244 + my_pic_p="${3-no}" 1.3245 + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` 1.3246 + my_dlsyms= 1.3247 + 1.3248 + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 1.3249 + if test -n "$NM" && test -n "$global_symbol_pipe"; then 1.3250 + my_dlsyms="${my_outputname}S.c" 1.3251 + else 1.3252 + func_error "not configured to extract global symbols from dlpreopened files" 1.3253 + fi 1.3254 + fi 1.3255 + 1.3256 + if test -n "$my_dlsyms"; then 1.3257 + case $my_dlsyms in 1.3258 + "") ;; 1.3259 + *.c) 1.3260 + # Discover the nlist of each of the dlfiles. 1.3261 + nlist="$output_objdir/${my_outputname}.nm" 1.3262 + 1.3263 + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" 1.3264 + 1.3265 + # Parse the name list into a source file. 1.3266 + func_verbose "creating $output_objdir/$my_dlsyms" 1.3267 + 1.3268 + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ 1.3269 +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ 1.3270 +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ 1.3271 + 1.3272 +#ifdef __cplusplus 1.3273 +extern \"C\" { 1.3274 +#endif 1.3275 + 1.3276 +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) 1.3277 +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" 1.3278 +#endif 1.3279 + 1.3280 +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 1.3281 +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 1.3282 +/* DATA imports from DLLs on WIN32 con't be const, because runtime 1.3283 + relocations are performed -- see ld's documentation on pseudo-relocs. */ 1.3284 +# define LT_DLSYM_CONST 1.3285 +#elif defined(__osf__) 1.3286 +/* This system does not cope well with relocations in const data. */ 1.3287 +# define LT_DLSYM_CONST 1.3288 +#else 1.3289 +# define LT_DLSYM_CONST const 1.3290 +#endif 1.3291 + 1.3292 +/* External symbol declarations for the compiler. */\ 1.3293 +" 1.3294 + 1.3295 + if test "$dlself" = yes; then 1.3296 + func_verbose "generating symbol list for \`$output'" 1.3297 + 1.3298 + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" 1.3299 + 1.3300 + # Add our own program objects to the symbol list. 1.3301 + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` 1.3302 + for progfile in $progfiles; do 1.3303 + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 1.3304 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" 1.3305 + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" 1.3306 + done 1.3307 + 1.3308 + if test -n "$exclude_expsyms"; then 1.3309 + $opt_dry_run || { 1.3310 + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' 1.3311 + eval '$MV "$nlist"T "$nlist"' 1.3312 + } 1.3313 + fi 1.3314 + 1.3315 + if test -n "$export_symbols_regex"; then 1.3316 + $opt_dry_run || { 1.3317 + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' 1.3318 + eval '$MV "$nlist"T "$nlist"' 1.3319 + } 1.3320 + fi 1.3321 + 1.3322 + # Prepare the list of exported symbols 1.3323 + if test -z "$export_symbols"; then 1.3324 + export_symbols="$output_objdir/$outputname.exp" 1.3325 + $opt_dry_run || { 1.3326 + $RM $export_symbols 1.3327 + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' 1.3328 + case $host in 1.3329 + *cygwin* | *mingw* | *cegcc* ) 1.3330 + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' 1.3331 + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' 1.3332 + ;; 1.3333 + esac 1.3334 + } 1.3335 + else 1.3336 + $opt_dry_run || { 1.3337 + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' 1.3338 + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' 1.3339 + eval '$MV "$nlist"T "$nlist"' 1.3340 + case $host in 1.3341 + *cygwin* | *mingw* | *cegcc* ) 1.3342 + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' 1.3343 + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' 1.3344 + ;; 1.3345 + esac 1.3346 + } 1.3347 + fi 1.3348 + fi 1.3349 + 1.3350 + for dlprefile in $dlprefiles; do 1.3351 + func_verbose "extracting global C symbols from \`$dlprefile'" 1.3352 + func_basename "$dlprefile" 1.3353 + name="$func_basename_result" 1.3354 + case $host in 1.3355 + *cygwin* | *mingw* | *cegcc* ) 1.3356 + # if an import library, we need to obtain dlname 1.3357 + if func_win32_import_lib_p "$dlprefile"; then 1.3358 + func_tr_sh "$dlprefile" 1.3359 + eval "curr_lafile=\$libfile_$func_tr_sh_result" 1.3360 + dlprefile_dlbasename="" 1.3361 + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then 1.3362 + # Use subshell, to avoid clobbering current variable values 1.3363 + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` 1.3364 + if test -n "$dlprefile_dlname" ; then 1.3365 + func_basename "$dlprefile_dlname" 1.3366 + dlprefile_dlbasename="$func_basename_result" 1.3367 + else 1.3368 + # no lafile. user explicitly requested -dlpreopen <import library>. 1.3369 + $sharedlib_from_linklib_cmd "$dlprefile" 1.3370 + dlprefile_dlbasename=$sharedlib_from_linklib_result 1.3371 + fi 1.3372 + fi 1.3373 + $opt_dry_run || { 1.3374 + if test -n "$dlprefile_dlbasename" ; then 1.3375 + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' 1.3376 + else 1.3377 + func_warning "Could not compute DLL name from $name" 1.3378 + eval '$ECHO ": $name " >> "$nlist"' 1.3379 + fi 1.3380 + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 1.3381 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | 1.3382 + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" 1.3383 + } 1.3384 + else # not an import lib 1.3385 + $opt_dry_run || { 1.3386 + eval '$ECHO ": $name " >> "$nlist"' 1.3387 + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 1.3388 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" 1.3389 + } 1.3390 + fi 1.3391 + ;; 1.3392 + *) 1.3393 + $opt_dry_run || { 1.3394 + eval '$ECHO ": $name " >> "$nlist"' 1.3395 + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 1.3396 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" 1.3397 + } 1.3398 + ;; 1.3399 + esac 1.3400 + done 1.3401 + 1.3402 + $opt_dry_run || { 1.3403 + # Make sure we have at least an empty file. 1.3404 + test -f "$nlist" || : > "$nlist" 1.3405 + 1.3406 + if test -n "$exclude_expsyms"; then 1.3407 + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T 1.3408 + $MV "$nlist"T "$nlist" 1.3409 + fi 1.3410 + 1.3411 + # Try sorting and uniquifying the output. 1.3412 + if $GREP -v "^: " < "$nlist" | 1.3413 + if sort -k 3 </dev/null >/dev/null 2>&1; then 1.3414 + sort -k 3 1.3415 + else 1.3416 + sort +2 1.3417 + fi | 1.3418 + uniq > "$nlist"S; then 1.3419 + : 1.3420 + else 1.3421 + $GREP -v "^: " < "$nlist" > "$nlist"S 1.3422 + fi 1.3423 + 1.3424 + if test -f "$nlist"S; then 1.3425 + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' 1.3426 + else 1.3427 + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" 1.3428 + fi 1.3429 + 1.3430 + echo >> "$output_objdir/$my_dlsyms" "\ 1.3431 + 1.3432 +/* The mapping between symbol names and symbols. */ 1.3433 +typedef struct { 1.3434 + const char *name; 1.3435 + void *address; 1.3436 +} lt_dlsymlist; 1.3437 +extern LT_DLSYM_CONST lt_dlsymlist 1.3438 +lt_${my_prefix}_LTX_preloaded_symbols[]; 1.3439 +LT_DLSYM_CONST lt_dlsymlist 1.3440 +lt_${my_prefix}_LTX_preloaded_symbols[] = 1.3441 +{\ 1.3442 + { \"$my_originator\", (void *) 0 }," 1.3443 + 1.3444 + case $need_lib_prefix in 1.3445 + no) 1.3446 + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" 1.3447 + ;; 1.3448 + *) 1.3449 + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" 1.3450 + ;; 1.3451 + esac 1.3452 + echo >> "$output_objdir/$my_dlsyms" "\ 1.3453 + {0, (void *) 0} 1.3454 +}; 1.3455 + 1.3456 +/* This works around a problem in FreeBSD linker */ 1.3457 +#ifdef FREEBSD_WORKAROUND 1.3458 +static const void *lt_preloaded_setup() { 1.3459 + return lt_${my_prefix}_LTX_preloaded_symbols; 1.3460 +} 1.3461 +#endif 1.3462 + 1.3463 +#ifdef __cplusplus 1.3464 +} 1.3465 +#endif\ 1.3466 +" 1.3467 + } # !$opt_dry_run 1.3468 + 1.3469 + pic_flag_for_symtable= 1.3470 + case "$compile_command " in 1.3471 + *" -static "*) ;; 1.3472 + *) 1.3473 + case $host in 1.3474 + # compiling the symbol table file with pic_flag works around 1.3475 + # a FreeBSD bug that causes programs to crash when -lm is 1.3476 + # linked before any other PIC object. But we must not use 1.3477 + # pic_flag when linking with -static. The problem exists in 1.3478 + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. 1.3479 + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) 1.3480 + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; 1.3481 + *-*-hpux*) 1.3482 + pic_flag_for_symtable=" $pic_flag" ;; 1.3483 + *) 1.3484 + if test "X$my_pic_p" != Xno; then 1.3485 + pic_flag_for_symtable=" $pic_flag" 1.3486 + fi 1.3487 + ;; 1.3488 + esac 1.3489 + ;; 1.3490 + esac 1.3491 + symtab_cflags= 1.3492 + for arg in $LTCFLAGS; do 1.3493 + case $arg in 1.3494 + -pie | -fpie | -fPIE) ;; 1.3495 + *) func_append symtab_cflags " $arg" ;; 1.3496 + esac 1.3497 + done 1.3498 + 1.3499 + # Now compile the dynamic symbol file. 1.3500 + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' 1.3501 + 1.3502 + # Clean up the generated files. 1.3503 + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' 1.3504 + 1.3505 + # Transform the symbol file into the correct name. 1.3506 + symfileobj="$output_objdir/${my_outputname}S.$objext" 1.3507 + case $host in 1.3508 + *cygwin* | *mingw* | *cegcc* ) 1.3509 + if test -f "$output_objdir/$my_outputname.def"; then 1.3510 + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` 1.3511 + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` 1.3512 + else 1.3513 + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` 1.3514 + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` 1.3515 + fi 1.3516 + ;; 1.3517 + *) 1.3518 + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` 1.3519 + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` 1.3520 + ;; 1.3521 + esac 1.3522 + ;; 1.3523 + *) 1.3524 + func_fatal_error "unknown suffix for \`$my_dlsyms'" 1.3525 + ;; 1.3526 + esac 1.3527 + else 1.3528 + # We keep going just in case the user didn't refer to 1.3529 + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe 1.3530 + # really was required. 1.3531 + 1.3532 + # Nullify the symbol file. 1.3533 + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` 1.3534 + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` 1.3535 + fi 1.3536 +} 1.3537 + 1.3538 +# func_win32_libid arg 1.3539 +# return the library type of file 'arg' 1.3540 +# 1.3541 +# Need a lot of goo to handle *both* DLLs and import libs 1.3542 +# Has to be a shell function in order to 'eat' the argument 1.3543 +# that is supplied when $file_magic_command is called. 1.3544 +# Despite the name, also deal with 64 bit binaries. 1.3545 +func_win32_libid () 1.3546 +{ 1.3547 + $opt_debug 1.3548 + win32_libid_type="unknown" 1.3549 + win32_fileres=`file -L $1 2>/dev/null` 1.3550 + case $win32_fileres in 1.3551 + *ar\ archive\ import\ library*) # definitely import 1.3552 + win32_libid_type="x86 archive import" 1.3553 + ;; 1.3554 + *ar\ archive*) # could be an import, or static 1.3555 + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. 1.3556 + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | 1.3557 + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then 1.3558 + func_to_tool_file "$1" func_convert_file_msys_to_w32 1.3559 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | 1.3560 + $SED -n -e ' 1.3561 + 1,100{ 1.3562 + / I /{ 1.3563 + s,.*,import, 1.3564 + p 1.3565 + q 1.3566 + } 1.3567 + }'` 1.3568 + case $win32_nmres in 1.3569 + import*) win32_libid_type="x86 archive import";; 1.3570 + *) win32_libid_type="x86 archive static";; 1.3571 + esac 1.3572 + fi 1.3573 + ;; 1.3574 + *DLL*) 1.3575 + win32_libid_type="x86 DLL" 1.3576 + ;; 1.3577 + *executable*) # but shell scripts are "executable" too... 1.3578 + case $win32_fileres in 1.3579 + *MS\ Windows\ PE\ Intel*) 1.3580 + win32_libid_type="x86 DLL" 1.3581 + ;; 1.3582 + esac 1.3583 + ;; 1.3584 + esac 1.3585 + $ECHO "$win32_libid_type" 1.3586 +} 1.3587 + 1.3588 +# func_cygming_dll_for_implib ARG 1.3589 +# 1.3590 +# Platform-specific function to extract the 1.3591 +# name of the DLL associated with the specified 1.3592 +# import library ARG. 1.3593 +# Invoked by eval'ing the libtool variable 1.3594 +# $sharedlib_from_linklib_cmd 1.3595 +# Result is available in the variable 1.3596 +# $sharedlib_from_linklib_result 1.3597 +func_cygming_dll_for_implib () 1.3598 +{ 1.3599 + $opt_debug 1.3600 + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` 1.3601 +} 1.3602 + 1.3603 +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs 1.3604 +# 1.3605 +# The is the core of a fallback implementation of a 1.3606 +# platform-specific function to extract the name of the 1.3607 +# DLL associated with the specified import library LIBNAME. 1.3608 +# 1.3609 +# SECTION_NAME is either .idata$6 or .idata$7, depending 1.3610 +# on the platform and compiler that created the implib. 1.3611 +# 1.3612 +# Echos the name of the DLL associated with the 1.3613 +# specified import library. 1.3614 +func_cygming_dll_for_implib_fallback_core () 1.3615 +{ 1.3616 + $opt_debug 1.3617 + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` 1.3618 + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | 1.3619 + $SED '/^Contents of section '"$match_literal"':/{ 1.3620 + # Place marker at beginning of archive member dllname section 1.3621 + s/.*/====MARK====/ 1.3622 + p 1.3623 + d 1.3624 + } 1.3625 + # These lines can sometimes be longer than 43 characters, but 1.3626 + # are always uninteresting 1.3627 + /:[ ]*file format pe[i]\{,1\}-/d 1.3628 + /^In archive [^:]*:/d 1.3629 + # Ensure marker is printed 1.3630 + /^====MARK====/p 1.3631 + # Remove all lines with less than 43 characters 1.3632 + /^.\{43\}/!d 1.3633 + # From remaining lines, remove first 43 characters 1.3634 + s/^.\{43\}//' | 1.3635 + $SED -n ' 1.3636 + # Join marker and all lines until next marker into a single line 1.3637 + /^====MARK====/ b para 1.3638 + H 1.3639 + $ b para 1.3640 + b 1.3641 + :para 1.3642 + x 1.3643 + s/\n//g 1.3644 + # Remove the marker 1.3645 + s/^====MARK====// 1.3646 + # Remove trailing dots and whitespace 1.3647 + s/[\. \t]*$// 1.3648 + # Print 1.3649 + /./p' | 1.3650 + # we now have a list, one entry per line, of the stringified 1.3651 + # contents of the appropriate section of all members of the 1.3652 + # archive which possess that section. Heuristic: eliminate 1.3653 + # all those which have a first or second character that is 1.3654 + # a '.' (that is, objdump's representation of an unprintable 1.3655 + # character.) This should work for all archives with less than 1.3656 + # 0x302f exports -- but will fail for DLLs whose name actually 1.3657 + # begins with a literal '.' or a single character followed by 1.3658 + # a '.'. 1.3659 + # 1.3660 + # Of those that remain, print the first one. 1.3661 + $SED -e '/^\./d;/^.\./d;q' 1.3662 +} 1.3663 + 1.3664 +# func_cygming_gnu_implib_p ARG 1.3665 +# This predicate returns with zero status (TRUE) if 1.3666 +# ARG is a GNU/binutils-style import library. Returns 1.3667 +# with nonzero status (FALSE) otherwise. 1.3668 +func_cygming_gnu_implib_p () 1.3669 +{ 1.3670 + $opt_debug 1.3671 + func_to_tool_file "$1" func_convert_file_msys_to_w32 1.3672 + 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)$'` 1.3673 + test -n "$func_cygming_gnu_implib_tmp" 1.3674 +} 1.3675 + 1.3676 +# func_cygming_ms_implib_p ARG 1.3677 +# This predicate returns with zero status (TRUE) if 1.3678 +# ARG is an MS-style import library. Returns 1.3679 +# with nonzero status (FALSE) otherwise. 1.3680 +func_cygming_ms_implib_p () 1.3681 +{ 1.3682 + $opt_debug 1.3683 + func_to_tool_file "$1" func_convert_file_msys_to_w32 1.3684 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` 1.3685 + test -n "$func_cygming_ms_implib_tmp" 1.3686 +} 1.3687 + 1.3688 +# func_cygming_dll_for_implib_fallback ARG 1.3689 +# Platform-specific function to extract the 1.3690 +# name of the DLL associated with the specified 1.3691 +# import library ARG. 1.3692 +# 1.3693 +# This fallback implementation is for use when $DLLTOOL 1.3694 +# does not support the --identify-strict option. 1.3695 +# Invoked by eval'ing the libtool variable 1.3696 +# $sharedlib_from_linklib_cmd 1.3697 +# Result is available in the variable 1.3698 +# $sharedlib_from_linklib_result 1.3699 +func_cygming_dll_for_implib_fallback () 1.3700 +{ 1.3701 + $opt_debug 1.3702 + if func_cygming_gnu_implib_p "$1" ; then 1.3703 + # binutils import library 1.3704 + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` 1.3705 + elif func_cygming_ms_implib_p "$1" ; then 1.3706 + # ms-generated import library 1.3707 + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` 1.3708 + else 1.3709 + # unknown 1.3710 + sharedlib_from_linklib_result="" 1.3711 + fi 1.3712 +} 1.3713 + 1.3714 + 1.3715 +# func_extract_an_archive dir oldlib 1.3716 +func_extract_an_archive () 1.3717 +{ 1.3718 + $opt_debug 1.3719 + f_ex_an_ar_dir="$1"; shift 1.3720 + f_ex_an_ar_oldlib="$1" 1.3721 + if test "$lock_old_archive_extraction" = yes; then 1.3722 + lockfile=$f_ex_an_ar_oldlib.lock 1.3723 + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do 1.3724 + func_echo "Waiting for $lockfile to be removed" 1.3725 + sleep 2 1.3726 + done 1.3727 + fi 1.3728 + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 1.3729 + 'stat=$?; rm -f "$lockfile"; exit $stat' 1.3730 + if test "$lock_old_archive_extraction" = yes; then 1.3731 + $opt_dry_run || rm -f "$lockfile" 1.3732 + fi 1.3733 + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then 1.3734 + : 1.3735 + else 1.3736 + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1.3737 + fi 1.3738 +} 1.3739 + 1.3740 + 1.3741 +# func_extract_archives gentop oldlib ... 1.3742 +func_extract_archives () 1.3743 +{ 1.3744 + $opt_debug 1.3745 + my_gentop="$1"; shift 1.3746 + my_oldlibs=${1+"$@"} 1.3747 + my_oldobjs="" 1.3748 + my_xlib="" 1.3749 + my_xabs="" 1.3750 + my_xdir="" 1.3751 + 1.3752 + for my_xlib in $my_oldlibs; do 1.3753 + # Extract the objects. 1.3754 + case $my_xlib in 1.3755 + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; 1.3756 + *) my_xabs=`pwd`"/$my_xlib" ;; 1.3757 + esac 1.3758 + func_basename "$my_xlib" 1.3759 + my_xlib="$func_basename_result" 1.3760 + my_xlib_u=$my_xlib 1.3761 + while :; do 1.3762 + case " $extracted_archives " in 1.3763 + *" $my_xlib_u "*) 1.3764 + func_arith $extracted_serial + 1 1.3765 + extracted_serial=$func_arith_result 1.3766 + my_xlib_u=lt$extracted_serial-$my_xlib ;; 1.3767 + *) break ;; 1.3768 + esac 1.3769 + done 1.3770 + extracted_archives="$extracted_archives $my_xlib_u" 1.3771 + my_xdir="$my_gentop/$my_xlib_u" 1.3772 + 1.3773 + func_mkdir_p "$my_xdir" 1.3774 + 1.3775 + case $host in 1.3776 + *-darwin*) 1.3777 + func_verbose "Extracting $my_xabs" 1.3778 + # Do not bother doing anything if just a dry run 1.3779 + $opt_dry_run || { 1.3780 + darwin_orig_dir=`pwd` 1.3781 + cd $my_xdir || exit $? 1.3782 + darwin_archive=$my_xabs 1.3783 + darwin_curdir=`pwd` 1.3784 + darwin_base_archive=`basename "$darwin_archive"` 1.3785 + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` 1.3786 + if test -n "$darwin_arches"; then 1.3787 + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` 1.3788 + darwin_arch= 1.3789 + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" 1.3790 + for darwin_arch in $darwin_arches ; do 1.3791 + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" 1.3792 + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" 1.3793 + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" 1.3794 + func_extract_an_archive "`pwd`" "${darwin_base_archive}" 1.3795 + cd "$darwin_curdir" 1.3796 + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" 1.3797 + done # $darwin_arches 1.3798 + ## Okay now we've a bunch of thin objects, gotta fatten them up :) 1.3799 + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` 1.3800 + darwin_file= 1.3801 + darwin_files= 1.3802 + for darwin_file in $darwin_filelist; do 1.3803 + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` 1.3804 + $LIPO -create -output "$darwin_file" $darwin_files 1.3805 + done # $darwin_filelist 1.3806 + $RM -rf unfat-$$ 1.3807 + cd "$darwin_orig_dir" 1.3808 + else 1.3809 + cd $darwin_orig_dir 1.3810 + func_extract_an_archive "$my_xdir" "$my_xabs" 1.3811 + fi # $darwin_arches 1.3812 + } # !$opt_dry_run 1.3813 + ;; 1.3814 + *) 1.3815 + func_extract_an_archive "$my_xdir" "$my_xabs" 1.3816 + ;; 1.3817 + esac 1.3818 + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` 1.3819 + done 1.3820 + 1.3821 + func_extract_archives_result="$my_oldobjs" 1.3822 +} 1.3823 + 1.3824 + 1.3825 +# func_emit_wrapper [arg=no] 1.3826 +# 1.3827 +# Emit a libtool wrapper script on stdout. 1.3828 +# Don't directly open a file because we may want to 1.3829 +# incorporate the script contents within a cygwin/mingw 1.3830 +# wrapper executable. Must ONLY be called from within 1.3831 +# func_mode_link because it depends on a number of variables 1.3832 +# set therein. 1.3833 +# 1.3834 +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR 1.3835 +# variable will take. If 'yes', then the emitted script 1.3836 +# will assume that the directory in which it is stored is 1.3837 +# the $objdir directory. This is a cygwin/mingw-specific 1.3838 +# behavior. 1.3839 +func_emit_wrapper () 1.3840 +{ 1.3841 + func_emit_wrapper_arg1=${1-no} 1.3842 + 1.3843 + $ECHO "\ 1.3844 +#! $SHELL 1.3845 + 1.3846 +# $output - temporary wrapper script for $objdir/$outputname 1.3847 +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION 1.3848 +# 1.3849 +# The $output program cannot be directly executed until all the libtool 1.3850 +# libraries that it depends on are installed. 1.3851 +# 1.3852 +# This wrapper script should never be moved out of the build directory. 1.3853 +# If it is, it will not operate correctly. 1.3854 + 1.3855 +# Sed substitution that helps us do robust quoting. It backslashifies 1.3856 +# metacharacters that are still active within double-quoted strings. 1.3857 +sed_quote_subst='$sed_quote_subst' 1.3858 + 1.3859 +# Be Bourne compatible 1.3860 +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then 1.3861 + emulate sh 1.3862 + NULLCMD=: 1.3863 + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which 1.3864 + # is contrary to our usage. Disable this feature. 1.3865 + alias -g '\${1+\"\$@\"}'='\"\$@\"' 1.3866 + setopt NO_GLOB_SUBST 1.3867 +else 1.3868 + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac 1.3869 +fi 1.3870 +BIN_SH=xpg4; export BIN_SH # for Tru64 1.3871 +DUALCASE=1; export DUALCASE # for MKS sh 1.3872 + 1.3873 +# The HP-UX ksh and POSIX shell print the target directory to stdout 1.3874 +# if CDPATH is set. 1.3875 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1.3876 + 1.3877 +relink_command=\"$relink_command\" 1.3878 + 1.3879 +# This environment variable determines our operation mode. 1.3880 +if test \"\$libtool_install_magic\" = \"$magic\"; then 1.3881 + # install mode needs the following variables: 1.3882 + generated_by_libtool_version='$macro_version' 1.3883 + notinst_deplibs='$notinst_deplibs' 1.3884 +else 1.3885 + # When we are sourced in execute mode, \$file and \$ECHO are already set. 1.3886 + if test \"\$libtool_execute_magic\" != \"$magic\"; then 1.3887 + file=\"\$0\"" 1.3888 + 1.3889 + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` 1.3890 + $ECHO "\ 1.3891 + 1.3892 +# A function that is used when there is no print builtin or printf. 1.3893 +func_fallback_echo () 1.3894 +{ 1.3895 + eval 'cat <<_LTECHO_EOF 1.3896 +\$1 1.3897 +_LTECHO_EOF' 1.3898 +} 1.3899 + ECHO=\"$qECHO\" 1.3900 + fi 1.3901 + 1.3902 +# Very basic option parsing. These options are (a) specific to 1.3903 +# the libtool wrapper, (b) are identical between the wrapper 1.3904 +# /script/ and the wrapper /executable/ which is used only on 1.3905 +# windows platforms, and (c) all begin with the string "--lt-" 1.3906 +# (application programs are unlikely to have options which match 1.3907 +# this pattern). 1.3908 +# 1.3909 +# There are only two supported options: --lt-debug and 1.3910 +# --lt-dump-script. There is, deliberately, no --lt-help. 1.3911 +# 1.3912 +# The first argument to this parsing function should be the 1.3913 +# script's $0 value, followed by "$@". 1.3914 +lt_option_debug= 1.3915 +func_parse_lt_options () 1.3916 +{ 1.3917 + lt_script_arg0=\$0 1.3918 + shift 1.3919 + for lt_opt 1.3920 + do 1.3921 + case \"\$lt_opt\" in 1.3922 + --lt-debug) lt_option_debug=1 ;; 1.3923 + --lt-dump-script) 1.3924 + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` 1.3925 + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. 1.3926 + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` 1.3927 + cat \"\$lt_dump_D/\$lt_dump_F\" 1.3928 + exit 0 1.3929 + ;; 1.3930 + --lt-*) 1.3931 + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 1.3932 + exit 1 1.3933 + ;; 1.3934 + esac 1.3935 + done 1.3936 + 1.3937 + # Print the debug banner immediately: 1.3938 + if test -n \"\$lt_option_debug\"; then 1.3939 + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 1.3940 + fi 1.3941 +} 1.3942 + 1.3943 +# Used when --lt-debug. Prints its arguments to stdout 1.3944 +# (redirection is the responsibility of the caller) 1.3945 +func_lt_dump_args () 1.3946 +{ 1.3947 + lt_dump_args_N=1; 1.3948 + for lt_arg 1.3949 + do 1.3950 + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" 1.3951 + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` 1.3952 + done 1.3953 +} 1.3954 + 1.3955 +# Core function for launching the target application 1.3956 +func_exec_program_core () 1.3957 +{ 1.3958 +" 1.3959 + case $host in 1.3960 + # Backslashes separate directories on plain windows 1.3961 + *-*-mingw | *-*-os2* | *-cegcc*) 1.3962 + $ECHO "\ 1.3963 + if test -n \"\$lt_option_debug\"; then 1.3964 + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 1.3965 + func_lt_dump_args \${1+\"\$@\"} 1>&2 1.3966 + fi 1.3967 + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} 1.3968 +" 1.3969 + ;; 1.3970 + 1.3971 + *) 1.3972 + $ECHO "\ 1.3973 + if test -n \"\$lt_option_debug\"; then 1.3974 + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 1.3975 + func_lt_dump_args \${1+\"\$@\"} 1>&2 1.3976 + fi 1.3977 + exec \"\$progdir/\$program\" \${1+\"\$@\"} 1.3978 +" 1.3979 + ;; 1.3980 + esac 1.3981 + $ECHO "\ 1.3982 + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 1.3983 + exit 1 1.3984 +} 1.3985 + 1.3986 +# A function to encapsulate launching the target application 1.3987 +# Strips options in the --lt-* namespace from \$@ and 1.3988 +# launches target application with the remaining arguments. 1.3989 +func_exec_program () 1.3990 +{ 1.3991 + case \" \$* \" in 1.3992 + *\\ --lt-*) 1.3993 + for lt_wr_arg 1.3994 + do 1.3995 + case \$lt_wr_arg in 1.3996 + --lt-*) ;; 1.3997 + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; 1.3998 + esac 1.3999 + shift 1.4000 + done ;; 1.4001 + esac 1.4002 + func_exec_program_core \${1+\"\$@\"} 1.4003 +} 1.4004 + 1.4005 + # Parse options 1.4006 + func_parse_lt_options \"\$0\" \${1+\"\$@\"} 1.4007 + 1.4008 + # Find the directory that this script lives in. 1.4009 + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` 1.4010 + test \"x\$thisdir\" = \"x\$file\" && thisdir=. 1.4011 + 1.4012 + # Follow symbolic links until we get to the real thisdir. 1.4013 + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` 1.4014 + while test -n \"\$file\"; do 1.4015 + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` 1.4016 + 1.4017 + # If there was a directory component, then change thisdir. 1.4018 + if test \"x\$destdir\" != \"x\$file\"; then 1.4019 + case \"\$destdir\" in 1.4020 + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; 1.4021 + *) thisdir=\"\$thisdir/\$destdir\" ;; 1.4022 + esac 1.4023 + fi 1.4024 + 1.4025 + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` 1.4026 + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` 1.4027 + done 1.4028 + 1.4029 + # Usually 'no', except on cygwin/mingw when embedded into 1.4030 + # the cwrapper. 1.4031 + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 1.4032 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then 1.4033 + # special case for '.' 1.4034 + if test \"\$thisdir\" = \".\"; then 1.4035 + thisdir=\`pwd\` 1.4036 + fi 1.4037 + # remove .libs from thisdir 1.4038 + case \"\$thisdir\" in 1.4039 + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; 1.4040 + $objdir ) thisdir=. ;; 1.4041 + esac 1.4042 + fi 1.4043 + 1.4044 + # Try to get the absolute directory name. 1.4045 + absdir=\`cd \"\$thisdir\" && pwd\` 1.4046 + test -n \"\$absdir\" && thisdir=\"\$absdir\" 1.4047 +" 1.4048 + 1.4049 + if test "$fast_install" = yes; then 1.4050 + $ECHO "\ 1.4051 + program=lt-'$outputname'$exeext 1.4052 + progdir=\"\$thisdir/$objdir\" 1.4053 + 1.4054 + if test ! -f \"\$progdir/\$program\" || 1.4055 + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ 1.4056 + test \"X\$file\" != \"X\$progdir/\$program\"; }; then 1.4057 + 1.4058 + file=\"\$\$-\$program\" 1.4059 + 1.4060 + if test ! -d \"\$progdir\"; then 1.4061 + $MKDIR \"\$progdir\" 1.4062 + else 1.4063 + $RM \"\$progdir/\$file\" 1.4064 + fi" 1.4065 + 1.4066 + $ECHO "\ 1.4067 + 1.4068 + # relink executable if necessary 1.4069 + if test -n \"\$relink_command\"; then 1.4070 + if relink_command_output=\`eval \$relink_command 2>&1\`; then : 1.4071 + else 1.4072 + $ECHO \"\$relink_command_output\" >&2 1.4073 + $RM \"\$progdir/\$file\" 1.4074 + exit 1 1.4075 + fi 1.4076 + fi 1.4077 + 1.4078 + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || 1.4079 + { $RM \"\$progdir/\$program\"; 1.4080 + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } 1.4081 + $RM \"\$progdir/\$file\" 1.4082 + fi" 1.4083 + else 1.4084 + $ECHO "\ 1.4085 + program='$outputname' 1.4086 + progdir=\"\$thisdir/$objdir\" 1.4087 +" 1.4088 + fi 1.4089 + 1.4090 + $ECHO "\ 1.4091 + 1.4092 + if test -f \"\$progdir/\$program\"; then" 1.4093 + 1.4094 + # fixup the dll searchpath if we need to. 1.4095 + # 1.4096 + # Fix the DLL searchpath if we need to. Do this before prepending 1.4097 + # to shlibpath, because on Windows, both are PATH and uninstalled 1.4098 + # libraries must come first. 1.4099 + if test -n "$dllsearchpath"; then 1.4100 + $ECHO "\ 1.4101 + # Add the dll search path components to the executable PATH 1.4102 + PATH=$dllsearchpath:\$PATH 1.4103 +" 1.4104 + fi 1.4105 + 1.4106 + # Export our shlibpath_var if we have one. 1.4107 + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then 1.4108 + $ECHO "\ 1.4109 + # Add our own library path to $shlibpath_var 1.4110 + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" 1.4111 + 1.4112 + # Some systems cannot cope with colon-terminated $shlibpath_var 1.4113 + # The second colon is a workaround for a bug in BeOS R4 sed 1.4114 + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` 1.4115 + 1.4116 + export $shlibpath_var 1.4117 +" 1.4118 + fi 1.4119 + 1.4120 + $ECHO "\ 1.4121 + if test \"\$libtool_execute_magic\" != \"$magic\"; then 1.4122 + # Run the actual program with our arguments. 1.4123 + func_exec_program \${1+\"\$@\"} 1.4124 + fi 1.4125 + else 1.4126 + # The program doesn't exist. 1.4127 + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 1.4128 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 1.4129 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 1.4130 + exit 1 1.4131 + fi 1.4132 +fi\ 1.4133 +" 1.4134 +} 1.4135 + 1.4136 + 1.4137 +# func_emit_cwrapperexe_src 1.4138 +# emit the source code for a wrapper executable on stdout 1.4139 +# Must ONLY be called from within func_mode_link because 1.4140 +# it depends on a number of variable set therein. 1.4141 +func_emit_cwrapperexe_src () 1.4142 +{ 1.4143 + cat <<EOF 1.4144 + 1.4145 +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname 1.4146 + Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION 1.4147 + 1.4148 + The $output program cannot be directly executed until all the libtool 1.4149 + libraries that it depends on are installed. 1.4150 + 1.4151 + This wrapper executable should never be moved out of the build directory. 1.4152 + If it is, it will not operate correctly. 1.4153 +*/ 1.4154 +EOF 1.4155 + cat <<"EOF" 1.4156 +#ifdef _MSC_VER 1.4157 +# define _CRT_SECURE_NO_DEPRECATE 1 1.4158 +#endif 1.4159 +#include <stdio.h> 1.4160 +#include <stdlib.h> 1.4161 +#ifdef _MSC_VER 1.4162 +# include <direct.h> 1.4163 +# include <process.h> 1.4164 +# include <io.h> 1.4165 +#else 1.4166 +# include <unistd.h> 1.4167 +# include <stdint.h> 1.4168 +# ifdef __CYGWIN__ 1.4169 +# include <io.h> 1.4170 +# endif 1.4171 +#endif 1.4172 +#include <malloc.h> 1.4173 +#include <stdarg.h> 1.4174 +#include <assert.h> 1.4175 +#include <string.h> 1.4176 +#include <ctype.h> 1.4177 +#include <errno.h> 1.4178 +#include <fcntl.h> 1.4179 +#include <sys/stat.h> 1.4180 + 1.4181 +/* declarations of non-ANSI functions */ 1.4182 +#if defined(__MINGW32__) 1.4183 +# ifdef __STRICT_ANSI__ 1.4184 +int _putenv (const char *); 1.4185 +# endif 1.4186 +#elif defined(__CYGWIN__) 1.4187 +# ifdef __STRICT_ANSI__ 1.4188 +char *realpath (const char *, char *); 1.4189 +int putenv (char *); 1.4190 +int setenv (const char *, const char *, int); 1.4191 +# endif 1.4192 +/* #elif defined (other platforms) ... */ 1.4193 +#endif 1.4194 + 1.4195 +/* portability defines, excluding path handling macros */ 1.4196 +#if defined(_MSC_VER) 1.4197 +# define setmode _setmode 1.4198 +# define stat _stat 1.4199 +# define chmod _chmod 1.4200 +# define getcwd _getcwd 1.4201 +# define putenv _putenv 1.4202 +# define S_IXUSR _S_IEXEC 1.4203 +# ifndef _INTPTR_T_DEFINED 1.4204 +# define _INTPTR_T_DEFINED 1.4205 +# define intptr_t int 1.4206 +# endif 1.4207 +#elif defined(__MINGW32__) 1.4208 +# define setmode _setmode 1.4209 +# define stat _stat 1.4210 +# define chmod _chmod 1.4211 +# define getcwd _getcwd 1.4212 +# define putenv _putenv 1.4213 +#elif defined(__CYGWIN__) 1.4214 +# define HAVE_SETENV 1.4215 +# define FOPEN_WB "wb" 1.4216 +/* #elif defined (other platforms) ... */ 1.4217 +#endif 1.4218 + 1.4219 +#if defined(PATH_MAX) 1.4220 +# define LT_PATHMAX PATH_MAX 1.4221 +#elif defined(MAXPATHLEN) 1.4222 +# define LT_PATHMAX MAXPATHLEN 1.4223 +#else 1.4224 +# define LT_PATHMAX 1024 1.4225 +#endif 1.4226 + 1.4227 +#ifndef S_IXOTH 1.4228 +# define S_IXOTH 0 1.4229 +#endif 1.4230 +#ifndef S_IXGRP 1.4231 +# define S_IXGRP 0 1.4232 +#endif 1.4233 + 1.4234 +/* path handling portability macros */ 1.4235 +#ifndef DIR_SEPARATOR 1.4236 +# define DIR_SEPARATOR '/' 1.4237 +# define PATH_SEPARATOR ':' 1.4238 +#endif 1.4239 + 1.4240 +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ 1.4241 + defined (__OS2__) 1.4242 +# define HAVE_DOS_BASED_FILE_SYSTEM 1.4243 +# define FOPEN_WB "wb" 1.4244 +# ifndef DIR_SEPARATOR_2 1.4245 +# define DIR_SEPARATOR_2 '\\' 1.4246 +# endif 1.4247 +# ifndef PATH_SEPARATOR_2 1.4248 +# define PATH_SEPARATOR_2 ';' 1.4249 +# endif 1.4250 +#endif 1.4251 + 1.4252 +#ifndef DIR_SEPARATOR_2 1.4253 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) 1.4254 +#else /* DIR_SEPARATOR_2 */ 1.4255 +# define IS_DIR_SEPARATOR(ch) \ 1.4256 + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) 1.4257 +#endif /* DIR_SEPARATOR_2 */ 1.4258 + 1.4259 +#ifndef PATH_SEPARATOR_2 1.4260 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) 1.4261 +#else /* PATH_SEPARATOR_2 */ 1.4262 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) 1.4263 +#endif /* PATH_SEPARATOR_2 */ 1.4264 + 1.4265 +#ifndef FOPEN_WB 1.4266 +# define FOPEN_WB "w" 1.4267 +#endif 1.4268 +#ifndef _O_BINARY 1.4269 +# define _O_BINARY 0 1.4270 +#endif 1.4271 + 1.4272 +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) 1.4273 +#define XFREE(stale) do { \ 1.4274 + if (stale) { free ((void *) stale); stale = 0; } \ 1.4275 +} while (0) 1.4276 + 1.4277 +#if defined(LT_DEBUGWRAPPER) 1.4278 +static int lt_debug = 1; 1.4279 +#else 1.4280 +static int lt_debug = 0; 1.4281 +#endif 1.4282 + 1.4283 +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ 1.4284 + 1.4285 +void *xmalloc (size_t num); 1.4286 +char *xstrdup (const char *string); 1.4287 +const char *base_name (const char *name); 1.4288 +char *find_executable (const char *wrapper); 1.4289 +char *chase_symlinks (const char *pathspec); 1.4290 +int make_executable (const char *path); 1.4291 +int check_executable (const char *path); 1.4292 +char *strendzap (char *str, const char *pat); 1.4293 +void lt_debugprintf (const char *file, int line, const char *fmt, ...); 1.4294 +void lt_fatal (const char *file, int line, const char *message, ...); 1.4295 +static const char *nonnull (const char *s); 1.4296 +static const char *nonempty (const char *s); 1.4297 +void lt_setenv (const char *name, const char *value); 1.4298 +char *lt_extend_str (const char *orig_value, const char *add, int to_end); 1.4299 +void lt_update_exe_path (const char *name, const char *value); 1.4300 +void lt_update_lib_path (const char *name, const char *value); 1.4301 +char **prepare_spawn (char **argv); 1.4302 +void lt_dump_script (FILE *f); 1.4303 +EOF 1.4304 + 1.4305 + cat <<EOF 1.4306 +volatile const char * MAGIC_EXE = "$magic_exe"; 1.4307 +const char * LIB_PATH_VARNAME = "$shlibpath_var"; 1.4308 +EOF 1.4309 + 1.4310 + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then 1.4311 + func_to_host_path "$temp_rpath" 1.4312 + cat <<EOF 1.4313 +const char * LIB_PATH_VALUE = "$func_to_host_path_result"; 1.4314 +EOF 1.4315 + else 1.4316 + cat <<"EOF" 1.4317 +const char * LIB_PATH_VALUE = ""; 1.4318 +EOF 1.4319 + fi 1.4320 + 1.4321 + if test -n "$dllsearchpath"; then 1.4322 + func_to_host_path "$dllsearchpath:" 1.4323 + cat <<EOF 1.4324 +const char * EXE_PATH_VARNAME = "PATH"; 1.4325 +const char * EXE_PATH_VALUE = "$func_to_host_path_result"; 1.4326 +EOF 1.4327 + else 1.4328 + cat <<"EOF" 1.4329 +const char * EXE_PATH_VARNAME = ""; 1.4330 +const char * EXE_PATH_VALUE = ""; 1.4331 +EOF 1.4332 + fi 1.4333 + 1.4334 + if test "$fast_install" = yes; then 1.4335 + cat <<EOF 1.4336 +const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */ 1.4337 +EOF 1.4338 + else 1.4339 + cat <<EOF 1.4340 +const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */ 1.4341 +EOF 1.4342 + fi 1.4343 + 1.4344 + 1.4345 + cat <<"EOF" 1.4346 + 1.4347 +#define LTWRAPPER_OPTION_PREFIX "--lt-" 1.4348 + 1.4349 +static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX; 1.4350 +static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; 1.4351 +static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug"; 1.4352 + 1.4353 +int 1.4354 +main (int argc, char *argv[]) 1.4355 +{ 1.4356 + char **newargz; 1.4357 + int newargc; 1.4358 + char *tmp_pathspec; 1.4359 + char *actual_cwrapper_path; 1.4360 + char *actual_cwrapper_name; 1.4361 + char *target_name; 1.4362 + char *lt_argv_zero; 1.4363 + intptr_t rval = 127; 1.4364 + 1.4365 + int i; 1.4366 + 1.4367 + program_name = (char *) xstrdup (base_name (argv[0])); 1.4368 + newargz = XMALLOC (char *, argc + 1); 1.4369 + 1.4370 + /* very simple arg parsing; don't want to rely on getopt 1.4371 + * also, copy all non cwrapper options to newargz, except 1.4372 + * argz[0], which is handled differently 1.4373 + */ 1.4374 + newargc=0; 1.4375 + for (i = 1; i < argc; i++) 1.4376 + { 1.4377 + if (strcmp (argv[i], dumpscript_opt) == 0) 1.4378 + { 1.4379 +EOF 1.4380 + case "$host" in 1.4381 + *mingw* | *cygwin* ) 1.4382 + # make stdout use "unix" line endings 1.4383 + echo " setmode(1,_O_BINARY);" 1.4384 + ;; 1.4385 + esac 1.4386 + 1.4387 + cat <<"EOF" 1.4388 + lt_dump_script (stdout); 1.4389 + return 0; 1.4390 + } 1.4391 + if (strcmp (argv[i], debug_opt) == 0) 1.4392 + { 1.4393 + lt_debug = 1; 1.4394 + continue; 1.4395 + } 1.4396 + if (strcmp (argv[i], ltwrapper_option_prefix) == 0) 1.4397 + { 1.4398 + /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX 1.4399 + namespace, but it is not one of the ones we know about and 1.4400 + have already dealt with, above (inluding dump-script), then 1.4401 + report an error. Otherwise, targets might begin to believe 1.4402 + they are allowed to use options in the LTWRAPPER_OPTION_PREFIX 1.4403 + namespace. The first time any user complains about this, we'll 1.4404 + need to make LTWRAPPER_OPTION_PREFIX a configure-time option 1.4405 + or a configure.ac-settable value. 1.4406 + */ 1.4407 + lt_fatal (__FILE__, __LINE__, 1.4408 + "unrecognized %s option: '%s'", 1.4409 + ltwrapper_option_prefix, argv[i]); 1.4410 + } 1.4411 + /* otherwise ... */ 1.4412 + newargz[++newargc] = xstrdup (argv[i]); 1.4413 + } 1.4414 + newargz[++newargc] = NULL; 1.4415 + 1.4416 +EOF 1.4417 + cat <<EOF 1.4418 + /* The GNU banner must be the first non-error debug message */ 1.4419 + lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n"); 1.4420 +EOF 1.4421 + cat <<"EOF" 1.4422 + lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]); 1.4423 + lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name); 1.4424 + 1.4425 + tmp_pathspec = find_executable (argv[0]); 1.4426 + if (tmp_pathspec == NULL) 1.4427 + lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]); 1.4428 + lt_debugprintf (__FILE__, __LINE__, 1.4429 + "(main) found exe (before symlink chase) at: %s\n", 1.4430 + tmp_pathspec); 1.4431 + 1.4432 + actual_cwrapper_path = chase_symlinks (tmp_pathspec); 1.4433 + lt_debugprintf (__FILE__, __LINE__, 1.4434 + "(main) found exe (after symlink chase) at: %s\n", 1.4435 + actual_cwrapper_path); 1.4436 + XFREE (tmp_pathspec); 1.4437 + 1.4438 + actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path)); 1.4439 + strendzap (actual_cwrapper_path, actual_cwrapper_name); 1.4440 + 1.4441 + /* wrapper name transforms */ 1.4442 + strendzap (actual_cwrapper_name, ".exe"); 1.4443 + tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1); 1.4444 + XFREE (actual_cwrapper_name); 1.4445 + actual_cwrapper_name = tmp_pathspec; 1.4446 + tmp_pathspec = 0; 1.4447 + 1.4448 + /* target_name transforms -- use actual target program name; might have lt- prefix */ 1.4449 + target_name = xstrdup (base_name (TARGET_PROGRAM_NAME)); 1.4450 + strendzap (target_name, ".exe"); 1.4451 + tmp_pathspec = lt_extend_str (target_name, ".exe", 1); 1.4452 + XFREE (target_name); 1.4453 + target_name = tmp_pathspec; 1.4454 + tmp_pathspec = 0; 1.4455 + 1.4456 + lt_debugprintf (__FILE__, __LINE__, 1.4457 + "(main) libtool target name: %s\n", 1.4458 + target_name); 1.4459 +EOF 1.4460 + 1.4461 + cat <<EOF 1.4462 + newargz[0] = 1.4463 + XMALLOC (char, (strlen (actual_cwrapper_path) + 1.4464 + strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1)); 1.4465 + strcpy (newargz[0], actual_cwrapper_path); 1.4466 + strcat (newargz[0], "$objdir"); 1.4467 + strcat (newargz[0], "/"); 1.4468 +EOF 1.4469 + 1.4470 + cat <<"EOF" 1.4471 + /* stop here, and copy so we don't have to do this twice */ 1.4472 + tmp_pathspec = xstrdup (newargz[0]); 1.4473 + 1.4474 + /* do NOT want the lt- prefix here, so use actual_cwrapper_name */ 1.4475 + strcat (newargz[0], actual_cwrapper_name); 1.4476 + 1.4477 + /* DO want the lt- prefix here if it exists, so use target_name */ 1.4478 + lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1); 1.4479 + XFREE (tmp_pathspec); 1.4480 + tmp_pathspec = NULL; 1.4481 +EOF 1.4482 + 1.4483 + case $host_os in 1.4484 + mingw*) 1.4485 + cat <<"EOF" 1.4486 + { 1.4487 + char* p; 1.4488 + while ((p = strchr (newargz[0], '\\')) != NULL) 1.4489 + { 1.4490 + *p = '/'; 1.4491 + } 1.4492 + while ((p = strchr (lt_argv_zero, '\\')) != NULL) 1.4493 + { 1.4494 + *p = '/'; 1.4495 + } 1.4496 + } 1.4497 +EOF 1.4498 + ;; 1.4499 + esac 1.4500 + 1.4501 + cat <<"EOF" 1.4502 + XFREE (target_name); 1.4503 + XFREE (actual_cwrapper_path); 1.4504 + XFREE (actual_cwrapper_name); 1.4505 + 1.4506 + lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */ 1.4507 + lt_setenv ("DUALCASE", "1"); /* for MSK sh */ 1.4508 + /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must 1.4509 + be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath) 1.4510 + because on Windows, both *_VARNAMEs are PATH but uninstalled 1.4511 + libraries must come first. */ 1.4512 + lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE); 1.4513 + lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE); 1.4514 + 1.4515 + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", 1.4516 + nonnull (lt_argv_zero)); 1.4517 + for (i = 0; i < newargc; i++) 1.4518 + { 1.4519 + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", 1.4520 + i, nonnull (newargz[i])); 1.4521 + } 1.4522 + 1.4523 +EOF 1.4524 + 1.4525 + case $host_os in 1.4526 + mingw*) 1.4527 + cat <<"EOF" 1.4528 + /* execv doesn't actually work on mingw as expected on unix */ 1.4529 + newargz = prepare_spawn (newargz); 1.4530 + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); 1.4531 + if (rval == -1) 1.4532 + { 1.4533 + /* failed to start process */ 1.4534 + lt_debugprintf (__FILE__, __LINE__, 1.4535 + "(main) failed to launch target \"%s\": %s\n", 1.4536 + lt_argv_zero, nonnull (strerror (errno))); 1.4537 + return 127; 1.4538 + } 1.4539 + return rval; 1.4540 +EOF 1.4541 + ;; 1.4542 + *) 1.4543 + cat <<"EOF" 1.4544 + execv (lt_argv_zero, newargz); 1.4545 + return rval; /* =127, but avoids unused variable warning */ 1.4546 +EOF 1.4547 + ;; 1.4548 + esac 1.4549 + 1.4550 + cat <<"EOF" 1.4551 +} 1.4552 + 1.4553 +void * 1.4554 +xmalloc (size_t num) 1.4555 +{ 1.4556 + void *p = (void *) malloc (num); 1.4557 + if (!p) 1.4558 + lt_fatal (__FILE__, __LINE__, "memory exhausted"); 1.4559 + 1.4560 + return p; 1.4561 +} 1.4562 + 1.4563 +char * 1.4564 +xstrdup (const char *string) 1.4565 +{ 1.4566 + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), 1.4567 + string) : NULL; 1.4568 +} 1.4569 + 1.4570 +const char * 1.4571 +base_name (const char *name) 1.4572 +{ 1.4573 + const char *base; 1.4574 + 1.4575 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) 1.4576 + /* Skip over the disk name in MSDOS pathnames. */ 1.4577 + if (isalpha ((unsigned char) name[0]) && name[1] == ':') 1.4578 + name += 2; 1.4579 +#endif 1.4580 + 1.4581 + for (base = name; *name; name++) 1.4582 + if (IS_DIR_SEPARATOR (*name)) 1.4583 + base = name + 1; 1.4584 + return base; 1.4585 +} 1.4586 + 1.4587 +int 1.4588 +check_executable (const char *path) 1.4589 +{ 1.4590 + struct stat st; 1.4591 + 1.4592 + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", 1.4593 + nonempty (path)); 1.4594 + if ((!path) || (!*path)) 1.4595 + return 0; 1.4596 + 1.4597 + if ((stat (path, &st) >= 0) 1.4598 + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) 1.4599 + return 1; 1.4600 + else 1.4601 + return 0; 1.4602 +} 1.4603 + 1.4604 +int 1.4605 +make_executable (const char *path) 1.4606 +{ 1.4607 + int rval = 0; 1.4608 + struct stat st; 1.4609 + 1.4610 + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", 1.4611 + nonempty (path)); 1.4612 + if ((!path) || (!*path)) 1.4613 + return 0; 1.4614 + 1.4615 + if (stat (path, &st) >= 0) 1.4616 + { 1.4617 + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); 1.4618 + } 1.4619 + return rval; 1.4620 +} 1.4621 + 1.4622 +/* Searches for the full path of the wrapper. Returns 1.4623 + newly allocated full path name if found, NULL otherwise 1.4624 + Does not chase symlinks, even on platforms that support them. 1.4625 +*/ 1.4626 +char * 1.4627 +find_executable (const char *wrapper) 1.4628 +{ 1.4629 + int has_slash = 0; 1.4630 + const char *p; 1.4631 + const char *p_next; 1.4632 + /* static buffer for getcwd */ 1.4633 + char tmp[LT_PATHMAX + 1]; 1.4634 + int tmp_len; 1.4635 + char *concat_name; 1.4636 + 1.4637 + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", 1.4638 + nonempty (wrapper)); 1.4639 + 1.4640 + if ((wrapper == NULL) || (*wrapper == '\0')) 1.4641 + return NULL; 1.4642 + 1.4643 + /* Absolute path? */ 1.4644 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) 1.4645 + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') 1.4646 + { 1.4647 + concat_name = xstrdup (wrapper); 1.4648 + if (check_executable (concat_name)) 1.4649 + return concat_name; 1.4650 + XFREE (concat_name); 1.4651 + } 1.4652 + else 1.4653 + { 1.4654 +#endif 1.4655 + if (IS_DIR_SEPARATOR (wrapper[0])) 1.4656 + { 1.4657 + concat_name = xstrdup (wrapper); 1.4658 + if (check_executable (concat_name)) 1.4659 + return concat_name; 1.4660 + XFREE (concat_name); 1.4661 + } 1.4662 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) 1.4663 + } 1.4664 +#endif 1.4665 + 1.4666 + for (p = wrapper; *p; p++) 1.4667 + if (*p == '/') 1.4668 + { 1.4669 + has_slash = 1; 1.4670 + break; 1.4671 + } 1.4672 + if (!has_slash) 1.4673 + { 1.4674 + /* no slashes; search PATH */ 1.4675 + const char *path = getenv ("PATH"); 1.4676 + if (path != NULL) 1.4677 + { 1.4678 + for (p = path; *p; p = p_next) 1.4679 + { 1.4680 + const char *q; 1.4681 + size_t p_len; 1.4682 + for (q = p; *q; q++) 1.4683 + if (IS_PATH_SEPARATOR (*q)) 1.4684 + break; 1.4685 + p_len = q - p; 1.4686 + p_next = (*q == '\0' ? q : q + 1); 1.4687 + if (p_len == 0) 1.4688 + { 1.4689 + /* empty path: current directory */ 1.4690 + if (getcwd (tmp, LT_PATHMAX) == NULL) 1.4691 + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", 1.4692 + nonnull (strerror (errno))); 1.4693 + tmp_len = strlen (tmp); 1.4694 + concat_name = 1.4695 + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); 1.4696 + memcpy (concat_name, tmp, tmp_len); 1.4697 + concat_name[tmp_len] = '/'; 1.4698 + strcpy (concat_name + tmp_len + 1, wrapper); 1.4699 + } 1.4700 + else 1.4701 + { 1.4702 + concat_name = 1.4703 + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); 1.4704 + memcpy (concat_name, p, p_len); 1.4705 + concat_name[p_len] = '/'; 1.4706 + strcpy (concat_name + p_len + 1, wrapper); 1.4707 + } 1.4708 + if (check_executable (concat_name)) 1.4709 + return concat_name; 1.4710 + XFREE (concat_name); 1.4711 + } 1.4712 + } 1.4713 + /* not found in PATH; assume curdir */ 1.4714 + } 1.4715 + /* Relative path | not found in path: prepend cwd */ 1.4716 + if (getcwd (tmp, LT_PATHMAX) == NULL) 1.4717 + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", 1.4718 + nonnull (strerror (errno))); 1.4719 + tmp_len = strlen (tmp); 1.4720 + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); 1.4721 + memcpy (concat_name, tmp, tmp_len); 1.4722 + concat_name[tmp_len] = '/'; 1.4723 + strcpy (concat_name + tmp_len + 1, wrapper); 1.4724 + 1.4725 + if (check_executable (concat_name)) 1.4726 + return concat_name; 1.4727 + XFREE (concat_name); 1.4728 + return NULL; 1.4729 +} 1.4730 + 1.4731 +char * 1.4732 +chase_symlinks (const char *pathspec) 1.4733 +{ 1.4734 +#ifndef S_ISLNK 1.4735 + return xstrdup (pathspec); 1.4736 +#else 1.4737 + char buf[LT_PATHMAX]; 1.4738 + struct stat s; 1.4739 + char *tmp_pathspec = xstrdup (pathspec); 1.4740 + char *p; 1.4741 + int has_symlinks = 0; 1.4742 + while (strlen (tmp_pathspec) && !has_symlinks) 1.4743 + { 1.4744 + lt_debugprintf (__FILE__, __LINE__, 1.4745 + "checking path component for symlinks: %s\n", 1.4746 + tmp_pathspec); 1.4747 + if (lstat (tmp_pathspec, &s) == 0) 1.4748 + { 1.4749 + if (S_ISLNK (s.st_mode) != 0) 1.4750 + { 1.4751 + has_symlinks = 1; 1.4752 + break; 1.4753 + } 1.4754 + 1.4755 + /* search backwards for last DIR_SEPARATOR */ 1.4756 + p = tmp_pathspec + strlen (tmp_pathspec) - 1; 1.4757 + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) 1.4758 + p--; 1.4759 + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) 1.4760 + { 1.4761 + /* no more DIR_SEPARATORS left */ 1.4762 + break; 1.4763 + } 1.4764 + *p = '\0'; 1.4765 + } 1.4766 + else 1.4767 + { 1.4768 + lt_fatal (__FILE__, __LINE__, 1.4769 + "error accessing file \"%s\": %s", 1.4770 + tmp_pathspec, nonnull (strerror (errno))); 1.4771 + } 1.4772 + } 1.4773 + XFREE (tmp_pathspec); 1.4774 + 1.4775 + if (!has_symlinks) 1.4776 + { 1.4777 + return xstrdup (pathspec); 1.4778 + } 1.4779 + 1.4780 + tmp_pathspec = realpath (pathspec, buf); 1.4781 + if (tmp_pathspec == 0) 1.4782 + { 1.4783 + lt_fatal (__FILE__, __LINE__, 1.4784 + "could not follow symlinks for %s", pathspec); 1.4785 + } 1.4786 + return xstrdup (tmp_pathspec); 1.4787 +#endif 1.4788 +} 1.4789 + 1.4790 +char * 1.4791 +strendzap (char *str, const char *pat) 1.4792 +{ 1.4793 + size_t len, patlen; 1.4794 + 1.4795 + assert (str != NULL); 1.4796 + assert (pat != NULL); 1.4797 + 1.4798 + len = strlen (str); 1.4799 + patlen = strlen (pat); 1.4800 + 1.4801 + if (patlen <= len) 1.4802 + { 1.4803 + str += len - patlen; 1.4804 + if (strcmp (str, pat) == 0) 1.4805 + *str = '\0'; 1.4806 + } 1.4807 + return str; 1.4808 +} 1.4809 + 1.4810 +void 1.4811 +lt_debugprintf (const char *file, int line, const char *fmt, ...) 1.4812 +{ 1.4813 + va_list args; 1.4814 + if (lt_debug) 1.4815 + { 1.4816 + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); 1.4817 + va_start (args, fmt); 1.4818 + (void) vfprintf (stderr, fmt, args); 1.4819 + va_end (args); 1.4820 + } 1.4821 +} 1.4822 + 1.4823 +static void 1.4824 +lt_error_core (int exit_status, const char *file, 1.4825 + int line, const char *mode, 1.4826 + const char *message, va_list ap) 1.4827 +{ 1.4828 + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); 1.4829 + vfprintf (stderr, message, ap); 1.4830 + fprintf (stderr, ".\n"); 1.4831 + 1.4832 + if (exit_status >= 0) 1.4833 + exit (exit_status); 1.4834 +} 1.4835 + 1.4836 +void 1.4837 +lt_fatal (const char *file, int line, const char *message, ...) 1.4838 +{ 1.4839 + va_list ap; 1.4840 + va_start (ap, message); 1.4841 + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); 1.4842 + va_end (ap); 1.4843 +} 1.4844 + 1.4845 +static const char * 1.4846 +nonnull (const char *s) 1.4847 +{ 1.4848 + return s ? s : "(null)"; 1.4849 +} 1.4850 + 1.4851 +static const char * 1.4852 +nonempty (const char *s) 1.4853 +{ 1.4854 + return (s && !*s) ? "(empty)" : nonnull (s); 1.4855 +} 1.4856 + 1.4857 +void 1.4858 +lt_setenv (const char *name, const char *value) 1.4859 +{ 1.4860 + lt_debugprintf (__FILE__, __LINE__, 1.4861 + "(lt_setenv) setting '%s' to '%s'\n", 1.4862 + nonnull (name), nonnull (value)); 1.4863 + { 1.4864 +#ifdef HAVE_SETENV 1.4865 + /* always make a copy, for consistency with !HAVE_SETENV */ 1.4866 + char *str = xstrdup (value); 1.4867 + setenv (name, str, 1); 1.4868 +#else 1.4869 + int len = strlen (name) + 1 + strlen (value) + 1; 1.4870 + char *str = XMALLOC (char, len); 1.4871 + sprintf (str, "%s=%s", name, value); 1.4872 + if (putenv (str) != EXIT_SUCCESS) 1.4873 + { 1.4874 + XFREE (str); 1.4875 + } 1.4876 +#endif 1.4877 + } 1.4878 +} 1.4879 + 1.4880 +char * 1.4881 +lt_extend_str (const char *orig_value, const char *add, int to_end) 1.4882 +{ 1.4883 + char *new_value; 1.4884 + if (orig_value && *orig_value) 1.4885 + { 1.4886 + int orig_value_len = strlen (orig_value); 1.4887 + int add_len = strlen (add); 1.4888 + new_value = XMALLOC (char, add_len + orig_value_len + 1); 1.4889 + if (to_end) 1.4890 + { 1.4891 + strcpy (new_value, orig_value); 1.4892 + strcpy (new_value + orig_value_len, add); 1.4893 + } 1.4894 + else 1.4895 + { 1.4896 + strcpy (new_value, add); 1.4897 + strcpy (new_value + add_len, orig_value); 1.4898 + } 1.4899 + } 1.4900 + else 1.4901 + { 1.4902 + new_value = xstrdup (add); 1.4903 + } 1.4904 + return new_value; 1.4905 +} 1.4906 + 1.4907 +void 1.4908 +lt_update_exe_path (const char *name, const char *value) 1.4909 +{ 1.4910 + lt_debugprintf (__FILE__, __LINE__, 1.4911 + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", 1.4912 + nonnull (name), nonnull (value)); 1.4913 + 1.4914 + if (name && *name && value && *value) 1.4915 + { 1.4916 + char *new_value = lt_extend_str (getenv (name), value, 0); 1.4917 + /* some systems can't cope with a ':'-terminated path #' */ 1.4918 + int len = strlen (new_value); 1.4919 + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) 1.4920 + { 1.4921 + new_value[len-1] = '\0'; 1.4922 + } 1.4923 + lt_setenv (name, new_value); 1.4924 + XFREE (new_value); 1.4925 + } 1.4926 +} 1.4927 + 1.4928 +void 1.4929 +lt_update_lib_path (const char *name, const char *value) 1.4930 +{ 1.4931 + lt_debugprintf (__FILE__, __LINE__, 1.4932 + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", 1.4933 + nonnull (name), nonnull (value)); 1.4934 + 1.4935 + if (name && *name && value && *value) 1.4936 + { 1.4937 + char *new_value = lt_extend_str (getenv (name), value, 0); 1.4938 + lt_setenv (name, new_value); 1.4939 + XFREE (new_value); 1.4940 + } 1.4941 +} 1.4942 + 1.4943 +EOF 1.4944 + case $host_os in 1.4945 + mingw*) 1.4946 + cat <<"EOF" 1.4947 + 1.4948 +/* Prepares an argument vector before calling spawn(). 1.4949 + Note that spawn() does not by itself call the command interpreter 1.4950 + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : 1.4951 + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); 1.4952 + GetVersionEx(&v); 1.4953 + v.dwPlatformId == VER_PLATFORM_WIN32_NT; 1.4954 + }) ? "cmd.exe" : "command.com"). 1.4955 + Instead it simply concatenates the arguments, separated by ' ', and calls 1.4956 + CreateProcess(). We must quote the arguments since Win32 CreateProcess() 1.4957 + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a 1.4958 + special way: 1.4959 + - Space and tab are interpreted as delimiters. They are not treated as 1.4960 + delimiters if they are surrounded by double quotes: "...". 1.4961 + - Unescaped double quotes are removed from the input. Their only effect is 1.4962 + that within double quotes, space and tab are treated like normal 1.4963 + characters. 1.4964 + - Backslashes not followed by double quotes are not special. 1.4965 + - But 2*n+1 backslashes followed by a double quote become 1.4966 + n backslashes followed by a double quote (n >= 0): 1.4967 + \" -> " 1.4968 + \\\" -> \" 1.4969 + \\\\\" -> \\" 1.4970 + */ 1.4971 +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" 1.4972 +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" 1.4973 +char ** 1.4974 +prepare_spawn (char **argv) 1.4975 +{ 1.4976 + size_t argc; 1.4977 + char **new_argv; 1.4978 + size_t i; 1.4979 + 1.4980 + /* Count number of arguments. */ 1.4981 + for (argc = 0; argv[argc] != NULL; argc++) 1.4982 + ; 1.4983 + 1.4984 + /* Allocate new argument vector. */ 1.4985 + new_argv = XMALLOC (char *, argc + 1); 1.4986 + 1.4987 + /* Put quoted arguments into the new argument vector. */ 1.4988 + for (i = 0; i < argc; i++) 1.4989 + { 1.4990 + const char *string = argv[i]; 1.4991 + 1.4992 + if (string[0] == '\0') 1.4993 + new_argv[i] = xstrdup ("\"\""); 1.4994 + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) 1.4995 + { 1.4996 + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); 1.4997 + size_t length; 1.4998 + unsigned int backslashes; 1.4999 + const char *s; 1.5000 + char *quoted_string; 1.5001 + char *p; 1.5002 + 1.5003 + length = 0; 1.5004 + backslashes = 0; 1.5005 + if (quote_around) 1.5006 + length++; 1.5007 + for (s = string; *s != '\0'; s++) 1.5008 + { 1.5009 + char c = *s; 1.5010 + if (c == '"') 1.5011 + length += backslashes + 1; 1.5012 + length++; 1.5013 + if (c == '\\') 1.5014 + backslashes++; 1.5015 + else 1.5016 + backslashes = 0; 1.5017 + } 1.5018 + if (quote_around) 1.5019 + length += backslashes + 1; 1.5020 + 1.5021 + quoted_string = XMALLOC (char, length + 1); 1.5022 + 1.5023 + p = quoted_string; 1.5024 + backslashes = 0; 1.5025 + if (quote_around) 1.5026 + *p++ = '"'; 1.5027 + for (s = string; *s != '\0'; s++) 1.5028 + { 1.5029 + char c = *s; 1.5030 + if (c == '"') 1.5031 + { 1.5032 + unsigned int j; 1.5033 + for (j = backslashes + 1; j > 0; j--) 1.5034 + *p++ = '\\'; 1.5035 + } 1.5036 + *p++ = c; 1.5037 + if (c == '\\') 1.5038 + backslashes++; 1.5039 + else 1.5040 + backslashes = 0; 1.5041 + } 1.5042 + if (quote_around) 1.5043 + { 1.5044 + unsigned int j; 1.5045 + for (j = backslashes; j > 0; j--) 1.5046 + *p++ = '\\'; 1.5047 + *p++ = '"'; 1.5048 + } 1.5049 + *p = '\0'; 1.5050 + 1.5051 + new_argv[i] = quoted_string; 1.5052 + } 1.5053 + else 1.5054 + new_argv[i] = (char *) string; 1.5055 + } 1.5056 + new_argv[argc] = NULL; 1.5057 + 1.5058 + return new_argv; 1.5059 +} 1.5060 +EOF 1.5061 + ;; 1.5062 + esac 1.5063 + 1.5064 + cat <<"EOF" 1.5065 +void lt_dump_script (FILE* f) 1.5066 +{ 1.5067 +EOF 1.5068 + func_emit_wrapper yes | 1.5069 + $SED -n -e ' 1.5070 +s/^\(.\{79\}\)\(..*\)/\1\ 1.5071 +\2/ 1.5072 +h 1.5073 +s/\([\\"]\)/\\\1/g 1.5074 +s/$/\\n/ 1.5075 +s/\([^\n]*\).*/ fputs ("\1", f);/p 1.5076 +g 1.5077 +D' 1.5078 + cat <<"EOF" 1.5079 +} 1.5080 +EOF 1.5081 +} 1.5082 +# end: func_emit_cwrapperexe_src 1.5083 + 1.5084 +# func_win32_import_lib_p ARG 1.5085 +# True if ARG is an import lib, as indicated by $file_magic_cmd 1.5086 +func_win32_import_lib_p () 1.5087 +{ 1.5088 + $opt_debug 1.5089 + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in 1.5090 + *import*) : ;; 1.5091 + *) false ;; 1.5092 + esac 1.5093 +} 1.5094 + 1.5095 +# func_mode_link arg... 1.5096 +func_mode_link () 1.5097 +{ 1.5098 + $opt_debug 1.5099 + case $host in 1.5100 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) 1.5101 + # It is impossible to link a dll without this setting, and 1.5102 + # we shouldn't force the makefile maintainer to figure out 1.5103 + # which system we are compiling for in order to pass an extra 1.5104 + # flag for every libtool invocation. 1.5105 + # allow_undefined=no 1.5106 + 1.5107 + # FIXME: Unfortunately, there are problems with the above when trying 1.5108 + # to make a dll which has undefined symbols, in which case not 1.5109 + # even a static library is built. For now, we need to specify 1.5110 + # -no-undefined on the libtool link line when we can be certain 1.5111 + # that all symbols are satisfied, otherwise we get a static library. 1.5112 + allow_undefined=yes 1.5113 + ;; 1.5114 + *) 1.5115 + allow_undefined=yes 1.5116 + ;; 1.5117 + esac 1.5118 + libtool_args=$nonopt 1.5119 + base_compile="$nonopt $@" 1.5120 + compile_command=$nonopt 1.5121 + finalize_command=$nonopt 1.5122 + 1.5123 + compile_rpath= 1.5124 + finalize_rpath= 1.5125 + compile_shlibpath= 1.5126 + finalize_shlibpath= 1.5127 + convenience= 1.5128 + old_convenience= 1.5129 + deplibs= 1.5130 + old_deplibs= 1.5131 + compiler_flags= 1.5132 + linker_flags= 1.5133 + dllsearchpath= 1.5134 + lib_search_path=`pwd` 1.5135 + inst_prefix_dir= 1.5136 + new_inherited_linker_flags= 1.5137 + 1.5138 + avoid_version=no 1.5139 + bindir= 1.5140 + dlfiles= 1.5141 + dlprefiles= 1.5142 + dlself=no 1.5143 + export_dynamic=no 1.5144 + export_symbols= 1.5145 + export_symbols_regex= 1.5146 + generated= 1.5147 + libobjs= 1.5148 + ltlibs= 1.5149 + module=no 1.5150 + no_install=no 1.5151 + objs= 1.5152 + non_pic_objects= 1.5153 + precious_files_regex= 1.5154 + prefer_static_libs=no 1.5155 + preload=no 1.5156 + prev= 1.5157 + prevarg= 1.5158 + release= 1.5159 + rpath= 1.5160 + xrpath= 1.5161 + perm_rpath= 1.5162 + temp_rpath= 1.5163 + thread_safe=no 1.5164 + vinfo= 1.5165 + vinfo_number=no 1.5166 + weak_libs= 1.5167 + single_module="${wl}-single_module" 1.5168 + func_infer_tag $base_compile 1.5169 + 1.5170 + # We need to know -static, to get the right output filenames. 1.5171 + for arg 1.5172 + do 1.5173 + case $arg in 1.5174 + -shared) 1.5175 + test "$build_libtool_libs" != yes && \ 1.5176 + func_fatal_configuration "can not build a shared library" 1.5177 + build_old_libs=no 1.5178 + break 1.5179 + ;; 1.5180 + -all-static | -static | -static-libtool-libs) 1.5181 + case $arg in 1.5182 + -all-static) 1.5183 + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then 1.5184 + func_warning "complete static linking is impossible in this configuration" 1.5185 + fi 1.5186 + if test -n "$link_static_flag"; then 1.5187 + dlopen_self=$dlopen_self_static 1.5188 + fi 1.5189 + prefer_static_libs=yes 1.5190 + ;; 1.5191 + -static) 1.5192 + if test -z "$pic_flag" && test -n "$link_static_flag"; then 1.5193 + dlopen_self=$dlopen_self_static 1.5194 + fi 1.5195 + prefer_static_libs=built 1.5196 + ;; 1.5197 + -static-libtool-libs) 1.5198 + if test -z "$pic_flag" && test -n "$link_static_flag"; then 1.5199 + dlopen_self=$dlopen_self_static 1.5200 + fi 1.5201 + prefer_static_libs=yes 1.5202 + ;; 1.5203 + esac 1.5204 + build_libtool_libs=no 1.5205 + build_old_libs=yes 1.5206 + break 1.5207 + ;; 1.5208 + esac 1.5209 + done 1.5210 + 1.5211 + # See if our shared archives depend on static archives. 1.5212 + test -n "$old_archive_from_new_cmds" && build_old_libs=yes 1.5213 + 1.5214 + # Go through the arguments, transforming them on the way. 1.5215 + while test "$#" -gt 0; do 1.5216 + arg="$1" 1.5217 + shift 1.5218 + func_quote_for_eval "$arg" 1.5219 + qarg=$func_quote_for_eval_unquoted_result 1.5220 + func_append libtool_args " $func_quote_for_eval_result" 1.5221 + 1.5222 + # If the previous option needs an argument, assign it. 1.5223 + if test -n "$prev"; then 1.5224 + case $prev in 1.5225 + output) 1.5226 + func_append compile_command " @OUTPUT@" 1.5227 + func_append finalize_command " @OUTPUT@" 1.5228 + ;; 1.5229 + esac 1.5230 + 1.5231 + case $prev in 1.5232 + bindir) 1.5233 + bindir="$arg" 1.5234 + prev= 1.5235 + continue 1.5236 + ;; 1.5237 + dlfiles|dlprefiles) 1.5238 + if test "$preload" = no; then 1.5239 + # Add the symbol object into the linking commands. 1.5240 + func_append compile_command " @SYMFILE@" 1.5241 + func_append finalize_command " @SYMFILE@" 1.5242 + preload=yes 1.5243 + fi 1.5244 + case $arg in 1.5245 + *.la | *.lo) ;; # We handle these cases below. 1.5246 + force) 1.5247 + if test "$dlself" = no; then 1.5248 + dlself=needless 1.5249 + export_dynamic=yes 1.5250 + fi 1.5251 + prev= 1.5252 + continue 1.5253 + ;; 1.5254 + self) 1.5255 + if test "$prev" = dlprefiles; then 1.5256 + dlself=yes 1.5257 + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then 1.5258 + dlself=yes 1.5259 + else 1.5260 + dlself=needless 1.5261 + export_dynamic=yes 1.5262 + fi 1.5263 + prev= 1.5264 + continue 1.5265 + ;; 1.5266 + *) 1.5267 + if test "$prev" = dlfiles; then 1.5268 + func_append dlfiles " $arg" 1.5269 + else 1.5270 + func_append dlprefiles " $arg" 1.5271 + fi 1.5272 + prev= 1.5273 + continue 1.5274 + ;; 1.5275 + esac 1.5276 + ;; 1.5277 + expsyms) 1.5278 + export_symbols="$arg" 1.5279 + test -f "$arg" \ 1.5280 + || func_fatal_error "symbol file \`$arg' does not exist" 1.5281 + prev= 1.5282 + continue 1.5283 + ;; 1.5284 + expsyms_regex) 1.5285 + export_symbols_regex="$arg" 1.5286 + prev= 1.5287 + continue 1.5288 + ;; 1.5289 + framework) 1.5290 + case $host in 1.5291 + *-*-darwin*) 1.5292 + case "$deplibs " in 1.5293 + *" $qarg.ltframework "*) ;; 1.5294 + *) func_append deplibs " $qarg.ltframework" # this is fixed later 1.5295 + ;; 1.5296 + esac 1.5297 + ;; 1.5298 + esac 1.5299 + prev= 1.5300 + continue 1.5301 + ;; 1.5302 + inst_prefix) 1.5303 + inst_prefix_dir="$arg" 1.5304 + prev= 1.5305 + continue 1.5306 + ;; 1.5307 + objectlist) 1.5308 + if test -f "$arg"; then 1.5309 + save_arg=$arg 1.5310 + moreargs= 1.5311 + for fil in `cat "$save_arg"` 1.5312 + do 1.5313 +# func_append moreargs " $fil" 1.5314 + arg=$fil 1.5315 + # A libtool-controlled object. 1.5316 + 1.5317 + # Check to see that this really is a libtool object. 1.5318 + if func_lalib_unsafe_p "$arg"; then 1.5319 + pic_object= 1.5320 + non_pic_object= 1.5321 + 1.5322 + # Read the .lo file 1.5323 + func_source "$arg" 1.5324 + 1.5325 + if test -z "$pic_object" || 1.5326 + test -z "$non_pic_object" || 1.5327 + test "$pic_object" = none && 1.5328 + test "$non_pic_object" = none; then 1.5329 + func_fatal_error "cannot find name of object for \`$arg'" 1.5330 + fi 1.5331 + 1.5332 + # Extract subdirectory from the argument. 1.5333 + func_dirname "$arg" "/" "" 1.5334 + xdir="$func_dirname_result" 1.5335 + 1.5336 + if test "$pic_object" != none; then 1.5337 + # Prepend the subdirectory the object is found in. 1.5338 + pic_object="$xdir$pic_object" 1.5339 + 1.5340 + if test "$prev" = dlfiles; then 1.5341 + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1.5342 + func_append dlfiles " $pic_object" 1.5343 + prev= 1.5344 + continue 1.5345 + else 1.5346 + # If libtool objects are unsupported, then we need to preload. 1.5347 + prev=dlprefiles 1.5348 + fi 1.5349 + fi 1.5350 + 1.5351 + # CHECK ME: I think I busted this. -Ossama 1.5352 + if test "$prev" = dlprefiles; then 1.5353 + # Preload the old-style object. 1.5354 + func_append dlprefiles " $pic_object" 1.5355 + prev= 1.5356 + fi 1.5357 + 1.5358 + # A PIC object. 1.5359 + func_append libobjs " $pic_object" 1.5360 + arg="$pic_object" 1.5361 + fi 1.5362 + 1.5363 + # Non-PIC object. 1.5364 + if test "$non_pic_object" != none; then 1.5365 + # Prepend the subdirectory the object is found in. 1.5366 + non_pic_object="$xdir$non_pic_object" 1.5367 + 1.5368 + # A standard non-PIC object 1.5369 + func_append non_pic_objects " $non_pic_object" 1.5370 + if test -z "$pic_object" || test "$pic_object" = none ; then 1.5371 + arg="$non_pic_object" 1.5372 + fi 1.5373 + else 1.5374 + # If the PIC object exists, use it instead. 1.5375 + # $xdir was prepended to $pic_object above. 1.5376 + non_pic_object="$pic_object" 1.5377 + func_append non_pic_objects " $non_pic_object" 1.5378 + fi 1.5379 + else 1.5380 + # Only an error if not doing a dry-run. 1.5381 + if $opt_dry_run; then 1.5382 + # Extract subdirectory from the argument. 1.5383 + func_dirname "$arg" "/" "" 1.5384 + xdir="$func_dirname_result" 1.5385 + 1.5386 + func_lo2o "$arg" 1.5387 + pic_object=$xdir$objdir/$func_lo2o_result 1.5388 + non_pic_object=$xdir$func_lo2o_result 1.5389 + func_append libobjs " $pic_object" 1.5390 + func_append non_pic_objects " $non_pic_object" 1.5391 + else 1.5392 + func_fatal_error "\`$arg' is not a valid libtool object" 1.5393 + fi 1.5394 + fi 1.5395 + done 1.5396 + else 1.5397 + func_fatal_error "link input file \`$arg' does not exist" 1.5398 + fi 1.5399 + arg=$save_arg 1.5400 + prev= 1.5401 + continue 1.5402 + ;; 1.5403 + precious_regex) 1.5404 + precious_files_regex="$arg" 1.5405 + prev= 1.5406 + continue 1.5407 + ;; 1.5408 + release) 1.5409 + release="-$arg" 1.5410 + prev= 1.5411 + continue 1.5412 + ;; 1.5413 + rpath | xrpath) 1.5414 + # We need an absolute path. 1.5415 + case $arg in 1.5416 + [\\/]* | [A-Za-z]:[\\/]*) ;; 1.5417 + *) 1.5418 + func_fatal_error "only absolute run-paths are allowed" 1.5419 + ;; 1.5420 + esac 1.5421 + if test "$prev" = rpath; then 1.5422 + case "$rpath " in 1.5423 + *" $arg "*) ;; 1.5424 + *) func_append rpath " $arg" ;; 1.5425 + esac 1.5426 + else 1.5427 + case "$xrpath " in 1.5428 + *" $arg "*) ;; 1.5429 + *) func_append xrpath " $arg" ;; 1.5430 + esac 1.5431 + fi 1.5432 + prev= 1.5433 + continue 1.5434 + ;; 1.5435 + shrext) 1.5436 + shrext_cmds="$arg" 1.5437 + prev= 1.5438 + continue 1.5439 + ;; 1.5440 + weak) 1.5441 + func_append weak_libs " $arg" 1.5442 + prev= 1.5443 + continue 1.5444 + ;; 1.5445 + xcclinker) 1.5446 + func_append linker_flags " $qarg" 1.5447 + func_append compiler_flags " $qarg" 1.5448 + prev= 1.5449 + func_append compile_command " $qarg" 1.5450 + func_append finalize_command " $qarg" 1.5451 + continue 1.5452 + ;; 1.5453 + xcompiler) 1.5454 + func_append compiler_flags " $qarg" 1.5455 + prev= 1.5456 + func_append compile_command " $qarg" 1.5457 + func_append finalize_command " $qarg" 1.5458 + continue 1.5459 + ;; 1.5460 + xlinker) 1.5461 + func_append linker_flags " $qarg" 1.5462 + func_append compiler_flags " $wl$qarg" 1.5463 + prev= 1.5464 + func_append compile_command " $wl$qarg" 1.5465 + func_append finalize_command " $wl$qarg" 1.5466 + continue 1.5467 + ;; 1.5468 + *) 1.5469 + eval "$prev=\"\$arg\"" 1.5470 + prev= 1.5471 + continue 1.5472 + ;; 1.5473 + esac 1.5474 + fi # test -n "$prev" 1.5475 + 1.5476 + prevarg="$arg" 1.5477 + 1.5478 + case $arg in 1.5479 + -all-static) 1.5480 + if test -n "$link_static_flag"; then 1.5481 + # See comment for -static flag below, for more details. 1.5482 + func_append compile_command " $link_static_flag" 1.5483 + func_append finalize_command " $link_static_flag" 1.5484 + fi 1.5485 + continue 1.5486 + ;; 1.5487 + 1.5488 + -allow-undefined) 1.5489 + # FIXME: remove this flag sometime in the future. 1.5490 + func_fatal_error "\`-allow-undefined' must not be used because it is the default" 1.5491 + ;; 1.5492 + 1.5493 + -avoid-version) 1.5494 + avoid_version=yes 1.5495 + continue 1.5496 + ;; 1.5497 + 1.5498 + -bindir) 1.5499 + prev=bindir 1.5500 + continue 1.5501 + ;; 1.5502 + 1.5503 + -dlopen) 1.5504 + prev=dlfiles 1.5505 + continue 1.5506 + ;; 1.5507 + 1.5508 + -dlpreopen) 1.5509 + prev=dlprefiles 1.5510 + continue 1.5511 + ;; 1.5512 + 1.5513 + -export-dynamic) 1.5514 + export_dynamic=yes 1.5515 + continue 1.5516 + ;; 1.5517 + 1.5518 + -export-symbols | -export-symbols-regex) 1.5519 + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 1.5520 + func_fatal_error "more than one -exported-symbols argument is not allowed" 1.5521 + fi 1.5522 + if test "X$arg" = "X-export-symbols"; then 1.5523 + prev=expsyms 1.5524 + else 1.5525 + prev=expsyms_regex 1.5526 + fi 1.5527 + continue 1.5528 + ;; 1.5529 + 1.5530 + -framework) 1.5531 + prev=framework 1.5532 + continue 1.5533 + ;; 1.5534 + 1.5535 + -inst-prefix-dir) 1.5536 + prev=inst_prefix 1.5537 + continue 1.5538 + ;; 1.5539 + 1.5540 + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* 1.5541 + # so, if we see these flags be careful not to treat them like -L 1.5542 + -L[A-Z][A-Z]*:*) 1.5543 + case $with_gcc/$host in 1.5544 + no/*-*-irix* | /*-*-irix*) 1.5545 + func_append compile_command " $arg" 1.5546 + func_append finalize_command " $arg" 1.5547 + ;; 1.5548 + esac 1.5549 + continue 1.5550 + ;; 1.5551 + 1.5552 + -L*) 1.5553 + func_stripname "-L" '' "$arg" 1.5554 + if test -z "$func_stripname_result"; then 1.5555 + if test "$#" -gt 0; then 1.5556 + func_fatal_error "require no space between \`-L' and \`$1'" 1.5557 + else 1.5558 + func_fatal_error "need path for \`-L' option" 1.5559 + fi 1.5560 + fi 1.5561 + func_resolve_sysroot "$func_stripname_result" 1.5562 + dir=$func_resolve_sysroot_result 1.5563 + # We need an absolute path. 1.5564 + case $dir in 1.5565 + [\\/]* | [A-Za-z]:[\\/]*) ;; 1.5566 + *) 1.5567 + absdir=`cd "$dir" && pwd` 1.5568 + test -z "$absdir" && \ 1.5569 + func_fatal_error "cannot determine absolute directory name of \`$dir'" 1.5570 + dir="$absdir" 1.5571 + ;; 1.5572 + esac 1.5573 + case "$deplibs " in 1.5574 + *" -L$dir "* | *" $arg "*) 1.5575 + # Will only happen for absolute or sysroot arguments 1.5576 + ;; 1.5577 + *) 1.5578 + # Preserve sysroot, but never include relative directories 1.5579 + case $dir in 1.5580 + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; 1.5581 + *) func_append deplibs " -L$dir" ;; 1.5582 + esac 1.5583 + func_append lib_search_path " $dir" 1.5584 + ;; 1.5585 + esac 1.5586 + case $host in 1.5587 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) 1.5588 + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` 1.5589 + case :$dllsearchpath: in 1.5590 + *":$dir:"*) ;; 1.5591 + ::) dllsearchpath=$dir;; 1.5592 + *) func_append dllsearchpath ":$dir";; 1.5593 + esac 1.5594 + case :$dllsearchpath: in 1.5595 + *":$testbindir:"*) ;; 1.5596 + ::) dllsearchpath=$testbindir;; 1.5597 + *) func_append dllsearchpath ":$testbindir";; 1.5598 + esac 1.5599 + ;; 1.5600 + esac 1.5601 + continue 1.5602 + ;; 1.5603 + 1.5604 + -l*) 1.5605 + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then 1.5606 + case $host in 1.5607 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) 1.5608 + # These systems don't actually have a C or math library (as such) 1.5609 + continue 1.5610 + ;; 1.5611 + *-*-os2*) 1.5612 + # These systems don't actually have a C library (as such) 1.5613 + test "X$arg" = "X-lc" && continue 1.5614 + ;; 1.5615 + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) 1.5616 + # Do not include libc due to us having libc/libc_r. 1.5617 + test "X$arg" = "X-lc" && continue 1.5618 + ;; 1.5619 + *-*-rhapsody* | *-*-darwin1.[012]) 1.5620 + # Rhapsody C and math libraries are in the System framework 1.5621 + func_append deplibs " System.ltframework" 1.5622 + continue 1.5623 + ;; 1.5624 + *-*-sco3.2v5* | *-*-sco5v6*) 1.5625 + # Causes problems with __ctype 1.5626 + test "X$arg" = "X-lc" && continue 1.5627 + ;; 1.5628 + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) 1.5629 + # Compiler inserts libc in the correct place for threads to work 1.5630 + test "X$arg" = "X-lc" && continue 1.5631 + ;; 1.5632 + esac 1.5633 + elif test "X$arg" = "X-lc_r"; then 1.5634 + case $host in 1.5635 + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) 1.5636 + # Do not include libc_r directly, use -pthread flag. 1.5637 + continue 1.5638 + ;; 1.5639 + esac 1.5640 + fi 1.5641 + func_append deplibs " $arg" 1.5642 + continue 1.5643 + ;; 1.5644 + 1.5645 + -module) 1.5646 + module=yes 1.5647 + continue 1.5648 + ;; 1.5649 + 1.5650 + # Tru64 UNIX uses -model [arg] to determine the layout of C++ 1.5651 + # classes, name mangling, and exception handling. 1.5652 + # Darwin uses the -arch flag to determine output architecture. 1.5653 + -model|-arch|-isysroot|--sysroot) 1.5654 + func_append compiler_flags " $arg" 1.5655 + func_append compile_command " $arg" 1.5656 + func_append finalize_command " $arg" 1.5657 + prev=xcompiler 1.5658 + continue 1.5659 + ;; 1.5660 + 1.5661 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ 1.5662 + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) 1.5663 + func_append compiler_flags " $arg" 1.5664 + func_append compile_command " $arg" 1.5665 + func_append finalize_command " $arg" 1.5666 + case "$new_inherited_linker_flags " in 1.5667 + *" $arg "*) ;; 1.5668 + * ) func_append new_inherited_linker_flags " $arg" ;; 1.5669 + esac 1.5670 + continue 1.5671 + ;; 1.5672 + 1.5673 + -multi_module) 1.5674 + single_module="${wl}-multi_module" 1.5675 + continue 1.5676 + ;; 1.5677 + 1.5678 + -no-fast-install) 1.5679 + fast_install=no 1.5680 + continue 1.5681 + ;; 1.5682 + 1.5683 + -no-install) 1.5684 + case $host in 1.5685 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) 1.5686 + # The PATH hackery in wrapper scripts is required on Windows 1.5687 + # and Darwin in order for the loader to find any dlls it needs. 1.5688 + func_warning "\`-no-install' is ignored for $host" 1.5689 + func_warning "assuming \`-no-fast-install' instead" 1.5690 + fast_install=no 1.5691 + ;; 1.5692 + *) no_install=yes ;; 1.5693 + esac 1.5694 + continue 1.5695 + ;; 1.5696 + 1.5697 + -no-undefined) 1.5698 + allow_undefined=no 1.5699 + continue 1.5700 + ;; 1.5701 + 1.5702 + -objectlist) 1.5703 + prev=objectlist 1.5704 + continue 1.5705 + ;; 1.5706 + 1.5707 + -o) prev=output ;; 1.5708 + 1.5709 + -precious-files-regex) 1.5710 + prev=precious_regex 1.5711 + continue 1.5712 + ;; 1.5713 + 1.5714 + -release) 1.5715 + prev=release 1.5716 + continue 1.5717 + ;; 1.5718 + 1.5719 + -rpath) 1.5720 + prev=rpath 1.5721 + continue 1.5722 + ;; 1.5723 + 1.5724 + -R) 1.5725 + prev=xrpath 1.5726 + continue 1.5727 + ;; 1.5728 + 1.5729 + -R*) 1.5730 + func_stripname '-R' '' "$arg" 1.5731 + dir=$func_stripname_result 1.5732 + # We need an absolute path. 1.5733 + case $dir in 1.5734 + [\\/]* | [A-Za-z]:[\\/]*) ;; 1.5735 + =*) 1.5736 + func_stripname '=' '' "$dir" 1.5737 + dir=$lt_sysroot$func_stripname_result 1.5738 + ;; 1.5739 + *) 1.5740 + func_fatal_error "only absolute run-paths are allowed" 1.5741 + ;; 1.5742 + esac 1.5743 + case "$xrpath " in 1.5744 + *" $dir "*) ;; 1.5745 + *) func_append xrpath " $dir" ;; 1.5746 + esac 1.5747 + continue 1.5748 + ;; 1.5749 + 1.5750 + -shared) 1.5751 + # The effects of -shared are defined in a previous loop. 1.5752 + continue 1.5753 + ;; 1.5754 + 1.5755 + -shrext) 1.5756 + prev=shrext 1.5757 + continue 1.5758 + ;; 1.5759 + 1.5760 + -static | -static-libtool-libs) 1.5761 + # The effects of -static are defined in a previous loop. 1.5762 + # We used to do the same as -all-static on platforms that 1.5763 + # didn't have a PIC flag, but the assumption that the effects 1.5764 + # would be equivalent was wrong. It would break on at least 1.5765 + # Digital Unix and AIX. 1.5766 + continue 1.5767 + ;; 1.5768 + 1.5769 + -thread-safe) 1.5770 + thread_safe=yes 1.5771 + continue 1.5772 + ;; 1.5773 + 1.5774 + -version-info) 1.5775 + prev=vinfo 1.5776 + continue 1.5777 + ;; 1.5778 + 1.5779 + -version-number) 1.5780 + prev=vinfo 1.5781 + vinfo_number=yes 1.5782 + continue 1.5783 + ;; 1.5784 + 1.5785 + -weak) 1.5786 + prev=weak 1.5787 + continue 1.5788 + ;; 1.5789 + 1.5790 + -Wc,*) 1.5791 + func_stripname '-Wc,' '' "$arg" 1.5792 + args=$func_stripname_result 1.5793 + arg= 1.5794 + save_ifs="$IFS"; IFS=',' 1.5795 + for flag in $args; do 1.5796 + IFS="$save_ifs" 1.5797 + func_quote_for_eval "$flag" 1.5798 + func_append arg " $func_quote_for_eval_result" 1.5799 + func_append compiler_flags " $func_quote_for_eval_result" 1.5800 + done 1.5801 + IFS="$save_ifs" 1.5802 + func_stripname ' ' '' "$arg" 1.5803 + arg=$func_stripname_result 1.5804 + ;; 1.5805 + 1.5806 + -Wl,*) 1.5807 + func_stripname '-Wl,' '' "$arg" 1.5808 + args=$func_stripname_result 1.5809 + arg= 1.5810 + save_ifs="$IFS"; IFS=',' 1.5811 + for flag in $args; do 1.5812 + IFS="$save_ifs" 1.5813 + func_quote_for_eval "$flag" 1.5814 + func_append arg " $wl$func_quote_for_eval_result" 1.5815 + func_append compiler_flags " $wl$func_quote_for_eval_result" 1.5816 + func_append linker_flags " $func_quote_for_eval_result" 1.5817 + done 1.5818 + IFS="$save_ifs" 1.5819 + func_stripname ' ' '' "$arg" 1.5820 + arg=$func_stripname_result 1.5821 + ;; 1.5822 + 1.5823 + -Xcompiler) 1.5824 + prev=xcompiler 1.5825 + continue 1.5826 + ;; 1.5827 + 1.5828 + -Xlinker) 1.5829 + prev=xlinker 1.5830 + continue 1.5831 + ;; 1.5832 + 1.5833 + -XCClinker) 1.5834 + prev=xcclinker 1.5835 + continue 1.5836 + ;; 1.5837 + 1.5838 + # -msg_* for osf cc 1.5839 + -msg_*) 1.5840 + func_quote_for_eval "$arg" 1.5841 + arg="$func_quote_for_eval_result" 1.5842 + ;; 1.5843 + 1.5844 + # Flags to be passed through unchanged, with rationale: 1.5845 + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler 1.5846 + # -r[0-9][0-9]* specify processor for the SGI compiler 1.5847 + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler 1.5848 + # +DA*, +DD* enable 64-bit mode for the HP compiler 1.5849 + # -q* compiler args for the IBM compiler 1.5850 + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC 1.5851 + # -F/path path to uninstalled frameworks, gcc on darwin 1.5852 + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC 1.5853 + # @file GCC response files 1.5854 + # -tp=* Portland pgcc target processor selection 1.5855 + # --sysroot=* for sysroot support 1.5856 + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization 1.5857 + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ 1.5858 + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ 1.5859 + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) 1.5860 + func_quote_for_eval "$arg" 1.5861 + arg="$func_quote_for_eval_result" 1.5862 + func_append compile_command " $arg" 1.5863 + func_append finalize_command " $arg" 1.5864 + func_append compiler_flags " $arg" 1.5865 + continue 1.5866 + ;; 1.5867 + 1.5868 + # Some other compiler flag. 1.5869 + -* | +*) 1.5870 + func_quote_for_eval "$arg" 1.5871 + arg="$func_quote_for_eval_result" 1.5872 + ;; 1.5873 + 1.5874 + *.$objext) 1.5875 + # A standard object. 1.5876 + func_append objs " $arg" 1.5877 + ;; 1.5878 + 1.5879 + *.lo) 1.5880 + # A libtool-controlled object. 1.5881 + 1.5882 + # Check to see that this really is a libtool object. 1.5883 + if func_lalib_unsafe_p "$arg"; then 1.5884 + pic_object= 1.5885 + non_pic_object= 1.5886 + 1.5887 + # Read the .lo file 1.5888 + func_source "$arg" 1.5889 + 1.5890 + if test -z "$pic_object" || 1.5891 + test -z "$non_pic_object" || 1.5892 + test "$pic_object" = none && 1.5893 + test "$non_pic_object" = none; then 1.5894 + func_fatal_error "cannot find name of object for \`$arg'" 1.5895 + fi 1.5896 + 1.5897 + # Extract subdirectory from the argument. 1.5898 + func_dirname "$arg" "/" "" 1.5899 + xdir="$func_dirname_result" 1.5900 + 1.5901 + if test "$pic_object" != none; then 1.5902 + # Prepend the subdirectory the object is found in. 1.5903 + pic_object="$xdir$pic_object" 1.5904 + 1.5905 + if test "$prev" = dlfiles; then 1.5906 + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1.5907 + func_append dlfiles " $pic_object" 1.5908 + prev= 1.5909 + continue 1.5910 + else 1.5911 + # If libtool objects are unsupported, then we need to preload. 1.5912 + prev=dlprefiles 1.5913 + fi 1.5914 + fi 1.5915 + 1.5916 + # CHECK ME: I think I busted this. -Ossama 1.5917 + if test "$prev" = dlprefiles; then 1.5918 + # Preload the old-style object. 1.5919 + func_append dlprefiles " $pic_object" 1.5920 + prev= 1.5921 + fi 1.5922 + 1.5923 + # A PIC object. 1.5924 + func_append libobjs " $pic_object" 1.5925 + arg="$pic_object" 1.5926 + fi 1.5927 + 1.5928 + # Non-PIC object. 1.5929 + if test "$non_pic_object" != none; then 1.5930 + # Prepend the subdirectory the object is found in. 1.5931 + non_pic_object="$xdir$non_pic_object" 1.5932 + 1.5933 + # A standard non-PIC object 1.5934 + func_append non_pic_objects " $non_pic_object" 1.5935 + if test -z "$pic_object" || test "$pic_object" = none ; then 1.5936 + arg="$non_pic_object" 1.5937 + fi 1.5938 + else 1.5939 + # If the PIC object exists, use it instead. 1.5940 + # $xdir was prepended to $pic_object above. 1.5941 + non_pic_object="$pic_object" 1.5942 + func_append non_pic_objects " $non_pic_object" 1.5943 + fi 1.5944 + else 1.5945 + # Only an error if not doing a dry-run. 1.5946 + if $opt_dry_run; then 1.5947 + # Extract subdirectory from the argument. 1.5948 + func_dirname "$arg" "/" "" 1.5949 + xdir="$func_dirname_result" 1.5950 + 1.5951 + func_lo2o "$arg" 1.5952 + pic_object=$xdir$objdir/$func_lo2o_result 1.5953 + non_pic_object=$xdir$func_lo2o_result 1.5954 + func_append libobjs " $pic_object" 1.5955 + func_append non_pic_objects " $non_pic_object" 1.5956 + else 1.5957 + func_fatal_error "\`$arg' is not a valid libtool object" 1.5958 + fi 1.5959 + fi 1.5960 + ;; 1.5961 + 1.5962 + *.$libext) 1.5963 + # An archive. 1.5964 + func_append deplibs " $arg" 1.5965 + func_append old_deplibs " $arg" 1.5966 + continue 1.5967 + ;; 1.5968 + 1.5969 + *.la) 1.5970 + # A libtool-controlled library. 1.5971 + 1.5972 + func_resolve_sysroot "$arg" 1.5973 + if test "$prev" = dlfiles; then 1.5974 + # This library was specified with -dlopen. 1.5975 + func_append dlfiles " $func_resolve_sysroot_result" 1.5976 + prev= 1.5977 + elif test "$prev" = dlprefiles; then 1.5978 + # The library was specified with -dlpreopen. 1.5979 + func_append dlprefiles " $func_resolve_sysroot_result" 1.5980 + prev= 1.5981 + else 1.5982 + func_append deplibs " $func_resolve_sysroot_result" 1.5983 + fi 1.5984 + continue 1.5985 + ;; 1.5986 + 1.5987 + # Some other compiler argument. 1.5988 + *) 1.5989 + # Unknown arguments in both finalize_command and compile_command need 1.5990 + # to be aesthetically quoted because they are evaled later. 1.5991 + func_quote_for_eval "$arg" 1.5992 + arg="$func_quote_for_eval_result" 1.5993 + ;; 1.5994 + esac # arg 1.5995 + 1.5996 + # Now actually substitute the argument into the commands. 1.5997 + if test -n "$arg"; then 1.5998 + func_append compile_command " $arg" 1.5999 + func_append finalize_command " $arg" 1.6000 + fi 1.6001 + done # argument parsing loop 1.6002 + 1.6003 + test -n "$prev" && \ 1.6004 + func_fatal_help "the \`$prevarg' option requires an argument" 1.6005 + 1.6006 + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then 1.6007 + eval arg=\"$export_dynamic_flag_spec\" 1.6008 + func_append compile_command " $arg" 1.6009 + func_append finalize_command " $arg" 1.6010 + fi 1.6011 + 1.6012 + oldlibs= 1.6013 + # calculate the name of the file, without its directory 1.6014 + func_basename "$output" 1.6015 + outputname="$func_basename_result" 1.6016 + libobjs_save="$libobjs" 1.6017 + 1.6018 + if test -n "$shlibpath_var"; then 1.6019 + # get the directories listed in $shlibpath_var 1.6020 + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` 1.6021 + else 1.6022 + shlib_search_path= 1.6023 + fi 1.6024 + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" 1.6025 + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" 1.6026 + 1.6027 + func_dirname "$output" "/" "" 1.6028 + output_objdir="$func_dirname_result$objdir" 1.6029 + func_to_tool_file "$output_objdir/" 1.6030 + tool_output_objdir=$func_to_tool_file_result 1.6031 + # Create the object directory. 1.6032 + func_mkdir_p "$output_objdir" 1.6033 + 1.6034 + # Determine the type of output 1.6035 + case $output in 1.6036 + "") 1.6037 + func_fatal_help "you must specify an output file" 1.6038 + ;; 1.6039 + *.$libext) linkmode=oldlib ;; 1.6040 + *.lo | *.$objext) linkmode=obj ;; 1.6041 + *.la) linkmode=lib ;; 1.6042 + *) linkmode=prog ;; # Anything else should be a program. 1.6043 + esac 1.6044 + 1.6045 + specialdeplibs= 1.6046 + 1.6047 + libs= 1.6048 + # Find all interdependent deplibs by searching for libraries 1.6049 + # that are linked more than once (e.g. -la -lb -la) 1.6050 + for deplib in $deplibs; do 1.6051 + if $opt_preserve_dup_deps ; then 1.6052 + case "$libs " in 1.6053 + *" $deplib "*) func_append specialdeplibs " $deplib" ;; 1.6054 + esac 1.6055 + fi 1.6056 + func_append libs " $deplib" 1.6057 + done 1.6058 + 1.6059 + if test "$linkmode" = lib; then 1.6060 + libs="$predeps $libs $compiler_lib_search_path $postdeps" 1.6061 + 1.6062 + # Compute libraries that are listed more than once in $predeps 1.6063 + # $postdeps and mark them as special (i.e., whose duplicates are 1.6064 + # not to be eliminated). 1.6065 + pre_post_deps= 1.6066 + if $opt_duplicate_compiler_generated_deps; then 1.6067 + for pre_post_dep in $predeps $postdeps; do 1.6068 + case "$pre_post_deps " in 1.6069 + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; 1.6070 + esac 1.6071 + func_append pre_post_deps " $pre_post_dep" 1.6072 + done 1.6073 + fi 1.6074 + pre_post_deps= 1.6075 + fi 1.6076 + 1.6077 + deplibs= 1.6078 + newdependency_libs= 1.6079 + newlib_search_path= 1.6080 + need_relink=no # whether we're linking any uninstalled libtool libraries 1.6081 + notinst_deplibs= # not-installed libtool libraries 1.6082 + notinst_path= # paths that contain not-installed libtool libraries 1.6083 + 1.6084 + case $linkmode in 1.6085 + lib) 1.6086 + passes="conv dlpreopen link" 1.6087 + for file in $dlfiles $dlprefiles; do 1.6088 + case $file in 1.6089 + *.la) ;; 1.6090 + *) 1.6091 + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" 1.6092 + ;; 1.6093 + esac 1.6094 + done 1.6095 + ;; 1.6096 + prog) 1.6097 + compile_deplibs= 1.6098 + finalize_deplibs= 1.6099 + alldeplibs=no 1.6100 + newdlfiles= 1.6101 + newdlprefiles= 1.6102 + passes="conv scan dlopen dlpreopen link" 1.6103 + ;; 1.6104 + *) passes="conv" 1.6105 + ;; 1.6106 + esac 1.6107 + 1.6108 + for pass in $passes; do 1.6109 + # The preopen pass in lib mode reverses $deplibs; put it back here 1.6110 + # so that -L comes before libs that need it for instance... 1.6111 + if test "$linkmode,$pass" = "lib,link"; then 1.6112 + ## FIXME: Find the place where the list is rebuilt in the wrong 1.6113 + ## order, and fix it there properly 1.6114 + tmp_deplibs= 1.6115 + for deplib in $deplibs; do 1.6116 + tmp_deplibs="$deplib $tmp_deplibs" 1.6117 + done 1.6118 + deplibs="$tmp_deplibs" 1.6119 + fi 1.6120 + 1.6121 + if test "$linkmode,$pass" = "lib,link" || 1.6122 + test "$linkmode,$pass" = "prog,scan"; then 1.6123 + libs="$deplibs" 1.6124 + deplibs= 1.6125 + fi 1.6126 + if test "$linkmode" = prog; then 1.6127 + case $pass in 1.6128 + dlopen) libs="$dlfiles" ;; 1.6129 + dlpreopen) libs="$dlprefiles" ;; 1.6130 + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; 1.6131 + esac 1.6132 + fi 1.6133 + if test "$linkmode,$pass" = "lib,dlpreopen"; then 1.6134 + # Collect and forward deplibs of preopened libtool libs 1.6135 + for lib in $dlprefiles; do 1.6136 + # Ignore non-libtool-libs 1.6137 + dependency_libs= 1.6138 + func_resolve_sysroot "$lib" 1.6139 + case $lib in 1.6140 + *.la) func_source "$func_resolve_sysroot_result" ;; 1.6141 + esac 1.6142 + 1.6143 + # Collect preopened libtool deplibs, except any this library 1.6144 + # has declared as weak libs 1.6145 + for deplib in $dependency_libs; do 1.6146 + func_basename "$deplib" 1.6147 + deplib_base=$func_basename_result 1.6148 + case " $weak_libs " in 1.6149 + *" $deplib_base "*) ;; 1.6150 + *) func_append deplibs " $deplib" ;; 1.6151 + esac 1.6152 + done 1.6153 + done 1.6154 + libs="$dlprefiles" 1.6155 + fi 1.6156 + if test "$pass" = dlopen; then 1.6157 + # Collect dlpreopened libraries 1.6158 + save_deplibs="$deplibs" 1.6159 + deplibs= 1.6160 + fi 1.6161 + 1.6162 + for deplib in $libs; do 1.6163 + lib= 1.6164 + found=no 1.6165 + case $deplib in 1.6166 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ 1.6167 + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) 1.6168 + if test "$linkmode,$pass" = "prog,link"; then 1.6169 + compile_deplibs="$deplib $compile_deplibs" 1.6170 + finalize_deplibs="$deplib $finalize_deplibs" 1.6171 + else 1.6172 + func_append compiler_flags " $deplib" 1.6173 + if test "$linkmode" = lib ; then 1.6174 + case "$new_inherited_linker_flags " in 1.6175 + *" $deplib "*) ;; 1.6176 + * ) func_append new_inherited_linker_flags " $deplib" ;; 1.6177 + esac 1.6178 + fi 1.6179 + fi 1.6180 + continue 1.6181 + ;; 1.6182 + -l*) 1.6183 + if test "$linkmode" != lib && test "$linkmode" != prog; then 1.6184 + func_warning "\`-l' is ignored for archives/objects" 1.6185 + continue 1.6186 + fi 1.6187 + func_stripname '-l' '' "$deplib" 1.6188 + name=$func_stripname_result 1.6189 + if test "$linkmode" = lib; then 1.6190 + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" 1.6191 + else 1.6192 + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" 1.6193 + fi 1.6194 + for searchdir in $searchdirs; do 1.6195 + for search_ext in .la $std_shrext .so .a; do 1.6196 + # Search the libtool library 1.6197 + lib="$searchdir/lib${name}${search_ext}" 1.6198 + if test -f "$lib"; then 1.6199 + if test "$search_ext" = ".la"; then 1.6200 + found=yes 1.6201 + else 1.6202 + found=no 1.6203 + fi 1.6204 + break 2 1.6205 + fi 1.6206 + done 1.6207 + done 1.6208 + if test "$found" != yes; then 1.6209 + # deplib doesn't seem to be a libtool library 1.6210 + if test "$linkmode,$pass" = "prog,link"; then 1.6211 + compile_deplibs="$deplib $compile_deplibs" 1.6212 + finalize_deplibs="$deplib $finalize_deplibs" 1.6213 + else 1.6214 + deplibs="$deplib $deplibs" 1.6215 + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" 1.6216 + fi 1.6217 + continue 1.6218 + else # deplib is a libtool library 1.6219 + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, 1.6220 + # We need to do some special things here, and not later. 1.6221 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 1.6222 + case " $predeps $postdeps " in 1.6223 + *" $deplib "*) 1.6224 + if func_lalib_p "$lib"; then 1.6225 + library_names= 1.6226 + old_library= 1.6227 + func_source "$lib" 1.6228 + for l in $old_library $library_names; do 1.6229 + ll="$l" 1.6230 + done 1.6231 + if test "X$ll" = "X$old_library" ; then # only static version available 1.6232 + found=no 1.6233 + func_dirname "$lib" "" "." 1.6234 + ladir="$func_dirname_result" 1.6235 + lib=$ladir/$old_library 1.6236 + if test "$linkmode,$pass" = "prog,link"; then 1.6237 + compile_deplibs="$deplib $compile_deplibs" 1.6238 + finalize_deplibs="$deplib $finalize_deplibs" 1.6239 + else 1.6240 + deplibs="$deplib $deplibs" 1.6241 + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" 1.6242 + fi 1.6243 + continue 1.6244 + fi 1.6245 + fi 1.6246 + ;; 1.6247 + *) ;; 1.6248 + esac 1.6249 + fi 1.6250 + fi 1.6251 + ;; # -l 1.6252 + *.ltframework) 1.6253 + if test "$linkmode,$pass" = "prog,link"; then 1.6254 + compile_deplibs="$deplib $compile_deplibs" 1.6255 + finalize_deplibs="$deplib $finalize_deplibs" 1.6256 + else 1.6257 + deplibs="$deplib $deplibs" 1.6258 + if test "$linkmode" = lib ; then 1.6259 + case "$new_inherited_linker_flags " in 1.6260 + *" $deplib "*) ;; 1.6261 + * ) func_append new_inherited_linker_flags " $deplib" ;; 1.6262 + esac 1.6263 + fi 1.6264 + fi 1.6265 + continue 1.6266 + ;; 1.6267 + -L*) 1.6268 + case $linkmode in 1.6269 + lib) 1.6270 + deplibs="$deplib $deplibs" 1.6271 + test "$pass" = conv && continue 1.6272 + newdependency_libs="$deplib $newdependency_libs" 1.6273 + func_stripname '-L' '' "$deplib" 1.6274 + func_resolve_sysroot "$func_stripname_result" 1.6275 + func_append newlib_search_path " $func_resolve_sysroot_result" 1.6276 + ;; 1.6277 + prog) 1.6278 + if test "$pass" = conv; then 1.6279 + deplibs="$deplib $deplibs" 1.6280 + continue 1.6281 + fi 1.6282 + if test "$pass" = scan; then 1.6283 + deplibs="$deplib $deplibs" 1.6284 + else 1.6285 + compile_deplibs="$deplib $compile_deplibs" 1.6286 + finalize_deplibs="$deplib $finalize_deplibs" 1.6287 + fi 1.6288 + func_stripname '-L' '' "$deplib" 1.6289 + func_resolve_sysroot "$func_stripname_result" 1.6290 + func_append newlib_search_path " $func_resolve_sysroot_result" 1.6291 + ;; 1.6292 + *) 1.6293 + func_warning "\`-L' is ignored for archives/objects" 1.6294 + ;; 1.6295 + esac # linkmode 1.6296 + continue 1.6297 + ;; # -L 1.6298 + -R*) 1.6299 + if test "$pass" = link; then 1.6300 + func_stripname '-R' '' "$deplib" 1.6301 + func_resolve_sysroot "$func_stripname_result" 1.6302 + dir=$func_resolve_sysroot_result 1.6303 + # Make sure the xrpath contains only unique directories. 1.6304 + case "$xrpath " in 1.6305 + *" $dir "*) ;; 1.6306 + *) func_append xrpath " $dir" ;; 1.6307 + esac 1.6308 + fi 1.6309 + deplibs="$deplib $deplibs" 1.6310 + continue 1.6311 + ;; 1.6312 + *.la) 1.6313 + func_resolve_sysroot "$deplib" 1.6314 + lib=$func_resolve_sysroot_result 1.6315 + ;; 1.6316 + *.$libext) 1.6317 + if test "$pass" = conv; then 1.6318 + deplibs="$deplib $deplibs" 1.6319 + continue 1.6320 + fi 1.6321 + case $linkmode in 1.6322 + lib) 1.6323 + # Linking convenience modules into shared libraries is allowed, 1.6324 + # but linking other static libraries is non-portable. 1.6325 + case " $dlpreconveniencelibs " in 1.6326 + *" $deplib "*) ;; 1.6327 + *) 1.6328 + valid_a_lib=no 1.6329 + case $deplibs_check_method in 1.6330 + match_pattern*) 1.6331 + set dummy $deplibs_check_method; shift 1.6332 + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` 1.6333 + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ 1.6334 + | $EGREP "$match_pattern_regex" > /dev/null; then 1.6335 + valid_a_lib=yes 1.6336 + fi 1.6337 + ;; 1.6338 + pass_all) 1.6339 + valid_a_lib=yes 1.6340 + ;; 1.6341 + esac 1.6342 + if test "$valid_a_lib" != yes; then 1.6343 + echo 1.6344 + $ECHO "*** Warning: Trying to link with static lib archive $deplib." 1.6345 + echo "*** I have the capability to make that library automatically link in when" 1.6346 + echo "*** you link to this library. But I can only do this if you have a" 1.6347 + echo "*** shared version of the library, which you do not appear to have" 1.6348 + echo "*** because the file extensions .$libext of this argument makes me believe" 1.6349 + echo "*** that it is just a static archive that I should not use here." 1.6350 + else 1.6351 + echo 1.6352 + $ECHO "*** Warning: Linking the shared library $output against the" 1.6353 + $ECHO "*** static library $deplib is not portable!" 1.6354 + deplibs="$deplib $deplibs" 1.6355 + fi 1.6356 + ;; 1.6357 + esac 1.6358 + continue 1.6359 + ;; 1.6360 + prog) 1.6361 + if test "$pass" != link; then 1.6362 + deplibs="$deplib $deplibs" 1.6363 + else 1.6364 + compile_deplibs="$deplib $compile_deplibs" 1.6365 + finalize_deplibs="$deplib $finalize_deplibs" 1.6366 + fi 1.6367 + continue 1.6368 + ;; 1.6369 + esac # linkmode 1.6370 + ;; # *.$libext 1.6371 + *.lo | *.$objext) 1.6372 + if test "$pass" = conv; then 1.6373 + deplibs="$deplib $deplibs" 1.6374 + elif test "$linkmode" = prog; then 1.6375 + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1.6376 + # If there is no dlopen support or we're linking statically, 1.6377 + # we need to preload. 1.6378 + func_append newdlprefiles " $deplib" 1.6379 + compile_deplibs="$deplib $compile_deplibs" 1.6380 + finalize_deplibs="$deplib $finalize_deplibs" 1.6381 + else 1.6382 + func_append newdlfiles " $deplib" 1.6383 + fi 1.6384 + fi 1.6385 + continue 1.6386 + ;; 1.6387 + %DEPLIBS%) 1.6388 + alldeplibs=yes 1.6389 + continue 1.6390 + ;; 1.6391 + esac # case $deplib 1.6392 + 1.6393 + if test "$found" = yes || test -f "$lib"; then : 1.6394 + else 1.6395 + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" 1.6396 + fi 1.6397 + 1.6398 + # Check to see that this really is a libtool archive. 1.6399 + func_lalib_unsafe_p "$lib" \ 1.6400 + || func_fatal_error "\`$lib' is not a valid libtool archive" 1.6401 + 1.6402 + func_dirname "$lib" "" "." 1.6403 + ladir="$func_dirname_result" 1.6404 + 1.6405 + dlname= 1.6406 + dlopen= 1.6407 + dlpreopen= 1.6408 + libdir= 1.6409 + library_names= 1.6410 + old_library= 1.6411 + inherited_linker_flags= 1.6412 + # If the library was installed with an old release of libtool, 1.6413 + # it will not redefine variables installed, or shouldnotlink 1.6414 + installed=yes 1.6415 + shouldnotlink=no 1.6416 + avoidtemprpath= 1.6417 + 1.6418 + 1.6419 + # Read the .la file 1.6420 + func_source "$lib" 1.6421 + 1.6422 + # Convert "-framework foo" to "foo.ltframework" 1.6423 + if test -n "$inherited_linker_flags"; then 1.6424 + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` 1.6425 + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do 1.6426 + case " $new_inherited_linker_flags " in 1.6427 + *" $tmp_inherited_linker_flag "*) ;; 1.6428 + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; 1.6429 + esac 1.6430 + done 1.6431 + fi 1.6432 + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` 1.6433 + if test "$linkmode,$pass" = "lib,link" || 1.6434 + test "$linkmode,$pass" = "prog,scan" || 1.6435 + { test "$linkmode" != prog && test "$linkmode" != lib; }; then 1.6436 + test -n "$dlopen" && func_append dlfiles " $dlopen" 1.6437 + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" 1.6438 + fi 1.6439 + 1.6440 + if test "$pass" = conv; then 1.6441 + # Only check for convenience libraries 1.6442 + deplibs="$lib $deplibs" 1.6443 + if test -z "$libdir"; then 1.6444 + if test -z "$old_library"; then 1.6445 + func_fatal_error "cannot find name of link library for \`$lib'" 1.6446 + fi 1.6447 + # It is a libtool convenience library, so add in its objects. 1.6448 + func_append convenience " $ladir/$objdir/$old_library" 1.6449 + func_append old_convenience " $ladir/$objdir/$old_library" 1.6450 + elif test "$linkmode" != prog && test "$linkmode" != lib; then 1.6451 + func_fatal_error "\`$lib' is not a convenience library" 1.6452 + fi 1.6453 + tmp_libs= 1.6454 + for deplib in $dependency_libs; do 1.6455 + deplibs="$deplib $deplibs" 1.6456 + if $opt_preserve_dup_deps ; then 1.6457 + case "$tmp_libs " in 1.6458 + *" $deplib "*) func_append specialdeplibs " $deplib" ;; 1.6459 + esac 1.6460 + fi 1.6461 + func_append tmp_libs " $deplib" 1.6462 + done 1.6463 + continue 1.6464 + fi # $pass = conv 1.6465 + 1.6466 + 1.6467 + # Get the name of the library we link against. 1.6468 + linklib= 1.6469 + if test -n "$old_library" && 1.6470 + { test "$prefer_static_libs" = yes || 1.6471 + test "$prefer_static_libs,$installed" = "built,no"; }; then 1.6472 + linklib=$old_library 1.6473 + else 1.6474 + for l in $old_library $library_names; do 1.6475 + linklib="$l" 1.6476 + done 1.6477 + fi 1.6478 + if test -z "$linklib"; then 1.6479 + func_fatal_error "cannot find name of link library for \`$lib'" 1.6480 + fi 1.6481 + 1.6482 + # This library was specified with -dlopen. 1.6483 + if test "$pass" = dlopen; then 1.6484 + if test -z "$libdir"; then 1.6485 + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" 1.6486 + fi 1.6487 + if test -z "$dlname" || 1.6488 + test "$dlopen_support" != yes || 1.6489 + test "$build_libtool_libs" = no; then 1.6490 + # If there is no dlname, no dlopen support or we're linking 1.6491 + # statically, we need to preload. We also need to preload any 1.6492 + # dependent libraries so libltdl's deplib preloader doesn't 1.6493 + # bomb out in the load deplibs phase. 1.6494 + func_append dlprefiles " $lib $dependency_libs" 1.6495 + else 1.6496 + func_append newdlfiles " $lib" 1.6497 + fi 1.6498 + continue 1.6499 + fi # $pass = dlopen 1.6500 + 1.6501 + # We need an absolute path. 1.6502 + case $ladir in 1.6503 + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; 1.6504 + *) 1.6505 + abs_ladir=`cd "$ladir" && pwd` 1.6506 + if test -z "$abs_ladir"; then 1.6507 + func_warning "cannot determine absolute directory name of \`$ladir'" 1.6508 + func_warning "passing it literally to the linker, although it might fail" 1.6509 + abs_ladir="$ladir" 1.6510 + fi 1.6511 + ;; 1.6512 + esac 1.6513 + func_basename "$lib" 1.6514 + laname="$func_basename_result" 1.6515 + 1.6516 + # Find the relevant object directory and library name. 1.6517 + if test "X$installed" = Xyes; then 1.6518 + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then 1.6519 + func_warning "library \`$lib' was moved." 1.6520 + dir="$ladir" 1.6521 + absdir="$abs_ladir" 1.6522 + libdir="$abs_ladir" 1.6523 + else 1.6524 + dir="$lt_sysroot$libdir" 1.6525 + absdir="$lt_sysroot$libdir" 1.6526 + fi 1.6527 + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes 1.6528 + else 1.6529 + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then 1.6530 + dir="$ladir" 1.6531 + absdir="$abs_ladir" 1.6532 + # Remove this search path later 1.6533 + func_append notinst_path " $abs_ladir" 1.6534 + else 1.6535 + dir="$ladir/$objdir" 1.6536 + absdir="$abs_ladir/$objdir" 1.6537 + # Remove this search path later 1.6538 + func_append notinst_path " $abs_ladir" 1.6539 + fi 1.6540 + fi # $installed = yes 1.6541 + func_stripname 'lib' '.la' "$laname" 1.6542 + name=$func_stripname_result 1.6543 + 1.6544 + # This library was specified with -dlpreopen. 1.6545 + if test "$pass" = dlpreopen; then 1.6546 + if test -z "$libdir" && test "$linkmode" = prog; then 1.6547 + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" 1.6548 + fi 1.6549 + case "$host" in 1.6550 + # special handling for platforms with PE-DLLs. 1.6551 + *cygwin* | *mingw* | *cegcc* ) 1.6552 + # Linker will automatically link against shared library if both 1.6553 + # static and shared are present. Therefore, ensure we extract 1.6554 + # symbols from the import library if a shared library is present 1.6555 + # (otherwise, the dlopen module name will be incorrect). We do 1.6556 + # this by putting the import library name into $newdlprefiles. 1.6557 + # We recover the dlopen module name by 'saving' the la file 1.6558 + # name in a special purpose variable, and (later) extracting the 1.6559 + # dlname from the la file. 1.6560 + if test -n "$dlname"; then 1.6561 + func_tr_sh "$dir/$linklib" 1.6562 + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" 1.6563 + func_append newdlprefiles " $dir/$linklib" 1.6564 + else 1.6565 + func_append newdlprefiles " $dir/$old_library" 1.6566 + # Keep a list of preopened convenience libraries to check 1.6567 + # that they are being used correctly in the link pass. 1.6568 + test -z "$libdir" && \ 1.6569 + func_append dlpreconveniencelibs " $dir/$old_library" 1.6570 + fi 1.6571 + ;; 1.6572 + * ) 1.6573 + # Prefer using a static library (so that no silly _DYNAMIC symbols 1.6574 + # are required to link). 1.6575 + if test -n "$old_library"; then 1.6576 + func_append newdlprefiles " $dir/$old_library" 1.6577 + # Keep a list of preopened convenience libraries to check 1.6578 + # that they are being used correctly in the link pass. 1.6579 + test -z "$libdir" && \ 1.6580 + func_append dlpreconveniencelibs " $dir/$old_library" 1.6581 + # Otherwise, use the dlname, so that lt_dlopen finds it. 1.6582 + elif test -n "$dlname"; then 1.6583 + func_append newdlprefiles " $dir/$dlname" 1.6584 + else 1.6585 + func_append newdlprefiles " $dir/$linklib" 1.6586 + fi 1.6587 + ;; 1.6588 + esac 1.6589 + fi # $pass = dlpreopen 1.6590 + 1.6591 + if test -z "$libdir"; then 1.6592 + # Link the convenience library 1.6593 + if test "$linkmode" = lib; then 1.6594 + deplibs="$dir/$old_library $deplibs" 1.6595 + elif test "$linkmode,$pass" = "prog,link"; then 1.6596 + compile_deplibs="$dir/$old_library $compile_deplibs" 1.6597 + finalize_deplibs="$dir/$old_library $finalize_deplibs" 1.6598 + else 1.6599 + deplibs="$lib $deplibs" # used for prog,scan pass 1.6600 + fi 1.6601 + continue 1.6602 + fi 1.6603 + 1.6604 + 1.6605 + if test "$linkmode" = prog && test "$pass" != link; then 1.6606 + func_append newlib_search_path " $ladir" 1.6607 + deplibs="$lib $deplibs" 1.6608 + 1.6609 + linkalldeplibs=no 1.6610 + if test "$link_all_deplibs" != no || test -z "$library_names" || 1.6611 + test "$build_libtool_libs" = no; then 1.6612 + linkalldeplibs=yes 1.6613 + fi 1.6614 + 1.6615 + tmp_libs= 1.6616 + for deplib in $dependency_libs; do 1.6617 + case $deplib in 1.6618 + -L*) func_stripname '-L' '' "$deplib" 1.6619 + func_resolve_sysroot "$func_stripname_result" 1.6620 + func_append newlib_search_path " $func_resolve_sysroot_result" 1.6621 + ;; 1.6622 + esac 1.6623 + # Need to link against all dependency_libs? 1.6624 + if test "$linkalldeplibs" = yes; then 1.6625 + deplibs="$deplib $deplibs" 1.6626 + else 1.6627 + # Need to hardcode shared library paths 1.6628 + # or/and link against static libraries 1.6629 + newdependency_libs="$deplib $newdependency_libs" 1.6630 + fi 1.6631 + if $opt_preserve_dup_deps ; then 1.6632 + case "$tmp_libs " in 1.6633 + *" $deplib "*) func_append specialdeplibs " $deplib" ;; 1.6634 + esac 1.6635 + fi 1.6636 + func_append tmp_libs " $deplib" 1.6637 + done # for deplib 1.6638 + continue 1.6639 + fi # $linkmode = prog... 1.6640 + 1.6641 + if test "$linkmode,$pass" = "prog,link"; then 1.6642 + if test -n "$library_names" && 1.6643 + { { test "$prefer_static_libs" = no || 1.6644 + test "$prefer_static_libs,$installed" = "built,yes"; } || 1.6645 + test -z "$old_library"; }; then 1.6646 + # We need to hardcode the library path 1.6647 + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then 1.6648 + # Make sure the rpath contains only unique directories. 1.6649 + case "$temp_rpath:" in 1.6650 + *"$absdir:"*) ;; 1.6651 + *) func_append temp_rpath "$absdir:" ;; 1.6652 + esac 1.6653 + fi 1.6654 + 1.6655 + # Hardcode the library path. 1.6656 + # Skip directories that are in the system default run-time 1.6657 + # search path. 1.6658 + case " $sys_lib_dlsearch_path " in 1.6659 + *" $absdir "*) ;; 1.6660 + *) 1.6661 + case "$compile_rpath " in 1.6662 + *" $absdir "*) ;; 1.6663 + *) func_append compile_rpath " $absdir" ;; 1.6664 + esac 1.6665 + ;; 1.6666 + esac 1.6667 + case " $sys_lib_dlsearch_path " in 1.6668 + *" $libdir "*) ;; 1.6669 + *) 1.6670 + case "$finalize_rpath " in 1.6671 + *" $libdir "*) ;; 1.6672 + *) func_append finalize_rpath " $libdir" ;; 1.6673 + esac 1.6674 + ;; 1.6675 + esac 1.6676 + fi # $linkmode,$pass = prog,link... 1.6677 + 1.6678 + if test "$alldeplibs" = yes && 1.6679 + { test "$deplibs_check_method" = pass_all || 1.6680 + { test "$build_libtool_libs" = yes && 1.6681 + test -n "$library_names"; }; }; then 1.6682 + # We only need to search for static libraries 1.6683 + continue 1.6684 + fi 1.6685 + fi 1.6686 + 1.6687 + link_static=no # Whether the deplib will be linked statically 1.6688 + use_static_libs=$prefer_static_libs 1.6689 + if test "$use_static_libs" = built && test "$installed" = yes; then 1.6690 + use_static_libs=no 1.6691 + fi 1.6692 + if test -n "$library_names" && 1.6693 + { test "$use_static_libs" = no || test -z "$old_library"; }; then 1.6694 + case $host in 1.6695 + *cygwin* | *mingw* | *cegcc*) 1.6696 + # No point in relinking DLLs because paths are not encoded 1.6697 + func_append notinst_deplibs " $lib" 1.6698 + need_relink=no 1.6699 + ;; 1.6700 + *) 1.6701 + if test "$installed" = no; then 1.6702 + func_append notinst_deplibs " $lib" 1.6703 + need_relink=yes 1.6704 + fi 1.6705 + ;; 1.6706 + esac 1.6707 + # This is a shared library 1.6708 + 1.6709 + # Warn about portability, can't link against -module's on some 1.6710 + # systems (darwin). Don't bleat about dlopened modules though! 1.6711 + dlopenmodule="" 1.6712 + for dlpremoduletest in $dlprefiles; do 1.6713 + if test "X$dlpremoduletest" = "X$lib"; then 1.6714 + dlopenmodule="$dlpremoduletest" 1.6715 + break 1.6716 + fi 1.6717 + done 1.6718 + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then 1.6719 + echo 1.6720 + if test "$linkmode" = prog; then 1.6721 + $ECHO "*** Warning: Linking the executable $output against the loadable module" 1.6722 + else 1.6723 + $ECHO "*** Warning: Linking the shared library $output against the loadable module" 1.6724 + fi 1.6725 + $ECHO "*** $linklib is not portable!" 1.6726 + fi 1.6727 + if test "$linkmode" = lib && 1.6728 + test "$hardcode_into_libs" = yes; then 1.6729 + # Hardcode the library path. 1.6730 + # Skip directories that are in the system default run-time 1.6731 + # search path. 1.6732 + case " $sys_lib_dlsearch_path " in 1.6733 + *" $absdir "*) ;; 1.6734 + *) 1.6735 + case "$compile_rpath " in 1.6736 + *" $absdir "*) ;; 1.6737 + *) func_append compile_rpath " $absdir" ;; 1.6738 + esac 1.6739 + ;; 1.6740 + esac 1.6741 + case " $sys_lib_dlsearch_path " in 1.6742 + *" $libdir "*) ;; 1.6743 + *) 1.6744 + case "$finalize_rpath " in 1.6745 + *" $libdir "*) ;; 1.6746 + *) func_append finalize_rpath " $libdir" ;; 1.6747 + esac 1.6748 + ;; 1.6749 + esac 1.6750 + fi 1.6751 + 1.6752 + if test -n "$old_archive_from_expsyms_cmds"; then 1.6753 + # figure out the soname 1.6754 + set dummy $library_names 1.6755 + shift 1.6756 + realname="$1" 1.6757 + shift 1.6758 + libname=`eval "\\$ECHO \"$libname_spec\""` 1.6759 + # use dlname if we got it. it's perfectly good, no? 1.6760 + if test -n "$dlname"; then 1.6761 + soname="$dlname" 1.6762 + elif test -n "$soname_spec"; then 1.6763 + # bleh windows 1.6764 + case $host in 1.6765 + *cygwin* | mingw* | *cegcc*) 1.6766 + func_arith $current - $age 1.6767 + major=$func_arith_result 1.6768 + versuffix="-$major" 1.6769 + ;; 1.6770 + esac 1.6771 + eval soname=\"$soname_spec\" 1.6772 + else 1.6773 + soname="$realname" 1.6774 + fi 1.6775 + 1.6776 + # Make a new name for the extract_expsyms_cmds to use 1.6777 + soroot="$soname" 1.6778 + func_basename "$soroot" 1.6779 + soname="$func_basename_result" 1.6780 + func_stripname 'lib' '.dll' "$soname" 1.6781 + newlib=libimp-$func_stripname_result.a 1.6782 + 1.6783 + # If the library has no export list, then create one now 1.6784 + if test -f "$output_objdir/$soname-def"; then : 1.6785 + else 1.6786 + func_verbose "extracting exported symbol list from \`$soname'" 1.6787 + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' 1.6788 + fi 1.6789 + 1.6790 + # Create $newlib 1.6791 + if test -f "$output_objdir/$newlib"; then :; else 1.6792 + func_verbose "generating import library for \`$soname'" 1.6793 + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 1.6794 + fi 1.6795 + # make sure the library variables are pointing to the new library 1.6796 + dir=$output_objdir 1.6797 + linklib=$newlib 1.6798 + fi # test -n "$old_archive_from_expsyms_cmds" 1.6799 + 1.6800 + if test "$linkmode" = prog || test "$opt_mode" != relink; then 1.6801 + add_shlibpath= 1.6802 + add_dir= 1.6803 + add= 1.6804 + lib_linked=yes 1.6805 + case $hardcode_action in 1.6806 + immediate | unsupported) 1.6807 + if test "$hardcode_direct" = no; then 1.6808 + add="$dir/$linklib" 1.6809 + case $host in 1.6810 + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; 1.6811 + *-*-sysv4*uw2*) add_dir="-L$dir" ;; 1.6812 + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ 1.6813 + *-*-unixware7*) add_dir="-L$dir" ;; 1.6814 + *-*-darwin* ) 1.6815 + # if the lib is a (non-dlopened) module then we can not 1.6816 + # link against it, someone is ignoring the earlier warnings 1.6817 + if /usr/bin/file -L $add 2> /dev/null | 1.6818 + $GREP ": [^:]* bundle" >/dev/null ; then 1.6819 + if test "X$dlopenmodule" != "X$lib"; then 1.6820 + $ECHO "*** Warning: lib $linklib is a module, not a shared library" 1.6821 + if test -z "$old_library" ; then 1.6822 + echo 1.6823 + echo "*** And there doesn't seem to be a static archive available" 1.6824 + echo "*** The link will probably fail, sorry" 1.6825 + else 1.6826 + add="$dir/$old_library" 1.6827 + fi 1.6828 + elif test -n "$old_library"; then 1.6829 + add="$dir/$old_library" 1.6830 + fi 1.6831 + fi 1.6832 + esac 1.6833 + elif test "$hardcode_minus_L" = no; then 1.6834 + case $host in 1.6835 + *-*-sunos*) add_shlibpath="$dir" ;; 1.6836 + esac 1.6837 + add_dir="-L$dir" 1.6838 + add="-l$name" 1.6839 + elif test "$hardcode_shlibpath_var" = no; then 1.6840 + add_shlibpath="$dir" 1.6841 + add="-l$name" 1.6842 + else 1.6843 + lib_linked=no 1.6844 + fi 1.6845 + ;; 1.6846 + relink) 1.6847 + if test "$hardcode_direct" = yes && 1.6848 + test "$hardcode_direct_absolute" = no; then 1.6849 + add="$dir/$linklib" 1.6850 + elif test "$hardcode_minus_L" = yes; then 1.6851 + add_dir="-L$absdir" 1.6852 + # Try looking first in the location we're being installed to. 1.6853 + if test -n "$inst_prefix_dir"; then 1.6854 + case $libdir in 1.6855 + [\\/]*) 1.6856 + func_append add_dir " -L$inst_prefix_dir$libdir" 1.6857 + ;; 1.6858 + esac 1.6859 + fi 1.6860 + add="-l$name" 1.6861 + elif test "$hardcode_shlibpath_var" = yes; then 1.6862 + add_shlibpath="$dir" 1.6863 + add="-l$name" 1.6864 + else 1.6865 + lib_linked=no 1.6866 + fi 1.6867 + ;; 1.6868 + *) lib_linked=no ;; 1.6869 + esac 1.6870 + 1.6871 + if test "$lib_linked" != yes; then 1.6872 + func_fatal_configuration "unsupported hardcode properties" 1.6873 + fi 1.6874 + 1.6875 + if test -n "$add_shlibpath"; then 1.6876 + case :$compile_shlibpath: in 1.6877 + *":$add_shlibpath:"*) ;; 1.6878 + *) func_append compile_shlibpath "$add_shlibpath:" ;; 1.6879 + esac 1.6880 + fi 1.6881 + if test "$linkmode" = prog; then 1.6882 + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" 1.6883 + test -n "$add" && compile_deplibs="$add $compile_deplibs" 1.6884 + else 1.6885 + test -n "$add_dir" && deplibs="$add_dir $deplibs" 1.6886 + test -n "$add" && deplibs="$add $deplibs" 1.6887 + if test "$hardcode_direct" != yes && 1.6888 + test "$hardcode_minus_L" != yes && 1.6889 + test "$hardcode_shlibpath_var" = yes; then 1.6890 + case :$finalize_shlibpath: in 1.6891 + *":$libdir:"*) ;; 1.6892 + *) func_append finalize_shlibpath "$libdir:" ;; 1.6893 + esac 1.6894 + fi 1.6895 + fi 1.6896 + fi 1.6897 + 1.6898 + if test "$linkmode" = prog || test "$opt_mode" = relink; then 1.6899 + add_shlibpath= 1.6900 + add_dir= 1.6901 + add= 1.6902 + # Finalize command for both is simple: just hardcode it. 1.6903 + if test "$hardcode_direct" = yes && 1.6904 + test "$hardcode_direct_absolute" = no; then 1.6905 + add="$libdir/$linklib" 1.6906 + elif test "$hardcode_minus_L" = yes; then 1.6907 + add_dir="-L$libdir" 1.6908 + add="-l$name" 1.6909 + elif test "$hardcode_shlibpath_var" = yes; then 1.6910 + case :$finalize_shlibpath: in 1.6911 + *":$libdir:"*) ;; 1.6912 + *) func_append finalize_shlibpath "$libdir:" ;; 1.6913 + esac 1.6914 + add="-l$name" 1.6915 + elif test "$hardcode_automatic" = yes; then 1.6916 + if test -n "$inst_prefix_dir" && 1.6917 + test -f "$inst_prefix_dir$libdir/$linklib" ; then 1.6918 + add="$inst_prefix_dir$libdir/$linklib" 1.6919 + else 1.6920 + add="$libdir/$linklib" 1.6921 + fi 1.6922 + else 1.6923 + # We cannot seem to hardcode it, guess we'll fake it. 1.6924 + add_dir="-L$libdir" 1.6925 + # Try looking first in the location we're being installed to. 1.6926 + if test -n "$inst_prefix_dir"; then 1.6927 + case $libdir in 1.6928 + [\\/]*) 1.6929 + func_append add_dir " -L$inst_prefix_dir$libdir" 1.6930 + ;; 1.6931 + esac 1.6932 + fi 1.6933 + add="-l$name" 1.6934 + fi 1.6935 + 1.6936 + if test "$linkmode" = prog; then 1.6937 + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" 1.6938 + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" 1.6939 + else 1.6940 + test -n "$add_dir" && deplibs="$add_dir $deplibs" 1.6941 + test -n "$add" && deplibs="$add $deplibs" 1.6942 + fi 1.6943 + fi 1.6944 + elif test "$linkmode" = prog; then 1.6945 + # Here we assume that one of hardcode_direct or hardcode_minus_L 1.6946 + # is not unsupported. This is valid on all known static and 1.6947 + # shared platforms. 1.6948 + if test "$hardcode_direct" != unsupported; then 1.6949 + test -n "$old_library" && linklib="$old_library" 1.6950 + compile_deplibs="$dir/$linklib $compile_deplibs" 1.6951 + finalize_deplibs="$dir/$linklib $finalize_deplibs" 1.6952 + else 1.6953 + compile_deplibs="-l$name -L$dir $compile_deplibs" 1.6954 + finalize_deplibs="-l$name -L$dir $finalize_deplibs" 1.6955 + fi 1.6956 + elif test "$build_libtool_libs" = yes; then 1.6957 + # Not a shared library 1.6958 + if test "$deplibs_check_method" != pass_all; then 1.6959 + # We're trying link a shared library against a static one 1.6960 + # but the system doesn't support it. 1.6961 + 1.6962 + # Just print a warning and add the library to dependency_libs so 1.6963 + # that the program can be linked against the static library. 1.6964 + echo 1.6965 + $ECHO "*** Warning: This system can not link to static lib archive $lib." 1.6966 + echo "*** I have the capability to make that library automatically link in when" 1.6967 + echo "*** you link to this library. But I can only do this if you have a" 1.6968 + echo "*** shared version of the library, which you do not appear to have." 1.6969 + if test "$module" = yes; then 1.6970 + echo "*** But as you try to build a module library, libtool will still create " 1.6971 + echo "*** a static module, that should work as long as the dlopening application" 1.6972 + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." 1.6973 + if test -z "$global_symbol_pipe"; then 1.6974 + echo 1.6975 + echo "*** However, this would only work if libtool was able to extract symbol" 1.6976 + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 1.6977 + echo "*** not find such a program. So, this module is probably useless." 1.6978 + echo "*** \`nm' from GNU binutils and a full rebuild may help." 1.6979 + fi 1.6980 + if test "$build_old_libs" = no; then 1.6981 + build_libtool_libs=module 1.6982 + build_old_libs=yes 1.6983 + else 1.6984 + build_libtool_libs=no 1.6985 + fi 1.6986 + fi 1.6987 + else 1.6988 + deplibs="$dir/$old_library $deplibs" 1.6989 + link_static=yes 1.6990 + fi 1.6991 + fi # link shared/static library? 1.6992 + 1.6993 + if test "$linkmode" = lib; then 1.6994 + if test -n "$dependency_libs" && 1.6995 + { test "$hardcode_into_libs" != yes || 1.6996 + test "$build_old_libs" = yes || 1.6997 + test "$link_static" = yes; }; then 1.6998 + # Extract -R from dependency_libs 1.6999 + temp_deplibs= 1.7000 + for libdir in $dependency_libs; do 1.7001 + case $libdir in 1.7002 + -R*) func_stripname '-R' '' "$libdir" 1.7003 + temp_xrpath=$func_stripname_result 1.7004 + case " $xrpath " in 1.7005 + *" $temp_xrpath "*) ;; 1.7006 + *) func_append xrpath " $temp_xrpath";; 1.7007 + esac;; 1.7008 + *) func_append temp_deplibs " $libdir";; 1.7009 + esac 1.7010 + done 1.7011 + dependency_libs="$temp_deplibs" 1.7012 + fi 1.7013 + 1.7014 + func_append newlib_search_path " $absdir" 1.7015 + # Link against this library 1.7016 + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" 1.7017 + # ... and its dependency_libs 1.7018 + tmp_libs= 1.7019 + for deplib in $dependency_libs; do 1.7020 + newdependency_libs="$deplib $newdependency_libs" 1.7021 + case $deplib in 1.7022 + -L*) func_stripname '-L' '' "$deplib" 1.7023 + func_resolve_sysroot "$func_stripname_result";; 1.7024 + *) func_resolve_sysroot "$deplib" ;; 1.7025 + esac 1.7026 + if $opt_preserve_dup_deps ; then 1.7027 + case "$tmp_libs " in 1.7028 + *" $func_resolve_sysroot_result "*) 1.7029 + func_append specialdeplibs " $func_resolve_sysroot_result" ;; 1.7030 + esac 1.7031 + fi 1.7032 + func_append tmp_libs " $func_resolve_sysroot_result" 1.7033 + done 1.7034 + 1.7035 + if test "$link_all_deplibs" != no; then 1.7036 + # Add the search paths of all dependency libraries 1.7037 + for deplib in $dependency_libs; do 1.7038 + path= 1.7039 + case $deplib in 1.7040 + -L*) path="$deplib" ;; 1.7041 + *.la) 1.7042 + func_resolve_sysroot "$deplib" 1.7043 + deplib=$func_resolve_sysroot_result 1.7044 + func_dirname "$deplib" "" "." 1.7045 + dir=$func_dirname_result 1.7046 + # We need an absolute path. 1.7047 + case $dir in 1.7048 + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; 1.7049 + *) 1.7050 + absdir=`cd "$dir" && pwd` 1.7051 + if test -z "$absdir"; then 1.7052 + func_warning "cannot determine absolute directory name of \`$dir'" 1.7053 + absdir="$dir" 1.7054 + fi 1.7055 + ;; 1.7056 + esac 1.7057 + if $GREP "^installed=no" $deplib > /dev/null; then 1.7058 + case $host in 1.7059 + *-*-darwin*) 1.7060 + depdepl= 1.7061 + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` 1.7062 + if test -n "$deplibrary_names" ; then 1.7063 + for tmp in $deplibrary_names ; do 1.7064 + depdepl=$tmp 1.7065 + done 1.7066 + if test -f "$absdir/$objdir/$depdepl" ; then 1.7067 + depdepl="$absdir/$objdir/$depdepl" 1.7068 + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` 1.7069 + if test -z "$darwin_install_name"; then 1.7070 + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` 1.7071 + fi 1.7072 + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" 1.7073 + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" 1.7074 + path= 1.7075 + fi 1.7076 + fi 1.7077 + ;; 1.7078 + *) 1.7079 + path="-L$absdir/$objdir" 1.7080 + ;; 1.7081 + esac 1.7082 + else 1.7083 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 1.7084 + test -z "$libdir" && \ 1.7085 + func_fatal_error "\`$deplib' is not a valid libtool archive" 1.7086 + test "$absdir" != "$libdir" && \ 1.7087 + func_warning "\`$deplib' seems to be moved" 1.7088 + 1.7089 + path="-L$absdir" 1.7090 + fi 1.7091 + ;; 1.7092 + esac 1.7093 + case " $deplibs " in 1.7094 + *" $path "*) ;; 1.7095 + *) deplibs="$path $deplibs" ;; 1.7096 + esac 1.7097 + done 1.7098 + fi # link_all_deplibs != no 1.7099 + fi # linkmode = lib 1.7100 + done # for deplib in $libs 1.7101 + if test "$pass" = link; then 1.7102 + if test "$linkmode" = "prog"; then 1.7103 + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" 1.7104 + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" 1.7105 + else 1.7106 + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` 1.7107 + fi 1.7108 + fi 1.7109 + dependency_libs="$newdependency_libs" 1.7110 + if test "$pass" = dlpreopen; then 1.7111 + # Link the dlpreopened libraries before other libraries 1.7112 + for deplib in $save_deplibs; do 1.7113 + deplibs="$deplib $deplibs" 1.7114 + done 1.7115 + fi 1.7116 + if test "$pass" != dlopen; then 1.7117 + if test "$pass" != conv; then 1.7118 + # Make sure lib_search_path contains only unique directories. 1.7119 + lib_search_path= 1.7120 + for dir in $newlib_search_path; do 1.7121 + case "$lib_search_path " in 1.7122 + *" $dir "*) ;; 1.7123 + *) func_append lib_search_path " $dir" ;; 1.7124 + esac 1.7125 + done 1.7126 + newlib_search_path= 1.7127 + fi 1.7128 + 1.7129 + if test "$linkmode,$pass" != "prog,link"; then 1.7130 + vars="deplibs" 1.7131 + else 1.7132 + vars="compile_deplibs finalize_deplibs" 1.7133 + fi 1.7134 + for var in $vars dependency_libs; do 1.7135 + # Add libraries to $var in reverse order 1.7136 + eval tmp_libs=\"\$$var\" 1.7137 + new_libs= 1.7138 + for deplib in $tmp_libs; do 1.7139 + # FIXME: Pedantically, this is the right thing to do, so 1.7140 + # that some nasty dependency loop isn't accidentally 1.7141 + # broken: 1.7142 + #new_libs="$deplib $new_libs" 1.7143 + # Pragmatically, this seems to cause very few problems in 1.7144 + # practice: 1.7145 + case $deplib in 1.7146 + -L*) new_libs="$deplib $new_libs" ;; 1.7147 + -R*) ;; 1.7148 + *) 1.7149 + # And here is the reason: when a library appears more 1.7150 + # than once as an explicit dependence of a library, or 1.7151 + # is implicitly linked in more than once by the 1.7152 + # compiler, it is considered special, and multiple 1.7153 + # occurrences thereof are not removed. Compare this 1.7154 + # with having the same library being listed as a 1.7155 + # dependency of multiple other libraries: in this case, 1.7156 + # we know (pedantically, we assume) the library does not 1.7157 + # need to be listed more than once, so we keep only the 1.7158 + # last copy. This is not always right, but it is rare 1.7159 + # enough that we require users that really mean to play 1.7160 + # such unportable linking tricks to link the library 1.7161 + # using -Wl,-lname, so that libtool does not consider it 1.7162 + # for duplicate removal. 1.7163 + case " $specialdeplibs " in 1.7164 + *" $deplib "*) new_libs="$deplib $new_libs" ;; 1.7165 + *) 1.7166 + case " $new_libs " in 1.7167 + *" $deplib "*) ;; 1.7168 + *) new_libs="$deplib $new_libs" ;; 1.7169 + esac 1.7170 + ;; 1.7171 + esac 1.7172 + ;; 1.7173 + esac 1.7174 + done 1.7175 + tmp_libs= 1.7176 + for deplib in $new_libs; do 1.7177 + case $deplib in 1.7178 + -L*) 1.7179 + case " $tmp_libs " in 1.7180 + *" $deplib "*) ;; 1.7181 + *) func_append tmp_libs " $deplib" ;; 1.7182 + esac 1.7183 + ;; 1.7184 + *) func_append tmp_libs " $deplib" ;; 1.7185 + esac 1.7186 + done 1.7187 + eval $var=\"$tmp_libs\" 1.7188 + done # for var 1.7189 + fi 1.7190 + # Last step: remove runtime libs from dependency_libs 1.7191 + # (they stay in deplibs) 1.7192 + tmp_libs= 1.7193 + for i in $dependency_libs ; do 1.7194 + case " $predeps $postdeps $compiler_lib_search_path " in 1.7195 + *" $i "*) 1.7196 + i="" 1.7197 + ;; 1.7198 + esac 1.7199 + if test -n "$i" ; then 1.7200 + func_append tmp_libs " $i" 1.7201 + fi 1.7202 + done 1.7203 + dependency_libs=$tmp_libs 1.7204 + done # for pass 1.7205 + if test "$linkmode" = prog; then 1.7206 + dlfiles="$newdlfiles" 1.7207 + fi 1.7208 + if test "$linkmode" = prog || test "$linkmode" = lib; then 1.7209 + dlprefiles="$newdlprefiles" 1.7210 + fi 1.7211 + 1.7212 + case $linkmode in 1.7213 + oldlib) 1.7214 + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 1.7215 + func_warning "\`-dlopen' is ignored for archives" 1.7216 + fi 1.7217 + 1.7218 + case " $deplibs" in 1.7219 + *\ -l* | *\ -L*) 1.7220 + func_warning "\`-l' and \`-L' are ignored for archives" ;; 1.7221 + esac 1.7222 + 1.7223 + test -n "$rpath" && \ 1.7224 + func_warning "\`-rpath' is ignored for archives" 1.7225 + 1.7226 + test -n "$xrpath" && \ 1.7227 + func_warning "\`-R' is ignored for archives" 1.7228 + 1.7229 + test -n "$vinfo" && \ 1.7230 + func_warning "\`-version-info/-version-number' is ignored for archives" 1.7231 + 1.7232 + test -n "$release" && \ 1.7233 + func_warning "\`-release' is ignored for archives" 1.7234 + 1.7235 + test -n "$export_symbols$export_symbols_regex" && \ 1.7236 + func_warning "\`-export-symbols' is ignored for archives" 1.7237 + 1.7238 + # Now set the variables for building old libraries. 1.7239 + build_libtool_libs=no 1.7240 + oldlibs="$output" 1.7241 + func_append objs "$old_deplibs" 1.7242 + ;; 1.7243 + 1.7244 + lib) 1.7245 + # Make sure we only generate libraries of the form `libNAME.la'. 1.7246 + case $outputname in 1.7247 + lib*) 1.7248 + func_stripname 'lib' '.la' "$outputname" 1.7249 + name=$func_stripname_result 1.7250 + eval shared_ext=\"$shrext_cmds\" 1.7251 + eval libname=\"$libname_spec\" 1.7252 + ;; 1.7253 + *) 1.7254 + test "$module" = no && \ 1.7255 + func_fatal_help "libtool library \`$output' must begin with \`lib'" 1.7256 + 1.7257 + if test "$need_lib_prefix" != no; then 1.7258 + # Add the "lib" prefix for modules if required 1.7259 + func_stripname '' '.la' "$outputname" 1.7260 + name=$func_stripname_result 1.7261 + eval shared_ext=\"$shrext_cmds\" 1.7262 + eval libname=\"$libname_spec\" 1.7263 + else 1.7264 + func_stripname '' '.la' "$outputname" 1.7265 + libname=$func_stripname_result 1.7266 + fi 1.7267 + ;; 1.7268 + esac 1.7269 + 1.7270 + if test -n "$objs"; then 1.7271 + if test "$deplibs_check_method" != pass_all; then 1.7272 + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 1.7273 + else 1.7274 + echo 1.7275 + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" 1.7276 + $ECHO "*** objects $objs is not portable!" 1.7277 + func_append libobjs " $objs" 1.7278 + fi 1.7279 + fi 1.7280 + 1.7281 + test "$dlself" != no && \ 1.7282 + func_warning "\`-dlopen self' is ignored for libtool libraries" 1.7283 + 1.7284 + set dummy $rpath 1.7285 + shift 1.7286 + test "$#" -gt 1 && \ 1.7287 + func_warning "ignoring multiple \`-rpath's for a libtool library" 1.7288 + 1.7289 + install_libdir="$1" 1.7290 + 1.7291 + oldlibs= 1.7292 + if test -z "$rpath"; then 1.7293 + if test "$build_libtool_libs" = yes; then 1.7294 + # Building a libtool convenience library. 1.7295 + # Some compilers have problems with a `.al' extension so 1.7296 + # convenience libraries should have the same extension an 1.7297 + # archive normally would. 1.7298 + oldlibs="$output_objdir/$libname.$libext $oldlibs" 1.7299 + build_libtool_libs=convenience 1.7300 + build_old_libs=yes 1.7301 + fi 1.7302 + 1.7303 + test -n "$vinfo" && \ 1.7304 + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" 1.7305 + 1.7306 + test -n "$release" && \ 1.7307 + func_warning "\`-release' is ignored for convenience libraries" 1.7308 + else 1.7309 + 1.7310 + # Parse the version information argument. 1.7311 + save_ifs="$IFS"; IFS=':' 1.7312 + set dummy $vinfo 0 0 0 1.7313 + shift 1.7314 + IFS="$save_ifs" 1.7315 + 1.7316 + test -n "$7" && \ 1.7317 + func_fatal_help "too many parameters to \`-version-info'" 1.7318 + 1.7319 + # convert absolute version numbers to libtool ages 1.7320 + # this retains compatibility with .la files and attempts 1.7321 + # to make the code below a bit more comprehensible 1.7322 + 1.7323 + case $vinfo_number in 1.7324 + yes) 1.7325 + number_major="$1" 1.7326 + number_minor="$2" 1.7327 + number_revision="$3" 1.7328 + # 1.7329 + # There are really only two kinds -- those that 1.7330 + # use the current revision as the major version 1.7331 + # and those that subtract age and use age as 1.7332 + # a minor version. But, then there is irix 1.7333 + # which has an extra 1 added just for fun 1.7334 + # 1.7335 + case $version_type in 1.7336 + # correct linux to gnu/linux during the next big refactor 1.7337 + darwin|linux|osf|windows|none) 1.7338 + func_arith $number_major + $number_minor 1.7339 + current=$func_arith_result 1.7340 + age="$number_minor" 1.7341 + revision="$number_revision" 1.7342 + ;; 1.7343 + freebsd-aout|freebsd-elf|qnx|sunos) 1.7344 + current="$number_major" 1.7345 + revision="$number_minor" 1.7346 + age="0" 1.7347 + ;; 1.7348 + irix|nonstopux) 1.7349 + func_arith $number_major + $number_minor 1.7350 + current=$func_arith_result 1.7351 + age="$number_minor" 1.7352 + revision="$number_minor" 1.7353 + lt_irix_increment=no 1.7354 + ;; 1.7355 + esac 1.7356 + ;; 1.7357 + no) 1.7358 + current="$1" 1.7359 + revision="$2" 1.7360 + age="$3" 1.7361 + ;; 1.7362 + esac 1.7363 + 1.7364 + # Check that each of the things are valid numbers. 1.7365 + case $current in 1.7366 + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; 1.7367 + *) 1.7368 + func_error "CURRENT \`$current' must be a nonnegative integer" 1.7369 + func_fatal_error "\`$vinfo' is not valid version information" 1.7370 + ;; 1.7371 + esac 1.7372 + 1.7373 + case $revision in 1.7374 + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; 1.7375 + *) 1.7376 + func_error "REVISION \`$revision' must be a nonnegative integer" 1.7377 + func_fatal_error "\`$vinfo' is not valid version information" 1.7378 + ;; 1.7379 + esac 1.7380 + 1.7381 + case $age in 1.7382 + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; 1.7383 + *) 1.7384 + func_error "AGE \`$age' must be a nonnegative integer" 1.7385 + func_fatal_error "\`$vinfo' is not valid version information" 1.7386 + ;; 1.7387 + esac 1.7388 + 1.7389 + if test "$age" -gt "$current"; then 1.7390 + func_error "AGE \`$age' is greater than the current interface number \`$current'" 1.7391 + func_fatal_error "\`$vinfo' is not valid version information" 1.7392 + fi 1.7393 + 1.7394 + # Calculate the version variables. 1.7395 + major= 1.7396 + versuffix= 1.7397 + verstring= 1.7398 + case $version_type in 1.7399 + none) ;; 1.7400 + 1.7401 + darwin) 1.7402 + # Like Linux, but with the current version available in 1.7403 + # verstring for coding it into the library header 1.7404 + func_arith $current - $age 1.7405 + major=.$func_arith_result 1.7406 + versuffix="$major.$age.$revision" 1.7407 + # Darwin ld doesn't like 0 for these options... 1.7408 + func_arith $current + 1 1.7409 + minor_current=$func_arith_result 1.7410 + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" 1.7411 + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" 1.7412 + ;; 1.7413 + 1.7414 + freebsd-aout) 1.7415 + major=".$current" 1.7416 + versuffix=".$current.$revision"; 1.7417 + ;; 1.7418 + 1.7419 + freebsd-elf) 1.7420 + major=".$current" 1.7421 + versuffix=".$current" 1.7422 + ;; 1.7423 + 1.7424 + irix | nonstopux) 1.7425 + if test "X$lt_irix_increment" = "Xno"; then 1.7426 + func_arith $current - $age 1.7427 + else 1.7428 + func_arith $current - $age + 1 1.7429 + fi 1.7430 + major=$func_arith_result 1.7431 + 1.7432 + case $version_type in 1.7433 + nonstopux) verstring_prefix=nonstopux ;; 1.7434 + *) verstring_prefix=sgi ;; 1.7435 + esac 1.7436 + verstring="$verstring_prefix$major.$revision" 1.7437 + 1.7438 + # Add in all the interfaces that we are compatible with. 1.7439 + loop=$revision 1.7440 + while test "$loop" -ne 0; do 1.7441 + func_arith $revision - $loop 1.7442 + iface=$func_arith_result 1.7443 + func_arith $loop - 1 1.7444 + loop=$func_arith_result 1.7445 + verstring="$verstring_prefix$major.$iface:$verstring" 1.7446 + done 1.7447 + 1.7448 + # Before this point, $major must not contain `.'. 1.7449 + major=.$major 1.7450 + versuffix="$major.$revision" 1.7451 + ;; 1.7452 + 1.7453 + linux) # correct to gnu/linux during the next big refactor 1.7454 + func_arith $current - $age 1.7455 + major=.$func_arith_result 1.7456 + versuffix="$major.$age.$revision" 1.7457 + ;; 1.7458 + 1.7459 + osf) 1.7460 + func_arith $current - $age 1.7461 + major=.$func_arith_result 1.7462 + versuffix=".$current.$age.$revision" 1.7463 + verstring="$current.$age.$revision" 1.7464 + 1.7465 + # Add in all the interfaces that we are compatible with. 1.7466 + loop=$age 1.7467 + while test "$loop" -ne 0; do 1.7468 + func_arith $current - $loop 1.7469 + iface=$func_arith_result 1.7470 + func_arith $loop - 1 1.7471 + loop=$func_arith_result 1.7472 + verstring="$verstring:${iface}.0" 1.7473 + done 1.7474 + 1.7475 + # Make executables depend on our current version. 1.7476 + func_append verstring ":${current}.0" 1.7477 + ;; 1.7478 + 1.7479 + qnx) 1.7480 + major=".$current" 1.7481 + versuffix=".$current" 1.7482 + ;; 1.7483 + 1.7484 + sunos) 1.7485 + major=".$current" 1.7486 + versuffix=".$current.$revision" 1.7487 + ;; 1.7488 + 1.7489 + windows) 1.7490 + # Use '-' rather than '.', since we only want one 1.7491 + # extension on DOS 8.3 filesystems. 1.7492 + func_arith $current - $age 1.7493 + major=$func_arith_result 1.7494 + versuffix="-$major" 1.7495 + ;; 1.7496 + 1.7497 + *) 1.7498 + func_fatal_configuration "unknown library version type \`$version_type'" 1.7499 + ;; 1.7500 + esac 1.7501 + 1.7502 + # Clear the version info if we defaulted, and they specified a release. 1.7503 + if test -z "$vinfo" && test -n "$release"; then 1.7504 + major= 1.7505 + case $version_type in 1.7506 + darwin) 1.7507 + # we can't check for "0.0" in archive_cmds due to quoting 1.7508 + # problems, so we reset it completely 1.7509 + verstring= 1.7510 + ;; 1.7511 + *) 1.7512 + verstring="0.0" 1.7513 + ;; 1.7514 + esac 1.7515 + if test "$need_version" = no; then 1.7516 + versuffix= 1.7517 + else 1.7518 + versuffix=".0.0" 1.7519 + fi 1.7520 + fi 1.7521 + 1.7522 + # Remove version info from name if versioning should be avoided 1.7523 + if test "$avoid_version" = yes && test "$need_version" = no; then 1.7524 + major= 1.7525 + versuffix= 1.7526 + verstring="" 1.7527 + fi 1.7528 + 1.7529 + # Check to see if the archive will have undefined symbols. 1.7530 + if test "$allow_undefined" = yes; then 1.7531 + if test "$allow_undefined_flag" = unsupported; then 1.7532 + func_warning "undefined symbols not allowed in $host shared libraries" 1.7533 + build_libtool_libs=no 1.7534 + build_old_libs=yes 1.7535 + fi 1.7536 + else 1.7537 + # Don't allow undefined symbols. 1.7538 + allow_undefined_flag="$no_undefined_flag" 1.7539 + fi 1.7540 + 1.7541 + fi 1.7542 + 1.7543 + func_generate_dlsyms "$libname" "$libname" "yes" 1.7544 + func_append libobjs " $symfileobj" 1.7545 + test "X$libobjs" = "X " && libobjs= 1.7546 + 1.7547 + if test "$opt_mode" != relink; then 1.7548 + # Remove our outputs, but don't remove object files since they 1.7549 + # may have been created when compiling PIC objects. 1.7550 + removelist= 1.7551 + tempremovelist=`$ECHO "$output_objdir/*"` 1.7552 + for p in $tempremovelist; do 1.7553 + case $p in 1.7554 + *.$objext | *.gcno) 1.7555 + ;; 1.7556 + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) 1.7557 + if test "X$precious_files_regex" != "X"; then 1.7558 + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 1.7559 + then 1.7560 + continue 1.7561 + fi 1.7562 + fi 1.7563 + func_append removelist " $p" 1.7564 + ;; 1.7565 + *) ;; 1.7566 + esac 1.7567 + done 1.7568 + test -n "$removelist" && \ 1.7569 + func_show_eval "${RM}r \$removelist" 1.7570 + fi 1.7571 + 1.7572 + # Now set the variables for building old libraries. 1.7573 + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then 1.7574 + func_append oldlibs " $output_objdir/$libname.$libext" 1.7575 + 1.7576 + # Transform .lo files to .o files. 1.7577 + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` 1.7578 + fi 1.7579 + 1.7580 + # Eliminate all temporary directories. 1.7581 + #for path in $notinst_path; do 1.7582 + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` 1.7583 + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` 1.7584 + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` 1.7585 + #done 1.7586 + 1.7587 + if test -n "$xrpath"; then 1.7588 + # If the user specified any rpath flags, then add them. 1.7589 + temp_xrpath= 1.7590 + for libdir in $xrpath; do 1.7591 + func_replace_sysroot "$libdir" 1.7592 + func_append temp_xrpath " -R$func_replace_sysroot_result" 1.7593 + case "$finalize_rpath " in 1.7594 + *" $libdir "*) ;; 1.7595 + *) func_append finalize_rpath " $libdir" ;; 1.7596 + esac 1.7597 + done 1.7598 + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then 1.7599 + dependency_libs="$temp_xrpath $dependency_libs" 1.7600 + fi 1.7601 + fi 1.7602 + 1.7603 + # Make sure dlfiles contains only unique files that won't be dlpreopened 1.7604 + old_dlfiles="$dlfiles" 1.7605 + dlfiles= 1.7606 + for lib in $old_dlfiles; do 1.7607 + case " $dlprefiles $dlfiles " in 1.7608 + *" $lib "*) ;; 1.7609 + *) func_append dlfiles " $lib" ;; 1.7610 + esac 1.7611 + done 1.7612 + 1.7613 + # Make sure dlprefiles contains only unique files 1.7614 + old_dlprefiles="$dlprefiles" 1.7615 + dlprefiles= 1.7616 + for lib in $old_dlprefiles; do 1.7617 + case "$dlprefiles " in 1.7618 + *" $lib "*) ;; 1.7619 + *) func_append dlprefiles " $lib" ;; 1.7620 + esac 1.7621 + done 1.7622 + 1.7623 + if test "$build_libtool_libs" = yes; then 1.7624 + if test -n "$rpath"; then 1.7625 + case $host in 1.7626 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) 1.7627 + # these systems don't actually have a c library (as such)! 1.7628 + ;; 1.7629 + *-*-rhapsody* | *-*-darwin1.[012]) 1.7630 + # Rhapsody C library is in the System framework 1.7631 + func_append deplibs " System.ltframework" 1.7632 + ;; 1.7633 + *-*-netbsd*) 1.7634 + # Don't link with libc until the a.out ld.so is fixed. 1.7635 + ;; 1.7636 + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) 1.7637 + # Do not include libc due to us having libc/libc_r. 1.7638 + ;; 1.7639 + *-*-sco3.2v5* | *-*-sco5v6*) 1.7640 + # Causes problems with __ctype 1.7641 + ;; 1.7642 + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) 1.7643 + # Compiler inserts libc in the correct place for threads to work 1.7644 + ;; 1.7645 + *) 1.7646 + # Add libc to deplibs on all other systems if necessary. 1.7647 + if test "$build_libtool_need_lc" = "yes"; then 1.7648 + func_append deplibs " -lc" 1.7649 + fi 1.7650 + ;; 1.7651 + esac 1.7652 + fi 1.7653 + 1.7654 + # Transform deplibs into only deplibs that can be linked in shared. 1.7655 + name_save=$name 1.7656 + libname_save=$libname 1.7657 + release_save=$release 1.7658 + versuffix_save=$versuffix 1.7659 + major_save=$major 1.7660 + # I'm not sure if I'm treating the release correctly. I think 1.7661 + # release should show up in the -l (ie -lgmp5) so we don't want to 1.7662 + # add it in twice. Is that correct? 1.7663 + release="" 1.7664 + versuffix="" 1.7665 + major="" 1.7666 + newdeplibs= 1.7667 + droppeddeps=no 1.7668 + case $deplibs_check_method in 1.7669 + pass_all) 1.7670 + # Don't check for shared/static. Everything works. 1.7671 + # This might be a little naive. We might want to check 1.7672 + # whether the library exists or not. But this is on 1.7673 + # osf3 & osf4 and I'm not really sure... Just 1.7674 + # implementing what was already the behavior. 1.7675 + newdeplibs=$deplibs 1.7676 + ;; 1.7677 + test_compile) 1.7678 + # This code stresses the "libraries are programs" paradigm to its 1.7679 + # limits. Maybe even breaks it. We compile a program, linking it 1.7680 + # against the deplibs as a proxy for the library. Then we can check 1.7681 + # whether they linked in statically or dynamically with ldd. 1.7682 + $opt_dry_run || $RM conftest.c 1.7683 + cat > conftest.c <<EOF 1.7684 + int main() { return 0; } 1.7685 +EOF 1.7686 + $opt_dry_run || $RM conftest 1.7687 + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then 1.7688 + ldd_output=`ldd conftest` 1.7689 + for i in $deplibs; do 1.7690 + case $i in 1.7691 + -l*) 1.7692 + func_stripname -l '' "$i" 1.7693 + name=$func_stripname_result 1.7694 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 1.7695 + case " $predeps $postdeps " in 1.7696 + *" $i "*) 1.7697 + func_append newdeplibs " $i" 1.7698 + i="" 1.7699 + ;; 1.7700 + esac 1.7701 + fi 1.7702 + if test -n "$i" ; then 1.7703 + libname=`eval "\\$ECHO \"$libname_spec\""` 1.7704 + deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` 1.7705 + set dummy $deplib_matches; shift 1.7706 + deplib_match=$1 1.7707 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 1.7708 + func_append newdeplibs " $i" 1.7709 + else 1.7710 + droppeddeps=yes 1.7711 + echo 1.7712 + $ECHO "*** Warning: dynamic linker does not accept needed library $i." 1.7713 + echo "*** I have the capability to make that library automatically link in when" 1.7714 + echo "*** you link to this library. But I can only do this if you have a" 1.7715 + echo "*** shared version of the library, which I believe you do not have" 1.7716 + echo "*** because a test_compile did reveal that the linker did not use it for" 1.7717 + echo "*** its dynamic dependency list that programs get resolved with at runtime." 1.7718 + fi 1.7719 + fi 1.7720 + ;; 1.7721 + *) 1.7722 + func_append newdeplibs " $i" 1.7723 + ;; 1.7724 + esac 1.7725 + done 1.7726 + else 1.7727 + # Error occurred in the first compile. Let's try to salvage 1.7728 + # the situation: Compile a separate program for each library. 1.7729 + for i in $deplibs; do 1.7730 + case $i in 1.7731 + -l*) 1.7732 + func_stripname -l '' "$i" 1.7733 + name=$func_stripname_result 1.7734 + $opt_dry_run || $RM conftest 1.7735 + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then 1.7736 + ldd_output=`ldd conftest` 1.7737 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 1.7738 + case " $predeps $postdeps " in 1.7739 + *" $i "*) 1.7740 + func_append newdeplibs " $i" 1.7741 + i="" 1.7742 + ;; 1.7743 + esac 1.7744 + fi 1.7745 + if test -n "$i" ; then 1.7746 + libname=`eval "\\$ECHO \"$libname_spec\""` 1.7747 + deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` 1.7748 + set dummy $deplib_matches; shift 1.7749 + deplib_match=$1 1.7750 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 1.7751 + func_append newdeplibs " $i" 1.7752 + else 1.7753 + droppeddeps=yes 1.7754 + echo 1.7755 + $ECHO "*** Warning: dynamic linker does not accept needed library $i." 1.7756 + echo "*** I have the capability to make that library automatically link in when" 1.7757 + echo "*** you link to this library. But I can only do this if you have a" 1.7758 + echo "*** shared version of the library, which you do not appear to have" 1.7759 + echo "*** because a test_compile did reveal that the linker did not use this one" 1.7760 + echo "*** as a dynamic dependency that programs can get resolved with at runtime." 1.7761 + fi 1.7762 + fi 1.7763 + else 1.7764 + droppeddeps=yes 1.7765 + echo 1.7766 + $ECHO "*** Warning! Library $i is needed by this library but I was not able to" 1.7767 + echo "*** make it link in! You will probably need to install it or some" 1.7768 + echo "*** library that it depends on before this library will be fully" 1.7769 + echo "*** functional. Installing it before continuing would be even better." 1.7770 + fi 1.7771 + ;; 1.7772 + *) 1.7773 + func_append newdeplibs " $i" 1.7774 + ;; 1.7775 + esac 1.7776 + done 1.7777 + fi 1.7778 + ;; 1.7779 + file_magic*) 1.7780 + set dummy $deplibs_check_method; shift 1.7781 + file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` 1.7782 + for a_deplib in $deplibs; do 1.7783 + case $a_deplib in 1.7784 + -l*) 1.7785 + func_stripname -l '' "$a_deplib" 1.7786 + name=$func_stripname_result 1.7787 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 1.7788 + case " $predeps $postdeps " in 1.7789 + *" $a_deplib "*) 1.7790 + func_append newdeplibs " $a_deplib" 1.7791 + a_deplib="" 1.7792 + ;; 1.7793 + esac 1.7794 + fi 1.7795 + if test -n "$a_deplib" ; then 1.7796 + libname=`eval "\\$ECHO \"$libname_spec\""` 1.7797 + if test -n "$file_magic_glob"; then 1.7798 + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` 1.7799 + else 1.7800 + libnameglob=$libname 1.7801 + fi 1.7802 + test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` 1.7803 + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 1.7804 + if test "$want_nocaseglob" = yes; then 1.7805 + shopt -s nocaseglob 1.7806 + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` 1.7807 + $nocaseglob 1.7808 + else 1.7809 + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` 1.7810 + fi 1.7811 + for potent_lib in $potential_libs; do 1.7812 + # Follow soft links. 1.7813 + if ls -lLd "$potent_lib" 2>/dev/null | 1.7814 + $GREP " -> " >/dev/null; then 1.7815 + continue 1.7816 + fi 1.7817 + # The statement above tries to avoid entering an 1.7818 + # endless loop below, in case of cyclic links. 1.7819 + # We might still enter an endless loop, since a link 1.7820 + # loop can be closed while we follow links, 1.7821 + # but so what? 1.7822 + potlib="$potent_lib" 1.7823 + while test -h "$potlib" 2>/dev/null; do 1.7824 + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` 1.7825 + case $potliblink in 1.7826 + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; 1.7827 + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; 1.7828 + esac 1.7829 + done 1.7830 + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | 1.7831 + $SED -e 10q | 1.7832 + $EGREP "$file_magic_regex" > /dev/null; then 1.7833 + func_append newdeplibs " $a_deplib" 1.7834 + a_deplib="" 1.7835 + break 2 1.7836 + fi 1.7837 + done 1.7838 + done 1.7839 + fi 1.7840 + if test -n "$a_deplib" ; then 1.7841 + droppeddeps=yes 1.7842 + echo 1.7843 + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." 1.7844 + echo "*** I have the capability to make that library automatically link in when" 1.7845 + echo "*** you link to this library. But I can only do this if you have a" 1.7846 + echo "*** shared version of the library, which you do not appear to have" 1.7847 + echo "*** because I did check the linker path looking for a file starting" 1.7848 + if test -z "$potlib" ; then 1.7849 + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" 1.7850 + else 1.7851 + $ECHO "*** with $libname and none of the candidates passed a file format test" 1.7852 + $ECHO "*** using a file magic. Last file checked: $potlib" 1.7853 + fi 1.7854 + fi 1.7855 + ;; 1.7856 + *) 1.7857 + # Add a -L argument. 1.7858 + func_append newdeplibs " $a_deplib" 1.7859 + ;; 1.7860 + esac 1.7861 + done # Gone through all deplibs. 1.7862 + ;; 1.7863 + match_pattern*) 1.7864 + set dummy $deplibs_check_method; shift 1.7865 + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` 1.7866 + for a_deplib in $deplibs; do 1.7867 + case $a_deplib in 1.7868 + -l*) 1.7869 + func_stripname -l '' "$a_deplib" 1.7870 + name=$func_stripname_result 1.7871 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 1.7872 + case " $predeps $postdeps " in 1.7873 + *" $a_deplib "*) 1.7874 + func_append newdeplibs " $a_deplib" 1.7875 + a_deplib="" 1.7876 + ;; 1.7877 + esac 1.7878 + fi 1.7879 + if test -n "$a_deplib" ; then 1.7880 + libname=`eval "\\$ECHO \"$libname_spec\""` 1.7881 + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 1.7882 + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 1.7883 + for potent_lib in $potential_libs; do 1.7884 + potlib="$potent_lib" # see symlink-check above in file_magic test 1.7885 + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ 1.7886 + $EGREP "$match_pattern_regex" > /dev/null; then 1.7887 + func_append newdeplibs " $a_deplib" 1.7888 + a_deplib="" 1.7889 + break 2 1.7890 + fi 1.7891 + done 1.7892 + done 1.7893 + fi 1.7894 + if test -n "$a_deplib" ; then 1.7895 + droppeddeps=yes 1.7896 + echo 1.7897 + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." 1.7898 + echo "*** I have the capability to make that library automatically link in when" 1.7899 + echo "*** you link to this library. But I can only do this if you have a" 1.7900 + echo "*** shared version of the library, which you do not appear to have" 1.7901 + echo "*** because I did check the linker path looking for a file starting" 1.7902 + if test -z "$potlib" ; then 1.7903 + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" 1.7904 + else 1.7905 + $ECHO "*** with $libname and none of the candidates passed a file format test" 1.7906 + $ECHO "*** using a regex pattern. Last file checked: $potlib" 1.7907 + fi 1.7908 + fi 1.7909 + ;; 1.7910 + *) 1.7911 + # Add a -L argument. 1.7912 + func_append newdeplibs " $a_deplib" 1.7913 + ;; 1.7914 + esac 1.7915 + done # Gone through all deplibs. 1.7916 + ;; 1.7917 + none | unknown | *) 1.7918 + newdeplibs="" 1.7919 + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` 1.7920 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 1.7921 + for i in $predeps $postdeps ; do 1.7922 + # can't use Xsed below, because $i might contain '/' 1.7923 + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` 1.7924 + done 1.7925 + fi 1.7926 + case $tmp_deplibs in 1.7927 + *[!\ \ ]*) 1.7928 + echo 1.7929 + if test "X$deplibs_check_method" = "Xnone"; then 1.7930 + echo "*** Warning: inter-library dependencies are not supported in this platform." 1.7931 + else 1.7932 + echo "*** Warning: inter-library dependencies are not known to be supported." 1.7933 + fi 1.7934 + echo "*** All declared inter-library dependencies are being dropped." 1.7935 + droppeddeps=yes 1.7936 + ;; 1.7937 + esac 1.7938 + ;; 1.7939 + esac 1.7940 + versuffix=$versuffix_save 1.7941 + major=$major_save 1.7942 + release=$release_save 1.7943 + libname=$libname_save 1.7944 + name=$name_save 1.7945 + 1.7946 + case $host in 1.7947 + *-*-rhapsody* | *-*-darwin1.[012]) 1.7948 + # On Rhapsody replace the C library with the System framework 1.7949 + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` 1.7950 + ;; 1.7951 + esac 1.7952 + 1.7953 + if test "$droppeddeps" = yes; then 1.7954 + if test "$module" = yes; then 1.7955 + echo 1.7956 + echo "*** Warning: libtool could not satisfy all declared inter-library" 1.7957 + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" 1.7958 + echo "*** a static module, that should work as long as the dlopening" 1.7959 + echo "*** application is linked with the -dlopen flag." 1.7960 + if test -z "$global_symbol_pipe"; then 1.7961 + echo 1.7962 + echo "*** However, this would only work if libtool was able to extract symbol" 1.7963 + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 1.7964 + echo "*** not find such a program. So, this module is probably useless." 1.7965 + echo "*** \`nm' from GNU binutils and a full rebuild may help." 1.7966 + fi 1.7967 + if test "$build_old_libs" = no; then 1.7968 + oldlibs="$output_objdir/$libname.$libext" 1.7969 + build_libtool_libs=module 1.7970 + build_old_libs=yes 1.7971 + else 1.7972 + build_libtool_libs=no 1.7973 + fi 1.7974 + else 1.7975 + echo "*** The inter-library dependencies that have been dropped here will be" 1.7976 + echo "*** automatically added whenever a program is linked with this library" 1.7977 + echo "*** or is declared to -dlopen it." 1.7978 + 1.7979 + if test "$allow_undefined" = no; then 1.7980 + echo 1.7981 + echo "*** Since this library must not contain undefined symbols," 1.7982 + echo "*** because either the platform does not support them or" 1.7983 + echo "*** it was explicitly requested with -no-undefined," 1.7984 + echo "*** libtool will only create a static version of it." 1.7985 + if test "$build_old_libs" = no; then 1.7986 + oldlibs="$output_objdir/$libname.$libext" 1.7987 + build_libtool_libs=module 1.7988 + build_old_libs=yes 1.7989 + else 1.7990 + build_libtool_libs=no 1.7991 + fi 1.7992 + fi 1.7993 + fi 1.7994 + fi 1.7995 + # Done checking deplibs! 1.7996 + deplibs=$newdeplibs 1.7997 + fi 1.7998 + # Time to change all our "foo.ltframework" stuff back to "-framework foo" 1.7999 + case $host in 1.8000 + *-*-darwin*) 1.8001 + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` 1.8002 + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` 1.8003 + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` 1.8004 + ;; 1.8005 + esac 1.8006 + 1.8007 + # move library search paths that coincide with paths to not yet 1.8008 + # installed libraries to the beginning of the library search list 1.8009 + new_libs= 1.8010 + for path in $notinst_path; do 1.8011 + case " $new_libs " in 1.8012 + *" -L$path/$objdir "*) ;; 1.8013 + *) 1.8014 + case " $deplibs " in 1.8015 + *" -L$path/$objdir "*) 1.8016 + func_append new_libs " -L$path/$objdir" ;; 1.8017 + esac 1.8018 + ;; 1.8019 + esac 1.8020 + done 1.8021 + for deplib in $deplibs; do 1.8022 + case $deplib in 1.8023 + -L*) 1.8024 + case " $new_libs " in 1.8025 + *" $deplib "*) ;; 1.8026 + *) func_append new_libs " $deplib" ;; 1.8027 + esac 1.8028 + ;; 1.8029 + *) func_append new_libs " $deplib" ;; 1.8030 + esac 1.8031 + done 1.8032 + deplibs="$new_libs" 1.8033 + 1.8034 + # All the library-specific variables (install_libdir is set above). 1.8035 + library_names= 1.8036 + old_library= 1.8037 + dlname= 1.8038 + 1.8039 + # Test again, we may have decided not to build it any more 1.8040 + if test "$build_libtool_libs" = yes; then 1.8041 + # Remove ${wl} instances when linking with ld. 1.8042 + # FIXME: should test the right _cmds variable. 1.8043 + case $archive_cmds in 1.8044 + *\$LD\ *) wl= ;; 1.8045 + esac 1.8046 + if test "$hardcode_into_libs" = yes; then 1.8047 + # Hardcode the library paths 1.8048 + hardcode_libdirs= 1.8049 + dep_rpath= 1.8050 + rpath="$finalize_rpath" 1.8051 + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" 1.8052 + for libdir in $rpath; do 1.8053 + if test -n "$hardcode_libdir_flag_spec"; then 1.8054 + if test -n "$hardcode_libdir_separator"; then 1.8055 + func_replace_sysroot "$libdir" 1.8056 + libdir=$func_replace_sysroot_result 1.8057 + if test -z "$hardcode_libdirs"; then 1.8058 + hardcode_libdirs="$libdir" 1.8059 + else 1.8060 + # Just accumulate the unique libdirs. 1.8061 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in 1.8062 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 1.8063 + ;; 1.8064 + *) 1.8065 + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" 1.8066 + ;; 1.8067 + esac 1.8068 + fi 1.8069 + else 1.8070 + eval flag=\"$hardcode_libdir_flag_spec\" 1.8071 + func_append dep_rpath " $flag" 1.8072 + fi 1.8073 + elif test -n "$runpath_var"; then 1.8074 + case "$perm_rpath " in 1.8075 + *" $libdir "*) ;; 1.8076 + *) func_append perm_rpath " $libdir" ;; 1.8077 + esac 1.8078 + fi 1.8079 + done 1.8080 + # Substitute the hardcoded libdirs into the rpath. 1.8081 + if test -n "$hardcode_libdir_separator" && 1.8082 + test -n "$hardcode_libdirs"; then 1.8083 + libdir="$hardcode_libdirs" 1.8084 + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" 1.8085 + fi 1.8086 + if test -n "$runpath_var" && test -n "$perm_rpath"; then 1.8087 + # We should set the runpath_var. 1.8088 + rpath= 1.8089 + for dir in $perm_rpath; do 1.8090 + func_append rpath "$dir:" 1.8091 + done 1.8092 + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" 1.8093 + fi 1.8094 + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" 1.8095 + fi 1.8096 + 1.8097 + shlibpath="$finalize_shlibpath" 1.8098 + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" 1.8099 + if test -n "$shlibpath"; then 1.8100 + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" 1.8101 + fi 1.8102 + 1.8103 + # Get the real and link names of the library. 1.8104 + eval shared_ext=\"$shrext_cmds\" 1.8105 + eval library_names=\"$library_names_spec\" 1.8106 + set dummy $library_names 1.8107 + shift 1.8108 + realname="$1" 1.8109 + shift 1.8110 + 1.8111 + if test -n "$soname_spec"; then 1.8112 + eval soname=\"$soname_spec\" 1.8113 + else 1.8114 + soname="$realname" 1.8115 + fi 1.8116 + if test -z "$dlname"; then 1.8117 + dlname=$soname 1.8118 + fi 1.8119 + 1.8120 + lib="$output_objdir/$realname" 1.8121 + linknames= 1.8122 + for link 1.8123 + do 1.8124 + func_append linknames " $link" 1.8125 + done 1.8126 + 1.8127 + # Use standard objects if they are pic 1.8128 + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` 1.8129 + test "X$libobjs" = "X " && libobjs= 1.8130 + 1.8131 + delfiles= 1.8132 + if test -n "$export_symbols" && test -n "$include_expsyms"; then 1.8133 + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" 1.8134 + export_symbols="$output_objdir/$libname.uexp" 1.8135 + func_append delfiles " $export_symbols" 1.8136 + fi 1.8137 + 1.8138 + orig_export_symbols= 1.8139 + case $host_os in 1.8140 + cygwin* | mingw* | cegcc*) 1.8141 + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then 1.8142 + # exporting using user supplied symfile 1.8143 + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then 1.8144 + # and it's NOT already a .def file. Must figure out 1.8145 + # which of the given symbols are data symbols and tag 1.8146 + # them as such. So, trigger use of export_symbols_cmds. 1.8147 + # export_symbols gets reassigned inside the "prepare 1.8148 + # the list of exported symbols" if statement, so the 1.8149 + # include_expsyms logic still works. 1.8150 + orig_export_symbols="$export_symbols" 1.8151 + export_symbols= 1.8152 + always_export_symbols=yes 1.8153 + fi 1.8154 + fi 1.8155 + ;; 1.8156 + esac 1.8157 + 1.8158 + # Prepare the list of exported symbols 1.8159 + if test -z "$export_symbols"; then 1.8160 + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then 1.8161 + func_verbose "generating symbol list for \`$libname.la'" 1.8162 + export_symbols="$output_objdir/$libname.exp" 1.8163 + $opt_dry_run || $RM $export_symbols 1.8164 + cmds=$export_symbols_cmds 1.8165 + save_ifs="$IFS"; IFS='~' 1.8166 + for cmd1 in $cmds; do 1.8167 + IFS="$save_ifs" 1.8168 + # Take the normal branch if the nm_file_list_spec branch 1.8169 + # doesn't work or if tool conversion is not needed. 1.8170 + case $nm_file_list_spec~$to_tool_file_cmd in 1.8171 + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) 1.8172 + try_normal_branch=yes 1.8173 + eval cmd=\"$cmd1\" 1.8174 + func_len " $cmd" 1.8175 + len=$func_len_result 1.8176 + ;; 1.8177 + *) 1.8178 + try_normal_branch=no 1.8179 + ;; 1.8180 + esac 1.8181 + if test "$try_normal_branch" = yes \ 1.8182 + && { test "$len" -lt "$max_cmd_len" \ 1.8183 + || test "$max_cmd_len" -le -1; } 1.8184 + then 1.8185 + func_show_eval "$cmd" 'exit $?' 1.8186 + skipped_export=false 1.8187 + elif test -n "$nm_file_list_spec"; then 1.8188 + func_basename "$output" 1.8189 + output_la=$func_basename_result 1.8190 + save_libobjs=$libobjs 1.8191 + save_output=$output 1.8192 + output=${output_objdir}/${output_la}.nm 1.8193 + func_to_tool_file "$output" 1.8194 + libobjs=$nm_file_list_spec$func_to_tool_file_result 1.8195 + func_append delfiles " $output" 1.8196 + func_verbose "creating $NM input file list: $output" 1.8197 + for obj in $save_libobjs; do 1.8198 + func_to_tool_file "$obj" 1.8199 + $ECHO "$func_to_tool_file_result" 1.8200 + done > "$output" 1.8201 + eval cmd=\"$cmd1\" 1.8202 + func_show_eval "$cmd" 'exit $?' 1.8203 + output=$save_output 1.8204 + libobjs=$save_libobjs 1.8205 + skipped_export=false 1.8206 + else 1.8207 + # The command line is too long to execute in one step. 1.8208 + func_verbose "using reloadable object file for export list..." 1.8209 + skipped_export=: 1.8210 + # Break out early, otherwise skipped_export may be 1.8211 + # set to false by a later but shorter cmd. 1.8212 + break 1.8213 + fi 1.8214 + done 1.8215 + IFS="$save_ifs" 1.8216 + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then 1.8217 + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' 1.8218 + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' 1.8219 + fi 1.8220 + fi 1.8221 + fi 1.8222 + 1.8223 + if test -n "$export_symbols" && test -n "$include_expsyms"; then 1.8224 + tmp_export_symbols="$export_symbols" 1.8225 + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" 1.8226 + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' 1.8227 + fi 1.8228 + 1.8229 + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then 1.8230 + # The given exports_symbols file has to be filtered, so filter it. 1.8231 + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" 1.8232 + # FIXME: $output_objdir/$libname.filter potentially contains lots of 1.8233 + # 's' commands which not all seds can handle. GNU sed should be fine 1.8234 + # though. Also, the filter scales superlinearly with the number of 1.8235 + # global variables. join(1) would be nice here, but unfortunately 1.8236 + # isn't a blessed tool. 1.8237 + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter 1.8238 + func_append delfiles " $export_symbols $output_objdir/$libname.filter" 1.8239 + export_symbols=$output_objdir/$libname.def 1.8240 + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols 1.8241 + fi 1.8242 + 1.8243 + tmp_deplibs= 1.8244 + for test_deplib in $deplibs; do 1.8245 + case " $convenience " in 1.8246 + *" $test_deplib "*) ;; 1.8247 + *) 1.8248 + func_append tmp_deplibs " $test_deplib" 1.8249 + ;; 1.8250 + esac 1.8251 + done 1.8252 + deplibs="$tmp_deplibs" 1.8253 + 1.8254 + if test -n "$convenience"; then 1.8255 + if test -n "$whole_archive_flag_spec" && 1.8256 + test "$compiler_needs_object" = yes && 1.8257 + test -z "$libobjs"; then 1.8258 + # extract the archives, so we have objects to list. 1.8259 + # TODO: could optimize this to just extract one archive. 1.8260 + whole_archive_flag_spec= 1.8261 + fi 1.8262 + if test -n "$whole_archive_flag_spec"; then 1.8263 + save_libobjs=$libobjs 1.8264 + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 1.8265 + test "X$libobjs" = "X " && libobjs= 1.8266 + else 1.8267 + gentop="$output_objdir/${outputname}x" 1.8268 + func_append generated " $gentop" 1.8269 + 1.8270 + func_extract_archives $gentop $convenience 1.8271 + func_append libobjs " $func_extract_archives_result" 1.8272 + test "X$libobjs" = "X " && libobjs= 1.8273 + fi 1.8274 + fi 1.8275 + 1.8276 + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then 1.8277 + eval flag=\"$thread_safe_flag_spec\" 1.8278 + func_append linker_flags " $flag" 1.8279 + fi 1.8280 + 1.8281 + # Make a backup of the uninstalled library when relinking 1.8282 + if test "$opt_mode" = relink; then 1.8283 + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? 1.8284 + fi 1.8285 + 1.8286 + # Do each of the archive commands. 1.8287 + if test "$module" = yes && test -n "$module_cmds" ; then 1.8288 + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 1.8289 + eval test_cmds=\"$module_expsym_cmds\" 1.8290 + cmds=$module_expsym_cmds 1.8291 + else 1.8292 + eval test_cmds=\"$module_cmds\" 1.8293 + cmds=$module_cmds 1.8294 + fi 1.8295 + else 1.8296 + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 1.8297 + eval test_cmds=\"$archive_expsym_cmds\" 1.8298 + cmds=$archive_expsym_cmds 1.8299 + else 1.8300 + eval test_cmds=\"$archive_cmds\" 1.8301 + cmds=$archive_cmds 1.8302 + fi 1.8303 + fi 1.8304 + 1.8305 + if test "X$skipped_export" != "X:" && 1.8306 + func_len " $test_cmds" && 1.8307 + len=$func_len_result && 1.8308 + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then 1.8309 + : 1.8310 + else 1.8311 + # The command line is too long to link in one step, link piecewise 1.8312 + # or, if using GNU ld and skipped_export is not :, use a linker 1.8313 + # script. 1.8314 + 1.8315 + # Save the value of $output and $libobjs because we want to 1.8316 + # use them later. If we have whole_archive_flag_spec, we 1.8317 + # want to use save_libobjs as it was before 1.8318 + # whole_archive_flag_spec was expanded, because we can't 1.8319 + # assume the linker understands whole_archive_flag_spec. 1.8320 + # This may have to be revisited, in case too many 1.8321 + # convenience libraries get linked in and end up exceeding 1.8322 + # the spec. 1.8323 + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then 1.8324 + save_libobjs=$libobjs 1.8325 + fi 1.8326 + save_output=$output 1.8327 + func_basename "$output" 1.8328 + output_la=$func_basename_result 1.8329 + 1.8330 + # Clear the reloadable object creation command queue and 1.8331 + # initialize k to one. 1.8332 + test_cmds= 1.8333 + concat_cmds= 1.8334 + objlist= 1.8335 + last_robj= 1.8336 + k=1 1.8337 + 1.8338 + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then 1.8339 + output=${output_objdir}/${output_la}.lnkscript 1.8340 + func_verbose "creating GNU ld script: $output" 1.8341 + echo 'INPUT (' > $output 1.8342 + for obj in $save_libobjs 1.8343 + do 1.8344 + func_to_tool_file "$obj" 1.8345 + $ECHO "$func_to_tool_file_result" >> $output 1.8346 + done 1.8347 + echo ')' >> $output 1.8348 + func_append delfiles " $output" 1.8349 + func_to_tool_file "$output" 1.8350 + output=$func_to_tool_file_result 1.8351 + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then 1.8352 + output=${output_objdir}/${output_la}.lnk 1.8353 + func_verbose "creating linker input file list: $output" 1.8354 + : > $output 1.8355 + set x $save_libobjs 1.8356 + shift 1.8357 + firstobj= 1.8358 + if test "$compiler_needs_object" = yes; then 1.8359 + firstobj="$1 " 1.8360 + shift 1.8361 + fi 1.8362 + for obj 1.8363 + do 1.8364 + func_to_tool_file "$obj" 1.8365 + $ECHO "$func_to_tool_file_result" >> $output 1.8366 + done 1.8367 + func_append delfiles " $output" 1.8368 + func_to_tool_file "$output" 1.8369 + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" 1.8370 + else 1.8371 + if test -n "$save_libobjs"; then 1.8372 + func_verbose "creating reloadable object files..." 1.8373 + output=$output_objdir/$output_la-${k}.$objext 1.8374 + eval test_cmds=\"$reload_cmds\" 1.8375 + func_len " $test_cmds" 1.8376 + len0=$func_len_result 1.8377 + len=$len0 1.8378 + 1.8379 + # Loop over the list of objects to be linked. 1.8380 + for obj in $save_libobjs 1.8381 + do 1.8382 + func_len " $obj" 1.8383 + func_arith $len + $func_len_result 1.8384 + len=$func_arith_result 1.8385 + if test "X$objlist" = X || 1.8386 + test "$len" -lt "$max_cmd_len"; then 1.8387 + func_append objlist " $obj" 1.8388 + else 1.8389 + # The command $test_cmds is almost too long, add a 1.8390 + # command to the queue. 1.8391 + if test "$k" -eq 1 ; then 1.8392 + # The first file doesn't have a previous command to add. 1.8393 + reload_objs=$objlist 1.8394 + eval concat_cmds=\"$reload_cmds\" 1.8395 + else 1.8396 + # All subsequent reloadable object files will link in 1.8397 + # the last one created. 1.8398 + reload_objs="$objlist $last_robj" 1.8399 + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" 1.8400 + fi 1.8401 + last_robj=$output_objdir/$output_la-${k}.$objext 1.8402 + func_arith $k + 1 1.8403 + k=$func_arith_result 1.8404 + output=$output_objdir/$output_la-${k}.$objext 1.8405 + objlist=" $obj" 1.8406 + func_len " $last_robj" 1.8407 + func_arith $len0 + $func_len_result 1.8408 + len=$func_arith_result 1.8409 + fi 1.8410 + done 1.8411 + # Handle the remaining objects by creating one last 1.8412 + # reloadable object file. All subsequent reloadable object 1.8413 + # files will link in the last one created. 1.8414 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 1.8415 + reload_objs="$objlist $last_robj" 1.8416 + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" 1.8417 + if test -n "$last_robj"; then 1.8418 + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" 1.8419 + fi 1.8420 + func_append delfiles " $output" 1.8421 + 1.8422 + else 1.8423 + output= 1.8424 + fi 1.8425 + 1.8426 + if ${skipped_export-false}; then 1.8427 + func_verbose "generating symbol list for \`$libname.la'" 1.8428 + export_symbols="$output_objdir/$libname.exp" 1.8429 + $opt_dry_run || $RM $export_symbols 1.8430 + libobjs=$output 1.8431 + # Append the command to create the export file. 1.8432 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 1.8433 + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" 1.8434 + if test -n "$last_robj"; then 1.8435 + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" 1.8436 + fi 1.8437 + fi 1.8438 + 1.8439 + test -n "$save_libobjs" && 1.8440 + func_verbose "creating a temporary reloadable object file: $output" 1.8441 + 1.8442 + # Loop through the commands generated above and execute them. 1.8443 + save_ifs="$IFS"; IFS='~' 1.8444 + for cmd in $concat_cmds; do 1.8445 + IFS="$save_ifs" 1.8446 + $opt_silent || { 1.8447 + func_quote_for_expand "$cmd" 1.8448 + eval "func_echo $func_quote_for_expand_result" 1.8449 + } 1.8450 + $opt_dry_run || eval "$cmd" || { 1.8451 + lt_exit=$? 1.8452 + 1.8453 + # Restore the uninstalled library and exit 1.8454 + if test "$opt_mode" = relink; then 1.8455 + ( cd "$output_objdir" && \ 1.8456 + $RM "${realname}T" && \ 1.8457 + $MV "${realname}U" "$realname" ) 1.8458 + fi 1.8459 + 1.8460 + exit $lt_exit 1.8461 + } 1.8462 + done 1.8463 + IFS="$save_ifs" 1.8464 + 1.8465 + if test -n "$export_symbols_regex" && ${skipped_export-false}; then 1.8466 + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' 1.8467 + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' 1.8468 + fi 1.8469 + fi 1.8470 + 1.8471 + if ${skipped_export-false}; then 1.8472 + if test -n "$export_symbols" && test -n "$include_expsyms"; then 1.8473 + tmp_export_symbols="$export_symbols" 1.8474 + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" 1.8475 + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' 1.8476 + fi 1.8477 + 1.8478 + if test -n "$orig_export_symbols"; then 1.8479 + # The given exports_symbols file has to be filtered, so filter it. 1.8480 + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" 1.8481 + # FIXME: $output_objdir/$libname.filter potentially contains lots of 1.8482 + # 's' commands which not all seds can handle. GNU sed should be fine 1.8483 + # though. Also, the filter scales superlinearly with the number of 1.8484 + # global variables. join(1) would be nice here, but unfortunately 1.8485 + # isn't a blessed tool. 1.8486 + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter 1.8487 + func_append delfiles " $export_symbols $output_objdir/$libname.filter" 1.8488 + export_symbols=$output_objdir/$libname.def 1.8489 + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols 1.8490 + fi 1.8491 + fi 1.8492 + 1.8493 + libobjs=$output 1.8494 + # Restore the value of output. 1.8495 + output=$save_output 1.8496 + 1.8497 + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then 1.8498 + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 1.8499 + test "X$libobjs" = "X " && libobjs= 1.8500 + fi 1.8501 + # Expand the library linking commands again to reset the 1.8502 + # value of $libobjs for piecewise linking. 1.8503 + 1.8504 + # Do each of the archive commands. 1.8505 + if test "$module" = yes && test -n "$module_cmds" ; then 1.8506 + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 1.8507 + cmds=$module_expsym_cmds 1.8508 + else 1.8509 + cmds=$module_cmds 1.8510 + fi 1.8511 + else 1.8512 + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 1.8513 + cmds=$archive_expsym_cmds 1.8514 + else 1.8515 + cmds=$archive_cmds 1.8516 + fi 1.8517 + fi 1.8518 + fi 1.8519 + 1.8520 + if test -n "$delfiles"; then 1.8521 + # Append the command to remove temporary files to $cmds. 1.8522 + eval cmds=\"\$cmds~\$RM $delfiles\" 1.8523 + fi 1.8524 + 1.8525 + # Add any objects from preloaded convenience libraries 1.8526 + if test -n "$dlprefiles"; then 1.8527 + gentop="$output_objdir/${outputname}x" 1.8528 + func_append generated " $gentop" 1.8529 + 1.8530 + func_extract_archives $gentop $dlprefiles 1.8531 + func_append libobjs " $func_extract_archives_result" 1.8532 + test "X$libobjs" = "X " && libobjs= 1.8533 + fi 1.8534 + 1.8535 + save_ifs="$IFS"; IFS='~' 1.8536 + for cmd in $cmds; do 1.8537 + IFS="$save_ifs" 1.8538 + eval cmd=\"$cmd\" 1.8539 + $opt_silent || { 1.8540 + func_quote_for_expand "$cmd" 1.8541 + eval "func_echo $func_quote_for_expand_result" 1.8542 + } 1.8543 + $opt_dry_run || eval "$cmd" || { 1.8544 + lt_exit=$? 1.8545 + 1.8546 + # Restore the uninstalled library and exit 1.8547 + if test "$opt_mode" = relink; then 1.8548 + ( cd "$output_objdir" && \ 1.8549 + $RM "${realname}T" && \ 1.8550 + $MV "${realname}U" "$realname" ) 1.8551 + fi 1.8552 + 1.8553 + exit $lt_exit 1.8554 + } 1.8555 + done 1.8556 + IFS="$save_ifs" 1.8557 + 1.8558 + # Restore the uninstalled library and exit 1.8559 + if test "$opt_mode" = relink; then 1.8560 + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? 1.8561 + 1.8562 + if test -n "$convenience"; then 1.8563 + if test -z "$whole_archive_flag_spec"; then 1.8564 + func_show_eval '${RM}r "$gentop"' 1.8565 + fi 1.8566 + fi 1.8567 + 1.8568 + exit $EXIT_SUCCESS 1.8569 + fi 1.8570 + 1.8571 + # Create links to the real library. 1.8572 + for linkname in $linknames; do 1.8573 + if test "$realname" != "$linkname"; then 1.8574 + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' 1.8575 + fi 1.8576 + done 1.8577 + 1.8578 + # If -module or -export-dynamic was specified, set the dlname. 1.8579 + if test "$module" = yes || test "$export_dynamic" = yes; then 1.8580 + # On all known operating systems, these are identical. 1.8581 + dlname="$soname" 1.8582 + fi 1.8583 + fi 1.8584 + ;; 1.8585 + 1.8586 + obj) 1.8587 + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 1.8588 + func_warning "\`-dlopen' is ignored for objects" 1.8589 + fi 1.8590 + 1.8591 + case " $deplibs" in 1.8592 + *\ -l* | *\ -L*) 1.8593 + func_warning "\`-l' and \`-L' are ignored for objects" ;; 1.8594 + esac 1.8595 + 1.8596 + test -n "$rpath" && \ 1.8597 + func_warning "\`-rpath' is ignored for objects" 1.8598 + 1.8599 + test -n "$xrpath" && \ 1.8600 + func_warning "\`-R' is ignored for objects" 1.8601 + 1.8602 + test -n "$vinfo" && \ 1.8603 + func_warning "\`-version-info' is ignored for objects" 1.8604 + 1.8605 + test -n "$release" && \ 1.8606 + func_warning "\`-release' is ignored for objects" 1.8607 + 1.8608 + case $output in 1.8609 + *.lo) 1.8610 + test -n "$objs$old_deplibs" && \ 1.8611 + func_fatal_error "cannot build library object \`$output' from non-libtool objects" 1.8612 + 1.8613 + libobj=$output 1.8614 + func_lo2o "$libobj" 1.8615 + obj=$func_lo2o_result 1.8616 + ;; 1.8617 + *) 1.8618 + libobj= 1.8619 + obj="$output" 1.8620 + ;; 1.8621 + esac 1.8622 + 1.8623 + # Delete the old objects. 1.8624 + $opt_dry_run || $RM $obj $libobj 1.8625 + 1.8626 + # Objects from convenience libraries. This assumes 1.8627 + # single-version convenience libraries. Whenever we create 1.8628 + # different ones for PIC/non-PIC, this we'll have to duplicate 1.8629 + # the extraction. 1.8630 + reload_conv_objs= 1.8631 + gentop= 1.8632 + # reload_cmds runs $LD directly, so let us get rid of 1.8633 + # -Wl from whole_archive_flag_spec and hope we can get by with 1.8634 + # turning comma into space.. 1.8635 + wl= 1.8636 + 1.8637 + if test -n "$convenience"; then 1.8638 + if test -n "$whole_archive_flag_spec"; then 1.8639 + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" 1.8640 + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` 1.8641 + else 1.8642 + gentop="$output_objdir/${obj}x" 1.8643 + func_append generated " $gentop" 1.8644 + 1.8645 + func_extract_archives $gentop $convenience 1.8646 + reload_conv_objs="$reload_objs $func_extract_archives_result" 1.8647 + fi 1.8648 + fi 1.8649 + 1.8650 + # If we're not building shared, we need to use non_pic_objs 1.8651 + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" 1.8652 + 1.8653 + # Create the old-style object. 1.8654 + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test 1.8655 + 1.8656 + output="$obj" 1.8657 + func_execute_cmds "$reload_cmds" 'exit $?' 1.8658 + 1.8659 + # Exit if we aren't doing a library object file. 1.8660 + if test -z "$libobj"; then 1.8661 + if test -n "$gentop"; then 1.8662 + func_show_eval '${RM}r "$gentop"' 1.8663 + fi 1.8664 + 1.8665 + exit $EXIT_SUCCESS 1.8666 + fi 1.8667 + 1.8668 + if test "$build_libtool_libs" != yes; then 1.8669 + if test -n "$gentop"; then 1.8670 + func_show_eval '${RM}r "$gentop"' 1.8671 + fi 1.8672 + 1.8673 + # Create an invalid libtool object if no PIC, so that we don't 1.8674 + # accidentally link it into a program. 1.8675 + # $show "echo timestamp > $libobj" 1.8676 + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? 1.8677 + exit $EXIT_SUCCESS 1.8678 + fi 1.8679 + 1.8680 + if test -n "$pic_flag" || test "$pic_mode" != default; then 1.8681 + # Only do commands if we really have different PIC objects. 1.8682 + reload_objs="$libobjs $reload_conv_objs" 1.8683 + output="$libobj" 1.8684 + func_execute_cmds "$reload_cmds" 'exit $?' 1.8685 + fi 1.8686 + 1.8687 + if test -n "$gentop"; then 1.8688 + func_show_eval '${RM}r "$gentop"' 1.8689 + fi 1.8690 + 1.8691 + exit $EXIT_SUCCESS 1.8692 + ;; 1.8693 + 1.8694 + prog) 1.8695 + case $host in 1.8696 + *cygwin*) func_stripname '' '.exe' "$output" 1.8697 + output=$func_stripname_result.exe;; 1.8698 + esac 1.8699 + test -n "$vinfo" && \ 1.8700 + func_warning "\`-version-info' is ignored for programs" 1.8701 + 1.8702 + test -n "$release" && \ 1.8703 + func_warning "\`-release' is ignored for programs" 1.8704 + 1.8705 + test "$preload" = yes \ 1.8706 + && test "$dlopen_support" = unknown \ 1.8707 + && test "$dlopen_self" = unknown \ 1.8708 + && test "$dlopen_self_static" = unknown && \ 1.8709 + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." 1.8710 + 1.8711 + case $host in 1.8712 + *-*-rhapsody* | *-*-darwin1.[012]) 1.8713 + # On Rhapsody replace the C library is the System framework 1.8714 + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` 1.8715 + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` 1.8716 + ;; 1.8717 + esac 1.8718 + 1.8719 + case $host in 1.8720 + *-*-darwin*) 1.8721 + # Don't allow lazy linking, it breaks C++ global constructors 1.8722 + # But is supposedly fixed on 10.4 or later (yay!). 1.8723 + if test "$tagname" = CXX ; then 1.8724 + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 1.8725 + 10.[0123]) 1.8726 + func_append compile_command " ${wl}-bind_at_load" 1.8727 + func_append finalize_command " ${wl}-bind_at_load" 1.8728 + ;; 1.8729 + esac 1.8730 + fi 1.8731 + # Time to change all our "foo.ltframework" stuff back to "-framework foo" 1.8732 + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` 1.8733 + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` 1.8734 + ;; 1.8735 + esac 1.8736 + 1.8737 + 1.8738 + # move library search paths that coincide with paths to not yet 1.8739 + # installed libraries to the beginning of the library search list 1.8740 + new_libs= 1.8741 + for path in $notinst_path; do 1.8742 + case " $new_libs " in 1.8743 + *" -L$path/$objdir "*) ;; 1.8744 + *) 1.8745 + case " $compile_deplibs " in 1.8746 + *" -L$path/$objdir "*) 1.8747 + func_append new_libs " -L$path/$objdir" ;; 1.8748 + esac 1.8749 + ;; 1.8750 + esac 1.8751 + done 1.8752 + for deplib in $compile_deplibs; do 1.8753 + case $deplib in 1.8754 + -L*) 1.8755 + case " $new_libs " in 1.8756 + *" $deplib "*) ;; 1.8757 + *) func_append new_libs " $deplib" ;; 1.8758 + esac 1.8759 + ;; 1.8760 + *) func_append new_libs " $deplib" ;; 1.8761 + esac 1.8762 + done 1.8763 + compile_deplibs="$new_libs" 1.8764 + 1.8765 + 1.8766 + func_append compile_command " $compile_deplibs" 1.8767 + func_append finalize_command " $finalize_deplibs" 1.8768 + 1.8769 + if test -n "$rpath$xrpath"; then 1.8770 + # If the user specified any rpath flags, then add them. 1.8771 + for libdir in $rpath $xrpath; do 1.8772 + # This is the magic to use -rpath. 1.8773 + case "$finalize_rpath " in 1.8774 + *" $libdir "*) ;; 1.8775 + *) func_append finalize_rpath " $libdir" ;; 1.8776 + esac 1.8777 + done 1.8778 + fi 1.8779 + 1.8780 + # Now hardcode the library paths 1.8781 + rpath= 1.8782 + hardcode_libdirs= 1.8783 + for libdir in $compile_rpath $finalize_rpath; do 1.8784 + if test -n "$hardcode_libdir_flag_spec"; then 1.8785 + if test -n "$hardcode_libdir_separator"; then 1.8786 + if test -z "$hardcode_libdirs"; then 1.8787 + hardcode_libdirs="$libdir" 1.8788 + else 1.8789 + # Just accumulate the unique libdirs. 1.8790 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in 1.8791 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 1.8792 + ;; 1.8793 + *) 1.8794 + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" 1.8795 + ;; 1.8796 + esac 1.8797 + fi 1.8798 + else 1.8799 + eval flag=\"$hardcode_libdir_flag_spec\" 1.8800 + func_append rpath " $flag" 1.8801 + fi 1.8802 + elif test -n "$runpath_var"; then 1.8803 + case "$perm_rpath " in 1.8804 + *" $libdir "*) ;; 1.8805 + *) func_append perm_rpath " $libdir" ;; 1.8806 + esac 1.8807 + fi 1.8808 + case $host in 1.8809 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) 1.8810 + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` 1.8811 + case :$dllsearchpath: in 1.8812 + *":$libdir:"*) ;; 1.8813 + ::) dllsearchpath=$libdir;; 1.8814 + *) func_append dllsearchpath ":$libdir";; 1.8815 + esac 1.8816 + case :$dllsearchpath: in 1.8817 + *":$testbindir:"*) ;; 1.8818 + ::) dllsearchpath=$testbindir;; 1.8819 + *) func_append dllsearchpath ":$testbindir";; 1.8820 + esac 1.8821 + ;; 1.8822 + esac 1.8823 + done 1.8824 + # Substitute the hardcoded libdirs into the rpath. 1.8825 + if test -n "$hardcode_libdir_separator" && 1.8826 + test -n "$hardcode_libdirs"; then 1.8827 + libdir="$hardcode_libdirs" 1.8828 + eval rpath=\" $hardcode_libdir_flag_spec\" 1.8829 + fi 1.8830 + compile_rpath="$rpath" 1.8831 + 1.8832 + rpath= 1.8833 + hardcode_libdirs= 1.8834 + for libdir in $finalize_rpath; do 1.8835 + if test -n "$hardcode_libdir_flag_spec"; then 1.8836 + if test -n "$hardcode_libdir_separator"; then 1.8837 + if test -z "$hardcode_libdirs"; then 1.8838 + hardcode_libdirs="$libdir" 1.8839 + else 1.8840 + # Just accumulate the unique libdirs. 1.8841 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in 1.8842 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 1.8843 + ;; 1.8844 + *) 1.8845 + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" 1.8846 + ;; 1.8847 + esac 1.8848 + fi 1.8849 + else 1.8850 + eval flag=\"$hardcode_libdir_flag_spec\" 1.8851 + func_append rpath " $flag" 1.8852 + fi 1.8853 + elif test -n "$runpath_var"; then 1.8854 + case "$finalize_perm_rpath " in 1.8855 + *" $libdir "*) ;; 1.8856 + *) func_append finalize_perm_rpath " $libdir" ;; 1.8857 + esac 1.8858 + fi 1.8859 + done 1.8860 + # Substitute the hardcoded libdirs into the rpath. 1.8861 + if test -n "$hardcode_libdir_separator" && 1.8862 + test -n "$hardcode_libdirs"; then 1.8863 + libdir="$hardcode_libdirs" 1.8864 + eval rpath=\" $hardcode_libdir_flag_spec\" 1.8865 + fi 1.8866 + finalize_rpath="$rpath" 1.8867 + 1.8868 + if test -n "$libobjs" && test "$build_old_libs" = yes; then 1.8869 + # Transform all the library objects into standard objects. 1.8870 + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` 1.8871 + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` 1.8872 + fi 1.8873 + 1.8874 + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" 1.8875 + 1.8876 + # template prelinking step 1.8877 + if test -n "$prelink_cmds"; then 1.8878 + func_execute_cmds "$prelink_cmds" 'exit $?' 1.8879 + fi 1.8880 + 1.8881 + wrappers_required=yes 1.8882 + case $host in 1.8883 + *cegcc* | *mingw32ce*) 1.8884 + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. 1.8885 + wrappers_required=no 1.8886 + ;; 1.8887 + *cygwin* | *mingw* ) 1.8888 + if test "$build_libtool_libs" != yes; then 1.8889 + wrappers_required=no 1.8890 + fi 1.8891 + ;; 1.8892 + *) 1.8893 + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then 1.8894 + wrappers_required=no 1.8895 + fi 1.8896 + ;; 1.8897 + esac 1.8898 + if test "$wrappers_required" = no; then 1.8899 + # Replace the output file specification. 1.8900 + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` 1.8901 + link_command="$compile_command$compile_rpath" 1.8902 + 1.8903 + # We have no uninstalled library dependencies, so finalize right now. 1.8904 + exit_status=0 1.8905 + func_show_eval "$link_command" 'exit_status=$?' 1.8906 + 1.8907 + if test -n "$postlink_cmds"; then 1.8908 + func_to_tool_file "$output" 1.8909 + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` 1.8910 + func_execute_cmds "$postlink_cmds" 'exit $?' 1.8911 + fi 1.8912 + 1.8913 + # Delete the generated files. 1.8914 + if test -f "$output_objdir/${outputname}S.${objext}"; then 1.8915 + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' 1.8916 + fi 1.8917 + 1.8918 + exit $exit_status 1.8919 + fi 1.8920 + 1.8921 + if test -n "$compile_shlibpath$finalize_shlibpath"; then 1.8922 + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" 1.8923 + fi 1.8924 + if test -n "$finalize_shlibpath"; then 1.8925 + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" 1.8926 + fi 1.8927 + 1.8928 + compile_var= 1.8929 + finalize_var= 1.8930 + if test -n "$runpath_var"; then 1.8931 + if test -n "$perm_rpath"; then 1.8932 + # We should set the runpath_var. 1.8933 + rpath= 1.8934 + for dir in $perm_rpath; do 1.8935 + func_append rpath "$dir:" 1.8936 + done 1.8937 + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " 1.8938 + fi 1.8939 + if test -n "$finalize_perm_rpath"; then 1.8940 + # We should set the runpath_var. 1.8941 + rpath= 1.8942 + for dir in $finalize_perm_rpath; do 1.8943 + func_append rpath "$dir:" 1.8944 + done 1.8945 + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " 1.8946 + fi 1.8947 + fi 1.8948 + 1.8949 + if test "$no_install" = yes; then 1.8950 + # We don't need to create a wrapper script. 1.8951 + link_command="$compile_var$compile_command$compile_rpath" 1.8952 + # Replace the output file specification. 1.8953 + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` 1.8954 + # Delete the old output file. 1.8955 + $opt_dry_run || $RM $output 1.8956 + # Link the executable and exit 1.8957 + func_show_eval "$link_command" 'exit $?' 1.8958 + 1.8959 + if test -n "$postlink_cmds"; then 1.8960 + func_to_tool_file "$output" 1.8961 + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` 1.8962 + func_execute_cmds "$postlink_cmds" 'exit $?' 1.8963 + fi 1.8964 + 1.8965 + exit $EXIT_SUCCESS 1.8966 + fi 1.8967 + 1.8968 + if test "$hardcode_action" = relink; then 1.8969 + # Fast installation is not supported 1.8970 + link_command="$compile_var$compile_command$compile_rpath" 1.8971 + relink_command="$finalize_var$finalize_command$finalize_rpath" 1.8972 + 1.8973 + func_warning "this platform does not like uninstalled shared libraries" 1.8974 + func_warning "\`$output' will be relinked during installation" 1.8975 + else 1.8976 + if test "$fast_install" != no; then 1.8977 + link_command="$finalize_var$compile_command$finalize_rpath" 1.8978 + if test "$fast_install" = yes; then 1.8979 + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` 1.8980 + else 1.8981 + # fast_install is set to needless 1.8982 + relink_command= 1.8983 + fi 1.8984 + else 1.8985 + link_command="$compile_var$compile_command$compile_rpath" 1.8986 + relink_command="$finalize_var$finalize_command$finalize_rpath" 1.8987 + fi 1.8988 + fi 1.8989 + 1.8990 + # Replace the output file specification. 1.8991 + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` 1.8992 + 1.8993 + # Delete the old output files. 1.8994 + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname 1.8995 + 1.8996 + func_show_eval "$link_command" 'exit $?' 1.8997 + 1.8998 + if test -n "$postlink_cmds"; then 1.8999 + func_to_tool_file "$output_objdir/$outputname" 1.9000 + 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'` 1.9001 + func_execute_cmds "$postlink_cmds" 'exit $?' 1.9002 + fi 1.9003 + 1.9004 + # Now create the wrapper script. 1.9005 + func_verbose "creating $output" 1.9006 + 1.9007 + # Quote the relink command for shipping. 1.9008 + if test -n "$relink_command"; then 1.9009 + # Preserve any variables that may affect compiler behavior 1.9010 + for var in $variables_saved_for_relink; do 1.9011 + if eval test -z \"\${$var+set}\"; then 1.9012 + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" 1.9013 + elif eval var_value=\$$var; test -z "$var_value"; then 1.9014 + relink_command="$var=; export $var; $relink_command" 1.9015 + else 1.9016 + func_quote_for_eval "$var_value" 1.9017 + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" 1.9018 + fi 1.9019 + done 1.9020 + relink_command="(cd `pwd`; $relink_command)" 1.9021 + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` 1.9022 + fi 1.9023 + 1.9024 + # Only actually do things if not in dry run mode. 1.9025 + $opt_dry_run || { 1.9026 + # win32 will think the script is a binary if it has 1.9027 + # a .exe suffix, so we strip it off here. 1.9028 + case $output in 1.9029 + *.exe) func_stripname '' '.exe' "$output" 1.9030 + output=$func_stripname_result ;; 1.9031 + esac 1.9032 + # test for cygwin because mv fails w/o .exe extensions 1.9033 + case $host in 1.9034 + *cygwin*) 1.9035 + exeext=.exe 1.9036 + func_stripname '' '.exe' "$outputname" 1.9037 + outputname=$func_stripname_result ;; 1.9038 + *) exeext= ;; 1.9039 + esac 1.9040 + case $host in 1.9041 + *cygwin* | *mingw* ) 1.9042 + func_dirname_and_basename "$output" "" "." 1.9043 + output_name=$func_basename_result 1.9044 + output_path=$func_dirname_result 1.9045 + cwrappersource="$output_path/$objdir/lt-$output_name.c" 1.9046 + cwrapper="$output_path/$output_name.exe" 1.9047 + $RM $cwrappersource $cwrapper 1.9048 + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 1.9049 + 1.9050 + func_emit_cwrapperexe_src > $cwrappersource 1.9051 + 1.9052 + # The wrapper executable is built using the $host compiler, 1.9053 + # because it contains $host paths and files. If cross- 1.9054 + # compiling, it, like the target executable, must be 1.9055 + # executed on the $host or under an emulation environment. 1.9056 + $opt_dry_run || { 1.9057 + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource 1.9058 + $STRIP $cwrapper 1.9059 + } 1.9060 + 1.9061 + # Now, create the wrapper script for func_source use: 1.9062 + func_ltwrapper_scriptname $cwrapper 1.9063 + $RM $func_ltwrapper_scriptname_result 1.9064 + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 1.9065 + $opt_dry_run || { 1.9066 + # note: this script will not be executed, so do not chmod. 1.9067 + if test "x$build" = "x$host" ; then 1.9068 + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result 1.9069 + else 1.9070 + func_emit_wrapper no > $func_ltwrapper_scriptname_result 1.9071 + fi 1.9072 + } 1.9073 + ;; 1.9074 + * ) 1.9075 + $RM $output 1.9076 + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 1.9077 + 1.9078 + func_emit_wrapper no > $output 1.9079 + chmod +x $output 1.9080 + ;; 1.9081 + esac 1.9082 + } 1.9083 + exit $EXIT_SUCCESS 1.9084 + ;; 1.9085 + esac 1.9086 + 1.9087 + # See if we need to build an old-fashioned archive. 1.9088 + for oldlib in $oldlibs; do 1.9089 + 1.9090 + if test "$build_libtool_libs" = convenience; then 1.9091 + oldobjs="$libobjs_save $symfileobj" 1.9092 + addlibs="$convenience" 1.9093 + build_libtool_libs=no 1.9094 + else 1.9095 + if test "$build_libtool_libs" = module; then 1.9096 + oldobjs="$libobjs_save" 1.9097 + build_libtool_libs=no 1.9098 + else 1.9099 + oldobjs="$old_deplibs $non_pic_objects" 1.9100 + if test "$preload" = yes && test -f "$symfileobj"; then 1.9101 + func_append oldobjs " $symfileobj" 1.9102 + fi 1.9103 + fi 1.9104 + addlibs="$old_convenience" 1.9105 + fi 1.9106 + 1.9107 + if test -n "$addlibs"; then 1.9108 + gentop="$output_objdir/${outputname}x" 1.9109 + func_append generated " $gentop" 1.9110 + 1.9111 + func_extract_archives $gentop $addlibs 1.9112 + func_append oldobjs " $func_extract_archives_result" 1.9113 + fi 1.9114 + 1.9115 + # Do each command in the archive commands. 1.9116 + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then 1.9117 + cmds=$old_archive_from_new_cmds 1.9118 + else 1.9119 + 1.9120 + # Add any objects from preloaded convenience libraries 1.9121 + if test -n "$dlprefiles"; then 1.9122 + gentop="$output_objdir/${outputname}x" 1.9123 + func_append generated " $gentop" 1.9124 + 1.9125 + func_extract_archives $gentop $dlprefiles 1.9126 + func_append oldobjs " $func_extract_archives_result" 1.9127 + fi 1.9128 + 1.9129 + # POSIX demands no paths to be encoded in archives. We have 1.9130 + # to avoid creating archives with duplicate basenames if we 1.9131 + # might have to extract them afterwards, e.g., when creating a 1.9132 + # static archive out of a convenience library, or when linking 1.9133 + # the entirety of a libtool archive into another (currently 1.9134 + # not supported by libtool). 1.9135 + if (for obj in $oldobjs 1.9136 + do 1.9137 + func_basename "$obj" 1.9138 + $ECHO "$func_basename_result" 1.9139 + done | sort | sort -uc >/dev/null 2>&1); then 1.9140 + : 1.9141 + else 1.9142 + echo "copying selected object files to avoid basename conflicts..." 1.9143 + gentop="$output_objdir/${outputname}x" 1.9144 + func_append generated " $gentop" 1.9145 + func_mkdir_p "$gentop" 1.9146 + save_oldobjs=$oldobjs 1.9147 + oldobjs= 1.9148 + counter=1 1.9149 + for obj in $save_oldobjs 1.9150 + do 1.9151 + func_basename "$obj" 1.9152 + objbase="$func_basename_result" 1.9153 + case " $oldobjs " in 1.9154 + " ") oldobjs=$obj ;; 1.9155 + *[\ /]"$objbase "*) 1.9156 + while :; do 1.9157 + # Make sure we don't pick an alternate name that also 1.9158 + # overlaps. 1.9159 + newobj=lt$counter-$objbase 1.9160 + func_arith $counter + 1 1.9161 + counter=$func_arith_result 1.9162 + case " $oldobjs " in 1.9163 + *[\ /]"$newobj "*) ;; 1.9164 + *) if test ! -f "$gentop/$newobj"; then break; fi ;; 1.9165 + esac 1.9166 + done 1.9167 + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" 1.9168 + func_append oldobjs " $gentop/$newobj" 1.9169 + ;; 1.9170 + *) func_append oldobjs " $obj" ;; 1.9171 + esac 1.9172 + done 1.9173 + fi 1.9174 + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 1.9175 + tool_oldlib=$func_to_tool_file_result 1.9176 + eval cmds=\"$old_archive_cmds\" 1.9177 + 1.9178 + func_len " $cmds" 1.9179 + len=$func_len_result 1.9180 + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then 1.9181 + cmds=$old_archive_cmds 1.9182 + elif test -n "$archiver_list_spec"; then 1.9183 + func_verbose "using command file archive linking..." 1.9184 + for obj in $oldobjs 1.9185 + do 1.9186 + func_to_tool_file "$obj" 1.9187 + $ECHO "$func_to_tool_file_result" 1.9188 + done > $output_objdir/$libname.libcmd 1.9189 + func_to_tool_file "$output_objdir/$libname.libcmd" 1.9190 + oldobjs=" $archiver_list_spec$func_to_tool_file_result" 1.9191 + cmds=$old_archive_cmds 1.9192 + else 1.9193 + # the command line is too long to link in one step, link in parts 1.9194 + func_verbose "using piecewise archive linking..." 1.9195 + save_RANLIB=$RANLIB 1.9196 + RANLIB=: 1.9197 + objlist= 1.9198 + concat_cmds= 1.9199 + save_oldobjs=$oldobjs 1.9200 + oldobjs= 1.9201 + # Is there a better way of finding the last object in the list? 1.9202 + for obj in $save_oldobjs 1.9203 + do 1.9204 + last_oldobj=$obj 1.9205 + done 1.9206 + eval test_cmds=\"$old_archive_cmds\" 1.9207 + func_len " $test_cmds" 1.9208 + len0=$func_len_result 1.9209 + len=$len0 1.9210 + for obj in $save_oldobjs 1.9211 + do 1.9212 + func_len " $obj" 1.9213 + func_arith $len + $func_len_result 1.9214 + len=$func_arith_result 1.9215 + func_append objlist " $obj" 1.9216 + if test "$len" -lt "$max_cmd_len"; then 1.9217 + : 1.9218 + else 1.9219 + # the above command should be used before it gets too long 1.9220 + oldobjs=$objlist 1.9221 + if test "$obj" = "$last_oldobj" ; then 1.9222 + RANLIB=$save_RANLIB 1.9223 + fi 1.9224 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 1.9225 + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" 1.9226 + objlist= 1.9227 + len=$len0 1.9228 + fi 1.9229 + done 1.9230 + RANLIB=$save_RANLIB 1.9231 + oldobjs=$objlist 1.9232 + if test "X$oldobjs" = "X" ; then 1.9233 + eval cmds=\"\$concat_cmds\" 1.9234 + else 1.9235 + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" 1.9236 + fi 1.9237 + fi 1.9238 + fi 1.9239 + func_execute_cmds "$cmds" 'exit $?' 1.9240 + done 1.9241 + 1.9242 + test -n "$generated" && \ 1.9243 + func_show_eval "${RM}r$generated" 1.9244 + 1.9245 + # Now create the libtool archive. 1.9246 + case $output in 1.9247 + *.la) 1.9248 + old_library= 1.9249 + test "$build_old_libs" = yes && old_library="$libname.$libext" 1.9250 + func_verbose "creating $output" 1.9251 + 1.9252 + # Preserve any variables that may affect compiler behavior 1.9253 + for var in $variables_saved_for_relink; do 1.9254 + if eval test -z \"\${$var+set}\"; then 1.9255 + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" 1.9256 + elif eval var_value=\$$var; test -z "$var_value"; then 1.9257 + relink_command="$var=; export $var; $relink_command" 1.9258 + else 1.9259 + func_quote_for_eval "$var_value" 1.9260 + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" 1.9261 + fi 1.9262 + done 1.9263 + # Quote the link command for shipping. 1.9264 + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" 1.9265 + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` 1.9266 + if test "$hardcode_automatic" = yes ; then 1.9267 + relink_command= 1.9268 + fi 1.9269 + 1.9270 + # Only create the output if not a dry run. 1.9271 + $opt_dry_run || { 1.9272 + for installed in no yes; do 1.9273 + if test "$installed" = yes; then 1.9274 + if test -z "$install_libdir"; then 1.9275 + break 1.9276 + fi 1.9277 + output="$output_objdir/$outputname"i 1.9278 + # Replace all uninstalled libtool libraries with the installed ones 1.9279 + newdependency_libs= 1.9280 + for deplib in $dependency_libs; do 1.9281 + case $deplib in 1.9282 + *.la) 1.9283 + func_basename "$deplib" 1.9284 + name="$func_basename_result" 1.9285 + func_resolve_sysroot "$deplib" 1.9286 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` 1.9287 + test -z "$libdir" && \ 1.9288 + func_fatal_error "\`$deplib' is not a valid libtool archive" 1.9289 + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" 1.9290 + ;; 1.9291 + -L*) 1.9292 + func_stripname -L '' "$deplib" 1.9293 + func_replace_sysroot "$func_stripname_result" 1.9294 + func_append newdependency_libs " -L$func_replace_sysroot_result" 1.9295 + ;; 1.9296 + -R*) 1.9297 + func_stripname -R '' "$deplib" 1.9298 + func_replace_sysroot "$func_stripname_result" 1.9299 + func_append newdependency_libs " -R$func_replace_sysroot_result" 1.9300 + ;; 1.9301 + *) func_append newdependency_libs " $deplib" ;; 1.9302 + esac 1.9303 + done 1.9304 + dependency_libs="$newdependency_libs" 1.9305 + newdlfiles= 1.9306 + 1.9307 + for lib in $dlfiles; do 1.9308 + case $lib in 1.9309 + *.la) 1.9310 + func_basename "$lib" 1.9311 + name="$func_basename_result" 1.9312 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 1.9313 + test -z "$libdir" && \ 1.9314 + func_fatal_error "\`$lib' is not a valid libtool archive" 1.9315 + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" 1.9316 + ;; 1.9317 + *) func_append newdlfiles " $lib" ;; 1.9318 + esac 1.9319 + done 1.9320 + dlfiles="$newdlfiles" 1.9321 + newdlprefiles= 1.9322 + for lib in $dlprefiles; do 1.9323 + case $lib in 1.9324 + *.la) 1.9325 + # Only pass preopened files to the pseudo-archive (for 1.9326 + # eventual linking with the app. that links it) if we 1.9327 + # didn't already link the preopened objects directly into 1.9328 + # the library: 1.9329 + func_basename "$lib" 1.9330 + name="$func_basename_result" 1.9331 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 1.9332 + test -z "$libdir" && \ 1.9333 + func_fatal_error "\`$lib' is not a valid libtool archive" 1.9334 + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" 1.9335 + ;; 1.9336 + esac 1.9337 + done 1.9338 + dlprefiles="$newdlprefiles" 1.9339 + else 1.9340 + newdlfiles= 1.9341 + for lib in $dlfiles; do 1.9342 + case $lib in 1.9343 + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; 1.9344 + *) abs=`pwd`"/$lib" ;; 1.9345 + esac 1.9346 + func_append newdlfiles " $abs" 1.9347 + done 1.9348 + dlfiles="$newdlfiles" 1.9349 + newdlprefiles= 1.9350 + for lib in $dlprefiles; do 1.9351 + case $lib in 1.9352 + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; 1.9353 + *) abs=`pwd`"/$lib" ;; 1.9354 + esac 1.9355 + func_append newdlprefiles " $abs" 1.9356 + done 1.9357 + dlprefiles="$newdlprefiles" 1.9358 + fi 1.9359 + $RM $output 1.9360 + # place dlname in correct position for cygwin 1.9361 + # In fact, it would be nice if we could use this code for all target 1.9362 + # systems that can't hard-code library paths into their executables 1.9363 + # and that have no shared library path variable independent of PATH, 1.9364 + # but it turns out we can't easily determine that from inspecting 1.9365 + # libtool variables, so we have to hard-code the OSs to which it 1.9366 + # applies here; at the moment, that means platforms that use the PE 1.9367 + # object format with DLL files. See the long comment at the top of 1.9368 + # tests/bindir.at for full details. 1.9369 + tdlname=$dlname 1.9370 + case $host,$output,$installed,$module,$dlname in 1.9371 + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) 1.9372 + # If a -bindir argument was supplied, place the dll there. 1.9373 + if test "x$bindir" != x ; 1.9374 + then 1.9375 + func_relative_path "$install_libdir" "$bindir" 1.9376 + tdlname=$func_relative_path_result$dlname 1.9377 + else 1.9378 + # Otherwise fall back on heuristic. 1.9379 + tdlname=../bin/$dlname 1.9380 + fi 1.9381 + ;; 1.9382 + esac 1.9383 + $ECHO > $output "\ 1.9384 +# $outputname - a libtool library file 1.9385 +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION 1.9386 +# 1.9387 +# Please DO NOT delete this file! 1.9388 +# It is necessary for linking the library. 1.9389 + 1.9390 +# The name that we can dlopen(3). 1.9391 +dlname='$tdlname' 1.9392 + 1.9393 +# Names of this library. 1.9394 +library_names='$library_names' 1.9395 + 1.9396 +# The name of the static archive. 1.9397 +old_library='$old_library' 1.9398 + 1.9399 +# Linker flags that can not go in dependency_libs. 1.9400 +inherited_linker_flags='$new_inherited_linker_flags' 1.9401 + 1.9402 +# Libraries that this one depends upon. 1.9403 +dependency_libs='$dependency_libs' 1.9404 + 1.9405 +# Names of additional weak libraries provided by this library 1.9406 +weak_library_names='$weak_libs' 1.9407 + 1.9408 +# Version information for $libname. 1.9409 +current=$current 1.9410 +age=$age 1.9411 +revision=$revision 1.9412 + 1.9413 +# Is this an already installed library? 1.9414 +installed=$installed 1.9415 + 1.9416 +# Should we warn about portability when linking against -modules? 1.9417 +shouldnotlink=$module 1.9418 + 1.9419 +# Files to dlopen/dlpreopen 1.9420 +dlopen='$dlfiles' 1.9421 +dlpreopen='$dlprefiles' 1.9422 + 1.9423 +# Directory that this library needs to be installed in: 1.9424 +libdir='$install_libdir'" 1.9425 + if test "$installed" = no && test "$need_relink" = yes; then 1.9426 + $ECHO >> $output "\ 1.9427 +relink_command=\"$relink_command\"" 1.9428 + fi 1.9429 + done 1.9430 + } 1.9431 + 1.9432 + # Do a symbolic link so that the libtool archive can be found in 1.9433 + # LD_LIBRARY_PATH before the program is installed. 1.9434 + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' 1.9435 + ;; 1.9436 + esac 1.9437 + exit $EXIT_SUCCESS 1.9438 +} 1.9439 + 1.9440 +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && 1.9441 + func_mode_link ${1+"$@"} 1.9442 + 1.9443 + 1.9444 +# func_mode_uninstall arg... 1.9445 +func_mode_uninstall () 1.9446 +{ 1.9447 + $opt_debug 1.9448 + RM="$nonopt" 1.9449 + files= 1.9450 + rmforce= 1.9451 + exit_status=0 1.9452 + 1.9453 + # This variable tells wrapper scripts just to set variables rather 1.9454 + # than running their programs. 1.9455 + libtool_install_magic="$magic" 1.9456 + 1.9457 + for arg 1.9458 + do 1.9459 + case $arg in 1.9460 + -f) func_append RM " $arg"; rmforce=yes ;; 1.9461 + -*) func_append RM " $arg" ;; 1.9462 + *) func_append files " $arg" ;; 1.9463 + esac 1.9464 + done 1.9465 + 1.9466 + test -z "$RM" && \ 1.9467 + func_fatal_help "you must specify an RM program" 1.9468 + 1.9469 + rmdirs= 1.9470 + 1.9471 + for file in $files; do 1.9472 + func_dirname "$file" "" "." 1.9473 + dir="$func_dirname_result" 1.9474 + if test "X$dir" = X.; then 1.9475 + odir="$objdir" 1.9476 + else 1.9477 + odir="$dir/$objdir" 1.9478 + fi 1.9479 + func_basename "$file" 1.9480 + name="$func_basename_result" 1.9481 + test "$opt_mode" = uninstall && odir="$dir" 1.9482 + 1.9483 + # Remember odir for removal later, being careful to avoid duplicates 1.9484 + if test "$opt_mode" = clean; then 1.9485 + case " $rmdirs " in 1.9486 + *" $odir "*) ;; 1.9487 + *) func_append rmdirs " $odir" ;; 1.9488 + esac 1.9489 + fi 1.9490 + 1.9491 + # Don't error if the file doesn't exist and rm -f was used. 1.9492 + if { test -L "$file"; } >/dev/null 2>&1 || 1.9493 + { test -h "$file"; } >/dev/null 2>&1 || 1.9494 + test -f "$file"; then 1.9495 + : 1.9496 + elif test -d "$file"; then 1.9497 + exit_status=1 1.9498 + continue 1.9499 + elif test "$rmforce" = yes; then 1.9500 + continue 1.9501 + fi 1.9502 + 1.9503 + rmfiles="$file" 1.9504 + 1.9505 + case $name in 1.9506 + *.la) 1.9507 + # Possibly a libtool archive, so verify it. 1.9508 + if func_lalib_p "$file"; then 1.9509 + func_source $dir/$name 1.9510 + 1.9511 + # Delete the libtool libraries and symlinks. 1.9512 + for n in $library_names; do 1.9513 + func_append rmfiles " $odir/$n" 1.9514 + done 1.9515 + test -n "$old_library" && func_append rmfiles " $odir/$old_library" 1.9516 + 1.9517 + case "$opt_mode" in 1.9518 + clean) 1.9519 + case " $library_names " in 1.9520 + *" $dlname "*) ;; 1.9521 + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; 1.9522 + esac 1.9523 + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" 1.9524 + ;; 1.9525 + uninstall) 1.9526 + if test -n "$library_names"; then 1.9527 + # Do each command in the postuninstall commands. 1.9528 + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' 1.9529 + fi 1.9530 + 1.9531 + if test -n "$old_library"; then 1.9532 + # Do each command in the old_postuninstall commands. 1.9533 + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' 1.9534 + fi 1.9535 + # FIXME: should reinstall the best remaining shared library. 1.9536 + ;; 1.9537 + esac 1.9538 + fi 1.9539 + ;; 1.9540 + 1.9541 + *.lo) 1.9542 + # Possibly a libtool object, so verify it. 1.9543 + if func_lalib_p "$file"; then 1.9544 + 1.9545 + # Read the .lo file 1.9546 + func_source $dir/$name 1.9547 + 1.9548 + # Add PIC object to the list of files to remove. 1.9549 + if test -n "$pic_object" && 1.9550 + test "$pic_object" != none; then 1.9551 + func_append rmfiles " $dir/$pic_object" 1.9552 + fi 1.9553 + 1.9554 + # Add non-PIC object to the list of files to remove. 1.9555 + if test -n "$non_pic_object" && 1.9556 + test "$non_pic_object" != none; then 1.9557 + func_append rmfiles " $dir/$non_pic_object" 1.9558 + fi 1.9559 + fi 1.9560 + ;; 1.9561 + 1.9562 + *) 1.9563 + if test "$opt_mode" = clean ; then 1.9564 + noexename=$name 1.9565 + case $file in 1.9566 + *.exe) 1.9567 + func_stripname '' '.exe' "$file" 1.9568 + file=$func_stripname_result 1.9569 + func_stripname '' '.exe' "$name" 1.9570 + noexename=$func_stripname_result 1.9571 + # $file with .exe has already been added to rmfiles, 1.9572 + # add $file without .exe 1.9573 + func_append rmfiles " $file" 1.9574 + ;; 1.9575 + esac 1.9576 + # Do a test to see if this is a libtool program. 1.9577 + if func_ltwrapper_p "$file"; then 1.9578 + if func_ltwrapper_executable_p "$file"; then 1.9579 + func_ltwrapper_scriptname "$file" 1.9580 + relink_command= 1.9581 + func_source $func_ltwrapper_scriptname_result 1.9582 + func_append rmfiles " $func_ltwrapper_scriptname_result" 1.9583 + else 1.9584 + relink_command= 1.9585 + func_source $dir/$noexename 1.9586 + fi 1.9587 + 1.9588 + # note $name still contains .exe if it was in $file originally 1.9589 + # as does the version of $file that was added into $rmfiles 1.9590 + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" 1.9591 + if test "$fast_install" = yes && test -n "$relink_command"; then 1.9592 + func_append rmfiles " $odir/lt-$name" 1.9593 + fi 1.9594 + if test "X$noexename" != "X$name" ; then 1.9595 + func_append rmfiles " $odir/lt-${noexename}.c" 1.9596 + fi 1.9597 + fi 1.9598 + fi 1.9599 + ;; 1.9600 + esac 1.9601 + func_show_eval "$RM $rmfiles" 'exit_status=1' 1.9602 + done 1.9603 + 1.9604 + # Try to remove the ${objdir}s in the directories where we deleted files 1.9605 + for dir in $rmdirs; do 1.9606 + if test -d "$dir"; then 1.9607 + func_show_eval "rmdir $dir >/dev/null 2>&1" 1.9608 + fi 1.9609 + done 1.9610 + 1.9611 + exit $exit_status 1.9612 +} 1.9613 + 1.9614 +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && 1.9615 + func_mode_uninstall ${1+"$@"} 1.9616 + 1.9617 +test -z "$opt_mode" && { 1.9618 + help="$generic_help" 1.9619 + func_fatal_help "you must specify a MODE" 1.9620 +} 1.9621 + 1.9622 +test -z "$exec_cmd" && \ 1.9623 + func_fatal_help "invalid operation mode \`$opt_mode'" 1.9624 + 1.9625 +if test -n "$exec_cmd"; then 1.9626 + eval exec "$exec_cmd" 1.9627 + exit $EXIT_FAILURE 1.9628 +fi 1.9629 + 1.9630 +exit $exit_status 1.9631 + 1.9632 + 1.9633 +# The TAGs below are defined such that we never get into a situation 1.9634 +# in which we disable both kinds of libraries. Given conflicting 1.9635 +# choices, we go for a static library, that is the most portable, 1.9636 +# since we can't tell whether shared libraries were disabled because 1.9637 +# the user asked for that or because the platform doesn't support 1.9638 +# them. This is particularly important on AIX, because we don't 1.9639 +# support having both static and shared libraries enabled at the same 1.9640 +# time on that platform, so we default to a shared-only configuration. 1.9641 +# If a disable-shared tag is given, we'll fallback to a static-only 1.9642 +# configuration. But we'll never go from static-only to shared-only. 1.9643 + 1.9644 +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared 1.9645 +build_libtool_libs=no 1.9646 +build_old_libs=yes 1.9647 +# ### END LIBTOOL TAG CONFIG: disable-shared 1.9648 + 1.9649 +# ### BEGIN LIBTOOL TAG CONFIG: disable-static 1.9650 +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` 1.9651 +# ### END LIBTOOL TAG CONFIG: disable-static 1.9652 + 1.9653 +# Local Variables: 1.9654 +# mode:shell-script 1.9655 +# sh-indentation:2 1.9656 +# End: 1.9657 +# vi:sw=2 1.9658 +