2000-04-02 04:26:22 -04:00
|
|
|
--- ltmain.sh.orig Tue Dec 7 13:50:49 1999
|
|
|
|
+++ ltmain.sh Mon Jan 17 16:33:06 2000
|
1999-05-28 23:45:27 -04:00
|
|
|
@@ -54,7 +54,7 @@
|
|
|
|
# Constants.
|
|
|
|
PROGRAM=ltmain.sh
|
|
|
|
PACKAGE=libtool
|
2000-04-02 04:26:22 -04:00
|
|
|
-VERSION=1.3.4
|
|
|
|
+VERSION=1.3.4-freebsd-ports
|
|
|
|
TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
|
1999-05-28 23:45:27 -04:00
|
|
|
|
|
|
|
default_mode=
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -952,7 +952,11 @@
|
1999-05-28 23:45:27 -04:00
|
|
|
continue
|
|
|
|
;;
|
|
|
|
release)
|
|
|
|
- release="-$arg"
|
1999-09-10 21:04:52 -04:00
|
|
|
+ if test "$release_suffix" = all; then
|
|
|
|
+ release="$arg"
|
|
|
|
+ elif test "$release_suffix" = yes; then
|
|
|
|
+ release="-$arg"
|
|
|
|
+ fi
|
1999-05-28 23:45:27 -04:00
|
|
|
prev=
|
|
|
|
continue
|
|
|
|
;;
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -1005,6 +1009,7 @@
|
1999-05-28 23:45:27 -04:00
|
|
|
;;
|
|
|
|
|
|
|
|
-avoid-version)
|
|
|
|
+ build_old_libs=no
|
|
|
|
avoid_version=yes
|
|
|
|
continue
|
|
|
|
;;
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -1091,6 +1096,10 @@
|
1999-05-28 23:45:27 -04:00
|
|
|
deplibs="$deplibs $arg"
|
|
|
|
;;
|
|
|
|
|
|
|
|
+ -?thread)
|
|
|
|
+ deplibs="$deplibs $arg"
|
|
|
|
+ ;;
|
|
|
|
+
|
|
|
|
-module)
|
|
|
|
module=yes
|
|
|
|
continue
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -1168,7 +1177,7 @@
|
1999-09-20 04:40:55 -04:00
|
|
|
|
|
|
|
*.o | *.obj | *.a | *.lib)
|
|
|
|
# A standard object.
|
|
|
|
- objs="$objs $arg"
|
|
|
|
+ libobjs="$libobjs $arg"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*.lo)
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -1603,12 +1612,6 @@
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
- # How the heck are we supposed to write a wrapper for a shared library?
|
|
|
|
- if test -n "$link_against_libtool_libs"; then
|
|
|
|
- $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
|
|
|
|
- exit 1
|
|
|
|
- fi
|
|
|
|
-
|
|
|
|
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
|
|
|
|
$echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
|
|
|
|
fi
|
|
|
|
@@ -1795,6 +1798,9 @@
|
1999-05-28 23:45:27 -04:00
|
|
|
*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
|
|
|
|
# these systems don't actually have a c library (as such)!
|
|
|
|
;;
|
|
|
|
+ *-*-freebsd*)
|
|
|
|
+ # FreeBSD doesn't need this...
|
|
|
|
+ ;;
|
|
|
|
*)
|
|
|
|
# Add libc to deplibs on all other systems.
|
|
|
|
deplibs="$deplibs -lc"
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -1802,6 +1808,94 @@
|
1999-09-10 21:04:52 -04:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
+ if test -n "$rpath$xrpath"; then
|
|
|
|
+ # If the user specified any rpath flags, then add them.
|
|
|
|
+ for libdir in $rpath $xrpath; do
|
|
|
|
+ # 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
|
|
|
|
+
|
|
|
|
+ # Now hardcode the library paths
|
|
|
|
+ rpath=
|
|
|
|
+ hardcode_libdirs=
|
|
|
|
+ for libdir in $compile_rpath; do
|
|
|
|
+ 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\"
|
|
|
|
+ rpath="$rpath $flag"
|
|
|
|
+ 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" &&
|
|
|
|
+ test -n "$hardcode_libdirs"; then
|
|
|
|
+ libdir="$hardcode_libdirs"
|
|
|
|
+ eval rpath=\" $hardcode_libdir_flag_spec\"
|
|
|
|
+ fi
|
|
|
|
+ compile_rpath="$rpath"
|
|
|
|
+
|
|
|
|
+ rpath=
|
|
|
|
+ hardcode_libdirs=
|
|
|
|
+ for libdir in $finalize_rpath; do
|
|
|
|
+ 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\"
|
|
|
|
+ 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" &&
|
|
|
|
+ test -n "$hardcode_libdirs"; then
|
|
|
|
+ libdir="$hardcode_libdirs"
|
|
|
|
+ eval rpath=\" $hardcode_libdir_flag_spec\"
|
|
|
|
+ fi
|
|
|
|
+ finalize_rpath="$rpath"
|
|
|
|
+
|
|
|
|
# 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}.*"
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -1817,7 +1911,11 @@
|
1999-05-28 23:45:27 -04:00
|
|
|
|
|
|
|
# Now set the variables for building old libraries.
|
|
|
|
if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
|
|
|
|
- oldlibs="$oldlibs $output_objdir/$libname.$libext"
|
1999-09-10 21:04:52 -04:00
|
|
|
+ if test "$release_suffix" = all; then
|
|
|
|
+ oldlibs="$oldlibs $output_objdir/$libname$release.$libext"
|
|
|
|
+ else
|
|
|
|
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
|
|
|
|
+ fi
|
1999-05-28 23:45:27 -04:00
|
|
|
|
|
|
|
# Transform .lo files to .o files.
|
|
|
|
oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -2011,7 +2109,11 @@
|
1999-05-28 23:45:27 -04:00
|
|
|
echo "*** \`nm' from GNU binutils and a full rebuild may help."
|
|
|
|
fi
|
|
|
|
if test "$build_old_libs" = no; then
|
|
|
|
- oldlibs="$output_objdir/$libname.$libext"
|
1999-09-10 21:04:52 -04:00
|
|
|
+ if test "$release_suffix" = all; then
|
|
|
|
+ oldlibs="$output_objdir/$libname$release.$libext"
|
|
|
|
+ else
|
|
|
|
+ oldlibs="$output_objdir/$libname.$libext"
|
|
|
|
+ fi
|
1999-05-28 23:45:27 -04:00
|
|
|
build_libtool_libs=module
|
|
|
|
build_old_libs=yes
|
|
|
|
else
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -3059,7 +3161,11 @@
|
1999-05-28 23:45:27 -04:00
|
|
|
case "$output" in
|
|
|
|
*.la)
|
|
|
|
old_library=
|
|
|
|
- test "$build_old_libs" = yes && old_library="$libname.$libext"
|
1999-09-10 21:04:52 -04:00
|
|
|
+ if test "$release_suffix" = all; then
|
|
|
|
+ test "$build_old_libs" = yes && old_library="$libname$release.$libext"
|
|
|
|
+ else
|
|
|
|
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
|
|
|
|
+ fi
|
1999-05-28 23:45:27 -04:00
|
|
|
$show "creating $output"
|
|
|
|
|
|
|
|
if test -n "$xrpath"; then
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -3348,10 +3454,12 @@
|
1999-05-28 23:45:27 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Install the pseudo-library for information purposes.
|
|
|
|
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
|
|
|
|
- instname="$dir/$name"i
|
|
|
|
- $show "$install_prog $instname $destdir/$name"
|
|
|
|
- $run eval "$install_prog $instname $destdir/$name" || exit $?
|
|
|
|
+ if test "$install_ltlibs" = yes; then
|
|
|
|
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
|
|
|
|
+ instname="$dir/$name"i
|
|
|
|
+ $show "$install_prog $instname $destdir/$name"
|
|
|
|
+ $run eval "$install_prog $instname $destdir/$name" || exit $?
|
|
|
|
+ fi
|
|
|
|
|
|
|
|
# Maybe install the static library, too.
|
|
|
|
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
|
2000-04-02 04:26:22 -04:00
|
|
|
@@ -3440,7 +3548,6 @@
|
1999-05-28 23:45:27 -04:00
|
|
|
fi
|
|
|
|
libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
|
|
|
|
if test -n "$libdir" && test ! -f "$libfile"; then
|
|
|
|
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
|
|
|
|
finalize=no
|
|
|
|
fi
|
|
|
|
done
|