version 1.1.1.1, 2016/10/18 13:28:18
|
version 1.1.1.3, 2023/09/27 11:14:54
|
Line 1
|
Line 1
|
#! /bin/sh | #! /usr/bin/env sh |
## DO NOT EDIT - This file generated from ./build-aux/ltmain.in |
## DO NOT EDIT - This file generated from ./build-aux/ltmain.in |
## by inline-source v2014-01-03.01 | ## by inline-source v2019-02-19.15 |
|
|
# libtool (GNU libtool) 2.4.6 | # libtool (GNU libtool) 2.4.7 |
# Provide generalized library-building support services. |
# Provide generalized library-building support services. |
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
|
|
# Copyright (C) 1996-2015 Free Software Foundation, Inc. | # Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. |
# This is free software; see the source for copying conditions. There is NO |
# This is free software; see the source for copying conditions. There is NO |
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
|
Line 31
|
Line 31
|
|
|
PROGRAM=libtool |
PROGRAM=libtool |
PACKAGE=libtool |
PACKAGE=libtool |
VERSION=2.4.6 | VERSION=2.4.7 |
package_revision=2.4.6 | package_revision=2.4.7 |
|
|
|
|
## ------ ## |
## ------ ## |
Line 64 package_revision=2.4.6
|
Line 64 package_revision=2.4.6
|
# libraries, which are installed to $pkgauxdir. |
# libraries, which are installed to $pkgauxdir. |
|
|
# Set a version string for this script. |
# Set a version string for this script. |
scriptversion=2015-01-20.17; # UTC | scriptversion=2019-02-19.15; # UTC |
|
|
# General shell script boiler plate, and helper functions. |
# General shell script boiler plate, and helper functions. |
# Written by Gary V. Vaughan, 2004 |
# Written by Gary V. Vaughan, 2004 |
|
|
# Copyright (C) 2004-2015 Free Software Foundation, Inc. | # This is free software. There is NO warranty; not even for |
# This is free software; see the source for copying conditions. There is NO | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | # |
| # Copyright (C) 2004-2019, 2021 Bootstrap Authors |
| # |
| # This file is dual licensed under the terms of the MIT license |
| # <https://opensource.org/license/MIT>, and GPL version 2 or later |
| # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of |
| # these licenses when using or redistributing this software or any of |
| # the files within it. See the URLs above, or the file `LICENSE` |
| # included in the Bootstrap distribution for the full license texts. |
|
|
# This program is free software; you can redistribute it and/or modify | # Please report bugs or propose patches to: |
# it under the terms of the GNU General Public License as published by | # <https://github.com/gnulib-modules/bootstrap/issues> |
# the Free Software Foundation; either version 3 of the License, or | |
# (at your option) any later version. | |
|
|
# As a special exception to the GNU General Public License, if you distribute |
|
# this file as part of a program or library that is built using GNU Libtool, |
|
# you may include this file under the same distribution terms that you use |
|
# for the rest of that program. |
|
|
|
# This program is distributed in the hope that it will be useful, |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU |
|
# General Public License for more details. |
|
|
|
# You should have received a copy of the GNU General Public License |
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
# Please report bugs or propose patches to gary@gnu.org. |
|
|
|
|
|
## ------ ## |
## ------ ## |
## Usage. ## |
## Usage. ## |
## ------ ## |
## ------ ## |
Line 139 do
|
Line 130 do
|
_G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" |
_G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" |
fi" |
fi" |
done |
done |
|
# These NLS vars are set unconditionally (bootstrap issue #24). Unset those |
|
# in case the environment reset is needed later and the $save_* variant is not |
|
# defined (see the code above). |
|
LC_ALL=C |
|
LANGUAGE=C |
|
export LANGUAGE LC_ALL |
|
|
# CDPATH. |
|
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
|
|
|
# Make sure IFS has a sensible default |
# Make sure IFS has a sensible default |
sp=' ' |
sp=' ' |
nl=' |
nl=' |
Line 159 if test "${PATH_SEPARATOR+set}" != set; then
|
Line 153 if test "${PATH_SEPARATOR+set}" != set; then
|
fi |
fi |
|
|
|
|
|
# func_unset VAR |
|
# -------------- |
|
# Portably unset VAR. |
|
# In some shells, an 'unset VAR' statement leaves a non-zero return |
|
# status if VAR is already unset, which might be problematic if the |
|
# statement is used at the end of a function (thus poisoning its return |
|
# value) or when 'set -e' is active (causing even a spurious abort of |
|
# the script in this case). |
|
func_unset () |
|
{ |
|
{ eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } |
|
} |
|
|
|
|
|
# Make sure CDPATH doesn't cause `cd` commands to output the target dir. |
|
func_unset CDPATH |
|
|
|
# Make sure ${,E,F}GREP behave sanely. |
|
func_unset GREP_OPTIONS |
|
|
|
|
## ------------------------- ## |
## ------------------------- ## |
## Locate command utilities. ## |
## Locate command utilities. ## |
## ------------------------- ## |
## ------------------------- ## |
Line 259 test -z "$SED" && {
|
Line 273 test -z "$SED" && {
|
rm -f conftest.in conftest.tmp conftest.nl conftest.out |
rm -f conftest.in conftest.tmp conftest.nl conftest.out |
} |
} |
|
|
func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin | func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" |
rm -f conftest.sed |
rm -f conftest.sed |
SED=$func_path_progs_result |
SED=$func_path_progs_result |
} |
} |
Line 295 test -z "$GREP" && {
|
Line 309 test -z "$GREP" && {
|
rm -f conftest.in conftest.tmp conftest.nl conftest.out |
rm -f conftest.in conftest.tmp conftest.nl conftest.out |
} |
} |
|
|
func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin | func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" |
GREP=$func_path_progs_result |
GREP=$func_path_progs_result |
} |
} |
|
|
Line 360 sed_double_backslash="\
|
Line 374 sed_double_backslash="\
|
s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g |
s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g |
s/\n//g" |
s/\n//g" |
|
|
|
# require_check_ifs_backslash |
|
# --------------------------- |
|
# Check if we can use backslash as IFS='\' separator, and set |
|
# $check_ifs_backshlash_broken to ':' or 'false'. |
|
require_check_ifs_backslash=func_require_check_ifs_backslash |
|
func_require_check_ifs_backslash () |
|
{ |
|
_G_save_IFS=$IFS |
|
IFS='\' |
|
_G_check_ifs_backshlash='a\\b' |
|
for _G_i in $_G_check_ifs_backshlash |
|
do |
|
case $_G_i in |
|
a) |
|
check_ifs_backshlash_broken=false |
|
;; |
|
'') |
|
break |
|
;; |
|
*) |
|
check_ifs_backshlash_broken=: |
|
break |
|
;; |
|
esac |
|
done |
|
IFS=$_G_save_IFS |
|
require_check_ifs_backslash=: |
|
} |
|
|
|
|
## ----------------- ## |
## ----------------- ## |
## Global variables. ## |
## Global variables. ## |
## ----------------- ## |
## ----------------- ## |
Line 580 if test yes = "$_G_HAVE_PLUSEQ_OP"; then
|
Line 623 if test yes = "$_G_HAVE_PLUSEQ_OP"; then
|
{ |
{ |
$debug_cmd |
$debug_cmd |
|
|
func_quote_for_eval "$2" | func_quote_arg pretty "$2" |
eval "$1+=\\ \$func_quote_for_eval_result" | eval "$1+=\\ \$func_quote_arg_result" |
}' |
}' |
else |
else |
func_append_quoted () |
func_append_quoted () |
{ |
{ |
$debug_cmd |
$debug_cmd |
|
|
func_quote_for_eval "$2" | func_quote_arg pretty "$2" |
eval "$1=\$$1\\ \$func_quote_for_eval_result" | eval "$1=\$$1\\ \$func_quote_arg_result" |
} |
} |
fi |
fi |
|
|
Line 1091 func_relative_path ()
|
Line 1134 func_relative_path ()
|
} |
} |
|
|
|
|
# func_quote_for_eval ARG... | # func_quote_portable EVAL ARG |
# -------------------------- | # ---------------------------- |
# Aesthetically quote ARGs to be evaled later. | # Internal function to portably implement func_quote_arg. Note that we still |
# This function returns two values: | # keep attention to performance here so we as much as possible try to avoid |
# i) func_quote_for_eval_result | # calling sed binary (so far O(N) complexity as long as func_append is O(1)). |
# double-quoted, suitable for a subsequent eval | func_quote_portable () |
# ii) func_quote_for_eval_unquoted_result | |
# has all characters that are still active within double | |
# quotes backslashified. | |
func_quote_for_eval () | |
{ |
{ |
$debug_cmd |
$debug_cmd |
|
|
func_quote_for_eval_unquoted_result= | $require_check_ifs_backslash |
func_quote_for_eval_result= | |
while test 0 -lt $#; do | func_quote_portable_result=$2 |
case $1 in | |
*[\\\`\"\$]*) | # one-time-loop (easy break) |
_G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; | while true |
*) | do |
_G_unquoted_arg=$1 ;; | if $1; then |
esac | func_quote_portable_result=`$ECHO "$2" | $SED \ |
if test -n "$func_quote_for_eval_unquoted_result"; then | -e "$sed_double_quote_subst" -e "$sed_double_backslash"` |
func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" | break |
else | |
func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" | |
fi |
fi |
|
|
case $_G_unquoted_arg in | # Quote for eval. |
# Double-quote args containing shell metacharacters to delay | case $func_quote_portable_result in |
# word splitting, command substitution and variable expansion | *[\\\`\"\$]*) |
# for a subsequent eval. | # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string |
# Many Bourne shells cannot handle close brackets correctly | # contains the shell wildcard characters. |
# in scan sets, so we specify it separately. | case $check_ifs_backshlash_broken$func_quote_portable_result in |
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | :*|*[\[\*\?]*) |
_G_quoted_arg=\"$_G_unquoted_arg\" | func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ |
| | $SED "$sed_quote_subst"` |
| break |
| ;; |
| esac |
| |
| func_quote_portable_old_IFS=$IFS |
| for _G_char in '\' '`' '"' '$' |
| do |
| # STATE($1) PREV($2) SEPARATOR($3) |
| set start "" "" |
| func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy |
| IFS=$_G_char |
| for _G_part in $func_quote_portable_result |
| do |
| case $1 in |
| quote) |
| func_append func_quote_portable_result "$3$2" |
| set quote "$_G_part" "\\$_G_char" |
| ;; |
| start) |
| set first "" "" |
| func_quote_portable_result= |
| ;; |
| first) |
| set quote "$_G_part" "" |
| ;; |
| esac |
| done |
| done |
| IFS=$func_quote_portable_old_IFS |
;; |
;; |
*) | *) ;; |
_G_quoted_arg=$_G_unquoted_arg | |
;; | |
esac |
esac |
| break |
if test -n "$func_quote_for_eval_result"; then | |
func_append func_quote_for_eval_result " $_G_quoted_arg" | |
else | |
func_append func_quote_for_eval_result "$_G_quoted_arg" | |
fi | |
shift | |
done |
done |
|
|
|
func_quote_portable_unquoted_result=$func_quote_portable_result |
|
case $func_quote_portable_result in |
|
# double-quote args containing shell metacharacters to delay |
|
# word splitting, command substitution and variable expansion |
|
# for a subsequent eval. |
|
# many bourne shells cannot handle close brackets correctly |
|
# in scan sets, so we specify it separately. |
|
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
|
func_quote_portable_result=\"$func_quote_portable_result\" |
|
;; |
|
esac |
} |
} |
|
|
|
|
# func_quote_for_expand ARG | # func_quotefast_eval ARG |
# ------------------------- | # ----------------------- |
# Aesthetically quote ARG to be evaled later; same as above, | # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', |
# but do not quote variable references. | # but optimized for speed. Result is stored in $func_quotefast_eval. |
func_quote_for_expand () | if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then |
{ | printf -v _GL_test_printf_tilde %q '~' |
$debug_cmd | if test '\~' = "$_GL_test_printf_tilde"; then |
| func_quotefast_eval () |
| { |
| printf -v func_quotefast_eval_result %q "$1" |
| } |
| else |
| # Broken older Bash implementations. Make those faster too if possible. |
| func_quotefast_eval () |
| { |
| case $1 in |
| '~'*) |
| func_quote_portable false "$1" |
| func_quotefast_eval_result=$func_quote_portable_result |
| ;; |
| *) |
| printf -v func_quotefast_eval_result %q "$1" |
| ;; |
| esac |
| } |
| fi |
| else |
| func_quotefast_eval () |
| { |
| func_quote_portable false "$1" |
| func_quotefast_eval_result=$func_quote_portable_result |
| } |
| fi |
|
|
case $1 in | |
*[\\\`\"]*) | # func_quote_arg MODEs ARG |
_G_arg=`$ECHO "$1" | $SED \ | # ------------------------ |
-e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; | # Quote one ARG to be evaled later. MODEs argument may contain zero or more |
*) | # specifiers listed below separated by ',' character. This function returns two |
_G_arg=$1 ;; | # values: |
| # i) func_quote_arg_result |
| # double-quoted (when needed), suitable for a subsequent eval |
| # ii) func_quote_arg_unquoted_result |
| # has all characters that are still active within double |
| # quotes backslashified. Available only if 'unquoted' is specified. |
| # |
| # Available modes: |
| # ---------------- |
| # 'eval' (default) |
| # - escape shell special characters |
| # 'expand' |
| # - the same as 'eval'; but do not quote variable references |
| # 'pretty' |
| # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might |
| # be used later in func_quote to get output like: 'echo "a b"' instead |
| # of 'echo a\ b'. This is slower than default on some shells. |
| # 'unquoted' |
| # - produce also $func_quote_arg_unquoted_result which does not contain |
| # wrapping double-quotes. |
| # |
| # Examples for 'func_quote_arg pretty,unquoted string': |
| # |
| # string | *_result | *_unquoted_result |
| # ------------+-----------------------+------------------- |
| # " | \" | \" |
| # a b | "a b" | a b |
| # "a b" | "\"a b\"" | \"a b\" |
| # * | "*" | * |
| # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" |
| # |
| # Examples for 'func_quote_arg pretty,unquoted,expand string': |
| # |
| # string | *_result | *_unquoted_result |
| # --------------+---------------------+-------------------- |
| # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" |
| func_quote_arg () |
| { |
| _G_quote_expand=false |
| case ,$1, in |
| *,expand,*) |
| _G_quote_expand=: |
| ;; |
esac |
esac |
|
|
case $_G_arg in | case ,$1, in |
# Double-quote args containing shell metacharacters to delay | *,pretty,*|*,expand,*|*,unquoted,*) |
# word splitting and command substitution for a subsequent eval. | func_quote_portable $_G_quote_expand "$2" |
# Many Bourne shells cannot handle close brackets correctly | func_quote_arg_result=$func_quote_portable_result |
# in scan sets, so we specify it separately. | func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result |
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
_G_arg=\"$_G_arg\" | |
;; |
;; |
|
*) |
|
# Faster quote-for-eval for some shells. |
|
func_quotefast_eval "$2" |
|
func_quote_arg_result=$func_quotefast_eval_result |
|
;; |
esac |
esac |
|
} |
|
|
func_quote_for_expand_result=$_G_arg | |
| # func_quote MODEs ARGs... |
| # ------------------------ |
| # Quote all ARGs to be evaled later and join them into single command. See |
| # func_quote_arg's description for more info. |
| func_quote () |
| { |
| $debug_cmd |
| _G_func_quote_mode=$1 ; shift |
| func_quote_result= |
| while test 0 -lt $#; do |
| func_quote_arg "$_G_func_quote_mode" "$1" |
| if test -n "$func_quote_result"; then |
| func_append func_quote_result " $func_quote_arg_result" |
| else |
| func_append func_quote_result "$func_quote_arg_result" |
| fi |
| shift |
| done |
} |
} |
|
|
|
|
Line 1215 func_show_eval ()
|
Line 1376 func_show_eval ()
|
_G_cmd=$1 |
_G_cmd=$1 |
_G_fail_exp=${2-':'} |
_G_fail_exp=${2-':'} |
|
|
func_quote_for_expand "$_G_cmd" | func_quote_arg pretty,expand "$_G_cmd" |
eval "func_notquiet $func_quote_for_expand_result" | eval "func_notquiet $func_quote_arg_result" |
|
|
$opt_dry_run || { |
$opt_dry_run || { |
eval "$_G_cmd" |
eval "$_G_cmd" |
Line 1241 func_show_eval_locale ()
|
Line 1402 func_show_eval_locale ()
|
_G_fail_exp=${2-':'} |
_G_fail_exp=${2-':'} |
|
|
$opt_quiet || { |
$opt_quiet || { |
func_quote_for_expand "$_G_cmd" | func_quote_arg expand,pretty "$_G_cmd" |
eval "func_echo $func_quote_for_expand_result" | eval "func_echo $func_quote_arg_result" |
} |
} |
|
|
$opt_dry_run || { |
$opt_dry_run || { |
Line 1369 func_lt_ver ()
|
Line 1530 func_lt_ver ()
|
# End: |
# End: |
#! /bin/sh |
#! /bin/sh |
|
|
# Set a version string for this script. |
|
scriptversion=2014-01-07.03; # UTC |
|
|
|
# A portable, pluggable option parser for Bourne shell. |
# A portable, pluggable option parser for Bourne shell. |
# Written by Gary V. Vaughan, 2010 |
# Written by Gary V. Vaughan, 2010 |
|
|
# Copyright (C) 2010-2015 Free Software Foundation, Inc. | # This is free software. There is NO warranty; not even for |
# This is free software; see the source for copying conditions. There is NO | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | # |
| # Copyright (C) 2010-2019, 2021 Bootstrap Authors |
| # |
| # This file is dual licensed under the terms of the MIT license |
| # <https://opensource.org/license/MIT>, and GPL version 2 or later |
| # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of |
| # these licenses when using or redistributing this software or any of |
| # the files within it. See the URLs above, or the file `LICENSE` |
| # included in the Bootstrap distribution for the full license texts. |
|
|
# This program is free software: you can redistribute it and/or modify | # Please report bugs or propose patches to: |
# it under the terms of the GNU General Public License as published by | # <https://github.com/gnulib-modules/bootstrap/issues> |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
|
|
# This program is distributed in the hope that it will be useful, | # Set a version string for this script. |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | scriptversion=2019-02-19.15; # UTC |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
|
|
# You should have received a copy of the GNU General Public License |
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
# Please report bugs or propose patches to gary@gnu.org. |
|
|
|
|
|
## ------ ## |
## ------ ## |
## Usage. ## |
## Usage. ## |
## ------ ## |
## ------ ## |
Line 1415 scriptversion=2014-01-07.03; # UTC
|
Line 1572 scriptversion=2014-01-07.03; # UTC
|
# |
# |
# In order for the '--version' option to work, you will need to have a |
# In order for the '--version' option to work, you will need to have a |
# suitably formatted comment like the one at the top of this file |
# suitably formatted comment like the one at the top of this file |
# starting with '# Written by ' and ending with '# warranty; '. | # starting with '# Written by ' and ending with '# Copyright'. |
# |
# |
# For '-h' and '--help' to work, you will also need a one line |
# For '-h' and '--help' to work, you will also need a one line |
# description of your script's purpose in a comment directly above the |
# description of your script's purpose in a comment directly above the |
Line 1427 scriptversion=2014-01-07.03; # UTC
|
Line 1584 scriptversion=2014-01-07.03; # UTC
|
# to display verbose messages only when your user has specified |
# to display verbose messages only when your user has specified |
# '--verbose'. |
# '--verbose'. |
# |
# |
# After sourcing this file, you can plug processing for additional | # After sourcing this file, you can plug in processing for additional |
# options by amending the variables from the 'Configuration' section |
# options by amending the variables from the 'Configuration' section |
# below, and following the instructions in the 'Option parsing' |
# below, and following the instructions in the 'Option parsing' |
# section further down. |
# section further down. |
Line 1476 fatal_help="Try '\$progname --help' for more informati
|
Line 1633 fatal_help="Try '\$progname --help' for more informati
|
## ------------------------- ## |
## ------------------------- ## |
|
|
# This section contains functions for adding, removing, and running hooks |
# This section contains functions for adding, removing, and running hooks |
# to the main code. A hook is just a named list of of function, that can | # in the main code. A hook is just a list of function names that can be |
# be run in order later on. | # run in order later on. |
|
|
# func_hookable FUNC_NAME |
# func_hookable FUNC_NAME |
# ----------------------- |
# ----------------------- |
Line 1510 func_add_hook ()
|
Line 1667 func_add_hook ()
|
|
|
# func_remove_hook FUNC_NAME HOOK_FUNC |
# func_remove_hook FUNC_NAME HOOK_FUNC |
# ------------------------------------ |
# ------------------------------------ |
# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. | # Remove HOOK_FUNC from the list of hook functions to be called by |
| # FUNC_NAME. |
func_remove_hook () |
func_remove_hook () |
{ |
{ |
$debug_cmd |
$debug_cmd |
Line 1519 func_remove_hook ()
|
Line 1677 func_remove_hook ()
|
} |
} |
|
|
|
|
|
# func_propagate_result FUNC_NAME_A FUNC_NAME_B |
|
# --------------------------------------------- |
|
# If the *_result variable of FUNC_NAME_A _is set_, assign its value to |
|
# *_result variable of FUNC_NAME_B. |
|
func_propagate_result () |
|
{ |
|
$debug_cmd |
|
|
|
func_propagate_result_result=: |
|
if eval "test \"\${${1}_result+set}\" = set" |
|
then |
|
eval "${2}_result=\$${1}_result" |
|
else |
|
func_propagate_result_result=false |
|
fi |
|
} |
|
|
|
|
# func_run_hooks FUNC_NAME [ARG]... |
# func_run_hooks FUNC_NAME [ARG]... |
# --------------------------------- |
# --------------------------------- |
# Run all hook functions registered to FUNC_NAME. |
# Run all hook functions registered to FUNC_NAME. |
# It is assumed that the list of hook functions contains nothing more | # It's assumed that the list of hook functions contains nothing more |
# than a whitespace-delimited list of legal shell function names, and |
# than a whitespace-delimited list of legal shell function names, and |
# no effort is wasted trying to catch shell meta-characters or preserve |
# no effort is wasted trying to catch shell meta-characters or preserve |
# whitespace. |
# whitespace. |
Line 1532 func_run_hooks ()
|
Line 1708 func_run_hooks ()
|
|
|
case " $hookable_fns " in |
case " $hookable_fns " in |
*" $1 "*) ;; |
*" $1 "*) ;; |
*) func_fatal_error "'$1' does not support hook funcions.n" ;; | *) func_fatal_error "'$1' does not support hook functions." ;; |
esac |
esac |
|
|
eval _G_hook_fns=\$$1_hooks; shift |
eval _G_hook_fns=\$$1_hooks; shift |
|
|
for _G_hook in $_G_hook_fns; do |
for _G_hook in $_G_hook_fns; do |
eval $_G_hook '"$@"' | func_unset "${_G_hook}_result" |
| eval $_G_hook '${1+"$@"}' |
# store returned options list back into positional | func_propagate_result $_G_hook func_run_hooks |
# parameters for next 'cmd' execution. | if $func_propagate_result_result; then |
eval _G_hook_result=\$${_G_hook}_result | eval set dummy "$func_run_hooks_result"; shift |
eval set dummy "$_G_hook_result"; shift | fi |
done |
done |
|
|
func_quote_for_eval ${1+"$@"} |
|
func_run_hooks_result=$func_quote_for_eval_result |
|
} |
} |
|
|
|
|
Line 1557 func_run_hooks ()
|
Line 1730 func_run_hooks ()
|
## --------------- ## |
## --------------- ## |
|
|
# In order to add your own option parsing hooks, you must accept the |
# In order to add your own option parsing hooks, you must accept the |
# full positional parameter list in your hook function, remove any | # full positional parameter list from your hook function. You may remove |
# options that you action, and then pass back the remaining unprocessed | # or edit any options that you action, and then pass back the remaining |
# options in '<hooked_function_name>_result', escaped suitably for | # unprocessed options in '<hooked_function_name>_result', escaped |
# 'eval'. Like this: | # suitably for 'eval'. |
# |
# |
|
# The '<hooked_function_name>_result' variable is automatically unset |
|
# before your hook gets called; for best performance, only set the |
|
# *_result variable when necessary (i.e. don't call the 'func_quote' |
|
# function unnecessarily because it can be an expensive operation on some |
|
# machines). |
|
# |
|
# Like this: |
|
# |
# my_options_prep () |
# my_options_prep () |
# { |
# { |
# $debug_cmd |
# $debug_cmd |
Line 1570 func_run_hooks ()
|
Line 1751 func_run_hooks ()
|
# usage_message=$usage_message' |
# usage_message=$usage_message' |
# -s, --silent don'\''t print informational messages |
# -s, --silent don'\''t print informational messages |
# ' |
# ' |
# | # # No change in '$@' (ignored completely by this hook). Leave |
# func_quote_for_eval ${1+"$@"} | # # my_options_prep_result variable intact. |
# my_options_prep_result=$func_quote_for_eval_result | |
# } |
# } |
# func_add_hook func_options_prep my_options_prep |
# func_add_hook func_options_prep my_options_prep |
# |
# |
Line 1581 func_run_hooks ()
|
Line 1761 func_run_hooks ()
|
# { |
# { |
# $debug_cmd |
# $debug_cmd |
# |
# |
# # Note that for efficiency, we parse as many options as we can | # args_changed=false |
| # |
| # # Note that, for efficiency, we parse as many options as we can |
# # recognise in a loop before passing the remainder back to the |
# # recognise in a loop before passing the remainder back to the |
# # caller on the first unrecognised argument we encounter. |
# # caller on the first unrecognised argument we encounter. |
# while test $# -gt 0; do |
# while test $# -gt 0; do |
# opt=$1; shift |
# opt=$1; shift |
# case $opt in |
# case $opt in |
# --silent|-s) opt_silent=: ;; | # --silent|-s) opt_silent=: |
| # args_changed=: |
| # ;; |
# # Separate non-argument short options: |
# # Separate non-argument short options: |
# -s*) func_split_short_opt "$_G_opt" |
# -s*) func_split_short_opt "$_G_opt" |
# set dummy "$func_split_short_opt_name" \ |
# set dummy "$func_split_short_opt_name" \ |
# "-$func_split_short_opt_arg" ${1+"$@"} |
# "-$func_split_short_opt_arg" ${1+"$@"} |
# shift |
# shift |
|
# args_changed=: |
# ;; |
# ;; |
# *) set dummy "$_G_opt" "$*"; shift; break ;; | # *) # Make sure the first unrecognised option "$_G_opt" |
| # # is added back to "$@" in case we need it later, |
| # # if $args_changed was set to 'true'. |
| # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; |
# esac |
# esac |
# done |
# done |
# |
# |
# func_quote_for_eval ${1+"$@"} | # # Only call 'func_quote' here if we processed at least one argument. |
# my_silent_option_result=$func_quote_for_eval_result | # if $args_changed; then |
| # func_quote eval ${1+"$@"} |
| # my_silent_option_result=$func_quote_result |
| # fi |
# } |
# } |
# func_add_hook func_parse_options my_silent_option |
# func_add_hook func_parse_options my_silent_option |
# |
# |
Line 1610 func_run_hooks ()
|
Line 1801 func_run_hooks ()
|
# |
# |
# $opt_silent && $opt_verbose && func_fatal_help "\ |
# $opt_silent && $opt_verbose && func_fatal_help "\ |
# '--silent' and '--verbose' options are mutually exclusive." |
# '--silent' and '--verbose' options are mutually exclusive." |
# |
|
# func_quote_for_eval ${1+"$@"} |
|
# my_option_validation_result=$func_quote_for_eval_result |
|
# } |
# } |
# func_add_hook func_validate_options my_option_validation |
# func_add_hook func_validate_options my_option_validation |
# |
# |
# You'll alse need to manually amend $usage_message to reflect the extra | # You'll also need to manually amend $usage_message to reflect the extra |
# options you parse. It's preferable to append if you can, so that |
# options you parse. It's preferable to append if you can, so that |
# multiple option parsing hooks can be added safely. |
# multiple option parsing hooks can be added safely. |
|
|
|
|
|
# func_options_finish [ARG]... |
|
# ---------------------------- |
|
# Finishing the option parse loop (call 'func_options' hooks ATM). |
|
func_options_finish () |
|
{ |
|
$debug_cmd |
|
|
|
func_run_hooks func_options ${1+"$@"} |
|
func_propagate_result func_run_hooks func_options_finish |
|
} |
|
|
|
|
# func_options [ARG]... |
# func_options [ARG]... |
# --------------------- |
# --------------------- |
# All the functions called inside func_options are hookable. See the |
# All the functions called inside func_options are hookable. See the |
Line 1630 func_options ()
|
Line 1830 func_options ()
|
{ |
{ |
$debug_cmd |
$debug_cmd |
|
|
func_options_prep ${1+"$@"} | _G_options_quoted=false |
eval func_parse_options \ | |
${func_options_prep_result+"$func_options_prep_result"} | |
eval func_validate_options \ | |
${func_parse_options_result+"$func_parse_options_result"} | |
|
|
eval func_run_hooks func_options \ | for my_func in options_prep parse_options validate_options options_finish |
${func_validate_options_result+"$func_validate_options_result"} | do |
| func_unset func_${my_func}_result |
| func_unset func_run_hooks_result |
| eval func_$my_func '${1+"$@"}' |
| func_propagate_result func_$my_func func_options |
| if $func_propagate_result_result; then |
| eval set dummy "$func_options_result"; shift |
| _G_options_quoted=: |
| fi |
| done |
|
|
# save modified positional parameters for caller | $_G_options_quoted || { |
func_options_result=$func_run_hooks_result | # As we (func_options) are top-level options-parser function and |
| # nobody quoted "$@" for us yet, we need to do it explicitly for |
| # caller. |
| func_quote eval ${1+"$@"} |
| func_options_result=$func_quote_result |
| } |
} |
} |
|
|
|
|
Line 1649 func_options ()
|
Line 1859 func_options ()
|
# All initialisations required before starting the option parse loop. |
# All initialisations required before starting the option parse loop. |
# Note that when calling hook functions, we pass through the list of |
# Note that when calling hook functions, we pass through the list of |
# positional parameters. If a hook function modifies that list, and |
# positional parameters. If a hook function modifies that list, and |
# needs to propogate that back to rest of this script, then the complete | # needs to propagate that back to rest of this script, then the complete |
# modified list must be put in 'func_run_hooks_result' before | # modified list must be put in 'func_run_hooks_result' before returning. |
# returning. | |
func_hookable func_options_prep |
func_hookable func_options_prep |
func_options_prep () |
func_options_prep () |
{ |
{ |
Line 1662 func_options_prep ()
|
Line 1871 func_options_prep ()
|
opt_warning_types= |
opt_warning_types= |
|
|
func_run_hooks func_options_prep ${1+"$@"} |
func_run_hooks func_options_prep ${1+"$@"} |
| func_propagate_result func_run_hooks func_options_prep |
# save modified positional parameters for caller | |
func_options_prep_result=$func_run_hooks_result | |
} |
} |
|
|
|
|
Line 1676 func_parse_options ()
|
Line 1883 func_parse_options ()
|
{ |
{ |
$debug_cmd |
$debug_cmd |
|
|
func_parse_options_result= | _G_parse_options_requote=false |
| |
# this just eases exit handling |
# this just eases exit handling |
while test $# -gt 0; do |
while test $# -gt 0; do |
# Defer to hook functions for initial option parsing, so they |
# Defer to hook functions for initial option parsing, so they |
# get priority in the event of reusing an option name. |
# get priority in the event of reusing an option name. |
func_run_hooks func_parse_options ${1+"$@"} |
func_run_hooks func_parse_options ${1+"$@"} |
|
func_propagate_result func_run_hooks func_parse_options |
|
if $func_propagate_result_result; then |
|
eval set dummy "$func_parse_options_result"; shift |
|
# Even though we may have changed "$@", we passed the "$@" array |
|
# down into the hook and it quoted it for us (because we are in |
|
# this if-branch). No need to quote it again. |
|
_G_parse_options_requote=false |
|
fi |
|
|
# Adjust func_parse_options positional parameters to match |
|
eval set dummy "$func_run_hooks_result"; shift |
|
|
|
# Break out of the loop if we already parsed every option. |
# Break out of the loop if we already parsed every option. |
test $# -gt 0 || break |
test $# -gt 0 || break |
|
|
|
# We expect that one of the options parsed in this function matches |
|
# and thus we remove _G_opt from "$@" and need to re-quote. |
|
_G_match_parse_options=: |
_G_opt=$1 |
_G_opt=$1 |
shift |
shift |
case $_G_opt in |
case $_G_opt in |
--debug|-x) debug_cmd='set -x' |
--debug|-x) debug_cmd='set -x' |
func_echo "enabling shell trace mode" | func_echo "enabling shell trace mode" >&2 |
$debug_cmd |
$debug_cmd |
;; |
;; |
|
|
Line 1704 func_parse_options ()
|
Line 1918 func_parse_options ()
|
;; |
;; |
|
|
--warnings|--warning|-W) |
--warnings|--warning|-W) |
test $# = 0 && func_missing_arg $_G_opt && break | if test $# = 0 && func_missing_arg $_G_opt; then |
| _G_parse_options_requote=: |
| break |
| fi |
case " $warning_categories $1" in |
case " $warning_categories $1" in |
*" $1 "*) |
*" $1 "*) |
# trailing space prevents matching last $1 above |
# trailing space prevents matching last $1 above |
Line 1757 func_parse_options ()
|
Line 1974 func_parse_options ()
|
shift |
shift |
;; |
;; |
|
|
--) break ;; | --) _G_parse_options_requote=: ; break ;; |
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;; |
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;; |
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | *) set dummy "$_G_opt" ${1+"$@"}; shift |
| _G_match_parse_options=false |
| break |
| ;; |
esac |
esac |
|
|
|
if $_G_match_parse_options; then |
|
_G_parse_options_requote=: |
|
fi |
done |
done |
|
|
# save modified positional parameters for caller | if $_G_parse_options_requote; then |
func_quote_for_eval ${1+"$@"} | # save modified positional parameters for caller |
func_parse_options_result=$func_quote_for_eval_result | func_quote eval ${1+"$@"} |
| func_parse_options_result=$func_quote_result |
| fi |
} |
} |
|
|
|
|
Line 1782 func_validate_options ()
|
Line 2008 func_validate_options ()
|
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" |
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" |
|
|
func_run_hooks func_validate_options ${1+"$@"} |
func_run_hooks func_validate_options ${1+"$@"} |
|
func_propagate_result func_run_hooks func_validate_options |
|
|
# Bail if the options were screwed! |
# Bail if the options were screwed! |
$exit_cmd $EXIT_FAILURE |
$exit_cmd $EXIT_FAILURE |
|
|
# save modified positional parameters for caller |
|
func_validate_options_result=$func_run_hooks_result |
|
} |
} |
|
|
|
|
Line 1843 func_missing_arg ()
|
Line 2067 func_missing_arg ()
|
|
|
# func_split_equals STRING |
# func_split_equals STRING |
# ------------------------ |
# ------------------------ |
# Set func_split_equals_lhs and func_split_equals_rhs shell variables after | # Set func_split_equals_lhs and func_split_equals_rhs shell variables |
# splitting STRING at the '=' sign. | # after splitting STRING at the '=' sign. |
test -z "$_G_HAVE_XSI_OPS" \ |
test -z "$_G_HAVE_XSI_OPS" \ |
&& (eval 'x=a/b/c; |
&& (eval 'x=a/b/c; |
test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ |
test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ |
Line 1859 then
|
Line 2083 then
|
|
|
func_split_equals_lhs=${1%%=*} |
func_split_equals_lhs=${1%%=*} |
func_split_equals_rhs=${1#*=} |
func_split_equals_rhs=${1#*=} |
test "x$func_split_equals_lhs" = "x$1" \ | if test "x$func_split_equals_lhs" = "x$1"; then |
&& func_split_equals_rhs= | func_split_equals_rhs= |
| fi |
}' |
}' |
else |
else |
# ...otherwise fall back to using expr, which is often a shell builtin. |
# ...otherwise fall back to using expr, which is often a shell builtin. |
Line 1870 else
|
Line 2095 else
|
|
|
func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` |
func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` |
func_split_equals_rhs= |
func_split_equals_rhs= |
test "x$func_split_equals_lhs" = "x$1" \ | test "x$func_split_equals_lhs=" = "x$1" \ |
|| func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` |
|| func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` |
} |
} |
fi #func_split_equals |
fi #func_split_equals |
Line 1896 else
|
Line 2121 else
|
{ |
{ |
$debug_cmd |
$debug_cmd |
|
|
func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` | func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` |
func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` |
func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` |
} |
} |
fi #func_split_short_opt |
fi #func_split_short_opt |
Line 1938 func_usage_message ()
|
Line 2163 func_usage_message ()
|
# func_version |
# func_version |
# ------------ |
# ------------ |
# Echo version message to standard output and exit. |
# Echo version message to standard output and exit. |
|
# The version message is extracted from the calling file's header |
|
# comments, with leading '# ' stripped: |
|
# 1. First display the progname and version |
|
# 2. Followed by the header comment line matching /^# Written by / |
|
# 3. Then a blank line followed by the first following line matching |
|
# /^# Copyright / |
|
# 4. Immediately followed by any lines between the previous matches, |
|
# except lines preceding the intervening completely blank line. |
|
# For example, see the header comments of this file. |
func_version () |
func_version () |
{ |
{ |
$debug_cmd |
$debug_cmd |
|
|
printf '%s\n' "$progname $scriptversion" |
printf '%s\n' "$progname $scriptversion" |
$SED -n ' |
$SED -n ' |
/(C)/!b go | /^# Written by /!b |
:more | s|^# ||; p; n |
/\./!{ | |
N | :fwd2blnk |
s|\n# | | | /./ { |
b more | n |
| b fwd2blnk |
} |
} |
:go | p; n |
/^# Written by /,/# warranty; / { | |
s|^# || | :holdwrnt |
s|^# *$|| | s|^# || |
s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| | s|^# *$|| |
p | /^Copyright /!{ |
| /./H |
| n |
| b holdwrnt |
} |
} |
/^# Written by / { |
|
s|^# || |
|
p |
|
} |
|
/^warranty; /q' < "$progpath" |
|
|
|
|
s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| |
|
G |
|
s|\(\n\)\n*|\1|g |
|
p; q' < "$progpath" |
|
|
exit $? |
exit $? |
} |
} |
|
|
Line 1972 func_version ()
|
Line 2210 func_version ()
|
# mode: shell-script |
# mode: shell-script |
# sh-indentation: 2 |
# sh-indentation: 2 |
# eval: (add-hook 'before-save-hook 'time-stamp) |
# eval: (add-hook 'before-save-hook 'time-stamp) |
# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" | # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" |
# time-stamp-time-zone: "UTC" |
# time-stamp-time-zone: "UTC" |
# End: |
# End: |
|
|
# Set a version string. |
# Set a version string. |
scriptversion='(GNU libtool) 2.4.6' | scriptversion='(GNU libtool) 2.4.7' |
|
|
|
|
# func_echo ARG... |
# func_echo ARG... |
Line 2068 include the following information:
|
Line 2306 include the following information:
|
compiler: $LTCC |
compiler: $LTCC |
compiler flags: $LTCFLAGS |
compiler flags: $LTCFLAGS |
linker: $LD (gnu? $with_gnu_ld) |
linker: $LD (gnu? $with_gnu_ld) |
version: $progname (GNU libtool) 2.4.6 | version: $progname (GNU libtool) 2.4.7 |
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` |
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` |
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` |
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` |
|
|
Line 2124 fi
|
Line 2362 fi
|
# a configuration failure hint, and exit. |
# a configuration failure hint, and exit. |
func_fatal_configuration () |
func_fatal_configuration () |
{ |
{ |
func__fatal_error ${1+"$@"} \ | func_fatal_error ${1+"$@"} \ |
"See the $PACKAGE documentation for more information." \ |
"See the $PACKAGE documentation for more information." \ |
"Fatal configuration error." |
"Fatal configuration error." |
} |
} |
Line 2270 libtool_options_prep ()
|
Line 2508 libtool_options_prep ()
|
nonopt= |
nonopt= |
preserve_args= |
preserve_args= |
|
|
|
_G_rc_lt_options_prep=: |
|
|
# Shorthand for --mode=foo, only valid as the first argument |
# Shorthand for --mode=foo, only valid as the first argument |
case $1 in |
case $1 in |
clean|clea|cle|cl) |
clean|clea|cle|cl) |
Line 2293 libtool_options_prep ()
|
Line 2533 libtool_options_prep ()
|
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) |
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) |
shift; set dummy --mode uninstall ${1+"$@"}; shift |
shift; set dummy --mode uninstall ${1+"$@"}; shift |
;; |
;; |
|
*) |
|
_G_rc_lt_options_prep=false |
|
;; |
esac |
esac |
|
|
# Pass back the list of options. | if $_G_rc_lt_options_prep; then |
func_quote_for_eval ${1+"$@"} | # Pass back the list of options. |
libtool_options_prep_result=$func_quote_for_eval_result | func_quote eval ${1+"$@"} |
| libtool_options_prep_result=$func_quote_result |
| fi |
} |
} |
func_add_hook func_options_prep libtool_options_prep |
func_add_hook func_options_prep libtool_options_prep |
|
|
Line 2309 libtool_parse_options ()
|
Line 2554 libtool_parse_options ()
|
{ |
{ |
$debug_cmd |
$debug_cmd |
|
|
|
_G_rc_lt_parse_options=false |
|
|
# Perform our own loop to consume as many options as possible in |
# Perform our own loop to consume as many options as possible in |
# each iteration. |
# each iteration. |
while test $# -gt 0; do |
while test $# -gt 0; do |
|
_G_match_lt_parse_options=: |
_G_opt=$1 |
_G_opt=$1 |
shift |
shift |
case $_G_opt in |
case $_G_opt in |
Line 2386 libtool_parse_options ()
|
Line 2634 libtool_parse_options ()
|
func_append preserve_args " $_G_opt" |
func_append preserve_args " $_G_opt" |
;; |
;; |
|
|
# An option not handled by this hook function: | # An option not handled by this hook function: |
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; | *) set dummy "$_G_opt" ${1+"$@"} ; shift |
| _G_match_lt_parse_options=false |
| break |
| ;; |
esac |
esac |
|
$_G_match_lt_parse_options && _G_rc_lt_parse_options=: |
done |
done |
|
|
| if $_G_rc_lt_parse_options; then |
# save modified positional parameters for caller | # save modified positional parameters for caller |
func_quote_for_eval ${1+"$@"} | func_quote eval ${1+"$@"} |
libtool_parse_options_result=$func_quote_for_eval_result | libtool_parse_options_result=$func_quote_result |
| fi |
} |
} |
func_add_hook func_parse_options libtool_parse_options |
func_add_hook func_parse_options libtool_parse_options |
|
|
Line 2451 libtool_validate_options ()
|
Line 2704 libtool_validate_options ()
|
} |
} |
|
|
# Pass back the unparsed argument list |
# Pass back the unparsed argument list |
func_quote_for_eval ${1+"$@"} | func_quote eval ${1+"$@"} |
libtool_validate_options_result=$func_quote_for_eval_result | libtool_validate_options_result=$func_quote_result |
} |
} |
func_add_hook func_validate_options libtool_validate_options |
func_add_hook func_validate_options libtool_validate_options |
|
|
Line 3418 func_mode_compile ()
|
Line 3671 func_mode_compile ()
|
esac |
esac |
done |
done |
|
|
func_quote_for_eval "$libobj" | func_quote_arg pretty "$libobj" |
test "X$libobj" != "X$func_quote_for_eval_result" \ | test "X$libobj" != "X$func_quote_arg_result" \ |
&& $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ |
&& $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ |
&& func_warning "libobj name '$libobj' may not contain shell special characters." |
&& func_warning "libobj name '$libobj' may not contain shell special characters." |
func_dirname_and_basename "$obj" "/" "" |
func_dirname_and_basename "$obj" "/" "" |
Line 3492 compiler."
|
Line 3745 compiler."
|
|
|
func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 |
func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 |
srcfile=$func_to_tool_file_result |
srcfile=$func_to_tool_file_result |
func_quote_for_eval "$srcfile" | func_quote_arg pretty "$srcfile" |
qsrcfile=$func_quote_for_eval_result | qsrcfile=$func_quote_arg_result |
|
|
# Only build a PIC object if we are building libtool libraries. |
# Only build a PIC object if we are building libtool libraries. |
if test yes = "$build_libtool_libs"; then |
if test yes = "$build_libtool_libs"; then |
Line 3648 This mode accepts the following additional options:
|
Line 3901 This mode accepts the following additional options:
|
-prefer-non-pic try to build non-PIC objects only |
-prefer-non-pic try to build non-PIC objects only |
-shared do not build a '.o' file suitable for static linking |
-shared do not build a '.o' file suitable for static linking |
-static only build a '.o' file suitable for static linking |
-static only build a '.o' file suitable for static linking |
-Wc,FLAG pass FLAG directly to the compiler | -Wc,FLAG |
| -Xcompiler FLAG pass FLAG directly to the compiler |
|
|
COMPILE-COMMAND is a command to be used in creating a 'standard' object file |
COMPILE-COMMAND is a command to be used in creating a 'standard' object file |
from the given SOURCEFILE. |
from the given SOURCEFILE. |
Line 3754 The following components of LINK-COMMAND are treated s
|
Line 4008 The following components of LINK-COMMAND are treated s
|
-weak LIBNAME declare that the target provides the LIBNAME interface |
-weak LIBNAME declare that the target provides the LIBNAME interface |
-Wc,FLAG |
-Wc,FLAG |
-Xcompiler FLAG pass linker-specific FLAG directly to the compiler |
-Xcompiler FLAG pass linker-specific FLAG directly to the compiler |
|
-Wa,FLAG |
|
-Xassembler FLAG pass linker-specific FLAG directly to the assembler |
-Wl,FLAG |
-Wl,FLAG |
-Xlinker FLAG pass linker-specific FLAG directly to the linker |
-Xlinker FLAG pass linker-specific FLAG directly to the linker |
-XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) |
-XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) |
Line 4096 func_mode_install ()
|
Line 4352 func_mode_install ()
|
case $nonopt in *shtool*) :;; *) false;; esac |
case $nonopt in *shtool*) :;; *) false;; esac |
then |
then |
# Aesthetically quote it. |
# Aesthetically quote it. |
func_quote_for_eval "$nonopt" | func_quote_arg pretty "$nonopt" |
install_prog="$func_quote_for_eval_result " | install_prog="$func_quote_arg_result " |
arg=$1 |
arg=$1 |
shift |
shift |
else |
else |
Line 4107 func_mode_install ()
|
Line 4363 func_mode_install ()
|
|
|
# The real first argument should be the name of the installation program. |
# The real first argument should be the name of the installation program. |
# Aesthetically quote it. |
# Aesthetically quote it. |
func_quote_for_eval "$arg" | func_quote_arg pretty "$arg" |
func_append install_prog "$func_quote_for_eval_result" | func_append install_prog "$func_quote_arg_result" |
install_shared_prog=$install_prog |
install_shared_prog=$install_prog |
case " $install_prog " in |
case " $install_prog " in |
*[\\\ /]cp\ *) install_cp=: ;; |
*[\\\ /]cp\ *) install_cp=: ;; |
Line 4165 func_mode_install ()
|
Line 4421 func_mode_install ()
|
esac |
esac |
|
|
# Aesthetically quote the argument. |
# Aesthetically quote the argument. |
func_quote_for_eval "$arg" | func_quote_arg pretty "$arg" |
func_append install_prog " $func_quote_for_eval_result" | func_append install_prog " $func_quote_arg_result" |
if test -n "$arg2"; then |
if test -n "$arg2"; then |
func_quote_for_eval "$arg2" | func_quote_arg pretty "$arg2" |
fi |
fi |
func_append install_shared_prog " $func_quote_for_eval_result" | func_append install_shared_prog " $func_quote_arg_result" |
done |
done |
|
|
test -z "$install_prog" && \ |
test -z "$install_prog" && \ |
Line 4181 func_mode_install ()
|
Line 4437 func_mode_install ()
|
|
|
if test -n "$install_override_mode" && $no_mode; then |
if test -n "$install_override_mode" && $no_mode; then |
if $install_cp; then :; else |
if $install_cp; then :; else |
func_quote_for_eval "$install_override_mode" | func_quote_arg pretty "$install_override_mode" |
func_append install_shared_prog " -m $func_quote_for_eval_result" | func_append install_shared_prog " -m $func_quote_arg_result" |
fi |
fi |
fi |
fi |
|
|
Line 4478 func_mode_install ()
|
Line 4734 func_mode_install ()
|
relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` |
relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` |
|
|
$opt_quiet || { |
$opt_quiet || { |
func_quote_for_expand "$relink_command" | func_quote_arg expand,pretty "$relink_command" |
eval "func_echo $func_quote_for_expand_result" | eval "func_echo $func_quote_arg_result" |
} |
} |
if eval "$relink_command"; then : |
if eval "$relink_command"; then : |
else |
else |
Line 5258 else
|
Line 5514 else
|
if test \"\$libtool_execute_magic\" != \"$magic\"; then |
if test \"\$libtool_execute_magic\" != \"$magic\"; then |
file=\"\$0\"" |
file=\"\$0\"" |
|
|
qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` | func_quote_arg pretty "$ECHO" |
| qECHO=$func_quote_arg_result |
$ECHO "\ |
$ECHO "\ |
|
|
# A function that is used when there is no print builtin or printf. |
# A function that is used when there is no print builtin or printf. |
Line 5268 func_fallback_echo ()
|
Line 5525 func_fallback_echo ()
|
\$1 |
\$1 |
_LTECHO_EOF' |
_LTECHO_EOF' |
} |
} |
ECHO=\"$qECHO\" | ECHO=$qECHO |
fi |
fi |
|
|
# Very basic option parsing. These options are (a) specific to |
# Very basic option parsing. These options are (a) specific to |
Line 6611 func_mode_link ()
|
Line 6868 func_mode_link ()
|
while test "$#" -gt 0; do |
while test "$#" -gt 0; do |
arg=$1 |
arg=$1 |
shift |
shift |
func_quote_for_eval "$arg" | func_quote_arg pretty,unquoted "$arg" |
qarg=$func_quote_for_eval_unquoted_result | qarg=$func_quote_arg_unquoted_result |
func_append libtool_args " $func_quote_for_eval_result" | func_append libtool_args " $func_quote_arg_result" |
|
|
# If the previous option needs an argument, assign it. |
# If the previous option needs an argument, assign it. |
if test -n "$prev"; then |
if test -n "$prev"; then |
Line 6849 func_mode_link ()
|
Line 7106 func_mode_link ()
|
prev= |
prev= |
continue |
continue |
;; |
;; |
|
xassembler) |
|
func_append compiler_flags " -Xassembler $qarg" |
|
prev= |
|
func_append compile_command " -Xassembler $qarg" |
|
func_append finalize_command " -Xassembler $qarg" |
|
continue |
|
;; |
xcclinker) |
xcclinker) |
func_append linker_flags " $qarg" |
func_append linker_flags " $qarg" |
func_append compiler_flags " $qarg" |
func_append compiler_flags " $qarg" |
Line 7019 func_mode_link ()
|
Line 7283 func_mode_link ()
|
# These systems don't actually have a C library (as such) |
# These systems don't actually have a C library (as such) |
test X-lc = "X$arg" && continue |
test X-lc = "X$arg" && continue |
;; |
;; |
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) |
# Do not include libc due to us having libc/libc_r. |
# Do not include libc due to us having libc/libc_r. |
test X-lc = "X$arg" && continue |
test X-lc = "X$arg" && continue |
;; |
;; |
Line 7039 func_mode_link ()
|
Line 7303 func_mode_link ()
|
esac |
esac |
elif test X-lc_r = "X$arg"; then |
elif test X-lc_r = "X$arg"; then |
case $host in |
case $host in |
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) |
# Do not include libc_r directly, use -pthread flag. |
# Do not include libc_r directly, use -pthread flag. |
continue |
continue |
;; |
;; |
Line 7069 func_mode_link ()
|
Line 7333 func_mode_link ()
|
prev=xcompiler |
prev=xcompiler |
continue |
continue |
;; |
;; |
| # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. |
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ | -pthread) |
| case $host in |
| *solaris2*) ;; |
| *) |
| case "$new_inherited_linker_flags " in |
| *" $arg "*) ;; |
| * ) func_append new_inherited_linker_flags " $arg" ;; |
| esac |
| ;; |
| esac |
| continue |
| ;; |
| -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) |
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) |
func_append compiler_flags " $arg" |
func_append compiler_flags " $arg" |
func_append compile_command " $arg" |
func_append compile_command " $arg" |
Line 7211 func_mode_link ()
|
Line 7487 func_mode_link ()
|
save_ifs=$IFS; IFS=, |
save_ifs=$IFS; IFS=, |
for flag in $args; do |
for flag in $args; do |
IFS=$save_ifs |
IFS=$save_ifs |
func_quote_for_eval "$flag" | func_quote_arg pretty "$flag" |
func_append arg " $func_quote_for_eval_result" | func_append arg " $func_quote_arg_result" |
func_append compiler_flags " $func_quote_for_eval_result" | func_append compiler_flags " $func_quote_arg_result" |
done |
done |
IFS=$save_ifs |
IFS=$save_ifs |
func_stripname ' ' '' "$arg" |
func_stripname ' ' '' "$arg" |
Line 7227 func_mode_link ()
|
Line 7503 func_mode_link ()
|
save_ifs=$IFS; IFS=, |
save_ifs=$IFS; IFS=, |
for flag in $args; do |
for flag in $args; do |
IFS=$save_ifs |
IFS=$save_ifs |
func_quote_for_eval "$flag" | func_quote_arg pretty "$flag" |
func_append arg " $wl$func_quote_for_eval_result" | func_append arg " $wl$func_quote_arg_result" |
func_append compiler_flags " $wl$func_quote_for_eval_result" | func_append compiler_flags " $wl$func_quote_arg_result" |
func_append linker_flags " $func_quote_for_eval_result" | func_append linker_flags " $func_quote_arg_result" |
done |
done |
IFS=$save_ifs |
IFS=$save_ifs |
func_stripname ' ' '' "$arg" |
func_stripname ' ' '' "$arg" |
arg=$func_stripname_result |
arg=$func_stripname_result |
;; |
;; |
|
|
|
-Xassembler) |
|
prev=xassembler |
|
continue |
|
;; |
|
|
-Xcompiler) |
-Xcompiler) |
prev=xcompiler |
prev=xcompiler |
continue |
continue |
Line 7254 func_mode_link ()
|
Line 7535 func_mode_link ()
|
|
|
# -msg_* for osf cc |
# -msg_* for osf cc |
-msg_*) |
-msg_*) |
func_quote_for_eval "$arg" | func_quote_arg pretty "$arg" |
arg=$func_quote_for_eval_result | arg=$func_quote_arg_result |
;; |
;; |
|
|
# Flags to be passed through unchanged, with rationale: |
# Flags to be passed through unchanged, with rationale: |
Line 7272 func_mode_link ()
|
Line 7553 func_mode_link ()
|
# -tp=* Portland pgcc target processor selection |
# -tp=* Portland pgcc target processor selection |
# --sysroot=* for sysroot support |
# --sysroot=* for sysroot support |
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization |
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization |
|
# -specs=* GCC specs files |
# -stdlib=* select c++ std lib with clang |
# -stdlib=* select c++ std lib with clang |
# -fsanitize=* Clang memory and address sanitizer | # -fsanitize=* Clang/GCC memory and address sanitizer |
| # -fuse-ld=* Linker select flags for GCC |
| # -Wa,* Pass flags directly to the assembler |
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ |
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ |
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ |
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ |
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ |
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ |
-fsanitize=*) | -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) |
func_quote_for_eval "$arg" | func_quote_arg pretty "$arg" |
arg=$func_quote_for_eval_result | arg=$func_quote_arg_result |
func_append compile_command " $arg" |
func_append compile_command " $arg" |
func_append finalize_command " $arg" |
func_append finalize_command " $arg" |
func_append compiler_flags " $arg" |
func_append compiler_flags " $arg" |
Line 7300 func_mode_link ()
|
Line 7584 func_mode_link ()
|
continue |
continue |
else |
else |
# Otherwise treat like 'Some other compiler flag' below |
# Otherwise treat like 'Some other compiler flag' below |
func_quote_for_eval "$arg" | func_quote_arg pretty "$arg" |
arg=$func_quote_for_eval_result | arg=$func_quote_arg_result |
fi |
fi |
;; |
;; |
|
|
# Some other compiler flag. |
# Some other compiler flag. |
-* | +*) |
-* | +*) |
func_quote_for_eval "$arg" | func_quote_arg pretty "$arg" |
arg=$func_quote_for_eval_result | arg=$func_quote_arg_result |
;; |
;; |
|
|
*.$objext) |
*.$objext) |
Line 7428 func_mode_link ()
|
Line 7712 func_mode_link ()
|
*) |
*) |
# Unknown arguments in both finalize_command and compile_command need |
# Unknown arguments in both finalize_command and compile_command need |
# to be aesthetically quoted because they are evaled later. |
# to be aesthetically quoted because they are evaled later. |
func_quote_for_eval "$arg" | func_quote_arg pretty "$arg" |
arg=$func_quote_for_eval_result | arg=$func_quote_arg_result |
;; |
;; |
esac # arg |
esac # arg |
|
|
Line 8634 func_mode_link ()
|
Line 8918 func_mode_link ()
|
test CXX = "$tagname" && { |
test CXX = "$tagname" && { |
case $host_os in |
case $host_os in |
linux*) |
linux*) |
case `$CC -V 2>&1 | sed 5q` in | case `$CC -V 2>&1 | $SED 5q` in |
*Sun\ C*) # Sun C++ 5.9 |
*Sun\ C*) # Sun C++ 5.9 |
func_suncc_cstd_abi |
func_suncc_cstd_abi |
|
|
Line 8807 func_mode_link ()
|
Line 9091 func_mode_link ()
|
# |
# |
case $version_type in |
case $version_type in |
# correct linux to gnu/linux during the next big refactor |
# correct linux to gnu/linux during the next big refactor |
darwin|freebsd-elf|linux|osf|windows|none) | darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) |
func_arith $number_major + $number_minor |
func_arith $number_major + $number_minor |
current=$func_arith_result |
current=$func_arith_result |
age=$number_minor |
age=$number_minor |
Line 8898 func_mode_link ()
|
Line 9182 func_mode_link ()
|
versuffix=.$current.$revision |
versuffix=.$current.$revision |
;; |
;; |
|
|
freebsd-elf) | freebsd-elf | midnightbsd-elf) |
func_arith $current - $age |
func_arith $current - $age |
major=.$func_arith_result |
major=.$func_arith_result |
versuffix=$major.$age.$revision |
versuffix=$major.$age.$revision |
Line 9124 func_mode_link ()
|
Line 9408 func_mode_link ()
|
*-*-netbsd*) |
*-*-netbsd*) |
# Don't link with libc until the a.out ld.so is fixed. |
# Don't link with libc until the a.out ld.so is fixed. |
;; |
;; |
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) |
# Do not include libc due to us having libc/libc_r. |
# Do not include libc due to us having libc/libc_r. |
;; |
;; |
*-*-sco3.2v5* | *-*-sco5v6*) |
*-*-sco3.2v5* | *-*-sco5v6*) |
Line 9935 EOF
|
Line 10219 EOF
|
for cmd in $concat_cmds; do |
for cmd in $concat_cmds; do |
IFS=$save_ifs |
IFS=$save_ifs |
$opt_quiet || { |
$opt_quiet || { |
func_quote_for_expand "$cmd" | func_quote_arg expand,pretty "$cmd" |
eval "func_echo $func_quote_for_expand_result" | eval "func_echo $func_quote_arg_result" |
} |
} |
$opt_dry_run || eval "$cmd" || { |
$opt_dry_run || eval "$cmd" || { |
lt_exit=$? |
lt_exit=$? |
Line 10029 EOF
|
Line 10313 EOF
|
eval cmd=\"$cmd\" |
eval cmd=\"$cmd\" |
IFS=$save_ifs |
IFS=$save_ifs |
$opt_quiet || { |
$opt_quiet || { |
func_quote_for_expand "$cmd" | func_quote_arg expand,pretty "$cmd" |
eval "func_echo $func_quote_for_expand_result" | eval "func_echo $func_quote_arg_result" |
} |
} |
$opt_dry_run || eval "$cmd" || { |
$opt_dry_run || eval "$cmd" || { |
lt_exit=$? |
lt_exit=$? |
Line 10504 EOF
|
Line 10788 EOF
|
elif eval var_value=\$$var; test -z "$var_value"; then |
elif eval var_value=\$$var; test -z "$var_value"; then |
relink_command="$var=; export $var; $relink_command" |
relink_command="$var=; export $var; $relink_command" |
else |
else |
func_quote_for_eval "$var_value" | func_quote_arg pretty "$var_value" |
relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" | relink_command="$var=$func_quote_arg_result; export $var; $relink_command" |
fi |
fi |
done |
done |
relink_command="(cd `pwd`; $relink_command)" | func_quote eval cd "`pwd`" |
relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` | func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" |
| relink_command=$func_quote_arg_unquoted_result |
fi |
fi |
|
|
# Only actually do things if not in dry run mode. |
# Only actually do things if not in dry run mode. |
Line 10749 EOF
|
Line 11034 EOF
|
elif eval var_value=\$$var; test -z "$var_value"; then |
elif eval var_value=\$$var; test -z "$var_value"; then |
relink_command="$var=; export $var; $relink_command" |
relink_command="$var=; export $var; $relink_command" |
else |
else |
func_quote_for_eval "$var_value" | func_quote_arg pretty,unquoted "$var_value" |
relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" | relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" |
fi |
fi |
done |
done |
# Quote the link command for shipping. |
# Quote the link command for shipping. |
relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" | func_quote eval cd "`pwd`" |
relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` | relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" |
| func_quote_arg pretty,unquoted "$relink_command" |
| relink_command=$func_quote_arg_unquoted_result |
if test yes = "$hardcode_automatic"; then |
if test yes = "$hardcode_automatic"; then |
relink_command= |
relink_command= |
fi |
fi |