elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
dlself=yes
else
+ dlself=needless
export_dynamic=yes
fi
prev=
case "$arg" in
/* | [A-Za-z]:[/\\]*) ;;
*)
- absdir=`cd "$arg" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit 1
- fi
- arg="$absdir"
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
;;
esac
if test "$prev" = rpath; then
-L*)
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ if test -d "$dir"; then :
+ else
+ $echo "$modename: directory \`$dir' does not exist" 1>&2
+ exit 1
+ fi
# We need an absolute path.
case "$dir" in
/* | [A-Za-z]:[/\\]*) ;;
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"
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
;;
esac
case "$xrpath " in
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
fi
- if test -n "$dlfiles$dlprefiles"; then
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
fi
exit 1
fi
- if test -n "$dlfiles$dlprefiles"; then
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
fi
# Save some variables
name_save=$name
libname_save=$libname
- release_save=$release
- versuffix_save=$versuffix
- major_save=$major
- old_deplibs="$deplibs"
# Find libtool libraries and add their dependencies and directories
+ old_deplibs="$deplibs"
deplibs= # libraries to link (used in archive_cmds)
newdependency_libs= # all dependency libraries
uninst_path= # paths that contain uninstalled libtool libraries
- shlibpath=
new_lib_search_path=
for deplib in $old_deplibs; do
lib=
library_names=
old_library=
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
test "X$ladir" = "X$lib" && ladir="."
# We need an absolute path.
esac
laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- # Check to see that this really is a libtool archive.
- if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
- fi
-
# If the library was installed with an old release of libtool,
# it will not redefine variable installed.
installed=yes
exit 1
fi
+ if test -z "$libdir"; then
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $dir/$old_library"
+ old_convenience="$old_convenience $dir/$old_library"
+ deplibs="$deplibs $dir/$old_library"
+ continue
+ fi
+
# Find the relevant object directory and library name.
if test "X$installed" = Xyes; then
if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
fi
# Restore the variables
- versuffix=$versuffix_save
- major=$major_save
- release=$release_save
libname=$libname_save
name=$name_save
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
- if test -z "$rpath"; then
+ if test -n "$rpath"; then
case "$host" in
*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
# these systems don't actually have a c library (as such)!
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
-
linkopts="$linkopts $flag"
fi
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
fi
- if test -n "$dlfiles$dlprefiles"; then
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
fi
continue
;;
-R*)
- dir=`$echo "X$deplib" | $Xsed -e 's/^-lR/'`
+ dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
# Make sure the xrpath contains only unique directories.
case "$xrpath " in
*" $dir "*) ;;
library_names=
old_library=
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
test "X$ladir" = "X$lib" && ladir="."
# We need an absolute path.
esac
laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- # Check to see that this really is a libtool archive.
- if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
- fi
-
# If the library was installed with an old release of libtool,
# it will not redefine variable installed.
installed=yes
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
else
continue
fi
else
- $echo "$modename: error: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ $echo "$modename: error: cannot relink \`$file'" 1>&2
continue
fi
fi
# 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 "$relink_command"
if $run eval "$relink_command"; then :
else
fi
file="$outputname"
else
- $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ $echo "$modename: warning: cannot relink \`$file'" 1>&2
fi
else
# Install the binary that we compiled earlier.