# The first argument is the name of the installation program.
install_prog="$nonopt"
+ install_prog_shell=""
+
+ # CYGNUS LOCAL: Handle /bin/sh at the start.
+ if test "$install_prog" = "${CONFIG_SHELL}"; then
+ install_prog_shell="$install_prog "
+ install_prog="$1"
+ shift
+ fi
# We need to accept at least all the BSD install flags.
dest=
shift
# Install the shared library and build the symlinks.
- $show "$install_prog $dir/$realname $destdir/$realname"
- $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
+ $show "$install_prog_shell$install_prog $dir/$realname $destdir/$realname"
+ $run eval "$install_prog_shell$install_prog $dir/$realname $destdir/$realname" || exit $?
test "X$dlname" = "X$realname" && dlname=
# Support stripping libraries.
if test -n "$dlname"; then
# Install the dynamically-loadable library.
- $show "$install_prog $dir/$dlname $destdir/$dlname"
- $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
+ $show "$install_prog_shell$install_prog $dir/$dlname $destdir/$dlname"
+ $run eval "$install_prog_shell$install_prog $dir/$dlname $destdir/$dlname" || exit $?
fi
# Do each command in the postinstall commands.
# Install the pseudo-library for information purposes.
name=`echo "$file" | sed 's%^.*/%%'`
- $show "$install_prog $file $destdir/$name"
- $run $install_prog $file $destdir/$name || exit $?
+ $show "$install_prog_shell$install_prog $file $destdir/$name"
+ $run $install_prog_shell$install_prog $file $destdir/$name || exit $?
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
# Install the libtool object if requested.
if test -n "$destfile"; then
- $show "$install_prog $file $destfile"
- $run $install_prog $file $destfile || exit $?
+ $show "$install_prog_shell$install_prog $file $destfile"
+ $run $install_prog_shell$install_prog $file $destfile || exit $?
fi
# Install the old object if enabled.
# Deduce the name of the old-style object file.
staticobj=`echo "$file" | sed 's/\.lo$/\.o/;'`
- $show "$install_prog $staticobj $staticdest"
- $run $install_prog $staticobj $staticdest || exit $?
+ $show "$install_prog_shell$install_prog $staticobj $staticdest"
+ $run $install_prog_shell$install_prog $staticobj $staticdest || exit $?
fi
exit 0
;;
fi
fi
- $show "$install_prog$stripme $file $dest"
- $run $install_prog$stripme $file $dest || exit $?
+ $show "$install_prog_shell$install_prog$stripme $file $dest"
+ $run $install_prog_shell$install_prog$stripme $file $dest || exit $?
;;
esac
done
# Set up the ranlib parameters.
oldlib="$destdir/$name"
- $show "$install_prog $file $oldlib"
- $run $install_prog $file $oldlib || exit $?
+ $show "$install_prog_shell$install_prog $file $oldlib"
+ $run $install_prog_shell$install_prog $file $oldlib || exit $?
# Support stripping libraries.
if test -n "$stripme"; then
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec $0 --finish$current_libdirs
- exit 1
+ ${CONFIG_SHELL} $0 --finish$current_libdirs
+ exit $?
fi
exit 0