Skip to content

Latest commit

 

History

History
8407 lines (7531 loc) · 238 KB

ltmain.sh

File metadata and controls

8407 lines (7531 loc) · 238 KB
 
Jun 19, 2019
Jun 19, 2019
1
# Generated from ltmain.m4sh.
Oct 4, 2009
Oct 4, 2009
2
Jun 19, 2019
Jun 19, 2019
3
# ltmain.sh (GNU libtool) 2.2.6
Oct 4, 2009
Oct 4, 2009
4
5
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
Jun 19, 2019
Jun 19, 2019
6
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
Oct 4, 2009
Oct 4, 2009
7
8
9
10
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# GNU Libtool is free software; you can redistribute it and/or modify
Aug 10, 2000
Aug 10, 2000
11
12
13
14
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
Oct 4, 2009
Oct 4, 2009
15
16
17
18
19
20
# 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.
#
# GNU Libtool is distributed in the hope that it will be useful, but
Aug 10, 2000
Aug 10, 2000
21
22
23
24
25
# WITHOUT ANY WARRANTY; without even the implied warranty of
# 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
Jun 19, 2019
Jun 19, 2019
26
27
28
29
# along with GNU Libtool; see the file COPYING. If not, a copy
# can be downloaded from http://www.gnu.org/licenses/gpl.html,
# or obtained by writing to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Jun 19, 2019
Jun 19, 2019
30
Jun 19, 2019
Jun 19, 2019
31
# Usage: $progname [OPTION]... [MODE-ARG]...
Oct 4, 2009
Oct 4, 2009
32
#
Jun 19, 2019
Jun 19, 2019
33
# Provide generalized library-building support services.
Oct 4, 2009
Oct 4, 2009
34
#
Jun 19, 2019
Jun 19, 2019
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# --config show all configuration variables
# --debug enable verbose shell tracing
# -n, --dry-run display commands without modifying any files
# --features display basic configuration information and exit
# --mode=MODE use operation mode MODE
# --preserve-dup-deps don't remove duplicate dependency libraries
# --quiet, --silent don't print informational messages
# --tag=TAG use configuration variables from tag TAG
# -v, --verbose print informational messages (default)
# --version print version information
# -h, --help print short or long help message
#
# MODE must be one of the following:
#
# clean remove files from the build directory
# compile compile a source file into a libtool object
# execute automatically set library path, then run a program
# finish complete the installation of libtool libraries
# install install libraries or executables
# link create a library or an executable
# uninstall remove libraries from an installed directory
#
# MODE-ARGS vary depending on the MODE.
# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
#
# When reporting a bug, please describe a test case to reproduce it and
# include the following information:
#
# host-triplet: $host
# shell: $SHELL
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
# $progname: (GNU libtool) 2.2.6
# automake: $automake_version
# autoconf: $autoconf_version
#
# Report bugs to <bug-libtool@gnu.org>.
Jun 19, 2019
Jun 19, 2019
73
Jun 19, 2019
Jun 19, 2019
74
75
76
77
78
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=2.2.6
TIMESTAMP=""
package_revision=1.3012
Jun 19, 2019
Jun 19, 2019
79
Jun 19, 2019
Jun 19, 2019
80
81
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
Oct 4, 2009
Oct 4, 2009
82
83
emulate sh
NULLCMD=:
Jun 19, 2019
Jun 19, 2019
84
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Oct 4, 2009
Oct 4, 2009
85
86
87
88
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
Jun 19, 2019
Jun 19, 2019
89
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
Oct 4, 2009
Oct 4, 2009
90
fi
Jun 19, 2019
Jun 19, 2019
91
92
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
Oct 4, 2009
Oct 4, 2009
93
Jun 19, 2019
Jun 19, 2019
94
95
96
97
98
99
100
# NLS nuisances: We save the old values to restore during execute mode.
# Only set LANG and LC_ALL to C if already set.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
lt_user_locale=
lt_safe_locale=
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
Oct 4, 2009
Oct 4, 2009
101
do
Jun 19, 2019
Jun 19, 2019
102
103
104
105
106
107
eval "if test \"\${$lt_var+set}\" = set; then
save_$lt_var=\$$lt_var
$lt_var=C
export $lt_var
lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
Oct 4, 2009
Oct 4, 2009
108
109
110
fi"
done
Jun 19, 2019
Jun 19, 2019
111
$lt_unset CDPATH
Oct 4, 2009
Oct 4, 2009
112
113
114
115
116
117
: ${CP="cp -f"}
Jun 19, 2019
Jun 19, 2019
118
119
120
121
: ${ECHO="echo"}
: ${EGREP="/usr/bin/grep -E"}
: ${FGREP="/usr/bin/grep -F"}
: ${GREP="/usr/bin/grep"}
Oct 4, 2009
Oct 4, 2009
122
123
124
125
126
: ${LN_S="ln -s"}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
Jun 19, 2019
Jun 19, 2019
127
: ${SED="/opt/local/bin/gsed"}
Oct 4, 2009
Oct 4, 2009
128
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
Jun 19, 2019
Jun 19, 2019
129
: ${Xsed="$SED -e 1s/^X//"}
Aug 10, 2000
Aug 10, 2000
130
Jun 19, 2019
Jun 19, 2019
131
# Global variables:
Oct 4, 2009
Oct 4, 2009
132
133
134
135
136
EXIT_SUCCESS=0
EXIT_FAILURE=1
EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
Jun 19, 2019
Jun 19, 2019
137
exit_status=$EXIT_SUCCESS
Aug 24, 2004
Aug 24, 2004
138
Jun 19, 2019
Jun 19, 2019
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# Make sure IFS has a sensible default
lt_nl='
'
IFS=" $lt_nl"
dirname="s,/[^/]*$,,"
basename="s,^.*/,,"
# func_dirname_and_basename file append nondir_replacement
# perform func_basename and func_dirname in a single function
# call:
# dirname: Compute the dirname of FILE. If nonempty,
# add APPEND to the result, otherwise set result
# to NONDIR_REPLACEMENT.
# value returned in "$func_dirname_result"
# basename: Compute filename of FILE.
# value retuned in "$func_basename_result"
# Implementation must be kept synchronized with func_dirname
# and func_basename. For efficiency, we do not delegate to
# those functions but instead duplicate the functionality here.
func_dirname_and_basename ()
{
# Extract subdirectory from the argument.
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
if test "X$func_dirname_result" = "X${1}"; then
func_dirname_result="${3}"
else
func_dirname_result="$func_dirname_result${2}"
fi
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
}
# Generated shell functions inserted here.
Aug 24, 2004
Aug 24, 2004
173
174
175
176
177
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
# is ksh but when the shell is invoked as "sh" and the current value of
# the _XPG environment variable is not equal to 1 (one), the special
# positional parameter $0, within a function call, is the name of the
# function.
Jun 19, 2019
Jun 19, 2019
178
179
180
181
182
183
184
185
186
187
progpath="$0"
# The name of this program:
# In the unlikely event $progname began with a '-', it would play havoc with
# func_echo (imagine progname=-n), so we prepend ./ in that case:
func_dirname_and_basename "$progpath"
progname=$func_basename_result
case $progname in
-*) progname=./$progname ;;
esac
Aug 24, 2004
Aug 24, 2004
188
Jun 19, 2019
Jun 19, 2019
189
# Make sure we have an absolute path for reexecution:
Oct 4, 2009
Oct 4, 2009
190
191
192
case $progpath in
[\\/]*|[A-Za-z]:\\*) ;;
*[\\/]*)
Jun 19, 2019
Jun 19, 2019
193
progdir=$func_dirname_result
Oct 4, 2009
Oct 4, 2009
194
progdir=`cd "$progdir" && pwd`
Jun 19, 2019
Jun 19, 2019
195
progpath="$progdir/$progname"
Oct 4, 2009
Oct 4, 2009
196
197
;;
*)
Jun 19, 2019
Jun 19, 2019
198
199
save_IFS="$IFS"
IFS=:
Oct 4, 2009
Oct 4, 2009
200
for progdir in $PATH; do
Jun 19, 2019
Jun 19, 2019
201
IFS="$save_IFS"
Oct 4, 2009
Oct 4, 2009
202
203
test -x "$progdir/$progname" && break
done
Jun 19, 2019
Jun 19, 2019
204
IFS="$save_IFS"
Oct 4, 2009
Oct 4, 2009
205
test -n "$progdir" || progdir=`pwd`
Jun 19, 2019
Jun 19, 2019
206
progpath="$progdir/$progname"
Oct 4, 2009
Oct 4, 2009
207
208
;;
esac
Aug 24, 2004
Aug 24, 2004
209
Jun 19, 2019
Jun 19, 2019
210
211
212
213
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
Oct 4, 2009
Oct 4, 2009
214
Jun 19, 2019
Jun 19, 2019
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# Same as above, but do not quote variable references.
double_quote_subst='s/\(["`\\]\)/\\\1/g'
# Re-`\' parameter expansions in output of double_quote_subst that were
# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
# in input to double_quote_subst, that '$' was protected from expansion.
# Since each input `\' is now two `\'s, look for any number of runs of
# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
bs='\\'
bs2='\\\\'
bs4='\\\\\\\\'
dollar='\$'
sed_double_backslash="\
s/$bs4/&\\
/g
s/^$bs2$dollar/$bs&/
s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
s/\n//g"
Oct 4, 2009
Oct 4, 2009
233
Jun 19, 2019
Jun 19, 2019
234
# Standard options:
Oct 4, 2009
Oct 4, 2009
235
opt_dry_run=false
Jun 19, 2019
Jun 19, 2019
236
opt_help=false
Oct 4, 2009
Oct 4, 2009
237
238
opt_quiet=false
opt_verbose=false
Jun 19, 2019
Jun 19, 2019
239
opt_warning=:
Oct 4, 2009
Oct 4, 2009
240
Jun 19, 2019
Jun 19, 2019
241
242
243
# func_echo arg...
# Echo program name prefixed message, along with the current mode
# name if it has been set yet.
Oct 4, 2009
Oct 4, 2009
244
245
func_echo ()
{
Jun 19, 2019
Jun 19, 2019
246
$ECHO "$progname${mode+: }$mode: $*"
Jun 19, 2019
Jun 19, 2019
247
}
Aug 24, 2004
Aug 24, 2004
248
Jun 19, 2019
Jun 19, 2019
249
250
251
# func_verbose arg...
# Echo program name prefixed message in verbose mode only.
func_verbose ()
Jun 19, 2019
Jun 19, 2019
252
{
Jun 19, 2019
Jun 19, 2019
253
$opt_verbose && func_echo ${1+"$@"}
Jun 19, 2019
Jun 19, 2019
254
Jun 19, 2019
Jun 19, 2019
255
256
257
258
# A bug in bash halts the script if the last line of a function
# fails when set -e is in force, so we need another command to
# work around that:
:
Oct 4, 2009
Oct 4, 2009
259
}
Aug 10, 2000
Aug 10, 2000
260
Jun 19, 2019
Jun 19, 2019
261
# func_error arg...
Oct 4, 2009
Oct 4, 2009
262
263
264
# Echo program name prefixed message to standard error.
func_error ()
{
Jun 19, 2019
Jun 19, 2019
265
$ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
Oct 4, 2009
Oct 4, 2009
266
}
Aug 10, 2000
Aug 10, 2000
267
Jun 19, 2019
Jun 19, 2019
268
269
270
# func_warning arg...
# Echo program name prefixed warning message to standard error.
func_warning ()
Oct 4, 2009
Oct 4, 2009
271
{
Jun 19, 2019
Jun 19, 2019
272
$opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
Aug 10, 2000
Aug 10, 2000
273
Jun 19, 2019
Jun 19, 2019
274
275
# bash bug again:
:
Oct 4, 2009
Oct 4, 2009
276
}
Aug 10, 2000
Aug 10, 2000
277
Jun 19, 2019
Jun 19, 2019
278
279
280
# func_fatal_error arg...
# Echo program name prefixed message to standard error, and exit.
func_fatal_error ()
Oct 4, 2009
Oct 4, 2009
281
{
Jun 19, 2019
Jun 19, 2019
282
283
284
func_error ${1+"$@"}
exit $EXIT_FAILURE
}
Jun 19, 2019
Jun 19, 2019
285
Jun 19, 2019
Jun 19, 2019
286
287
288
289
290
291
292
293
294
# func_fatal_help arg...
# Echo program name prefixed message to standard error, followed by
# a help hint, and exit.
func_fatal_help ()
{
func_error ${1+"$@"}
func_fatal_error "$help"
}
help="Try \`$progname --help' for more information." ## default
Jun 19, 2019
Jun 19, 2019
295
296
Jun 19, 2019
Jun 19, 2019
297
298
299
300
301
# func_grep expression filename
# Check whether EXPRESSION matches any line of FILENAME, without output.
func_grep ()
{
$GREP "$1" "$2" >/dev/null 2>&1
Oct 4, 2009
Oct 4, 2009
302
303
304
}
Jun 19, 2019
Jun 19, 2019
305
306
307
# func_mkdir_p directory-path
# Make sure the entire path to DIRECTORY-PATH is available.
func_mkdir_p ()
Oct 4, 2009
Oct 4, 2009
308
{
Jun 19, 2019
Jun 19, 2019
309
310
my_directory_path="$1"
my_dir_list=
Oct 4, 2009
Oct 4, 2009
311
Jun 19, 2019
Jun 19, 2019
312
if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
Oct 4, 2009
Oct 4, 2009
313
Jun 19, 2019
Jun 19, 2019
314
315
316
317
# Protect directory names starting with `-'
case $my_directory_path in
-*) my_directory_path="./$my_directory_path" ;;
esac
Oct 4, 2009
Oct 4, 2009
318
Jun 19, 2019
Jun 19, 2019
319
320
321
322
323
# While some portion of DIR does not yet exist...
while test ! -d "$my_directory_path"; do
# ...make a list in topmost first order. Use a colon delimited
# list incase some portion of path contains whitespace.
my_dir_list="$my_directory_path:$my_dir_list"
Oct 4, 2009
Oct 4, 2009
324
Jun 19, 2019
Jun 19, 2019
325
326
# If the last portion added has no slash in it, the list is done
case $my_directory_path in */*) ;; *) break ;; esac
Oct 4, 2009
Oct 4, 2009
327
Jun 19, 2019
Jun 19, 2019
328
329
330
331
# ...otherwise throw away the child directory and loop
my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
done
my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
Oct 4, 2009
Oct 4, 2009
332
Jun 19, 2019
Jun 19, 2019
333
334
335
336
337
338
339
340
341
save_mkdir_p_IFS="$IFS"; IFS=':'
for my_dir in $my_dir_list; do
IFS="$save_mkdir_p_IFS"
# mkdir can fail with a `File exist' error if two processes
# try to create one of the directories concurrently. Don't
# stop in that case!
$MKDIR "$my_dir" 2>/dev/null || :
done
IFS="$save_mkdir_p_IFS"
Oct 4, 2009
Oct 4, 2009
342
Jun 19, 2019
Jun 19, 2019
343
344
345
346
# Bail out if we (or some other process) failed to create a directory.
test -d "$my_directory_path" || \
func_fatal_error "Failed to create \`$1'"
fi
Oct 4, 2009
Oct 4, 2009
347
}
Aug 10, 2000
Aug 10, 2000
348
Nov 19, 2003
Nov 19, 2003
349
Jun 19, 2019
Jun 19, 2019
350
351
352
353
354
# func_mktempdir [string]
# Make a temporary directory that won't clash with other running
# libtool processes, and avoids race conditions if possible. If
# given, STRING is the basename for that directory.
func_mktempdir ()
Apr 30, 2006
Apr 30, 2006
355
{
Jun 19, 2019
Jun 19, 2019
356
my_template="${TMPDIR-/tmp}/${1-$progname}"
Apr 30, 2006
Apr 30, 2006
357
Jun 19, 2019
Jun 19, 2019
358
359
360
361
if test "$opt_dry_run" = ":"; then
# Return a directory name, but don't create it in dry-run mode
my_tmpdir="${my_template}-$$"
else
Apr 30, 2006
Apr 30, 2006
362
Jun 19, 2019
Jun 19, 2019
363
364
# If mktemp works, use that first and foremost
my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
Apr 30, 2006
Apr 30, 2006
365
Jun 19, 2019
Jun 19, 2019
366
367
368
if test ! -d "$my_tmpdir"; then
# Failing that, at least try and use $RANDOM to avoid a race
my_tmpdir="${my_template}-${RANDOM-0}$$"
Jun 19, 2019
Jun 19, 2019
369
Jun 19, 2019
Jun 19, 2019
370
371
372
373
374
save_mktempdir_umask=`umask`
umask 0077
$MKDIR "$my_tmpdir"
umask $save_mktempdir_umask
fi
Jun 19, 2019
Jun 19, 2019
375
Jun 19, 2019
Jun 19, 2019
376
377
378
379
# If we're not in dry-run mode, bomb out on failure
test -d "$my_tmpdir" || \
func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
fi
Oct 4, 2009
Oct 4, 2009
380
Jun 19, 2019
Jun 19, 2019
381
$ECHO "X$my_tmpdir" | $Xsed
Nov 19, 2003
Nov 19, 2003
382
383
}
Aug 24, 2004
Aug 24, 2004
384
Jun 19, 2019
Jun 19, 2019
385
386
387
388
389
390
391
# func_quote_for_eval arg
# Aesthetically quote ARG to be evaled later.
# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
# is double-quoted, suitable for a subsequent eval, whereas
# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
# which are still active within double quotes backslashified.
func_quote_for_eval ()
Apr 30, 2006
Apr 30, 2006
392
{
Jun 19, 2019
Jun 19, 2019
393
394
395
396
397
398
case $1 in
*[\\\`\"\$]*)
func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
*)
func_quote_for_eval_unquoted_result="$1" ;;
esac
Oct 4, 2009
Oct 4, 2009
399
Jun 19, 2019
Jun 19, 2019
400
401
402
403
404
405
406
407
408
409
410
411
case $func_quote_for_eval_unquoted_result in
# Double-quote args containing shell metacharacters to delay
# word splitting, command substitution and 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_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
;;
*)
func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
esac
Aug 24, 2004
Aug 24, 2004
412
413
414
}
Jun 19, 2019
Jun 19, 2019
415
416
417
418
# func_quote_for_expand arg
# Aesthetically quote ARG to be evaled later; same as above,
# but do not quote variable references.
func_quote_for_expand ()
Apr 30, 2006
Apr 30, 2006
419
{
Jun 19, 2019
Jun 19, 2019
420
421
422
423
424
425
426
case $1 in
*[\\\`\"]*)
my_arg=`$ECHO "X$1" | $Xsed \
-e "$double_quote_subst" -e "$sed_double_backslash"` ;;
*)
my_arg="$1" ;;
esac
Oct 4, 2009
Oct 4, 2009
427
Jun 19, 2019
Jun 19, 2019
428
429
430
431
432
433
434
435
436
case $my_arg in
# Double-quote args containing shell metacharacters to delay
# word splitting and command substitution for a subsequent eval.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
my_arg="\"$my_arg\""
;;
esac
Nov 19, 2003
Nov 19, 2003
437
Jun 19, 2019
Jun 19, 2019
438
439
func_quote_for_expand_result="$my_arg"
}
Aug 24, 2004
Aug 24, 2004
440
Apr 30, 2006
Apr 30, 2006
441
Jun 19, 2019
Jun 19, 2019
442
443
444
445
446
447
448
449
# func_show_eval cmd [fail_exp]
# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it.
func_show_eval ()
{
my_cmd="$1"
my_fail_exp="${2-:}"
Oct 4, 2009
Oct 4, 2009
450
Jun 19, 2019
Jun 19, 2019
451
452
453
454
${opt_silent-false} || {
func_quote_for_expand "$my_cmd"
eval "func_echo $func_quote_for_expand_result"
}
Jun 19, 2019
Jun 19, 2019
455
Jun 19, 2019
Jun 19, 2019
456
457
458
459
460
461
462
463
if ${opt_dry_run-false}; then :; else
eval "$my_cmd"
my_status=$?
if test "$my_status" -eq 0; then :; else
eval "(exit $my_status); $my_fail_exp"
fi
fi
}
Oct 4, 2009
Oct 4, 2009
464
465
Jun 19, 2019
Jun 19, 2019
466
467
468
469
470
# func_show_eval_locale cmd [fail_exp]
# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it. Use the saved locale for evaluation.
func_show_eval_locale ()
Oct 4, 2009
Oct 4, 2009
471
{
Jun 19, 2019
Jun 19, 2019
472
473
474
475
476
477
478
my_cmd="$1"
my_fail_exp="${2-:}"
${opt_silent-false} || {
func_quote_for_expand "$my_cmd"
eval "func_echo $func_quote_for_expand_result"
}
Jun 19, 2019
Jun 19, 2019
479
Jun 19, 2019
Jun 19, 2019
480
481
482
483
484
485
486
487
488
if ${opt_dry_run-false}; then :; else
eval "$lt_user_locale
$my_cmd"
my_status=$?
eval "$lt_safe_locale"
if test "$my_status" -eq 0; then :; else
eval "(exit $my_status); $my_fail_exp"
fi
fi
Oct 4, 2009
Oct 4, 2009
489
490
}
Jun 19, 2019
Jun 19, 2019
491
492
493
494
495
496
497
# func_version
# Echo version message to standard output and exit.
func_version ()
Oct 4, 2009
Oct 4, 2009
498
{
Jun 19, 2019
Jun 19, 2019
499
500
501
502
503
504
505
$SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
s/^# //
s/^# *$//
s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
p
}' < "$progpath"
exit $?
Oct 4, 2009
Oct 4, 2009
506
507
}
Jun 19, 2019
Jun 19, 2019
508
509
510
# func_usage
# Echo short help message to standard output and exit.
func_usage ()
Oct 4, 2009
Oct 4, 2009
511
{
Jun 19, 2019
Jun 19, 2019
512
513
514
515
516
517
518
519
520
$SED -n '/^# Usage:/,/# -h/ {
s/^# //
s/^# *$//
s/\$progname/'$progname'/
p
}' < "$progpath"
$ECHO
$ECHO "run \`$progname --help | more' for full usage"
exit $?
Oct 4, 2009
Oct 4, 2009
521
522
}
Jun 19, 2019
Jun 19, 2019
523
524
525
# func_help
# Echo long help message to standard output and exit.
func_help ()
Jun 19, 2019
Jun 19, 2019
526
{
Jun 19, 2019
Jun 19, 2019
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
$SED -n '/^# Usage:/,/# Report bugs to/ {
s/^# //
s/^# *$//
s*\$progname*'$progname'*
s*\$host*'"$host"'*
s*\$SHELL*'"$SHELL"'*
s*\$LTCC*'"$LTCC"'*
s*\$LTCFLAGS*'"$LTCFLAGS"'*
s*\$LD*'"$LD"'*
s/\$with_gnu_ld/'"$with_gnu_ld"'/
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
p
}' < "$progpath"
exit $?
Jun 19, 2019
Jun 19, 2019
542
}
Oct 4, 2009
Oct 4, 2009
543
Jun 19, 2019
Jun 19, 2019
544
545
546
547
# func_missing_arg argname
# Echo program name prefixed message to standard error and set global
# exit_cmd.
func_missing_arg ()
Jun 19, 2019
Jun 19, 2019
548
{
Jun 19, 2019
Jun 19, 2019
549
550
func_error "missing argument for $1"
exit_cmd=exit
Jun 19, 2019
Jun 19, 2019
551
}
Oct 4, 2009
Oct 4, 2009
552
Jun 19, 2019
Jun 19, 2019
553
exit_cmd=:
Oct 4, 2009
Oct 4, 2009
554
Aug 10, 2000
Aug 10, 2000
555
556
Nov 19, 2003
Nov 19, 2003
557
Jun 19, 2019
Jun 19, 2019
558
559
560
561
562
563
564
565
566
567
568
# Check that we have a working $ECHO.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test "X$1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
# Yippee, $ECHO works!
:
Jun 19, 2019
Jun 19, 2019
569
else
Jun 19, 2019
Jun 19, 2019
570
571
572
# Restart under the correct shell, and then maybe $ECHO will work.
exec $SHELL "$progpath" --no-reexec ${1+"$@"}
fi
Aug 10, 2000
Aug 10, 2000
573
Jun 19, 2019
Jun 19, 2019
574
575
576
577
578
579
580
if test "X$1" = X--fallback-echo; then
# used as fallback echo
shift
cat <<EOF
$*
EOF
exit $EXIT_SUCCESS
Jun 19, 2019
Jun 19, 2019
581
fi
Aug 10, 2000
Aug 10, 2000
582
Jun 19, 2019
Jun 19, 2019
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
magic="%%%MAGIC variable%%%"
magic_exe="%%%MAGIC EXE variable%%%"
# Global variables.
# $mode is unset
nonopt=
execute_dlfiles=
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
extracted_archives=
extracted_serial=0
opt_dry_run=false
opt_duplicate_deps=false
opt_silent=false
opt_debug=:
# If this variable is set in any of the actions, the command in it
# will be execed at the end. This prevents here-documents from being
# left over by shells.
exec_cmd=
Aug 10, 2000
Aug 10, 2000
605
Jun 19, 2019
Jun 19, 2019
606
# func_fatal_configuration arg...
Oct 4, 2009
Oct 4, 2009
607
608
609
610
# Echo program name prefixed message to standard error, followed by
# a configuration failure hint, and exit.
func_fatal_configuration ()
{
Jun 19, 2019
Jun 19, 2019
611
612
613
func_error ${1+"$@"}
func_error "See the $PACKAGE documentation for more information."
func_fatal_error "Fatal configuration error."
Oct 4, 2009
Oct 4, 2009
614
615
616
617
618
619
620
621
622
623
624
625
}
# func_config
# Display the configuration for all the tags in this script.
func_config ()
{
re_begincf='^# ### BEGIN LIBTOOL'
re_endcf='^# ### END LIBTOOL'
# Default configuration.
$SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
Aug 10, 2000
Aug 10, 2000
626
Nov 19, 2003
Nov 19, 2003
627
628
# Now print the configurations for the tags.
for tagname in $taglist; do
Oct 4, 2009
Oct 4, 2009
629
$SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
Nov 19, 2003
Nov 19, 2003
630
done
Aug 10, 2000
Aug 10, 2000
631
Oct 4, 2009
Oct 4, 2009
632
633
exit $?
}
Aug 10, 2000
Aug 10, 2000
634
Oct 4, 2009
Oct 4, 2009
635
636
637
638
# func_features
# Display the features supported by this script.
func_features ()
{
Jun 19, 2019
Jun 19, 2019
639
640
641
$ECHO "host: $host"
if test "$build_libtool_libs" = yes; then
$ECHO "enable shared libraries"
Aug 10, 2000
Aug 10, 2000
642
else
Jun 19, 2019
Jun 19, 2019
643
$ECHO "disable shared libraries"
Aug 10, 2000
Aug 10, 2000
644
fi
Jun 19, 2019
Jun 19, 2019
645
646
if test "$build_old_libs" = yes; then
$ECHO "enable static libraries"
Aug 10, 2000
Aug 10, 2000
647
else
Jun 19, 2019
Jun 19, 2019
648
$ECHO "disable static libraries"
Aug 10, 2000
Aug 10, 2000
649
fi
Oct 4, 2009
Oct 4, 2009
650
Apr 30, 2006
Apr 30, 2006
651
exit $?
Oct 4, 2009
Oct 4, 2009
652
653
}
Jun 19, 2019
Jun 19, 2019
654
# func_enable_tag tagname
Oct 4, 2009
Oct 4, 2009
655
656
657
658
659
# Verify that TAGNAME is valid, and either flag an error and exit, or
# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
# variable here.
func_enable_tag ()
{
Jun 19, 2019
Jun 19, 2019
660
661
# Global variable:
tagname="$1"
Aug 10, 2000
Aug 10, 2000
662
Jun 19, 2019
Jun 19, 2019
663
664
665
re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
sed_extractcf="/$re_begincf/,/$re_endcf/p"
Aug 10, 2000
Aug 10, 2000
666
Jun 19, 2019
Jun 19, 2019
667
668
669
670
671
672
# Validate tagname.
case $tagname in
*[!-_A-Za-z0-9,/]*)
func_fatal_error "invalid tag name: $tagname"
;;
esac
Aug 10, 2000
Aug 10, 2000
673
Jun 19, 2019
Jun 19, 2019
674
675
676
677
# Don't test for the "default" C tag, as we know it's
# there but not specially marked.
case $tagname in
CC) ;;
Oct 4, 2009
Oct 4, 2009
678
*)
Jun 19, 2019
Jun 19, 2019
679
680
681
682
683
684
685
686
687
if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
taglist="$taglist $tagname"
# Evaluate the configuration. Be careful to quote the path
# and the sed script, to avoid splitting on whitespace, but
# also don't use non-portable quotes within backquotes within
# quotes we have to do it in 2 steps:
extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
eval "$extractedcf"
Oct 4, 2009
Oct 4, 2009
688
else
Jun 19, 2019
Jun 19, 2019
689
func_error "ignoring unknown tag $tagname"
Oct 4, 2009
Oct 4, 2009
690
fi
Jun 19, 2019
Jun 19, 2019
691
;;
Jun 19, 2019
Jun 19, 2019
692
693
esac
}
Jun 19, 2019
Jun 19, 2019
694
Jun 19, 2019
Jun 19, 2019
695
696
# Parse options once, thoroughly. This comes as soon as possible in
# the script to make things like `libtool --version' happen quickly.
Jun 19, 2019
Jun 19, 2019
697
{
Aug 10, 2000
Aug 10, 2000
698
Jun 19, 2019
Jun 19, 2019
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# Shorthand for --mode=foo, only valid as the first argument
case $1 in
clean|clea|cle|cl)
shift; set dummy --mode clean ${1+"$@"}; shift
;;
compile|compil|compi|comp|com|co|c)
shift; set dummy --mode compile ${1+"$@"}; shift
;;
execute|execut|execu|exec|exe|ex|e)
shift; set dummy --mode execute ${1+"$@"}; shift
;;
finish|finis|fini|fin|fi|f)
shift; set dummy --mode finish ${1+"$@"}; shift
;;
install|instal|insta|inst|ins|in|i)
shift; set dummy --mode install ${1+"$@"}; shift
;;
link|lin|li|l)
shift; set dummy --mode link ${1+"$@"}; shift
;;
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
shift; set dummy --mode uninstall ${1+"$@"}; shift
;;
esac
Jun 19, 2019
Jun 19, 2019
723
Jun 19, 2019
Jun 19, 2019
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
# Parse non-mode specific arguments:
while test "$#" -gt 0; do
opt="$1"
shift
case $opt in
--config) func_config ;;
--debug) preserve_args="$preserve_args $opt"
func_echo "enabling shell trace mode"
opt_debug='set -x'
$opt_debug
;;
-dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
execute_dlfiles="$execute_dlfiles $1"
shift
;;
--dry-run | -n) opt_dry_run=: ;;
--features) func_features ;;
--finish) mode="finish" ;;
--mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
case $1 in
# Valid mode arguments:
clean) ;;
compile) ;;
execute) ;;
finish) ;;
install) ;;
link) ;;
relink) ;;
uninstall) ;;
# Catch anything else as an error
*) func_error "invalid argument for $opt"
exit_cmd=exit
break
;;
esac
mode="$1"
shift
;;
--preserve-dup-deps)
opt_duplicate_deps=: ;;
--quiet|--silent) preserve_args="$preserve_args $opt"
opt_silent=:
;;
--verbose| -v) preserve_args="$preserve_args $opt"
opt_silent=false
;;
--tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
preserve_args="$preserve_args $opt $1"
func_enable_tag "$1" # tagname is set here
shift
;;
# Separate optargs to long options:
-dlopen=*|--mode=*|--tag=*)
func_opt_split "$opt"
set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
shift
;;
-\?|-h) func_usage ;;
--help) opt_help=: ;;
--version) func_version ;;
-*) func_fatal_help "unrecognized option \`$opt'" ;;
*) nonopt="$opt"
break
;;
Oct 4, 2009
Oct 4, 2009
803
esac
Jun 19, 2019
Jun 19, 2019
804
done
Oct 4, 2009
Oct 4, 2009
805
806
Jun 19, 2019
Jun 19, 2019
807
808
809
810
811
812
813
814
815
case $host in
*cygwin* | *mingw* | *pw32* | *cegcc*)
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
*)
opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
;;
esac
Aug 10, 2000
Aug 10, 2000
816
Jun 19, 2019
Jun 19, 2019
817
818
819
820
# Having warned about all mis-specified options, bail out if
# anything was wrong.
$exit_cmd $EXIT_FAILURE
}
Oct 4, 2009
Oct 4, 2009
821
Jun 19, 2019
Jun 19, 2019
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
# func_check_version_match
# Ensure that we are using m4 macros, and libtool script from the same
# release of libtool.
func_check_version_match ()
{
if test "$package_revision" != "$macro_revision"; then
if test "$VERSION" != "$macro_version"; then
if test -z "$macro_version"; then
cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from an older release.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
else
cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
Aug 10, 2000
Aug 10, 2000
843
fi
Jun 19, 2019
Jun 19, 2019
844
845
846
847
848
849
850
851
else
cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
$progname: but the definition of this LT_INIT comes from revision $macro_revision.
$progname: You should recreate aclocal.m4 with macros from revision $package_revision
$progname: of $PACKAGE $VERSION and run autoconf again.
_LT_EOF
fi
Oct 4, 2009
Oct 4, 2009
852
Jun 19, 2019
Jun 19, 2019
853
854
exit $EXIT_MISMATCH
fi
Oct 4, 2009
Oct 4, 2009
855
856
}
Aug 10, 2000
Aug 10, 2000
857
Jun 19, 2019
Jun 19, 2019
858
859
860
## ----------- ##
## Main. ##
## ----------- ##
Oct 4, 2009
Oct 4, 2009
861
Jun 19, 2019
Jun 19, 2019
862
863
864
$opt_help || {
# Sanity checks first:
func_check_version_match
Oct 4, 2009
Oct 4, 2009
865
Jun 19, 2019
Jun 19, 2019
866
867
868
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
func_fatal_configuration "not configured to build any kind of library"
fi
Oct 4, 2009
Oct 4, 2009
869
Jun 19, 2019
Jun 19, 2019
870
test -z "$mode" && func_fatal_error "error: you must specify a MODE."
Oct 4, 2009
Oct 4, 2009
871
Aug 10, 2000
Aug 10, 2000
872
Jun 19, 2019
Jun 19, 2019
873
874
# Darwin sucks
eval std_shrext=\"$shrext_cmds\"
Aug 10, 2000
Aug 10, 2000
875
Jun 19, 2019
Jun 19, 2019
876
877
878
879
880
881
882
883
884
885
886
# Only execute mode is allowed to have -dlopen flags.
if test -n "$execute_dlfiles" && test "$mode" != execute; then
func_error "unrecognized option \`-dlopen'"
$ECHO "$help" 1>&2
exit $EXIT_FAILURE
fi
# Change the help message to a mode-specific one.
generic_help="$help"
help="Try \`$progname --help --mode=$mode' for more information."
Jun 19, 2019
Jun 19, 2019
887
}
Aug 10, 2000
Aug 10, 2000
888
Jun 19, 2019
Jun 19, 2019
889
Oct 4, 2009
Oct 4, 2009
890
# func_lalib_p file
Jun 19, 2019
Jun 19, 2019
891
# True iff FILE is a libtool `.la' library or `.lo' object file.
Oct 4, 2009
Oct 4, 2009
892
893
894
895
896
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_lalib_p ()
{
test -f "$1" &&
Jun 19, 2019
Jun 19, 2019
897
898
$SED -e 4q "$1" 2>/dev/null \
| $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
Oct 4, 2009
Oct 4, 2009
899
}
Aug 10, 2000
Aug 10, 2000
900
Oct 4, 2009
Oct 4, 2009
901
# func_lalib_unsafe_p file
Jun 19, 2019
Jun 19, 2019
902
# True iff FILE is a libtool `.la' library or `.lo' object file.
Oct 4, 2009
Oct 4, 2009
903
904
905
906
# This function implements the same check as func_lalib_p without
# resorting to external programs. To this end, it redirects stdin and
# closes it afterwards, without saving the original file descriptor.
# As a safety measure, use it only where a negative result would be
Jun 19, 2019
Jun 19, 2019
907
# fatal anyway. Works if `file' does not exist.
Oct 4, 2009
Oct 4, 2009
908
909
910
911
912
913
914
func_lalib_unsafe_p ()
{
lalib_p=no
if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
for lalib_p_l in 1 2 3 4
do
read lalib_p_line
Jun 19, 2019
Jun 19, 2019
915
case "$lalib_p_line" in
Oct 4, 2009
Oct 4, 2009
916
917
918
919
920
\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
esac
done
exec 0<&5 5<&-
fi
Jun 19, 2019
Jun 19, 2019
921
test "$lalib_p" = yes
Oct 4, 2009
Oct 4, 2009
922
}
Aug 10, 2000
Aug 10, 2000
923
Oct 4, 2009
Oct 4, 2009
924
925
926
927
928
929
# func_ltwrapper_script_p file
# True iff FILE is a libtool wrapper script
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_ltwrapper_script_p ()
{
Jun 19, 2019
Jun 19, 2019
930
func_lalib_p "$1"
Oct 4, 2009
Oct 4, 2009
931
}
Nov 19, 2003
Nov 19, 2003
932
Oct 4, 2009
Oct 4, 2009
933
934
935
936
937
938
939
940
941
942
943
944
945
# func_ltwrapper_executable_p file
# True iff FILE is a libtool wrapper executable
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_ltwrapper_executable_p ()
{
func_ltwrapper_exec_suffix=
case $1 in
*.exe) ;;
*) func_ltwrapper_exec_suffix=.exe ;;
esac
$GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
}
Nov 19, 2003
Nov 19, 2003
946
Oct 4, 2009
Oct 4, 2009
947
948
949
950
951
952
# func_ltwrapper_scriptname file
# Assumes file is an ltwrapper_executable
# uses $file to determine the appropriate filename for a
# temporary ltwrapper_script.
func_ltwrapper_scriptname ()
{
Jun 19, 2019
Jun 19, 2019
953
954
955
956
957
958
func_ltwrapper_scriptname_result=""
if func_ltwrapper_executable_p "$1"; then
func_dirname_and_basename "$1" "" "."
func_stripname '' '.exe' "$func_basename_result"
func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
fi
Oct 4, 2009
Oct 4, 2009
959
}
Nov 19, 2003
Nov 19, 2003
960
Oct 4, 2009
Oct 4, 2009
961
962
963
964
965
966
967
968
# func_ltwrapper_p file
# True iff FILE is a libtool wrapper script or wrapper executable
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_ltwrapper_p ()
{
func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
}
Nov 19, 2003
Nov 19, 2003
969
970
Oct 4, 2009
Oct 4, 2009
971
972
973
974
975
976
# func_execute_cmds commands fail_cmd
# Execute tilde-delimited COMMANDS.
# If FAIL_CMD is given, eval that upon failure.
# FAIL_CMD may read-access the current command in variable CMD!
func_execute_cmds ()
{
Jun 19, 2019
Jun 19, 2019
977
$opt_debug
Oct 4, 2009
Oct 4, 2009
978
979
save_ifs=$IFS; IFS='~'
for cmd in $1; do
Jun 19, 2019
Jun 19, 2019
980
IFS=$save_ifs
Jun 19, 2019
Jun 19, 2019
981
eval cmd=\"$cmd\"
Oct 4, 2009
Oct 4, 2009
982
983
984
985
986
987
988
989
990
991
992
func_show_eval "$cmd" "${2-:}"
done
IFS=$save_ifs
}
# func_source file
# Source FILE, adding directory component if necessary.
# Note that it is not necessary on cygwin/mingw to append a dot to
# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
# behavior happens only for exec(3), not for open(2)! Also, sourcing
Jun 19, 2019
Jun 19, 2019
993
# `FILE.' does not work on cygwin managed mounts.
Oct 4, 2009
Oct 4, 2009
994
995
func_source ()
{
Jun 19, 2019
Jun 19, 2019
996
$opt_debug
Oct 4, 2009
Oct 4, 2009
997
998
999
1000
case $1 in
*/* | *\\*) . "$1" ;;
*) . "./$1" ;;
esac