allow_undefined=yes
;;
esac
- compile_command="$CC@BUILD_LIBDIRS_FLAGS@"
+ compile_command="$CC"
finalize_command="$CC"
+ compile_rpath=
+ finalize_rpath=
compile_shlibpath=
finalize_shlibpath=
convenience=
# get the directories listed in $shlibpath_var
eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
else
- libsearch_path=
+ lib_search_path=
fi
# now prepend the system-specific ones
eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
export_symbols=
export_symbols_regex=
generated=
- hardcode_libdirs=
libobjs=
link_against_libtool_libs=
ltlibs=
for deplib in $dependency_libs; do
case "$deplib" in
-R*) temp_xrpath=`echo "X$deplib" | $Xsed -e 's/^-R//'`
- case " $rpath $xrpath " in
+ case " $rpath $xrpath " in
*" $temp_xrpath "*) ;;
*) xrpath="$xrpath $temp_xrpath";;
esac;;
esac
fi
- # This is the magic to use -rpath.
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$libdir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- libdir=
- fi
- fi
-
- if test -n "$libdir"; then
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- compile_command="$compile_command $flag"
- finalize_command="$finalize_command $flag"
+ # We need an absolute path.
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
+ exit 1
fi
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $absdir "*) ;;
- *) perm_rpath="$perm_rpath $absdir" ;;
- esac
- fi
-
+ ;;
+ esac
+
+ # This is the magic to use -rpath.
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir" ;;
+ esac
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
lib_linked=yes
case "$hardcode_action" in
;;
relink)
- # We need an absolute path.
- case "$dir" in
- /* | [A-Za-z]:[/\\]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit 1
- fi
- dir="$absdir"
- ;;
- esac
-
if test "$hardcode_direct" = yes; then
- compile_command="$compile_command $dir/$linklib"
- deplibs="$deplibs $dir/$linklib"
+ compile_command="$compile_command $absdir/$linklib"
+ deplibs="$deplibs $absdir/$linklib"
elif test "$hardcode_minus_L" = yes; then
case "$compile_command " in
- *" -L$dir "*) ;;
- *) compile_command="$compile_command -L$dir";;
+ *" -L$absdir "*) ;;
+ *) compile_command="$compile_command -L$absdir";;
esac
compile_command="$compile_command -l$name"
- deplibs="$deplibs -L$dir -l$name"
+ deplibs="$deplibs -L$absdir -l$name"
elif test "$hardcode_shlibpath_var" = yes; then
case ":$compile_shlibpath:" in
- *":$dir:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$dir:";;
+ *":$absdir:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$absdir:";;
esac
compile_command="$compile_command -l$name"
deplibs="$deplibs -l$name"
# Create the output directory, or remove our outputs if we need to.
if test -d $output_objdir; then
- $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
- $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+
+ if test -z "$run" && test -f "$output_objdir/$objdir/$outputname"; then
+ $echo "$modename: warning: $output_objdir/$objdir/$outputname could not be removed" 1>&2
+ fi
else
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
linkopts="$linkopts $flag"
fi
-
+
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
done
IFS="$save_ifs"
if test -n "$export_symbols_regex"; then
- $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"$export_symbols\"T"
- $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "$export_symbols"T'
- $show "$mv \"$export_symbols\"T \"$export_symbols\""
- $run eval '$mv "$export_symbols"T "$export_symbols"'
+ $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
fi
fi
fi
if test -n "$rpath$xrpath"; then
# If the user specified any rpath flags, then add them.
for libdir in $rpath $xrpath; do
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$libdir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- libdir=
- fi
- fi
-
- if test -n "$libdir"; then
- eval flag=\"$hardcode_libdir_flag_spec\"
+ # This is the magic to use -rpath.
+ case "$compile_rpath " in
+ *" $libdir "*) ;;
+ *) compile_rpath="$compile_rpath $libdir" ;;
+ esac
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
- compile_command="$compile_command $flag"
- finalize_command="$finalize_command $flag"
+ # Now hardcode the library paths
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath; do
+ # Skip directories that are in the system search path
+ case " $sys_lib_search_path " in
+ *" $libdir "*) continue ;;
+ *) ;;
+ esac
+
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
- elif test -n "$runpath_var"; then
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
+ rpath="$rpath $flag"
fi
- done
- fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ # Skip directories that are in the system search path
+ case " $sys_lib_search_path " in
+ *" $libdir "*) continue ;;
+ *) ;;
+ esac
+
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
- # Substitute the hardcoded libdirs into the compile commands.
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator"; then
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%@HARDCODE_BUILD_LIBDIRS@$hardcode_libdirs%g"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
fi
+ finalize_rpath="$rpath"
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
if test "X$output_objdir" = "X$output"; then
dlsyms=
if test -n "$dlfiles$dlprefiles" || test "$dlself" = yes; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
dlsyms="${outputname}S.c"
else
$echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
/* External symbol declarations for the compiler. */\
"
- if test "$dlself" = yes; then
- if test -n "$export_symbols"; then
- $run eval 'sed -e "s/^\(.*\)/\1 \1/" < "$export_symbols" > "$nlist"'
- else
- # Add our own program objects to the preloaded list.
- progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- for arg in $progfiles; do
- $show "extracting global C symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
+ # Prepare the list of exported symbols
+ if test "$dlself" = yes && test -z "$export_symbols"; then
+ $show "generating symbol list for \`$output'"
+ export_symbols="$objdir/$output.exp"
+ $run $rm $export_symbols
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for arg in $progfiles; do
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$export_symbols'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $run eval 'egrep -v "^($exclude_expsyms)" "$export_symbols" > "${export_symbols}T"'
+ $run eval '$mv ${export_symbols}T $export_symbols'
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
fi
fi
+ if test "$dlself" = yes; then
+ $run eval 'sed -e "s/^\(.*\)/\1 \1/" < "$export_symbols" > "$nlist"'
+ fi
+
for arg in $dlprefiles; do
$show "extracting global C symbols from \`$arg'"
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
# First entry is the program itself
echo >> "$output_objdir/$dlsyms" "\
{\"@PROGRAM@\", (lt_ptr_t) 0},"
- if test -n "$export_symbols"; then
- sed 's/^\(.*\)/ {"\1", (lt_ptr_t) \&\1},/' < "$export_symbols" >> "$output_objdir/$dlsyms"
- else
- $rm "$nlist"
- for arg in $progfiles; do
- eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -f "$nlist"; then
- if test -n "$exclude_expsyms"; then
- egrep -v "^($exclude_expsyms) " "$nlist" > "$nlist"T
- $mv "$nlist"T "$nlist"
- fi
-
- sed 's/^\(.*\) \(.*\)$/ {"\1", (lt_ptr_t) \&\2},/' < "$nlist" >> "$output_objdir/$dlsyms"
- else
- echo '/* NONE */' >> "$output_objdir/$dlsyms"
- fi
- fi
+ sed 's/^\(.*\)/ {"\1", (lt_ptr_t) \&\1},/' < "$export_symbols" >> "$output_objdir/$dlsyms"
fi
for arg in $dlprefiles; do
if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g' -e 's%@BUILD_LIBDIRS_FLAGS@%%' -e 's%@HARDCODE_BUILD_LIBDIRS@%%'`
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
- $show "$compile_command"
- $run eval "$compile_command"
+ $show "$link_command"
+ $run eval "$link_command"
exit $?
fi
- # Create the binary in the object directory, then wrap it.
- if test ! -d $output_objdir; then
- $show "$mkdir $output_objdir"
- $run $mkdir $output_objdir
- status=$?
- if test $status -ne 0 && test ! -d $objdir; then
- exit $status
- fi
- fi
-
- if test "$shlibpath_overrides_runpath" != yes; then
- build_libdirs_flags=
- build_libdirs=
- build_rpath=
-
- for libdir in $temp_rpath; do
- case "$libdir" in
- /* | [A-Za-z]:[/\\]*)
- # Absolute path, ok.
- ;;
- *)
- # Relative path: add a thisdir entry.
- libdir="@THISDIR@/$libdir"
- ;;
- esac
-
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$build_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- build_libdirs="$libdir$hardcode_libdir_separator"
- ;;
- esac
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$build_libdirs$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- build_libdirs="$build_libdirs$libdir$hardcode_libdir_separator"
- ;;
- esac
- fi
- else
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- build_libdirs_flags="$build_libdirs_flags $flag"
- fi
-
- elif test -n "$runpath_var"; then
- case ":$build_rpath" in
- *":$libdir:"*) ;;
- *)
- case " $perm_rpath " in
- *" $libdir "*) ;;
- *) build_rpath="$build_rpath$libdir:" ;;
- esac
- ;;
- esac
- fi
- done
-
- $run $rm "$output_objdir/$objdir/$outputname"
-
- if test -z "$run" && test -f "$output_objdir/$objdir/$outputname"; then
- $echo "$modename: warning: $output_objdir/$objdir/$outputname could not be removed" 1>&2
- fi
- fi
-
if test -n "$shlibpath_var"; then
# We should set the shlibpath_var
rpath=
temp_rpath="$rpath"
fi
- # Delete the old output file.
- $run $rm $output
-
if test -n "$compile_shlibpath"; then
compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command"
fi
finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
fi
+ compile_var=
+ finalize_var=
if test -n "$runpath_var"; then
if test -n "$perm_rpath"; then
# We should set the runpath_var.
for dir in $perm_rpath; do
rpath="$rpath$dir:"
done
- compile_command="$runpath_var=\"@BUILD_RPATH@$rpath\$$runpath_var\" $compile_command"
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
fi
fi
if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
# AGH! Flame the AIX and HP-UX people for me, will ya?
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
$echo "$modename: \`$output' will be relinked during installation" 1>&2
+ elif test "$shlibpath_overrides_rpath" = yes; then
+ # Fast installation is not necessary
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ relink_command=
+ else
+ if test "$fast_install" = yes; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ relink_command="$compile_var$compile_command$compile_rpath"
+ relink_command=`echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
fi
- if test "$shlibpath_overrides_runpath" != yes; then
- compile_for_build_command=`echo "X$compile_command" | $Xsed -e "s%@BUILD_LIBDIRS_FLAGS@%$build_libdirs_flags%" -e "s%@BUILD_RPATH@%$build_rpath%" -e "s%@HARDCODE_BUILD_LIBDIRS@%$build_libdirs%" -e 's%@THISDIR@%\$thisdir%g' -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Create the binary in the object directory, then wrap it.
+ if test ! -d $output_objdir; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $objdir; then
+ exit $status
+ fi
fi
- # Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@BUILD_LIBDIRS_FLAGS@%%' -e 's%@BUILD_RPATH@%%' -e 's%@HARDCODE_BUILD_LIBDIRS@%%'`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'T%g'`
+ # Delete the old output file.
+ $run $rm $output
- $show "$compile_command"
- $run eval "$compile_command" || exit $?
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
# Now create the wrapper script.
$show "creating $output"
- # Quote the finalize command for shipping.
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"`
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ relink_command="cd `pwd`; $relink_command"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
# Quote $echo for shipping.
if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
# if CDPATH is set.
if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
+relink_command=\"$relink_command\"
+
# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variables:
+ # install mode needs the following variable:
link_against_libtool_libs='$link_against_libtool_libs'
- finalize_command=\"cd `pwd | sed -e $sed_quote_subst`; $finalize_command\"
else
# When we are sourced in execute mode, \$file and \$echo are already set.
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Try to get the absolute directory name.
absdir=\`cd \"\$thisdir\" && pwd\`
test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
- program='$outputname'"
-
- if test "$shlibpath_overrides_runpath" = yes; then
- echo >> $output " progdir=\"\$thisdir/$objdir\""
- else
+ if test "$fast_install" = yes; then
echo >> $output "\
- progdir=\"\$thisdir/$objdir/$objdir\"
-
+ program='$outputname'T
+ progdir=\"\$thisdir/$objdir\"
+
if test ! -f \"\$progdir/\$program\" || \\
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
echo >> $output "\
- # link executable that uses uninstalled libraries
- if (cd \"\$thisdir\" && $compile_for_build_command); then :
- else
- $rm \"\$progdir/\$file\"
- exit 1
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if (cd \"\$thisdir\" && eval \$relink_command); then :
+ else
+ $rm \"\$progdir/\$file\"
+ exit 1
+ fi
fi
$mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
$mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
$rm \"\$progdir/\$file\"
fi"
+ else
+ echo >> $output "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
fi
echo >> $output "\
# Do a test to see if this is really a libtool program.
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
link_against_libtool_libs=
- finalize_command=
+ relink_command=
# If there is no directory component, then add one.
case "$file" in
esac
# Check the variables that should have been set.
- if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then
+ if test -z "$link_against_libtool_libs"; then
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
exit 1
fi
fi
done
- if test "$hardcode_action" = relink; then
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes; then
+ outputname="/tmp/$$-$file"
+ # Replace the output file specification.
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
$echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
- $show "$finalize_command"
- if $run eval "$finalize_command"; then :
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
continue
fi
- file="$objdir/$file"T
+ file="$outputname"
else
$echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
fi
$show "$install_prog$stripme $file $destfile"
$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ test -n "$outputname" && $rm $outputname
;;
esac
done