|
Lines 1-234
Link Here
|
| 1 |
--- ltmain.sh.orig Tue Dec 7 13:50:49 1999 |
1 |
|
| 2 |
+++ ltmain.sh Mon Jan 17 16:33:06 2000 |
2 |
$FreeBSD$ |
| 3 |
@@ -54,7 +54,7 @@ |
3 |
|
| 4 |
# Constants. |
4 |
--- ltmain.sh.orig Mon Sep 10 22:33:26 2001 |
| 5 |
PROGRAM=ltmain.sh |
5 |
+++ ltmain.sh Mon Jan 14 17:43:05 2002 |
| 6 |
PACKAGE=libtool |
6 |
@@ -2444,6 +2444,9 @@ |
| 7 |
-VERSION=1.3.4 |
7 |
*-*-openbsd*) |
| 8 |
+VERSION=1.3.4-freebsd-ports |
8 |
# Do not include libc due to us having libc/libc_r. |
| 9 |
TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)" |
9 |
;; |
| 10 |
|
10 |
+ *-*-freebsd*) |
| 11 |
default_mode= |
11 |
+ # FreeBSD doesn't need this... |
| 12 |
@@ -952,7 +952,11 @@ |
12 |
+ ;; |
| 13 |
continue |
13 |
*) |
| 14 |
;; |
14 |
# Add libc to deplibs on all other systems if necessary. |
| 15 |
release) |
15 |
if test $build_libtool_need_lc = "yes"; then |
| 16 |
- release="-$arg" |
16 |
@@ -4210,10 +4213,12 @@ |
| 17 |
+ if test "$release_suffix" = all; then |
|
|
| 18 |
+ release="$arg" |
| 19 |
+ elif test "$release_suffix" = yes; then |
| 20 |
+ release="-$arg" |
| 21 |
+ fi |
| 22 |
prev= |
| 23 |
continue |
| 24 |
;; |
| 25 |
@@ -1005,6 +1009,7 @@ |
| 26 |
;; |
| 27 |
|
| 28 |
-avoid-version) |
| 29 |
+ build_old_libs=no |
| 30 |
avoid_version=yes |
| 31 |
continue |
| 32 |
;; |
| 33 |
@@ -1091,6 +1096,10 @@ |
| 34 |
deplibs="$deplibs $arg" |
| 35 |
;; |
| 36 |
|
| 37 |
+ -?thread) |
| 38 |
+ deplibs="$deplibs $arg" |
| 39 |
+ ;; |
| 40 |
+ |
| 41 |
-module) |
| 42 |
module=yes |
| 43 |
continue |
| 44 |
@@ -1168,7 +1177,7 @@ |
| 45 |
|
| 46 |
*.o | *.obj | *.a | *.lib) |
| 47 |
# A standard object. |
| 48 |
- objs="$objs $arg" |
| 49 |
+ libobjs="$libobjs $arg" |
| 50 |
;; |
| 51 |
|
| 52 |
*.lo) |
| 53 |
@@ -1603,12 +1612,6 @@ |
| 54 |
exit 1 |
| 55 |
fi |
| 56 |
|
| 57 |
- # How the heck are we supposed to write a wrapper for a shared library? |
| 58 |
- if test -n "$link_against_libtool_libs"; then |
| 59 |
- $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 |
| 60 |
- exit 1 |
| 61 |
- fi |
| 62 |
- |
| 63 |
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
| 64 |
$echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 |
| 65 |
fi |
| 66 |
@@ -1795,6 +1798,9 @@ |
| 67 |
*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) |
| 68 |
# these systems don't actually have a c library (as such)! |
| 69 |
;; |
| 70 |
+ *-*-freebsd*) |
| 71 |
+ # FreeBSD doesn't need this... |
| 72 |
+ ;; |
| 73 |
*) |
| 74 |
# Add libc to deplibs on all other systems. |
| 75 |
deplibs="$deplibs -lc" |
| 76 |
@@ -1802,6 +1808,94 @@ |
| 77 |
esac |
| 78 |
fi |
| 79 |
|
| 80 |
+ if test -n "$rpath$xrpath"; then |
| 81 |
+ # If the user specified any rpath flags, then add them. |
| 82 |
+ for libdir in $rpath $xrpath; do |
| 83 |
+ # This is the magic to use -rpath. |
| 84 |
+ case "$compile_rpath " in |
| 85 |
+ *" $libdir "*) ;; |
| 86 |
+ *) compile_rpath="$compile_rpath $libdir" ;; |
| 87 |
+ esac |
| 88 |
+ case "$finalize_rpath " in |
| 89 |
+ *" $libdir "*) ;; |
| 90 |
+ *) finalize_rpath="$finalize_rpath $libdir" ;; |
| 91 |
+ esac |
| 92 |
+ done |
| 93 |
+ fi |
| 94 |
+ |
| 95 |
+ # Now hardcode the library paths |
| 96 |
+ rpath= |
| 97 |
+ hardcode_libdirs= |
| 98 |
+ for libdir in $compile_rpath; do |
| 99 |
+ if test -n "$hardcode_libdir_flag_spec"; then |
| 100 |
+ if test -n "$hardcode_libdir_separator"; then |
| 101 |
+ if test -z "$hardcode_libdirs"; then |
| 102 |
+ hardcode_libdirs="$libdir" |
| 103 |
+ else |
| 104 |
+ # Just accumulate the unique libdirs. |
| 105 |
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in |
| 106 |
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
| 107 |
+ ;; |
| 108 |
+ *) |
| 109 |
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
| 110 |
+ ;; |
| 111 |
+ esac |
| 112 |
+ fi |
| 113 |
+ else |
| 114 |
+ eval flag=\"$hardcode_libdir_flag_spec\" |
| 115 |
+ rpath="$rpath $flag" |
| 116 |
+ fi |
| 117 |
+ elif test -n "$runpath_var"; then |
| 118 |
+ case "$perm_rpath " in |
| 119 |
+ *" $libdir "*) ;; |
| 120 |
+ *) perm_rpath="$perm_rpath $libdir" ;; |
| 121 |
+ esac |
| 122 |
+ fi |
| 123 |
+ done |
| 124 |
+ # Substitute the hardcoded libdirs into the rpath. |
| 125 |
+ if test -n "$hardcode_libdir_separator" && |
| 126 |
+ test -n "$hardcode_libdirs"; then |
| 127 |
+ libdir="$hardcode_libdirs" |
| 128 |
+ eval rpath=\" $hardcode_libdir_flag_spec\" |
| 129 |
+ fi |
| 130 |
+ compile_rpath="$rpath" |
| 131 |
+ |
| 132 |
+ rpath= |
| 133 |
+ hardcode_libdirs= |
| 134 |
+ for libdir in $finalize_rpath; do |
| 135 |
+ if test -n "$hardcode_libdir_flag_spec"; then |
| 136 |
+ if test -n "$hardcode_libdir_separator"; then |
| 137 |
+ if test -z "$hardcode_libdirs"; then |
| 138 |
+ hardcode_libdirs="$libdir" |
| 139 |
+ else |
| 140 |
+ # Just accumulate the unique libdirs. |
| 141 |
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in |
| 142 |
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
| 143 |
+ ;; |
| 144 |
+ *) |
| 145 |
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
| 146 |
+ ;; |
| 147 |
+ esac |
| 148 |
+ fi |
| 149 |
+ else |
| 150 |
+ eval flag=\"$hardcode_libdir_flag_spec\" |
| 151 |
+ rpath="$rpath $flag" |
| 152 |
+ fi |
| 153 |
+ elif test -n "$runpath_var"; then |
| 154 |
+ case "$finalize_perm_rpath " in |
| 155 |
+ *" $libdir "*) ;; |
| 156 |
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; |
| 157 |
+ esac |
| 158 |
+ fi |
| 159 |
+ done |
| 160 |
+ # Substitute the hardcoded libdirs into the rpath. |
| 161 |
+ if test -n "$hardcode_libdir_separator" && |
| 162 |
+ test -n "$hardcode_libdirs"; then |
| 163 |
+ libdir="$hardcode_libdirs" |
| 164 |
+ eval rpath=\" $hardcode_libdir_flag_spec\" |
| 165 |
+ fi |
| 166 |
+ finalize_rpath="$rpath" |
| 167 |
+ |
| 168 |
# Create the output directory, or remove our outputs if we need to. |
| 169 |
if test -d $output_objdir; then |
| 170 |
$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" |
| 171 |
@@ -1817,7 +1911,11 @@ |
| 172 |
|
| 173 |
# Now set the variables for building old libraries. |
| 174 |
if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then |
| 175 |
- oldlibs="$oldlibs $output_objdir/$libname.$libext" |
| 176 |
+ if test "$release_suffix" = all; then |
| 177 |
+ oldlibs="$oldlibs $output_objdir/$libname$release.$libext" |
| 178 |
+ else |
| 179 |
+ oldlibs="$oldlibs $output_objdir/$libname.$libext" |
| 180 |
+ fi |
| 181 |
|
| 182 |
# Transform .lo files to .o files. |
| 183 |
oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` |
| 184 |
@@ -2011,7 +2109,11 @@ |
| 185 |
echo "*** \`nm' from GNU binutils and a full rebuild may help." |
| 186 |
fi |
| 187 |
if test "$build_old_libs" = no; then |
| 188 |
- oldlibs="$output_objdir/$libname.$libext" |
| 189 |
+ if test "$release_suffix" = all; then |
| 190 |
+ oldlibs="$output_objdir/$libname$release.$libext" |
| 191 |
+ else |
| 192 |
+ oldlibs="$output_objdir/$libname.$libext" |
| 193 |
+ fi |
| 194 |
build_libtool_libs=module |
| 195 |
build_old_libs=yes |
| 196 |
else |
| 197 |
@@ -3059,7 +3161,11 @@ |
| 198 |
case "$output" in |
| 199 |
*.la) |
| 200 |
old_library= |
| 201 |
- test "$build_old_libs" = yes && old_library="$libname.$libext" |
| 202 |
+ if test "$release_suffix" = all; then |
| 203 |
+ test "$build_old_libs" = yes && old_library="$libname$release.$libext" |
| 204 |
+ else |
| 205 |
+ test "$build_old_libs" = yes && old_library="$libname.$libext" |
| 206 |
+ fi |
| 207 |
$show "creating $output" |
| 208 |
|
| 209 |
if test -n "$xrpath"; then |
| 210 |
@@ -3348,10 +3454,12 @@ |
| 211 |
fi |
17 |
fi |
| 212 |
|
18 |
|
| 213 |
# Install the pseudo-library for information purposes. |
19 |
# Install the pseudo-library for information purposes. |
| 214 |
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
20 |
+ if test `uname -s` != "FreeBSD"; then |
| 215 |
- instname="$dir/$name"i |
21 |
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
| 216 |
- $show "$install_prog $instname $destdir/$name" |
22 |
instname="$dir/$name"i |
| 217 |
- $run eval "$install_prog $instname $destdir/$name" || exit $? |
23 |
$show "$install_prog $instname $destdir/$name" |
| 218 |
+ if test "$install_ltlibs" = yes; then |
24 |
$run eval "$install_prog $instname $destdir/$name" || exit $? |
| 219 |
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
|
|
| 220 |
+ instname="$dir/$name"i |
| 221 |
+ $show "$install_prog $instname $destdir/$name" |
| 222 |
+ $run eval "$install_prog $instname $destdir/$name" || exit $? |
| 223 |
+ fi |
25 |
+ fi |
| 224 |
|
26 |
|
| 225 |
# Maybe install the static library, too. |
27 |
# Maybe install the static library, too. |
| 226 |
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" |
28 |
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" |
| 227 |
@@ -3440,7 +3548,6 @@ |
|
|
| 228 |
fi |
| 229 |
libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" |
| 230 |
if test -n "$libdir" && test ! -f "$libfile"; then |
| 231 |
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 |
| 232 |
finalize=no |
| 233 |
fi |
| 234 |
done |