1
1
# Generated from ltmain.m4sh.
3
# ltmain.sh (GNU libtool) 2.2.6
3
# libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
4
4
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
6
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
7
# 2007, 2008, 2009 Free Software Foundation, Inc.
7
8
# This is free software; see the source for copying conditions. There is NO
8
9
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33
34
# Provide generalized library-building support services.
35
# --config show all configuration variables
36
# --debug enable verbose shell tracing
37
# -n, --dry-run display commands without modifying any files
38
# --features display basic configuration information and exit
39
# --mode=MODE use operation mode MODE
40
# --preserve-dup-deps don't remove duplicate dependency libraries
41
# --quiet, --silent don't print informational messages
42
# --tag=TAG use configuration variables from tag TAG
43
# -v, --verbose print informational messages (default)
44
# --version print version information
45
# -h, --help print short or long help message
36
# --config show all configuration variables
37
# --debug enable verbose shell tracing
38
# -n, --dry-run display commands without modifying any files
39
# --features display basic configuration information and exit
40
# --mode=MODE use operation mode MODE
41
# --no-finish let install mode avoid finish commands
42
# --preserve-dup-deps don't remove duplicate dependency libraries
43
# --quiet, --silent don't print informational messages
44
# --no-quiet, --no-silent
45
# print informational messages (default)
46
# --tag=TAG use configuration variables from tag TAG
47
# -v, --verbose print more informational messages than default
48
# --no-verbose don't print the extra informational messages
49
# --version print version information
50
# -h, --help, --help-all print short, long, or detailed help message
47
52
# MODE must be one of the following:
49
# clean remove files from the build directory
50
# compile compile a source file into a libtool object
51
# execute automatically set library path, then run a program
52
# finish complete the installation of libtool libraries
53
# install install libraries or executables
54
# link create a library or an executable
55
# uninstall remove libraries from an installed directory
54
# clean remove files from the build directory
55
# compile compile a source file into a libtool object
56
# execute automatically set library path, then run a program
57
# finish complete the installation of libtool libraries
58
# install install libraries or executables
59
# link create a library or an executable
60
# uninstall remove libraries from an installed directory
57
# MODE-ARGS vary depending on the MODE.
62
# MODE-ARGS vary depending on the MODE. When passed as first option,
63
# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
58
64
# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
60
66
# When reporting a bug, please describe a test case to reproduce it and
61
67
# include the following information:
66
# compiler flags: $LTCFLAGS
67
# linker: $LD (gnu? $with_gnu_ld)
68
# $progname: (GNU libtool) 2.2.6
69
# automake: $automake_version
70
# autoconf: $autoconf_version
72
# compiler flags: $LTCFLAGS
73
# linker: $LD (gnu? $with_gnu_ld)
74
# $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a
75
# automake: $automake_version
76
# autoconf: $autoconf_version
72
78
# Report bugs to <bug-libtool@gnu.org>.
78
package_revision=1.3012
83
TIMESTAMP=" 1.3134 2009-11-29"
84
package_revision=1.3134
80
86
# Be Bourne compatible
81
87
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
133
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
134
# is ksh but when the shell is invoked as "sh" and the current value of
135
# the _XPG environment variable is not equal to 1 (one), the special
136
# positional parameter $0, within a function call, is the name of the
119
: ${EGREP="/usr/bin/grep -E"}
120
: ${FGREP="/usr/bin/grep -F"}
121
: ${GREP="/usr/bin/grep"}
144
: ${EGREP="/bin/grep -E"}
145
: ${FGREP="/bin/grep -F"}
146
: ${GREP="/bin/grep"}
122
147
: ${LN_S="ln -s"}
124
149
: ${MKDIR="mkdir"}
127
: ${SED="/opt/local/bin/gsed"}
152
: ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"}
128
153
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
129
154
: ${Xsed="$SED -e 1s/^X//"}
159
184
func_dirname_and_basename ()
161
186
# Extract subdirectory from the argument.
162
func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
187
func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
163
188
if test "X$func_dirname_result" = "X${1}"; then
164
189
func_dirname_result="${3}"
166
191
func_dirname_result="$func_dirname_result${2}"
168
func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
193
func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
171
196
# Generated shell functions inserted here.
173
198
# These SED scripts presuppose an absolute path with a trailing slash.
174
pathcar="s,^/\([^/]*\).*$,\1,"
175
pathcdr="s,^/[^/]*,,"
176
removedotparts="s@/\(\./\)\{1,\}@/@g;s,/\.$,/,"
177
collapseslashes="s@/\{1,\}@/@g"
178
finalslash="s,/*$,/,"
199
pathcar='s,^/\([^/]*\).*$,\1,'
200
pathcdr='s,^/[^/]*,,'
201
removedotparts=':dotsl
205
collapseslashes='s@/\{1,\}@/@g'
206
finalslash='s,/*$,/,'
180
208
# func_normal_abspath PATH
181
209
# Remove doubled-up and trailing slashes, "." path components,
318
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
319
# is ksh but when the shell is invoked as "sh" and the current value of
320
# the _XPG environment variable is not equal to 1 (one), the special
321
# positional parameter $0, within a function call, is the name of the
325
346
# The name of this program:
326
# In the unlikely event $progname began with a '-', it would play havoc with
327
# func_echo (imagine progname=-n), so we prepend ./ in that case:
328
347
func_dirname_and_basename "$progpath"
329
348
progname=$func_basename_result
331
-*) progname=./$progname ;;
334
350
# Make sure we have an absolute path for reexecution:
335
351
case $progpath in
471
494
case $my_directory_path in */*) ;; *) break ;; esac
473
496
# ...otherwise throw away the child directory and loop
474
my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
497
my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
476
my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
499
my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
478
501
save_mkdir_p_IFS="$IFS"; IFS=':'
479
502
for my_dir in $my_dir_list; do
654
685
# Echo short help message to standard output and exit.
657
$SED -n '/^# Usage:/,/# -h/ {
688
$SED -n '/^# Usage:/,/^# *-h/ {
660
691
s/\$progname/'$progname'/
664
695
$ECHO "run \`$progname --help | more' for full usage"
669
# Echo long help message to standard output and exit.
700
# Echo long help message to standard output and exit,
701
# unless 'noexit' is passed as argument.
672
704
$SED -n '/^# Usage:/,/# Report bugs to/ {
704
# Check that we have a working $ECHO.
705
if test "X$1" = X--no-reexec; then
706
# Discard the --no-reexec flag, and continue.
708
elif test "X$1" = X--fallback-echo; then
709
# Avoid inline document here, it may be left over
711
elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
712
# Yippee, $ECHO works!
715
# Restart under the correct shell, and then maybe $ECHO will work.
716
exec $SHELL "$progpath" --no-reexec ${1+"$@"}
719
if test "X$1" = X--fallback-echo; then
720
# used as fallback echo
728
740
magic="%%%MAGIC variable%%%"
729
741
magic_exe="%%%MAGIC EXE variable%%%"
781
794
# Display the features supported by this script.
785
798
if test "$build_libtool_libs" = yes; then
786
$ECHO "enable shared libraries"
799
echo "enable shared libraries"
788
$ECHO "disable shared libraries"
801
echo "disable shared libraries"
790
803
if test "$build_old_libs" = yes; then
791
$ECHO "enable static libraries"
804
echo "enable static libraries"
793
$ECHO "disable static libraries"
806
echo "disable static libraries"
1161
1187
func_quote_for_eval "$arg"
1162
1188
CC_quoted="$CC_quoted $func_quote_for_eval_result"
1190
CC_expanded=`func_echo_all $CC`
1191
CC_quoted_expanded=`func_echo_all $CC_quoted`
1165
1193
# Blanks in the command may have been stripped by the calling shell,
1166
1194
# but not from the CC environment variable when configure was run.
1167
" $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
1195
" $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1196
" $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
1168
1197
# Blanks at the start of $base_compile will cause this to fail
1169
1198
# if we don't check for them as well.
1178
1207
func_quote_for_eval "$arg"
1179
1208
CC_quoted="$CC_quoted $func_quote_for_eval_result"
1210
CC_expanded=`func_echo_all $CC`
1211
CC_quoted_expanded=`func_echo_all $CC_quoted`
1182
" $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
1213
" $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1214
" $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
1183
1215
# The compiler in the base compile command matches
1184
1216
# the one in the tagged configuration.
1185
1217
# Assume this is the tagged configuration we want.
1774
1812
$ECHO "Try \`$progname --help' for more information about other modes."
1779
# Now that we've collected a possible --mode arg, show help if necessary
1780
$opt_help && func_mode_help
1815
# Now that we've collected a possible --mode arg, show help if necessary
1817
if test "$opt_help" = :; then
1822
for mode in compile link execute install finish uninstall clean; do
1825
} | sed -n '1p; 2,$s/^Usage:/ or: /p'
1828
for mode in compile link execute install finish uninstall clean; do
1834
/^When reporting/,/^Report/{
1839
/information about other modes/d
1840
/more detailed .*MODE/d
1841
s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
1783
1847
# func_mode_execute arg...
1942
2006
# Exit here if they wanted silent mode.
1943
2007
$opt_silent && exit $EXIT_SUCCESS
1945
$ECHO "X----------------------------------------------------------------------" | $Xsed
1946
$ECHO "Libraries have been installed in:"
2009
echo "----------------------------------------------------------------------"
2010
echo "Libraries have been installed in:"
1947
2011
for libdir in $libdirs; do
1948
2012
$ECHO " $libdir"
1951
$ECHO "If you ever happen to want to link against installed libraries"
1952
$ECHO "in a given directory, LIBDIR, you must either use libtool, and"
1953
$ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
1954
$ECHO "flag during linking and do at least one of the following:"
2015
echo "If you ever happen to want to link against installed libraries"
2016
echo "in a given directory, LIBDIR, you must either use libtool, and"
2017
echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2018
echo "flag during linking and do at least one of the following:"
1955
2019
if test -n "$shlibpath_var"; then
1956
$ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
1957
$ECHO " during execution"
2020
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2021
echo " during execution"
1959
2023
if test -n "$runpath_var"; then
1960
$ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
1961
$ECHO " during linking"
2024
echo " - add LIBDIR to the \`$runpath_var' environment variable"
2025
echo " during linking"
1963
2027
if test -n "$hardcode_libdir_flag_spec"; then
1965
eval flag=\"$hardcode_libdir_flag_spec\"
2029
eval "flag=\"$hardcode_libdir_flag_spec\""
1967
2031
$ECHO " - use the \`$flag' linker flag"
1970
2034
$ECHO " - have your system administrator run these commands:$admincmds"
1972
2036
if test -f /etc/ld.so.conf; then
1973
$ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2037
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
1977
$ECHO "See any operating system documentation about shared libraries for"
2041
echo "See any operating system documentation about shared libraries for"
1979
2043
solaris2.[6789]|solaris2.1[0-9])
1980
$ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2044
echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
1984
$ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
2048
echo "more information, such as the ld(1) and ld.so(8) manual pages."
1987
$ECHO "X----------------------------------------------------------------------" | $Xsed
2051
echo "----------------------------------------------------------------------"
1988
2052
exit $EXIT_SUCCESS
2504
2593
export_symbols="$output_objdir/$outputname.exp"
2505
2594
$opt_dry_run || {
2506
2595
$RM $export_symbols
2507
eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2596
${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols"
2509
2598
*cygwin* | *mingw* | *cegcc* )
2510
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
2511
eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
2599
echo EXPORTS > "$output_objdir/$outputname.def"
2600
cat "$export_symbols" >> "$output_objdir/$outputname.def"
2516
2605
$opt_dry_run || {
2517
eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
2518
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
2519
eval '$MV "$nlist"T "$nlist"'
2606
${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp"
2607
$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T
2608
$MV "$nlist"T "$nlist"
2521
*cygwin | *mingw* | *cegcc* )
2522
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
2523
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
2610
*cygwin* | *mingw* | *cegcc* )
2611
echo EXPORTS > "$output_objdir/$outputname.def"
2612
cat "$nlist" >> "$output_objdir/$outputname.def"
2663
2752
*cygwin* | *mingw* | *cegcc* )
2664
2753
if test -f "$output_objdir/$my_outputname.def"; then
2665
compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2666
finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2754
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2755
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2668
compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2669
finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2757
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2758
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2673
compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2674
finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2762
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2763
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2746
2836
f_ex_an_ar_dir="$1"; shift
2747
2837
f_ex_an_ar_oldlib="$1"
2748
func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
2838
if test "$lock_old_archive_extraction" = yes; then
2839
lockfile=$f_ex_an_ar_oldlib.lock
2840
until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
2841
func_echo "Waiting for $lockfile to be removed"
2845
func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
2846
'stat=$?; rm -f "$lockfile"; exit $stat'
2847
if test "$lock_old_archive_extraction" = yes; then
2848
$opt_dry_run || rm -f "$lockfile"
2749
2850
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
2842
# func_emit_wrapper_part1 [arg=no]
2844
# Emit the first part of a libtool wrapper script on stdout.
2845
# For more information, see the description associated with
2846
# func_emit_wrapper(), below.
2847
func_emit_wrapper_part1 ()
2942
# func_emit_wrapper [arg=no]
2944
# Emit a libtool wrapper script on stdout.
2945
# Don't directly open a file because we may want to
2946
# incorporate the script contents within a cygwin/mingw
2947
# wrapper executable. Must ONLY be called from within
2948
# func_mode_link because it depends on a number of variables
2951
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
2952
# variable will take. If 'yes', then the emitted script
2953
# will assume that the directory in which it is stored is
2954
# the $objdir directory. This is a cygwin/mingw-specific
2956
func_emit_wrapper ()
2849
func_emit_wrapper_part1_arg1=no
2850
if test -n "$1" ; then
2851
func_emit_wrapper_part1_arg1=$1
2958
func_emit_wrapper_arg1=${1-no}
2897
3002
# When we are sourced in execute mode, \$file and \$ECHO are already set.
2898
3003
if test \"\$libtool_execute_magic\" != \"$magic\"; then
2901
# Make sure echo works.
2902
if test \"X\$1\" = X--no-reexec; then
2903
# Discard the --no-reexec flag, and continue.
2905
elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
2906
# Yippee, \$ECHO works!
2909
# Restart under the correct shell, and then maybe \$ECHO will work.
2910
exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
3006
qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
3009
# A function that is used when there is no print builtin or printf.
3010
func_fallback_echo ()
3012
eval 'cat <<_LTECHO_EOF
2916
3019
# Find the directory that this script lives in.
2917
thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
3020
thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
2918
3021
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2920
3023
# Follow symbolic links until we get to the real thisdir.
2921
file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
3024
file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
2922
3025
while test -n \"\$file\"; do
2923
destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3026
destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
2925
3028
# If there was a directory component, then change thisdir.
2926
3029
if test \"x\$destdir\" != \"x\$file\"; then
2933
file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2934
file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
3036
file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
3037
file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
2938
# end: func_emit_wrapper_part1
2940
# func_emit_wrapper_part2 [arg=no]
2942
# Emit the second part of a libtool wrapper script on stdout.
2943
# For more information, see the description associated with
2944
# func_emit_wrapper(), below.
2945
func_emit_wrapper_part2 ()
2947
func_emit_wrapper_part2_arg1=no
2948
if test -n "$1" ; then
2949
func_emit_wrapper_part2_arg1=$1
2954
3040
# Usually 'no', except on cygwin/mingw when embedded into
2955
3041
# the cwrapper.
2956
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
3042
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
2957
3043
if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
2958
3044
# special case for '.'
2959
3045
if test \"\$thisdir\" = \".\"; then
3064
3150
# The program doesn't exist.
3065
3151
\$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
3066
3152
\$ECHO \"This script is just a wrapper for \$program.\" 1>&2
3067
$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
3153
\$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
3073
# end: func_emit_wrapper_part2
3076
# func_emit_wrapper [arg=no]
3078
# Emit a libtool wrapper script on stdout.
3079
# Don't directly open a file because we may want to
3080
# incorporate the script contents within a cygwin/mingw
3081
# wrapper executable. Must ONLY be called from within
3082
# func_mode_link because it depends on a number of variables
3085
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
3086
# variable will take. If 'yes', then the emitted script
3087
# will assume that the directory in which it is stored is
3088
# the $objdir directory. This is a cygwin/mingw-specific
3090
func_emit_wrapper ()
3092
func_emit_wrapper_arg1=no
3093
if test -n "$1" ; then
3094
func_emit_wrapper_arg1=$1
3097
# split this up so that func_emit_cwrapperexe_src
3098
# can call each part independently.
3099
func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
3100
func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
3104
3161
# func_to_host_path arg
3125
3182
func_to_host_path ()
3127
3184
func_to_host_path_result="$1"
3128
if test -n "$1" ; then
3185
if test -n "$1"; then
3131
3188
lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3133
3190
*mingw* ) # actually, msys
3134
3191
# awkward: cmd appends spaces to result
3135
lt_sed_strip_trailing_spaces="s/[ ]*\$//"
3136
func_to_host_path_tmp1=`( cmd //c echo "$1" |\
3137
$SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3138
func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3139
$SED -e "$lt_sed_naive_backslashify"`
3192
func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
3193
$SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3142
func_to_host_path_tmp1=`cygpath -w "$1"`
3143
func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3144
$SED -e "$lt_sed_naive_backslashify"`
3196
func_to_host_path_result=`cygpath -w "$1" |
3197
$SED -e "$lt_sed_naive_backslashify"`
3147
3200
# Unfortunately, winepath does not exit with a non-zero
3153
3206
# the odd construction:
3154
3207
func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3155
3208
if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3156
func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3209
func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |
3157
3210
$SED -e "$lt_sed_naive_backslashify"`
3159
3212
# Allow warning below.
3160
func_to_host_path_result=""
3213
func_to_host_path_result=
3164
3217
if test -z "$func_to_host_path_result" ; then
3165
3218
func_error "Could not determine host path corresponding to"
3167
3220
func_error "Continuing, but uninstalled executables may not work."
3169
3222
func_to_host_path_result="$1"
3196
3249
func_to_host_pathlist ()
3198
3251
func_to_host_pathlist_result="$1"
3199
if test -n "$1" ; then
3252
if test -n "$1"; then
3202
3255
lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3203
3256
# Remove leading and trailing path separator characters from
3204
3257
# ARG. msys behavior is inconsistent here, cygpath turns them
3205
3258
# into '.;' and ';.', and winepath ignores them completely.
3206
func_to_host_pathlist_tmp2="$1"
3207
# Once set for this call, this variable should not be
3208
# reassigned. It is used in tha fallback case.
3209
func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
3210
$SED -e 's|^:*||' -e 's|:*$||'`
3259
func_stripname : : "$1"
3260
func_to_host_pathlist_tmp1=$func_stripname_result
3212
3262
*mingw* ) # Actually, msys.
3213
3263
# Awkward: cmd appends spaces to result.
3214
lt_sed_strip_trailing_spaces="s/[ ]*\$//"
3215
func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
3216
$SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3217
func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3218
$SED -e "$lt_sed_naive_backslashify"`
3264
func_to_host_pathlist_result=`
3265
( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
3266
$SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3221
func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
3222
func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3269
func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
3223
3270
$SED -e "$lt_sed_naive_backslashify"`
3235
3282
if test -z "$func_to_host_pathlist_result" ; then
3236
3283
func_to_host_pathlist_result="$func_to_host_path_result"
3238
func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
3285
func_append func_to_host_pathlist_result ";$func_to_host_path_result"
3244
3290
IFS=$func_to_host_pathlist_oldIFS
3247
if test -z "$func_to_host_pathlist_result" ; then
3293
if test -z "$func_to_host_pathlist_result"; then
3248
3294
func_error "Could not determine the host path(s) corresponding to"
3250
3296
func_error "Continuing, but uninstalled executables may not work."
3251
3297
# Fallback. This may break if $1 contains DOS-style drive
3252
3298
# specifications. The fix is not to complicate the expression
3324
3366
#include <fcntl.h>
3325
3367
#include <sys/stat.h>
3369
/* declarations of non-ANSI functions */
3370
#if defined(__MINGW32__)
3371
# ifdef __STRICT_ANSI__
3372
int _putenv (const char *);
3374
#elif defined(__CYGWIN__)
3375
# ifdef __STRICT_ANSI__
3376
char *realpath (const char *, char *);
3377
int putenv (char *);
3378
int setenv (const char *, const char *, int);
3380
/* #elif defined (other platforms) ... */
3383
/* portability defines, excluding path handling macros */
3384
#if defined(_MSC_VER)
3385
# define setmode _setmode
3387
# define chmod _chmod
3388
# define getcwd _getcwd
3389
# define putenv _putenv
3390
# define S_IXUSR _S_IEXEC
3391
# ifndef _INTPTR_T_DEFINED
3392
# define _INTPTR_T_DEFINED
3393
# define intptr_t int
3395
#elif defined(__MINGW32__)
3396
# define setmode _setmode
3398
# define chmod _chmod
3399
# define getcwd _getcwd
3400
# define putenv _putenv
3401
#elif defined(__CYGWIN__)
3402
# define HAVE_SETENV
3403
# define FOPEN_WB "wb"
3404
/* #elif defined (other platforms) ... */
3327
3407
#if defined(PATH_MAX)
3328
3408
# define LT_PATHMAX PATH_MAX
3329
3409
#elif defined(MAXPATHLEN)
3421
3490
void lt_fatal (const char *message, ...);
3422
3491
void lt_setenv (const char *name, const char *value);
3423
3492
char *lt_extend_str (const char *orig_value, const char *add, int to_end);
3424
void lt_opt_process_env_set (const char *arg);
3425
void lt_opt_process_env_prepend (const char *arg);
3426
void lt_opt_process_env_append (const char *arg);
3427
int lt_split_name_value (const char *arg, char** name, char** value);
3428
3493
void lt_update_exe_path (const char *name, const char *value);
3429
3494
void lt_update_lib_path (const char *name, const char *value);
3431
static const char *script_text_part1 =
3434
func_emit_wrapper_part1 yes |
3435
$SED -e 's/\([\\"]\)/\\\1/g' \
3436
-e 's/^/ "/' -e 's/$/\\n"/'
3440
static const char *script_text_part2 =
3442
func_emit_wrapper_part2 yes |
3443
$SED -e 's/\([\\"]\)/\\\1/g' \
3444
-e 's/^/ "/' -e 's/$/\\n"/'
3495
char **prepare_spawn (char **argv);
3496
void lt_dump_script (FILE *f);
3448
3500
const char * MAGIC_EXE = "$magic_exe";
3495
3547
static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
3497
static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
3498
static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
3499
/* argument is putenv-style "foo=bar", value of foo is set to bar */
3501
static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
3502
static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
3503
/* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
3505
static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
3506
static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
3507
/* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
3510
3550
main (int argc, char *argv[])
3632
3671
for (i = 1; i < argc; i++)
3634
if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
3636
if (argv[i][env_set_opt_len] == '=')
3638
const char *p = argv[i] + env_set_opt_len + 1;
3639
lt_opt_process_env_set (p);
3641
else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
3643
lt_opt_process_env_set (argv[++i]); /* don't copy */
3646
lt_fatal ("%s missing required argument", env_set_opt);
3649
if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
3651
if (argv[i][env_prepend_opt_len] == '=')
3653
const char *p = argv[i] + env_prepend_opt_len + 1;
3654
lt_opt_process_env_prepend (p);
3656
else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
3658
lt_opt_process_env_prepend (argv[++i]); /* don't copy */
3661
lt_fatal ("%s missing required argument", env_prepend_opt);
3664
if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
3666
if (argv[i][env_append_opt_len] == '=')
3668
const char *p = argv[i] + env_append_opt_len + 1;
3669
lt_opt_process_env_append (p);
3671
else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
3673
lt_opt_process_env_append (argv[++i]); /* don't copy */
3676
lt_fatal ("%s missing required argument", env_append_opt);
3679
3673
if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
3681
3675
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4051
4046
return new_value;
4055
lt_split_name_value (const char *arg, char** name, char** value)
4062
p = strchr (arg, (int)'=');
4067
*value = xstrdup (++p);
4069
len = strlen (arg) - strlen (*value);
4070
*name = XMALLOC (char, len);
4071
strncpy (*name, arg, len-1);
4072
(*name)[len - 1] = '\0';
4078
lt_opt_process_env_set (const char *arg)
4083
if (lt_split_name_value (arg, &name, &value) != 0)
4087
lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
4090
lt_setenv (name, value);
4096
lt_opt_process_env_prepend (const char *arg)
4100
char *new_value = NULL;
4102
if (lt_split_name_value (arg, &name, &value) != 0)
4106
lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
4109
new_value = lt_extend_str (getenv (name), value, 0);
4110
lt_setenv (name, new_value);
4117
lt_opt_process_env_append (const char *arg)
4121
char *new_value = NULL;
4123
if (lt_split_name_value (arg, &name, &value) != 0)
4127
lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
4130
new_value = lt_extend_str (getenv (name), value, 1);
4131
lt_setenv (name, new_value);
4138
4050
lt_update_exe_path (const char *name, const char *value)
4090
/* Prepares an argument vector before calling spawn().
4091
Note that spawn() does not by itself call the command interpreter
4092
(getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
4093
({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
4095
v.dwPlatformId == VER_PLATFORM_WIN32_NT;
4096
}) ? "cmd.exe" : "command.com").
4097
Instead it simply concatenates the arguments, separated by ' ', and calls
4098
CreateProcess(). We must quote the arguments since Win32 CreateProcess()
4099
interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
4101
- Space and tab are interpreted as delimiters. They are not treated as
4102
delimiters if they are surrounded by double quotes: "...".
4103
- Unescaped double quotes are removed from the input. Their only effect is
4104
that within double quotes, space and tab are treated like normal
4106
- Backslashes not followed by double quotes are not special.
4107
- But 2*n+1 backslashes followed by a double quote become
4108
n backslashes followed by a double quote (n >= 0):
4113
#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4114
#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4116
prepare_spawn (char **argv)
4122
/* Count number of arguments. */
4123
for (argc = 0; argv[argc] != NULL; argc++)
4126
/* Allocate new argument vector. */
4127
new_argv = XMALLOC (char *, argc + 1);
4129
/* Put quoted arguments into the new argument vector. */
4130
for (i = 0; i < argc; i++)
4132
const char *string = argv[i];
4134
if (string[0] == '\0')
4135
new_argv[i] = xstrdup ("\"\"");
4136
else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
4138
int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
4140
unsigned int backslashes;
4142
char *quoted_string;
4149
for (s = string; *s != '\0'; s++)
4153
length += backslashes + 1;
4161
length += backslashes + 1;
4163
quoted_string = XMALLOC (char, length + 1);
4169
for (s = string; *s != '\0'; s++)
4175
for (j = backslashes + 1; j > 0; j--)
4187
for (j = backslashes; j > 0; j--)
4193
new_argv[i] = quoted_string;
4196
new_argv[i] = (char *) string;
4198
new_argv[argc] = NULL;
4207
void lt_dump_script (FILE* f)
4210
func_emit_wrapper yes |
4211
$SED -e 's/\([\\"]\)/\\\1/g' \
4212
-e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
4176
4218
# end: func_emit_cwrapperexe_src
4220
# func_win32_import_lib_p ARG
4221
# True if ARG is an import lib, as indicated by $file_magic_cmd
4222
func_win32_import_lib_p ()
4225
case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in
4178
4231
# func_mode_link arg...
4179
4232
func_mode_link ()
4922
4978
# -F/path gives path to uninstalled frameworks, gcc on darwin
4923
4979
# -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
4924
4980
# @file GCC response files
4981
# -tp=* Portland pgcc target processor selection
4925
4982
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4926
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
4983
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
4927
4984
func_quote_for_eval "$arg"
4928
4985
arg="$func_quote_for_eval_result"
4929
4986
func_append compile_command " $arg"
5397
5455
if test "$valid_a_lib" != yes; then
5399
5457
$ECHO "*** Warning: Trying to link with static lib archive $deplib."
5400
$ECHO "*** I have the capability to make that library automatically link in when"
5401
$ECHO "*** you link to this library. But I can only do this if you have a"
5402
$ECHO "*** shared version of the library, which you do not appear to have"
5403
$ECHO "*** because the file extensions .$libext of this argument makes me believe"
5404
$ECHO "*** that it is just a static archive that I should not use here."
5458
echo "*** I have the capability to make that library automatically link in when"
5459
echo "*** you link to this library. But I can only do this if you have a"
5460
echo "*** shared version of the library, which you do not appear to have"
5461
echo "*** because the file extensions .$libext of this argument makes me believe"
5462
echo "*** that it is just a static archive that I should not use here."
5407
5465
$ECHO "*** Warning: Linking the shared library $output against the"
5408
5466
$ECHO "*** static library $deplib is not portable!"
5409
5467
deplibs="$deplib $deplibs"
5984
6042
# Just print a warning and add the library to dependency_libs so
5985
6043
# that the program can be linked against the static library.
5987
6045
$ECHO "*** Warning: This system can not link to static lib archive $lib."
5988
$ECHO "*** I have the capability to make that library automatically link in when"
5989
$ECHO "*** you link to this library. But I can only do this if you have a"
5990
$ECHO "*** shared version of the library, which you do not appear to have."
6046
echo "*** I have the capability to make that library automatically link in when"
6047
echo "*** you link to this library. But I can only do this if you have a"
6048
echo "*** shared version of the library, which you do not appear to have."
5991
6049
if test "$module" = yes; then
5992
$ECHO "*** But as you try to build a module library, libtool will still create "
5993
$ECHO "*** a static module, that should work as long as the dlopening application"
5994
$ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
6050
echo "*** But as you try to build a module library, libtool will still create "
6051
echo "*** a static module, that should work as long as the dlopening application"
6052
echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
5995
6053
if test -z "$global_symbol_pipe"; then
5997
$ECHO "*** However, this would only work if libtool was able to extract symbol"
5998
$ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
5999
$ECHO "*** not find such a program. So, this module is probably useless."
6000
$ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
6055
echo "*** However, this would only work if libtool was able to extract symbol"
6056
echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
6057
echo "*** not find such a program. So, this module is probably useless."
6058
echo "*** \`nm' from GNU binutils and a full rebuild may help."
6002
6060
if test "$build_old_libs" = no; then
6003
6061
build_libtool_libs=module
6586
6645
oldlibs="$oldlibs $output_objdir/$libname.$libext"
6588
6647
# Transform .lo files to .o files.
6589
oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
6648
oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
6592
6651
# Eliminate all temporary directories.
6593
6652
#for path in $notinst_path; do
6594
# lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
6595
# deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
6596
# dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
6653
# lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
6654
# deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
6655
# dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
6599
6658
if test -n "$xrpath"; then
6713
6772
if test -n "$i" ; then
6714
libname=`eval "\\$ECHO \"$libname_spec\""`
6715
deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
6773
eval "libname=\"$libname_spec\""
6774
eval "deplib_matches=\"$library_names_spec\""
6716
6775
set dummy $deplib_matches; shift
6717
6776
deplib_match=$1
6718
6777
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6719
6778
newdeplibs="$newdeplibs $i"
6721
6780
droppeddeps=yes
6723
6782
$ECHO "*** Warning: dynamic linker does not accept needed library $i."
6724
$ECHO "*** I have the capability to make that library automatically link in when"
6725
$ECHO "*** you link to this library. But I can only do this if you have a"
6726
$ECHO "*** shared version of the library, which I believe you do not have"
6727
$ECHO "*** because a test_compile did reveal that the linker did not use it for"
6728
$ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
6783
echo "*** I have the capability to make that library automatically link in when"
6784
echo "*** you link to this library. But I can only do this if you have a"
6785
echo "*** shared version of the library, which I believe you do not have"
6786
echo "*** because a test_compile did reveal that the linker did not use it for"
6787
echo "*** its dynamic dependency list that programs get resolved with at runtime."
6756
6815
if test -n "$i" ; then
6757
libname=`eval "\\$ECHO \"$libname_spec\""`
6758
deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
6816
eval "libname=\"$libname_spec\""
6817
eval "deplib_matches=\"$library_names_spec\""
6759
6818
set dummy $deplib_matches; shift
6760
6819
deplib_match=$1
6761
6820
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6762
6821
newdeplibs="$newdeplibs $i"
6764
6823
droppeddeps=yes
6766
6825
$ECHO "*** Warning: dynamic linker does not accept needed library $i."
6767
$ECHO "*** I have the capability to make that library automatically link in when"
6768
$ECHO "*** you link to this library. But I can only do this if you have a"
6769
$ECHO "*** shared version of the library, which you do not appear to have"
6770
$ECHO "*** because a test_compile did reveal that the linker did not use this one"
6771
$ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
6826
echo "*** I have the capability to make that library automatically link in when"
6827
echo "*** you link to this library. But I can only do this if you have a"
6828
echo "*** shared version of the library, which you do not appear to have"
6829
echo "*** because a test_compile did reveal that the linker did not use this one"
6830
echo "*** as a dynamic dependency that programs can get resolved with at runtime."
6775
6834
droppeddeps=yes
6777
6836
$ECHO "*** Warning! Library $i is needed by this library but I was not able to"
6778
$ECHO "*** make it link in! You will probably need to install it or some"
6779
$ECHO "*** library that it depends on before this library will be fully"
6780
$ECHO "*** functional. Installing it before continuing would be even better."
6837
echo "*** make it link in! You will probably need to install it or some"
6838
echo "*** library that it depends on before this library will be fully"
6839
echo "*** functional. Installing it before continuing would be even better."
6823
6882
potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
6824
6883
case $potliblink in
6825
6884
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
6826
*) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
6885
*) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
6829
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
6888
if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null |
6831
6890
$EGREP "$file_magic_regex" > /dev/null; then
6832
6891
newdeplibs="$newdeplibs $a_deplib"
6839
6898
if test -n "$a_deplib" ; then
6840
6899
droppeddeps=yes
6842
6901
$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6843
$ECHO "*** I have the capability to make that library automatically link in when"
6844
$ECHO "*** you link to this library. But I can only do this if you have a"
6845
$ECHO "*** shared version of the library, which you do not appear to have"
6846
$ECHO "*** because I did check the linker path looking for a file starting"
6902
echo "*** I have the capability to make that library automatically link in when"
6903
echo "*** you link to this library. But I can only do this if you have a"
6904
echo "*** shared version of the library, which you do not appear to have"
6905
echo "*** because I did check the linker path looking for a file starting"
6847
6906
if test -z "$potlib" ; then
6848
6907
$ECHO "*** with $libname but no candidates were found. (...for file magic test)"
6878
6937
if test -n "$a_deplib" ; then
6879
libname=`eval "\\$ECHO \"$libname_spec\""`
6938
eval "libname=\"$libname_spec\""
6880
6939
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6881
6940
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6882
6941
for potent_lib in $potential_libs; do
6883
6942
potlib="$potent_lib" # see symlink-check above in file_magic test
6884
if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
6943
if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
6885
6944
$EGREP "$match_pattern_regex" > /dev/null; then
6886
6945
newdeplibs="$newdeplibs $a_deplib"
6893
6952
if test -n "$a_deplib" ; then
6894
6953
droppeddeps=yes
6896
6955
$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6897
$ECHO "*** I have the capability to make that library automatically link in when"
6898
$ECHO "*** you link to this library. But I can only do this if you have a"
6899
$ECHO "*** shared version of the library, which you do not appear to have"
6900
$ECHO "*** because I did check the linker path looking for a file starting"
6956
echo "*** I have the capability to make that library automatically link in when"
6957
echo "*** you link to this library. But I can only do this if you have a"
6958
echo "*** shared version of the library, which you do not appear to have"
6959
echo "*** because I did check the linker path looking for a file starting"
6901
6960
if test -z "$potlib" ; then
6902
6961
$ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
6916
6975
none | unknown | *)
6918
tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
6919
-e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
6977
tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
6920
6978
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6921
6979
for i in $predeps $postdeps ; do
6922
6980
# can't use Xsed below, because $i might contain '/'
6923
tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
6981
tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
6926
if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
6927
$GREP . >/dev/null; then
6984
case $tmp_deplibs in
6929
6987
if test "X$deplibs_check_method" = "Xnone"; then
6930
$ECHO "*** Warning: inter-library dependencies are not supported in this platform."
6988
echo "*** Warning: inter-library dependencies are not supported in this platform."
6932
$ECHO "*** Warning: inter-library dependencies are not known to be supported."
6990
echo "*** Warning: inter-library dependencies are not known to be supported."
6934
$ECHO "*** All declared inter-library dependencies are being dropped."
6992
echo "*** All declared inter-library dependencies are being dropped."
6935
6993
droppeddeps=yes
6939
6998
versuffix=$versuffix_save
6946
7005
*-*-rhapsody* | *-*-darwin1.[012])
6947
7006
# On Rhapsody replace the C library with the System framework
6948
newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7007
newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
6952
7011
if test "$droppeddeps" = yes; then
6953
7012
if test "$module" = yes; then
6955
$ECHO "*** Warning: libtool could not satisfy all declared inter-library"
7014
echo "*** Warning: libtool could not satisfy all declared inter-library"
6956
7015
$ECHO "*** dependencies of module $libname. Therefore, libtool will create"
6957
$ECHO "*** a static module, that should work as long as the dlopening"
6958
$ECHO "*** application is linked with the -dlopen flag."
7016
echo "*** a static module, that should work as long as the dlopening"
7017
echo "*** application is linked with the -dlopen flag."
6959
7018
if test -z "$global_symbol_pipe"; then
6961
$ECHO "*** However, this would only work if libtool was able to extract symbol"
6962
$ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
6963
$ECHO "*** not find such a program. So, this module is probably useless."
6964
$ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
7020
echo "*** However, this would only work if libtool was able to extract symbol"
7021
echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7022
echo "*** not find such a program. So, this module is probably useless."
7023
echo "*** \`nm' from GNU binutils and a full rebuild may help."
6966
7025
if test "$build_old_libs" = no; then
6967
7026
oldlibs="$output_objdir/$libname.$libext"
6971
7030
build_libtool_libs=no
6974
$ECHO "*** The inter-library dependencies that have been dropped here will be"
6975
$ECHO "*** automatically added whenever a program is linked with this library"
6976
$ECHO "*** or is declared to -dlopen it."
7033
echo "*** The inter-library dependencies that have been dropped here will be"
7034
echo "*** automatically added whenever a program is linked with this library"
7035
echo "*** or is declared to -dlopen it."
6978
7037
if test "$allow_undefined" = no; then
6980
$ECHO "*** Since this library must not contain undefined symbols,"
6981
$ECHO "*** because either the platform does not support them or"
6982
$ECHO "*** it was explicitly requested with -no-undefined,"
6983
$ECHO "*** libtool will only create a static version of it."
7039
echo "*** Since this library must not contain undefined symbols,"
7040
echo "*** because either the platform does not support them or"
7041
echo "*** it was explicitly requested with -no-undefined,"
7042
echo "*** libtool will only create a static version of it."
6984
7043
if test "$build_old_libs" = no; then
6985
7044
oldlibs="$output_objdir/$libname.$libext"
6986
7045
build_libtool_libs=module
7093
7153
shlibpath="$finalize_shlibpath"
7094
7154
test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
7095
7155
if test -n "$shlibpath"; then
7096
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
7156
eval $shlibpath_var=\$shlibpath\$$shlibpath_var
7157
export $shlibpath_var
7099
7160
# Get the real and link names of the library.
7100
eval shared_ext=\"$shrext_cmds\"
7101
eval library_names=\"$library_names_spec\"
7161
eval "shared_ext=\"$shrext_cmds\""
7162
eval "library_names=\"$library_names_spec\""
7102
7163
set dummy $library_names
7107
7168
if test -n "$soname_spec"; then
7108
eval soname=\"$soname_spec\"
7169
eval "soname=\"$soname_spec\""
7110
7171
soname="$realname"
7240
7301
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
7241
eval flag=\"$thread_safe_flag_spec\"
7302
eval "flag=\"$thread_safe_flag_spec\""
7242
7303
linker_flags="$linker_flags $flag"
7245
7306
# Make a backup of the uninstalled library when relinking
7246
7307
if test "$mode" = relink; then
7247
$opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
7308
$opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $?
7250
7311
# Do each of the archive commands.
7251
7312
if test "$module" = yes && test -n "$module_cmds" ; then
7252
7313
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7253
eval test_cmds=\"$module_expsym_cmds\"
7314
eval "test_cmds=\"$module_expsym_cmds\""
7254
7315
cmds=$module_expsym_cmds
7256
eval test_cmds=\"$module_cmds\"
7317
eval "test_cmds=\"$module_cmds\""
7257
7318
cmds=$module_cmds
7260
7321
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7261
eval test_cmds=\"$archive_expsym_cmds\"
7322
eval "test_cmds=\"$archive_expsym_cmds\""
7262
7323
cmds=$archive_expsym_cmds
7264
eval test_cmds=\"$archive_cmds\"
7325
eval "test_cmds=\"$archive_cmds\""
7265
7326
cmds=$archive_cmds
7348
7410
# command to the queue.
7349
7411
if test "$k" -eq 1 ; then
7350
7412
# The first file doesn't have a previous command to add.
7351
eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
7413
reload_objs=$objlist
7414
eval "concat_cmds=\"$reload_cmds\""
7353
7416
# All subsequent reloadable object files will link in
7354
7417
# the last one created.
7355
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
7418
reload_objs="$objlist $last_robj"
7419
eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\""
7357
7421
last_robj=$output_objdir/$output_la-${k}.$objext
7358
7422
func_arith $k + 1
7359
7423
k=$func_arith_result
7360
7424
output=$output_objdir/$output_la-${k}.$objext
7362
7426
func_len " $last_robj"
7363
7427
func_arith $len0 + $func_len_result
7364
7428
len=$func_arith_result
7813
7878
if test -n "$hardcode_libdir_separator" &&
7814
7879
test -n "$hardcode_libdirs"; then
7815
7880
libdir="$hardcode_libdirs"
7816
eval rpath=\" $hardcode_libdir_flag_spec\"
7881
eval "rpath=\" $hardcode_libdir_flag_spec\""
7818
7883
finalize_rpath="$rpath"
7820
7885
if test -n "$libobjs" && test "$build_old_libs" = yes; then
7821
7886
# Transform all the library objects into standard objects.
7822
compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7823
finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7887
compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
7888
finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
7826
7891
func_generate_dlsyms "$outputname" "@PROGRAM@" "no"