* ltmain.in (progpath): 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. So, rather than
using "$0" in functions, we set $progpath in the body and use that
everywhere instead (incase of code refactoring later).
(EXIT_SUCCESS, EXIT_FAILURE, EXIT_MISMATCH): For clarity.
This commit is contained in:
Albert Chin-A-Young 2004-02-12 12:27:46 +00:00 committed by Gary V. Vaughan
parent ec1f30353c
commit 8bab449346
2 changed files with 150 additions and 125 deletions

View File

@ -1,3 +1,15 @@
2004-02-12 Albert Chin-A-Young <china@thewrittenword.com>,
Gary V. Vaughan <gary@gnu.org>
* ltmain.in (progpath): 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. So, rather than
using "$0" in functions, we set $progpath in the body and use that
everywhere instead (incase of code refactoring later).
(EXIT_SUCCESS, EXIT_FAILURE, EXIT_MISMATCH): For clarity.
2004-02-12 Gary V. Vaughan <gary@gnu.org>
* Makefile.am (EXTRA_DIST): Remove config/mailnotify after all; it

263
ltmain.in
View File

@ -24,6 +24,31 @@
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
basename="$SED 's,^.*/,,g'"
# 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.
progpath="$0"
# The name of this program:
progname=`echo "$progpath" | $basename`
modename="$progname"
# Global variables:
EXIT_SUCCESS=0
EXIT_FAILURE=1
EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
PROGRAM=ltmain.sh
PACKAGE=@PACKAGE@
VERSION=@VERSION@
TIMESTAMP="@TIMESTAMP@"
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
@ -36,7 +61,7 @@ elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
:
else
# Restart under the correct shell, and then maybe $echo will work.
exec $SHELL "$0" --no-reexec ${1+"$@"}
exec $SHELL "$progpath" --no-reexec ${1+"$@"}
fi
if test "X$1" = X--fallback-echo; then
@ -45,19 +70,9 @@ if test "X$1" = X--fallback-echo; then
cat <<EOF
$*
EOF
exit 0
exit $EXIT_SUCCESS
fi
# The name of this program.
progname=`$echo "$0" | ${SED} 's%^.*/%%'`
modename="$progname"
# Constants.
PROGRAM=ltmain.sh
PACKAGE=@PACKAGE@
VERSION=@VERSION@
TIMESTAMP="@TIMESTAMP@"
default_mode=
help="Try \`$progname --help' for more information."
magic="%%%MAGIC variable%%%"
@ -95,8 +110,7 @@ $progname: of $PACKAGE $VERSION and run autoconf again.
_LT_EOF
fi
# $? = 63 is used to indicate version mismatch to missing.
exit 63
exit $EXIT_MISMATCH
fi
# Ensure that we are using m4 macros, and libtool script from the same
@ -129,8 +143,7 @@ $progname: of $PACKAGE $VERSION and run autoconf again.
_LT_EOF
fi
# $? = 63 is used to indicate version mismatch to missing.
exit 63
exit $EXIT_MISMATCH
fi
# Sed substitution that helps us do robust quoting. It backslashifies
@ -168,7 +181,7 @@ fi
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
$echo "$modename: not configured to build any kind of library" 1>&2
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Global variables.
@ -253,9 +266,9 @@ func_infer_tag () {
# if we don't check for them as well.
*)
for z in $available_tags; do
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
CC_quoted=
for arg in $CC; do
# Double-quote args containing other shell metacharacters.
@ -283,7 +296,7 @@ func_infer_tag () {
if test -z "$tagname"; then
$echo "$modename: unable to infer tagged configuration"
$echo "$modename: specify a tag with \`--tag'" 1>&2
exit 1
exit $EXIT_FAILURE
# else
# $echo "$modename: using $tagname tagged configuration"
fi
@ -344,7 +357,7 @@ do
case $tagname in
*[!-_A-Za-z0-9,/]*)
$echo "$progname: invalid tag name: $tagname" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
@ -354,10 +367,10 @@ do
# not specially marked.
;;
*)
if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
taglist="$taglist $tagname"
# Evaluate the configuration.
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
else
$echo "$progname: ignoring unknown tag $tagname" 1>&2
fi
@ -386,16 +399,16 @@ do
$echo "Copyright (C) 2004 Free Software Foundation, Inc."
$echo "This is free software; see the source for copying conditions. There is NO"
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit 0
exit $EXIT_SUCCESS
;;
--config)
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
# Now print the configurations for the tags.
for tagname in $taglist; do
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
done
exit 0
exit $EXIT_SUCCESS
;;
--debug)
@ -420,7 +433,7 @@ do
else
$echo "disable static libraries"
fi
exit 0
exit $EXIT_SUCCESS
;;
--finish) mode="finish" ;;
@ -451,7 +464,7 @@ do
-*)
$echo "$modename: unrecognized option \`$arg'" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
;;
*)
@ -464,7 +477,7 @@ done
if test -n "$prevopt"; then
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# If this variable is set in any of the actions, the command in it
@ -475,14 +488,14 @@ exec_cmd=
if test -z "$show_help"; then
if test -z "$mode"; then
$echo "$modename: error: you must specify a MODE." 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Only execute mode is allowed to have -dlopen flags.
if test -n "$execute_dlfiles" && test "$mode" != execute; then
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Change the help message to a mode-specific one.
@ -524,7 +537,7 @@ exec_cmd=
-o)
if test -n "$libobj" ; then
$echo "$modename: you cannot specify \`-o' more than once" 1>&2
exit 1
exit $EXIT_FAILURE
fi
arg_mode=target
continue
@ -599,11 +612,11 @@ exec_cmd=
case $arg_mode in
arg)
$echo "$modename: you must specify an argument for -Xcompile"
exit 1
exit $EXIT_FAILURE
;;
target)
$echo "$modename: you must specify a target with \`-o'" 1>&2
exit 1
exit $EXIT_FAILURE
;;
*)
# Get the name of the library object.
@ -636,7 +649,7 @@ exec_cmd=
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
*)
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
@ -648,7 +661,7 @@ exec_cmd=
if test "$build_libtool_libs" != yes; then
$echo "$modename: can not build a shared library" 1>&2
$echo "Fatal configuration error." 1>&2
exit 1
exit $EXIT_FAILURE
fi
build_old_libs=no
continue
@ -684,7 +697,7 @@ exec_cmd=
if test -z "$base_compile"; then
$echo "$modename: you must specify a compilation command" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Delete any leftover library objects.
@ -695,7 +708,7 @@ exec_cmd=
fi
$run $rm $removelist
trap "$run $rm $removelist; exit 1" 1 2 15
trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
@ -714,7 +727,7 @@ exec_cmd=
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
lockfile="$output_obj.lock"
removelist="$removelist $output_obj $lockfile"
trap "$run $rm $removelist; exit 1" 1 2 15
trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
else
output_obj=
need_locks=no
@ -724,7 +737,7 @@ exec_cmd=
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
until $run ln "$0" "$lockfile" 2>/dev/null; do
until $run ln "$progpath" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
@ -742,7 +755,7 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
exit 1
exit $EXIT_FAILURE
fi
$echo $srcfile > "$lockfile"
fi
@ -797,7 +810,7 @@ EOF
if $run eval "$command"; then :
else
test -n "$output_obj" && $run $rm $removelist
exit 1
exit $EXIT_FAILURE
fi
if test "$need_locks" = warn &&
@ -817,7 +830,7 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
exit 1
exit $EXIT_FAILURE
fi
# Just move the object if needed, then go on to compile the next one
@ -869,7 +882,7 @@ EOF
if $run eval "$command"; then :
else
$run $rm $removelist
exit 1
exit $EXIT_FAILURE
fi
if test "$need_locks" = warn &&
@ -889,7 +902,7 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
exit 1
exit $EXIT_FAILURE
fi
# Just move the object if needed
@ -927,7 +940,7 @@ EOF
$run $rm "$lockfile"
fi
exit 0
exit $EXIT_SUCCESS
;;
# libtool link mode
@ -1009,7 +1022,7 @@ EOF
if test "$build_libtool_libs" != yes; then
$echo "$modename: can not build a shared library" 1>&2
$echo "Fatal configuration error." 1>&2
exit 1
exit $EXIT_FAILURE
fi
build_old_libs=no
break
@ -1107,7 +1120,7 @@ EOF
export_symbols="$arg"
if test ! -f "$arg"; then
$echo "$modename: symbol file \`$arg' does not exist"
exit 1
exit $EXIT_FAILURE
fi
prev=
continue
@ -1159,7 +1172,7 @@ EOF
test "$pic_object" = none && \
test "$non_pic_object" = none; then
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Extract subdirectory from the argument.
@ -1212,7 +1225,7 @@ EOF
# Only an error if not doing a dry-run.
if test -z "$run"; then
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
exit 1
exit $EXIT_FAILURE
else
# Dry-run case.
@ -1233,7 +1246,7 @@ EOF
done
else
$echo "$modename: link input file \`$save_arg' does not exist"
exit 1
exit $EXIT_FAILURE
fi
arg=$save_arg
prev=
@ -1245,7 +1258,7 @@ EOF
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
if test "$prev" = rpath; then
@ -1317,7 +1330,7 @@ EOF
-allow-undefined)
# FIXME: remove this flag sometime in the future.
$echo "$modename: \`-allow-undefined' must not be used because it is the default" 1>&2
exit 1
exit $EXIT_FAILURE
;;
-avoid-version)
@ -1343,7 +1356,7 @@ EOF
-export-symbols | -export-symbols-regex)
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: more than one -exported-symbols argument is not allowed"
exit 1
exit $EXIT_FAILURE
fi
if test "X$arg" = "X-export-symbols"; then
prev=expsyms
@ -1379,7 +1392,7 @@ EOF
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
dir="$absdir"
;;
@ -1530,7 +1543,7 @@ EOF
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
case "$xrpath " in
@ -1663,7 +1676,7 @@ EOF
test "$pic_object" = none && \
test "$non_pic_object" = none; then
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Extract subdirectory from the argument.
@ -1716,7 +1729,7 @@ EOF
# Only an error if not doing a dry-run.
if test -z "$run"; then
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
exit 1
exit $EXIT_FAILURE
else
# Dry-run case.
@ -1783,7 +1796,7 @@ EOF
if test -n "$prev"; then
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
@ -1827,7 +1840,7 @@ EOF
"")
$echo "$modename: you must specify an output file" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
;;
*.$libext) linkmode=oldlib ;;
*.lo | *.$objext) linkmode=obj ;;
@ -1890,7 +1903,7 @@ EOF
*.la) ;;
*)
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
done
@ -2120,14 +2133,14 @@ EOF
if test "$found" = yes || test -f "$lib"; then :
else
$echo "$modename: cannot find the library \`$lib'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Check to see that this really is a libtool archive.
if (${SED} -e '2q' $lib | $GREP "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1
exit $EXIT_FAILURE
fi
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
@ -2170,7 +2183,7 @@ EOF
if test -z "$libdir"; then
if test -z "$old_library"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# It is a libtool convenience library, so add in its objects.
convenience="$convenience $ladir/$objdir/$old_library"
@ -2187,7 +2200,7 @@ EOF
done
elif test "$linkmode" != prog && test "$linkmode" != lib; then
$echo "$modename: \`$lib' is not a convenience library" 1>&2
exit 1
exit $EXIT_FAILURE
fi
continue
fi # $pass = conv
@ -2200,14 +2213,14 @@ EOF
done
if test -z "$linklib"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# This library was specified with -dlopen.
if test "$pass" = dlopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
# If there is no dlname, no dlopen support or we're linking
@ -2265,7 +2278,7 @@ EOF
if test "$pass" = dlpreopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Prefer using a static library (so that no silly _DYNAMIC symbols
# are required to link).
@ -2539,7 +2552,7 @@ EOF
if test "$lib_linked" != yes; then
$echo "$modename: configuration error: unsupported hardcode properties"
exit 1
exit $EXIT_FAILURE
fi
if test -n "$add_shlibpath"; then
@ -2719,7 +2732,7 @@ EOF
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit 1
exit $EXIT_FAILURE
fi
if test "$absdir" != "$libdir"; then
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
@ -2939,7 +2952,7 @@ EOF
if test "$module" = no; then
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
if test "$need_lib_prefix" != no; then
# Add the "lib" prefix for modules if required
@ -2955,7 +2968,7 @@ EOF
if test -n "$objs"; then
if test "$deplibs_check_method" != pass_all; then
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
exit 1
exit $EXIT_FAILURE
else
$echo
$echo "*** Warning: Linking the shared library $output against the non-libtool"
@ -3003,7 +3016,7 @@ EOF
if test -n "$8"; then
$echo "$modename: too many parameters to \`-version-info'" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# convert absolute version numbers to libtool ages
@ -3053,7 +3066,7 @@ EOF
*)
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
@ -3062,7 +3075,7 @@ EOF
*)
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
@ -3071,14 +3084,14 @@ EOF
*)
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
if test "$age" -gt "$current"; then
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Calculate the version variables.
@ -3167,7 +3180,7 @@ EOF
*)
$echo "$modename: unknown library version type \`$version_type'" 1>&2
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
@ -4010,7 +4023,7 @@ EOF
# Restore the uninstalled library and exit
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
exit 0
exit $EXIT_SUCCESS
fi
# Create links to the real library.
@ -4058,7 +4071,7 @@ EOF
*.lo)
if test -n "$objs$old_deplibs"; then
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
exit 1
exit $EXIT_FAILURE
fi
libobj="$output"
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
@ -4169,7 +4182,7 @@ EOF
$run ${rm}r $gentop
fi
exit 0
exit $EXIT_SUCCESS
fi
if test "$build_libtool_libs" != yes; then
@ -4182,7 +4195,7 @@ EOF
# accidentally link it into a program.
# $show "echo timestamp > $libobj"
# $run eval "echo timestamp > $libobj" || exit $?
exit 0
exit $EXIT_SUCCESS
fi
if test -n "$pic_flag" || test "$pic_mode" != default; then
@ -4205,7 +4218,7 @@ EOF
$run ${rm}r $gentop
fi
exit 0
exit $EXIT_SUCCESS
;;
prog)
@ -4526,7 +4539,7 @@ static const void *lt_preloaded_setup() {
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
else
@ -4614,7 +4627,7 @@ static const void *lt_preloaded_setup() {
# Link the executable and exit
$show "$link_command"
$run eval "$link_command" || exit $?
exit 0
exit $EXIT_SUCCESS
fi
if test "$hardcode_action" = relink; then
@ -4669,10 +4682,10 @@ static const void *lt_preloaded_setup() {
fi
# Quote $echo for shipping.
if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
case $0 in
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
case $progpath in
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
esac
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
else
@ -4698,7 +4711,7 @@ static const void *lt_preloaded_setup() {
cwrappersource=`$echo ${objdir}/lt-${output}.c`
cwrapper=`$echo ${output}.exe`
$rm $cwrappersource $cwrapper
trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
cat > $cwrappersource <<EOF
@ -5031,7 +5044,7 @@ EOF
;;
esac
$rm $output
trap "$rm $output; exit 1" 1 2 15
trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
@ -5206,7 +5219,7 @@ fi\
"
chmod +x $output
fi
exit 0
exit $EXIT_SUCCESS
;;
esac
@ -5388,7 +5401,7 @@ fi\
fi
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then
relink_command=
@ -5410,7 +5423,7 @@ fi\
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit 1
exit $EXIT_FAILURE
fi
newdependency_libs="$newdependency_libs $libdir/$name"
;;
@ -5424,7 +5437,7 @@ fi\
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1
exit $EXIT_FAILURE
fi
newdlfiles="$newdlfiles $libdir/$name"
done
@ -5435,7 +5448,7 @@ fi\
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1
exit $EXIT_FAILURE
fi
newdlprefiles="$newdlprefiles $libdir/$name"
done
@ -5515,7 +5528,7 @@ relink_command=\"$relink_command\""
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
;;
esac
exit 0
exit $EXIT_SUCCESS
;;
# libtool install mode
@ -5604,13 +5617,13 @@ relink_command=\"$relink_command\""
if test -z "$install_prog"; then
$echo "$modename: you must specify an install program" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
if test -n "$prev"; then
$echo "$modename: the \`$prev' option requires an argument" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
if test -z "$files"; then
@ -5620,7 +5633,7 @@ relink_command=\"$relink_command\""
$echo "$modename: you must specify a destination" 1>&2
fi
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Strip any trailing slash from the destination.
@ -5641,7 +5654,7 @@ relink_command=\"$relink_command\""
if test "$#" -gt 2; then
$echo "$modename: \`$dest' is not a directory" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
fi
case $destdir in
@ -5653,7 +5666,7 @@ relink_command=\"$relink_command\""
*)
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
done
@ -5682,7 +5695,7 @@ relink_command=\"$relink_command\""
else
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
library_names=
@ -5724,7 +5737,7 @@ relink_command=\"$relink_command\""
# but it's something to keep an eye on.
if test "$inst_prefix_dir" = "$destdir"; then
$echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
exit 1
exit $EXIT_FAILURE
fi
if test -n "$inst_prefix_dir"; then
@ -5739,7 +5752,7 @@ relink_command=\"$relink_command\""
if $run eval "$relink_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
exit 1
exit $EXIT_FAILURE
fi
fi
@ -5818,7 +5831,7 @@ relink_command=\"$relink_command\""
*)
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
@ -5836,7 +5849,7 @@ relink_command=\"$relink_command\""
$show "$install_prog $staticobj $staticdest"
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
fi
exit 0
exit $EXIT_SUCCESS
;;
*)
@ -5890,7 +5903,7 @@ relink_command=\"$relink_command\""
# Check the variables that should have been set.
if test -z "$notinst_deplibs"; then
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
finalize=yes
@ -6019,9 +6032,9 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
exec_cmd='$SHELL $0 $preserve_args --finish$current_libdirs'
exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
else
exit 0
exit $EXIT_SUCCESS
fi
;;
@ -6061,7 +6074,7 @@ relink_command=\"$relink_command\""
fi
# Exit here if they wanted silent mode.
test "$show" = : && exit 0
test "$show" = : && exit $EXIT_SUCCESS
$echo "----------------------------------------------------------------------"
$echo "Libraries have been installed in:"
@ -6097,7 +6110,7 @@ relink_command=\"$relink_command\""
$echo "See any operating system documentation about shared libraries for"
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
$echo "----------------------------------------------------------------------"
exit 0
exit $EXIT_SUCCESS
;;
# libtool execute mode
@ -6109,7 +6122,7 @@ relink_command=\"$relink_command\""
if test -z "$cmd"; then
$echo "$modename: you must specify a COMMAND" 1>&2
$echo "$help"
exit 1
exit $EXIT_FAILURE
fi
# Handle -dlopen flags immediately.
@ -6117,7 +6130,7 @@ relink_command=\"$relink_command\""
if test ! -f "$file"; then
$echo "$modename: \`$file' is not a file" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
dir=
@ -6128,7 +6141,7 @@ relink_command=\"$relink_command\""
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
# Read the libtool library.
@ -6155,7 +6168,7 @@ relink_command=\"$relink_command\""
dir="$dir/$objdir"
else
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
exit 1
exit $EXIT_FAILURE
fi
;;
@ -6235,7 +6248,7 @@ relink_command=\"$relink_command\""
$echo "export $shlibpath_var"
fi
$echo "$cmd$args"
exit 0
exit $EXIT_SUCCESS
fi
;;
@ -6263,7 +6276,7 @@ relink_command=\"$relink_command\""
if test -z "$rm"; then
$echo "$modename: you must specify an RM program" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
rmdirs=
@ -6422,20 +6435,20 @@ relink_command=\"$relink_command\""
"")
$echo "$modename: you must specify a MODE" 1>&2
$echo "$generic_help" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
if test -z "$exec_cmd"; then
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$generic_help" 1>&2
exit 1
exit $EXIT_FAILURE
fi
fi # test -z "$show_help"
if test -n "$exec_cmd"; then
eval exec "$exec_cmd"
exit 1
exit $EXIT_FAILURE
fi
# We need to display help for each of the modes.
@ -6471,7 +6484,7 @@ MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
a more detailed description of MODE.
Report bugs to <bug-libtool@gnu.org>."
exit 0
exit $EXIT_SUCCESS
;;
clean)
@ -6629,14 +6642,14 @@ Otherwise, only FILE itself is deleted using RM."
*)
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$help" 1>&2
exit 1
exit $EXIT_FAILURE
;;
esac
$echo
$echo "Try \`$modename --help' for more information about other modes."
exit 0
exit $EXIT_SUCCESS
# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting