Annotation of /trunk/libjpeg/patches/libjpeg-6b-build-fixes.patch
Parent Directory | Revision Log
Revision 144 -
(hide annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 61021 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 61021 byte(s)
-import
1 | niro | 144 | diff -Naur jpeg-6b/ltconfig jpeg-6b.patched/ltconfig |
2 | --- jpeg-6b/ltconfig 1998-03-25 16:25:39.000000000 +0100 | ||
3 | +++ jpeg-6b.patched/ltconfig 2006-06-08 22:59:27.000000000 +0200 | ||
4 | @@ -25,30 +25,57 @@ | ||
5 | |||
6 | # A lot of this script is taken from autoconf-2.10. | ||
7 | |||
8 | +# Check that we are running under the correct shell. | ||
9 | +SHELL=${CONFIG_SHELL-/bin/sh} | ||
10 | +echo=echo | ||
11 | +if test "X$1" = X--no-reexec; then | ||
12 | + # Discard the --no-reexec flag, and continue. | ||
13 | + shift | ||
14 | +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | ||
15 | + # Yippee, $echo works! | ||
16 | + : | ||
17 | +else | ||
18 | + # Restart under the correct shell. | ||
19 | + exec "$SHELL" "$0" --no-reexec ${1+"$@"} | ||
20 | +fi | ||
21 | + | ||
22 | # The HP-UX ksh and POSIX shell print the target directory to stdout | ||
23 | # if CDPATH is set. | ||
24 | if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi | ||
25 | |||
26 | -echo=echo | ||
27 | -if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : | ||
28 | -else | ||
29 | - # The Solaris and AIX default echo program unquotes backslashes. | ||
30 | - # This makes it impossible to quote backslashes using | ||
31 | +if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then | ||
32 | + # The Solaris, AIX, and Digital Unix default echo programs unquote | ||
33 | + # backslashes. This makes it impossible to quote backslashes using | ||
34 | # echo "$something" | sed 's/\\/\\\\/g' | ||
35 | - # So, we emulate echo with printf '%s\n' | ||
36 | - echo="printf %s\\n" | ||
37 | - if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : | ||
38 | - else | ||
39 | - # Oops. We have no working printf. Try to find a not-so-buggy echo. | ||
40 | - echo=echo | ||
41 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" | ||
42 | - for dir in $PATH /usr/ucb; do | ||
43 | - if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then | ||
44 | - echo="$dir/echo" | ||
45 | - break | ||
46 | + # | ||
47 | + # So, first we look for a working echo in the user's PATH. | ||
48 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" | ||
49 | + for dir in $PATH /usr/ucb; do | ||
50 | + if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then | ||
51 | + echo="$dir/echo" | ||
52 | + break | ||
53 | + fi | ||
54 | + done | ||
55 | + IFS="$save_ifs" | ||
56 | + | ||
57 | + if test "X$echo" = Xecho; then | ||
58 | + # We didn't find a better echo, so look for alternatives. | ||
59 | + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then | ||
60 | + # This shell has a builtin print -r that does the trick. | ||
61 | + echo='print -r' | ||
62 | + elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then | ||
63 | + # If we have ksh, try running ltconfig again with it. | ||
64 | + CONFIG_SHELL=/bin/ksh | ||
65 | + export CONFIG_SHELL | ||
66 | + exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} | ||
67 | + else | ||
68 | + # Try using printf. | ||
69 | + echo='printf %s\n' | ||
70 | + if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then | ||
71 | + # Oops. We lost completely, so just stick with echo. | ||
72 | + echo=echo | ||
73 | fi | ||
74 | - done | ||
75 | - IFS="$save_ifs" | ||
76 | + fi | ||
77 | fi | ||
78 | fi | ||
79 | |||
80 | @@ -66,7 +93,7 @@ | ||
81 | # Constants: | ||
82 | PROGRAM=ltconfig | ||
83 | PACKAGE=libtool | ||
84 | -VERSION=1.2 | ||
85 | +VERSION=1.2b | ||
86 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' | ||
87 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' | ||
88 | rm="rm -f" | ||
89 | @@ -74,6 +101,7 @@ | ||
90 | help="Try \`$progname --help' for more information." | ||
91 | |||
92 | # Global variables: | ||
93 | +default_ofile=libtool | ||
94 | can_build_shared=yes | ||
95 | enable_shared=yes | ||
96 | # All known linkers require a `.a' archive for static linking. | ||
97 | @@ -85,6 +113,7 @@ | ||
98 | ac_config_sub= | ||
99 | host= | ||
100 | nonopt= | ||
101 | +ofile="$default_ofile" | ||
102 | verify_host=yes | ||
103 | with_gcc=no | ||
104 | with_gnu_ld=no | ||
105 | @@ -121,10 +150,12 @@ | ||
106 | |||
107 | Generate a system-specific libtool script. | ||
108 | |||
109 | + --debug enable verbose shell tracing | ||
110 | --disable-shared do not build shared libraries | ||
111 | --disable-static do not build static libraries | ||
112 | --help display this help and exit | ||
113 | --no-verify do not verify that HOST is a valid host type | ||
114 | +-o, --output=FILE specify the output file [default=$default_ofile] | ||
115 | --quiet same as \`--silent' | ||
116 | --silent do not print informational messages | ||
117 | --srcdir=DIR find \`config.guess' in DIR | ||
118 | @@ -140,6 +171,11 @@ | ||
119 | exit 0 | ||
120 | ;; | ||
121 | |||
122 | + --debug) | ||
123 | + echo "$progname: enabling shell trace mode" | ||
124 | + set -x | ||
125 | + ;; | ||
126 | + | ||
127 | --disable-shared) enable_shared=no ;; | ||
128 | |||
129 | --disable-static) enable_static=no ;; | ||
130 | @@ -151,6 +187,9 @@ | ||
131 | |||
132 | --no-verify) verify_host=no ;; | ||
133 | |||
134 | + --output | -o) prev=ofile ;; | ||
135 | + --output=*) ofile="$optarg" ;; | ||
136 | + | ||
137 | --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;; | ||
138 | |||
139 | --with-gcc) with_gcc=yes ;; | ||
140 | @@ -185,8 +224,7 @@ | ||
141 | exit 1 | ||
142 | fi | ||
143 | |||
144 | -if test -f "$ltmain"; then : | ||
145 | -else | ||
146 | +if test ! -f "$ltmain"; then | ||
147 | echo "$progname: \`$ltmain' does not exist" 1>&2 | ||
148 | echo "$help" 1>&2 | ||
149 | exit 1 | ||
150 | @@ -264,7 +302,7 @@ | ||
151 | ac_config_sub=$ac_aux_dir/config.sub | ||
152 | |||
153 | # Make sure we can run config.sub. | ||
154 | - if $ac_config_sub sun4 >/dev/null 2>&1; then : | ||
155 | + if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : | ||
156 | else | ||
157 | echo "$progname: cannot run $ac_config_sub" 1>&2 | ||
158 | echo "$help" 1>&2 | ||
159 | @@ -276,14 +314,14 @@ | ||
160 | host_alias=$host | ||
161 | case "$host_alias" in | ||
162 | "") | ||
163 | - if host_alias=`$ac_config_guess`; then : | ||
164 | + if host_alias=`$SHELL $ac_config_guess`; then : | ||
165 | else | ||
166 | echo "$progname: cannot guess host type; you must specify one" 1>&2 | ||
167 | echo "$help" 1>&2 | ||
168 | exit 1 | ||
169 | fi ;; | ||
170 | esac | ||
171 | - host=`$ac_config_sub $host_alias` | ||
172 | + host=`$SHELL $ac_config_sub $host_alias` | ||
173 | echo "$ac_t$host" 1>&6 | ||
174 | |||
175 | # Make sure the host verified. | ||
176 | @@ -421,7 +459,7 @@ | ||
177 | # Now see if the compiler is really GCC. | ||
178 | with_gcc=no | ||
179 | echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 | ||
180 | - echo "$progname:424: checking whether we are using GNU C" >&5 | ||
181 | + echo "$progname:462: checking whether we are using GNU C" >&5 | ||
182 | |||
183 | $rm conftest.c | ||
184 | cat > conftest.c <<EOF | ||
185 | @@ -429,7 +467,7 @@ | ||
186 | yes; | ||
187 | #endif | ||
188 | EOF | ||
189 | - if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then | ||
190 | + if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then | ||
191 | with_gcc=yes | ||
192 | fi | ||
193 | $rm conftest.c | ||
194 | @@ -477,7 +515,7 @@ | ||
195 | link_static_flag='-bnso -bI:/lib/syscalls.exp' | ||
196 | ;; | ||
197 | |||
198 | - hpux9* | hpux10*) | ||
199 | + hpux9* | hpux10* | hpux11*) | ||
200 | # Is there a better link_static_flag that works with the bundled CC? | ||
201 | wl='-Wl,' | ||
202 | link_static_flag="${wl}-a ${wl}archive" | ||
203 | @@ -541,11 +579,11 @@ | ||
204 | # Check to make sure the pic_flag actually works. | ||
205 | echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 | ||
206 | $rm conftest* | ||
207 | - echo > conftest.c | ||
208 | + echo "int some_variable = 0;" > conftest.c | ||
209 | save_CFLAGS="$CFLAGS" | ||
210 | CFLAGS="$CFLAGS $pic_flag -DPIC" | ||
211 | - echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5 | ||
212 | - if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then | ||
213 | + echo "$progname:585: checking if $compiler PIC flag $pic_flag works" >&5 | ||
214 | + if { (eval echo $progname:586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then | ||
215 | # Append any warnings to the config.log. | ||
216 | cat conftest.err 1>&5 | ||
217 | |||
218 | @@ -588,8 +626,8 @@ | ||
219 | echo 'main(){return(0);}' > conftest.c | ||
220 | save_LDFLAGS="$LDFLAGS" | ||
221 | LDFLAGS="$LDFLAGS $link_static_flag" | ||
222 | -echo "$progname:591: checking if $compiler static flag $link_static_flag works" >&5 | ||
223 | -if { (eval echo $progname:592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | ||
224 | +echo "$progname:629: checking if $compiler static flag $link_static_flag works" >&5 | ||
225 | +if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | ||
226 | echo "$ac_t$link_static_flag" 1>&6 | ||
227 | else | ||
228 | echo "$ac_t"none 1>&6 | ||
229 | @@ -621,11 +659,11 @@ | ||
230 | if test "$with_gcc" = yes; then | ||
231 | # Check if gcc -print-prog-name=ld gives a path. | ||
232 | echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 | ||
233 | - echo "$progname:624: checking for ld used by GCC" >&5 | ||
234 | + echo "$progname:662: checking for ld used by GCC" >&5 | ||
235 | ac_prog=`($CC -print-prog-name=ld) 2>&5` | ||
236 | case "$ac_prog" in | ||
237 | # Accept absolute paths. | ||
238 | - /* | [A-Za-z]:\\*) | ||
239 | + /* | [A-Za-z]:[/\\]*) | ||
240 | test -z "$LD" && LD="$ac_prog" | ||
241 | ;; | ||
242 | "") | ||
243 | @@ -639,10 +677,10 @@ | ||
244 | esac | ||
245 | elif test "$with_gnu_ld" = yes; then | ||
246 | echo $ac_n "checking for GNU ld... $ac_c" 1>&6 | ||
247 | - echo "$progname:642: checking for GNU ld" >&5 | ||
248 | + echo "$progname:680: checking for GNU ld" >&5 | ||
249 | else | ||
250 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 | ||
251 | - echo "$progname:645: checking for non-GNU ld" >&5 | ||
252 | + echo "$progname:683: checking for non-GNU ld" >&5 | ||
253 | fi | ||
254 | |||
255 | if test -z "$LD"; then | ||
256 | @@ -694,6 +732,7 @@ | ||
257 | archive_cmds= | ||
258 | old_archive_from_new_cmds= | ||
259 | export_dynamic_flag_spec= | ||
260 | +whole_archive_flag_spec= | ||
261 | hardcode_libdir_flag_spec= | ||
262 | hardcode_libdir_separator= | ||
263 | hardcode_direct=no | ||
264 | @@ -701,31 +740,38 @@ | ||
265 | hardcode_shlibpath_var=unsupported | ||
266 | runpath_var= | ||
267 | |||
268 | -case "$host_os" in | ||
269 | -amigaos* | sunos4*) | ||
270 | - # On these operating systems, we should treat GNU ld like the system ld. | ||
271 | - gnu_ld_acts_native=yes | ||
272 | - ;; | ||
273 | -*) | ||
274 | - gnu_ld_acts_native=no | ||
275 | - ;; | ||
276 | -esac | ||
277 | - | ||
278 | ld_shlibs=yes | ||
279 | -if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then | ||
280 | +if test "$with_gnu_ld" = yes; then | ||
281 | |||
282 | # See if GNU ld supports shared libraries. | ||
283 | - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | ||
284 | - archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' | ||
285 | - runpath_var=LD_RUN_PATH | ||
286 | - ld_shlibs=yes | ||
287 | - else | ||
288 | - ld_shlibs=no | ||
289 | - fi | ||
290 | + case "$host_os" in | ||
291 | + amigaos*) | ||
292 | + archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' | ||
293 | + hardcode_libdir_flag_spec='-L$libdir' | ||
294 | + hardcode_minus_L=yes | ||
295 | + ;; | ||
296 | + | ||
297 | + sunos4*) | ||
298 | + archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' | ||
299 | + hardcode_direct=yes | ||
300 | + hardcode_minus_L=yes | ||
301 | + hardcode_shlibpath_var=no | ||
302 | + ;; | ||
303 | + | ||
304 | + *) | ||
305 | + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | ||
306 | + archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' | ||
307 | + else | ||
308 | + ld_shlibs=no | ||
309 | + fi | ||
310 | + ;; | ||
311 | + esac | ||
312 | |||
313 | if test "$ld_shlibs" = yes; then | ||
314 | - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' | ||
315 | + runpath_var=XXXLD_RUN_PATH | ||
316 | + hardcode_libdir_flag_spec='' | ||
317 | export_dynamic_flag_spec='${wl}--export-dynamic' | ||
318 | + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | ||
319 | fi | ||
320 | else | ||
321 | # PORTME fill in a description of your system's linker (not GNU ld) | ||
322 | @@ -781,7 +827,7 @@ | ||
323 | archive_cmds='$CC -shared -o $lib$libobjs' | ||
324 | hardcode_libdir_flag_spec='-R$libdir' | ||
325 | hardcode_direct=yes | ||
326 | - hardcode_minus_L=yes | ||
327 | + hardcode_minus_L=no | ||
328 | hardcode_shlibpath_var=no | ||
329 | ;; | ||
330 | |||
331 | @@ -793,7 +839,7 @@ | ||
332 | export_dynamic_flag_spec='${wl}-E' | ||
333 | ;; | ||
334 | |||
335 | - hpux10*) | ||
336 | + hpux10* | hpux11*) | ||
337 | archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs' | ||
338 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | ||
339 | hardcode_direct=yes | ||
340 | @@ -802,7 +848,11 @@ | ||
341 | ;; | ||
342 | |||
343 | irix5* | irix6*) | ||
344 | - archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' | ||
345 | + if test "$with_gcc" = yes; then | ||
346 | + archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs' | ||
347 | + else | ||
348 | + archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' | ||
349 | + fi | ||
350 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
351 | ;; | ||
352 | |||
353 | @@ -856,15 +906,7 @@ | ||
354 | ;; | ||
355 | |||
356 | sunos4*) | ||
357 | - if test "$with_gcc" = yes; then | ||
358 | - archive_cmds='$CC -shared -o $lib$libobjs' | ||
359 | - else | ||
360 | - archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' | ||
361 | - fi | ||
362 | - | ||
363 | - if test "$with_gnu_ld" = yes; then | ||
364 | - export_dynamic_flag_spec='${wl}-export-dynamic' | ||
365 | - fi | ||
366 | + archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' | ||
367 | hardcode_libdir_flag_spec='-L$libdir' | ||
368 | hardcode_direct=yes | ||
369 | hardcode_minus_L=yes | ||
370 | @@ -890,7 +932,7 @@ | ||
371 | if test -z "$NM"; then | ||
372 | echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 | ||
373 | case "$NM" in | ||
374 | - /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path. | ||
375 | + /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path. | ||
376 | *) | ||
377 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | ||
378 | for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do | ||
379 | @@ -968,11 +1010,11 @@ | ||
380 | main(){nm_test_var='a';nm_test_func();return(0);} | ||
381 | EOF | ||
382 | |||
383 | -echo "$progname:971: checking if global_symbol_pipe works" >&5 | ||
384 | -if { (eval echo $progname:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then | ||
385 | +echo "$progname:1013: checking if global_symbol_pipe works" >&5 | ||
386 | +if { (eval echo $progname:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then | ||
387 | # Now try to grab the symbols. | ||
388 | nlist=conftest.nm | ||
389 | - if { echo "$progname:975: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then | ||
390 | + if { echo "$progname:1017: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then | ||
391 | |||
392 | # Try sorting and uniquifying the output. | ||
393 | if sort "$nlist" | uniq > "$nlist"T; then | ||
394 | @@ -1030,7 +1072,7 @@ | ||
395 | save_CFLAGS="$CFLAGS" | ||
396 | LIBS='conftestm.o' | ||
397 | CFLAGS="$CFLAGS$no_builtin_flag" | ||
398 | - if { (eval echo $progname:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | ||
399 | + if { (eval echo $progname:1075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | ||
400 | pipe_works=yes | ||
401 | else | ||
402 | echo "$progname: failed program was:" >&5 | ||
403 | @@ -1073,25 +1115,20 @@ | ||
404 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | ||
405 | hardcode_action=immediate | ||
406 | fi | ||
407 | -elif test "$hardcode_direct" != yes && \ | ||
408 | - test "$hardcode_minus_L" != yes && \ | ||
409 | - test "$hardcode_shlibpath_var" != yes; then | ||
410 | - # We cannot hardcode anything. | ||
411 | - hardcode_action=unsupported | ||
412 | else | ||
413 | - # We can only hardcode existing directories. | ||
414 | - hardcode_action=relink | ||
415 | + # We cannot hardcode anything, or else we can only hardcode existing | ||
416 | + # directories. | ||
417 | + hardcode_action=unsupported | ||
418 | fi | ||
419 | echo "$ac_t$hardcode_action" 1>&6 | ||
420 | -test "$hardcode_action" = unsupported && can_build_shared=no | ||
421 | |||
422 | |||
423 | reload_flag= | ||
424 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
425 | echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 | ||
426 | -# PORTME Some linker may need a different reload flag. | ||
427 | +# PORTME Some linkers may need a different reload flag. | ||
428 | reload_flag='-r' | ||
429 | -echo "$ac_t$reload_flag" | ||
430 | +echo "$ac_t$reload_flag" 1>&6 | ||
431 | test -n "$reload_flag" && reload_flag=" $reload_flag" | ||
432 | |||
433 | # PORTME Fill in your ld.so characteristics | ||
434 | @@ -1110,11 +1147,11 @@ | ||
435 | case "$host_os" in | ||
436 | aix3* | aix4*) | ||
437 | version_type=linux | ||
438 | - library_names_spec='${libname}${release}.so.$versuffix $libname.a' | ||
439 | + library_names_spec='${libname}${release}.so$versuffix $libname.a' | ||
440 | shlibpath_var=LIBPATH | ||
441 | |||
442 | # AIX has no versioning support, so we append a major version to the name. | ||
443 | - soname_spec='${libname}${release}.so.$major' | ||
444 | + soname_spec='${libname}${release}.so$major' | ||
445 | ;; | ||
446 | |||
447 | amigaos*) | ||
448 | @@ -1125,25 +1162,25 @@ | ||
449 | |||
450 | freebsd2* | freebsd3*) | ||
451 | version_type=sunos | ||
452 | - library_names_spec='${libname}${release}.so.$versuffix $libname.so' | ||
453 | - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' | ||
454 | + library_names_spec='${libname}${release}.so$versuffix $libname.so' | ||
455 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
456 | shlibpath_var=LD_LIBRARY_PATH | ||
457 | ;; | ||
458 | |||
459 | gnu*) | ||
460 | - version_type=sunos | ||
461 | - library_names_spec='${libname}${release}.so.$versuffix' | ||
462 | + version_type=linux | ||
463 | + library_names_spec='${libname}${release}.so$versuffix ${libname}.so' | ||
464 | shlibpath_var=LD_LIBRARY_PATH | ||
465 | ;; | ||
466 | |||
467 | -hpux9* | hpux10*) | ||
468 | +hpux9* | hpux10* | hpux11*) | ||
469 | # Give a soname corresponding to the major version so that dld.sl refuses to | ||
470 | # link against other versions. | ||
471 | dynamic_linker="$host_os dld.sl" | ||
472 | version_type=sunos | ||
473 | shlibpath_var=SHLIB_PATH | ||
474 | - library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl' | ||
475 | - soname_spec='${libname}${release}.sl.$major' | ||
476 | + library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' | ||
477 | + soname_spec='${libname}${release}.sl$major' | ||
478 | # HP-UX runs *really* slowly unless shared libraries are mode 555. | ||
479 | postinstall_cmds='chmod 555 $lib' | ||
480 | ;; | ||
481 | @@ -1151,7 +1188,7 @@ | ||
482 | irix5* | irix6*) | ||
483 | version_type=osf | ||
484 | soname_spec='${libname}${release}.so' | ||
485 | - library_names_spec='${libname}${release}.so.$versuffix $libname.so' | ||
486 | + library_names_spec='${libname}${release}.so$versuffix $libname.so' | ||
487 | shlibpath_var=LD_LIBRARY_PATH | ||
488 | ;; | ||
489 | |||
490 | @@ -1163,9 +1200,9 @@ | ||
491 | # This must be Linux ELF. | ||
492 | linux-gnu*) | ||
493 | version_type=linux | ||
494 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' | ||
495 | - soname_spec='${libname}${release}.so.$major' | ||
496 | - finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir' | ||
497 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | ||
498 | + soname_spec='${libname}${release}.so$major' | ||
499 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | ||
500 | shlibpath_var=LD_LIBRARY_PATH | ||
501 | |||
502 | if test -f /lib/ld.so.1; then | ||
503 | @@ -1173,7 +1210,6 @@ | ||
504 | else | ||
505 | # Only the GNU ld.so supports shared libraries on MkLinux. | ||
506 | case "$host_cpu" in | ||
507 | - powerpc*) dynamic_linker=no ;; | ||
508 | *) dynamic_linker='Linux ld.so' ;; | ||
509 | esac | ||
510 | fi | ||
511 | @@ -1181,8 +1217,8 @@ | ||
512 | |||
513 | netbsd* | openbsd*) | ||
514 | version_type=sunos | ||
515 | - library_names_spec='${libname}${release}.so.$versuffix' | ||
516 | - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' | ||
517 | + library_names_spec='${libname}${release}.so$versuffix' | ||
518 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
519 | shlibpath_var=LD_LIBRARY_PATH | ||
520 | ;; | ||
521 | |||
522 | @@ -1196,42 +1232,44 @@ | ||
523 | osf3* | osf4*) | ||
524 | version_type=osf | ||
525 | soname_spec='${libname}${release}.so' | ||
526 | - library_names_spec='${libname}${release}.so.$versuffix $libname.so' | ||
527 | + library_names_spec='${libname}${release}.so$versuffix $libname.so' | ||
528 | shlibpath_var=LD_LIBRARY_PATH | ||
529 | ;; | ||
530 | |||
531 | sco3.2v5*) | ||
532 | version_type=osf | ||
533 | - soname_spec='${libname}${release}.so.$major' | ||
534 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' | ||
535 | + soname_spec='${libname}${release}.so$major' | ||
536 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | ||
537 | shlibpath_var=LD_LIBRARY_PATH | ||
538 | ;; | ||
539 | |||
540 | solaris2*) | ||
541 | version_type=linux | ||
542 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' | ||
543 | - soname_spec='${libname}${release}.so.$major' | ||
544 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | ||
545 | + soname_spec='${libname}${release}.so$major' | ||
546 | shlibpath_var=LD_LIBRARY_PATH | ||
547 | + # ldd complains unless libraries are executable | ||
548 | + postinstall_cmds='chmod +x $lib' | ||
549 | ;; | ||
550 | |||
551 | sunos4*) | ||
552 | version_type=sunos | ||
553 | - library_names_spec='${libname}${release}.so.$versuffix' | ||
554 | - finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir' | ||
555 | + library_names_spec='${libname}${release}.so$versuffix' | ||
556 | + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | ||
557 | shlibpath_var=LD_LIBRARY_PATH | ||
558 | ;; | ||
559 | |||
560 | sysv4.2uw2*) | ||
561 | version_type=linux | ||
562 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' | ||
563 | - soname_spec='${libname}${release}.so.$major' | ||
564 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | ||
565 | + soname_spec='${libname}${release}.so$major' | ||
566 | shlibpath_var=LD_LIBRARY_PATH | ||
567 | ;; | ||
568 | |||
569 | uts4*) | ||
570 | version_type=linux | ||
571 | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' | ||
572 | - soname_spec='${libname}${release}.so.$major' | ||
573 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | ||
574 | + soname_spec='${libname}${release}.so$major' | ||
575 | shlibpath_var=LD_LIBRARY_PATH | ||
576 | ;; | ||
577 | |||
578 | @@ -1287,7 +1325,7 @@ | ||
579 | for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ | ||
580 | old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \ | ||
581 | link_static_flag no_builtin_flag export_dynamic_flag_spec \ | ||
582 | - libname_spec library_names_spec soname_spec RANLIB \ | ||
583 | + whole_archive_flag_spec libname_spec library_names_spec soname_spec RANLIB \ | ||
584 | old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ | ||
585 | old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \ | ||
586 | allow_undefined_flag no_undefined_flag \ | ||
587 | @@ -1307,14 +1345,13 @@ | ||
588 | esac | ||
589 | done | ||
590 | |||
591 | -ofile=libtool | ||
592 | -trap "$rm $ofile; exit 1" 1 2 15 | ||
593 | -echo creating $ofile | ||
594 | -$rm $ofile | ||
595 | -cat <<EOF > $ofile | ||
596 | -#! /bin/sh | ||
597 | +trap "$rm \"$ofile\"; exit 1" 1 2 15 | ||
598 | +echo "creating $ofile" | ||
599 | +$rm "$ofile" | ||
600 | +cat <<EOF > "$ofile" | ||
601 | +#! $SHELL | ||
602 | |||
603 | -# libtool - Provide generalized library-building support services. | ||
604 | +# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | ||
605 | # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION | ||
606 | # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. | ||
607 | # | ||
608 | @@ -1340,16 +1377,6 @@ | ||
609 | # configuration script generated by Autoconf, you may include it under | ||
610 | # the same distribution terms that you use for the rest of that program. | ||
611 | |||
612 | -# This program was configured as follows, | ||
613 | -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
614 | -# | ||
615 | -# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ | ||
616 | -# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ | ||
617 | -# $0$ltconfig_args | ||
618 | -# | ||
619 | -# Compiler and other test output produced by $progname, useful for | ||
620 | -# debugging $progname, is in ./config.log if it exists. | ||
621 | - | ||
622 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. | ||
623 | Xsed="sed -e s/^X//" | ||
624 | |||
625 | @@ -1357,25 +1384,35 @@ | ||
626 | # if CDPATH is set. | ||
627 | if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi | ||
628 | |||
629 | -# An echo program that does not interpret backslashes. | ||
630 | -echo="$ltecho" | ||
631 | +### BEGIN LIBTOOL CONFIG | ||
632 | +# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
633 | +# | ||
634 | +# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ | ||
635 | +# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ | ||
636 | +# $0$ltconfig_args | ||
637 | +# | ||
638 | +# Compiler and other test output produced by $progname, useful for | ||
639 | +# debugging $progname, is in ./config.log if it exists. | ||
640 | |||
641 | # The version of $progname that generated this script. | ||
642 | LTCONFIG_VERSION="$VERSION" | ||
643 | |||
644 | # Shell to use when invoking shell scripts. | ||
645 | -SHELL=${CONFIG_SHELL-/bin/sh} | ||
646 | +SHELL="$SHELL" | ||
647 | |||
648 | -# Whether or not to build libtool libraries. | ||
649 | +# Whether or not to build shared libraries. | ||
650 | build_libtool_libs=$enable_shared | ||
651 | |||
652 | -# Whether or not to build old-style libraries. | ||
653 | +# Whether or not to build static libraries. | ||
654 | build_old_libs=$enable_static | ||
655 | |||
656 | # The host system. | ||
657 | host_alias="$host_alias" | ||
658 | host="$host" | ||
659 | |||
660 | +# An echo program that does not interpret backslashes. | ||
661 | +echo="$ltecho" | ||
662 | + | ||
663 | # The archiver. | ||
664 | AR="$AR" | ||
665 | |||
666 | @@ -1413,6 +1450,9 @@ | ||
667 | # Compiler flag to allow reflexive dlopens. | ||
668 | export_dynamic_flag_spec="$export_dynamic_flag_spec" | ||
669 | |||
670 | +# Compiler flag to generate shared objects directly from archives. | ||
671 | +whole_archive_flag_spec="$whole_archive_flag_spec" | ||
672 | + | ||
673 | # Library versioning type. | ||
674 | version_type=$version_type | ||
675 | |||
676 | @@ -1482,12 +1522,12 @@ | ||
677 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | ||
678 | # the resulting binary. | ||
679 | hardcode_shlibpath_var=$hardcode_shlibpath_var | ||
680 | - | ||
681 | EOF | ||
682 | |||
683 | case "$host_os" in | ||
684 | aix3*) | ||
685 | - cat <<\EOF >> $ofile | ||
686 | + cat <<\EOF >> "$ofile" | ||
687 | + | ||
688 | # AIX sometimes has problems with the GCC collect2 program. For some | ||
689 | # reason, if we set the COLLECT_NAMES environment variable, the problems | ||
690 | # vanish in a puff of smoke. | ||
691 | @@ -1495,15 +1535,17 @@ | ||
692 | COLLECT_NAMES= | ||
693 | export COLLECT_NAMES | ||
694 | fi | ||
695 | - | ||
696 | EOF | ||
697 | ;; | ||
698 | esac | ||
699 | |||
700 | +echo '### END LIBTOOL CONFIG' >> "$ofile" | ||
701 | +echo >> "$ofile" | ||
702 | + | ||
703 | # Append the ltmain.sh script. | ||
704 | -cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1) | ||
705 | +cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) | ||
706 | |||
707 | -chmod +x $ofile | ||
708 | +chmod +x "$ofile" | ||
709 | exit 0 | ||
710 | |||
711 | # Local Variables: | ||
712 | diff -Naur jpeg-6b/ltmain.sh jpeg-6b.patched/ltmain.sh | ||
713 | --- jpeg-6b/ltmain.sh 1998-03-25 16:25:39.000000000 +0100 | ||
714 | +++ jpeg-6b.patched/ltmain.sh 2006-06-08 22:59:18.000000000 +0200 | ||
715 | @@ -23,6 +23,18 @@ | ||
716 | # configuration script generated by Autoconf, you may include it under | ||
717 | # the same distribution terms that you use for the rest of that program. | ||
718 | |||
719 | +# Check that we have a working $echo. | ||
720 | +if test "X$1" = X--no-reexec; then | ||
721 | + # Discard the --no-reexec flag, and continue. | ||
722 | + shift | ||
723 | +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | ||
724 | + # Yippee, $echo works! | ||
725 | + : | ||
726 | +else | ||
727 | + # Restart under the correct shell, and then maybe $echo will work. | ||
728 | + exec $SHELL "$0" --no-reexec ${1+"$@"} | ||
729 | +fi | ||
730 | + | ||
731 | # The name of this program. | ||
732 | progname=`$echo "$0" | sed 's%^.*/%%'` | ||
733 | modename="$progname" | ||
734 | @@ -30,7 +42,7 @@ | ||
735 | # Constants. | ||
736 | PROGRAM=ltmain.sh | ||
737 | PACKAGE=libtool | ||
738 | -VERSION=1.2 | ||
739 | +VERSION=1.2b | ||
740 | |||
741 | default_mode= | ||
742 | help="Try \`$progname --help' for more information." | ||
743 | @@ -48,8 +60,13 @@ | ||
744 | # Only set LANG and LC_ALL to C if already set. | ||
745 | # These must not be set unconditionally because not all systems understand | ||
746 | # e.g. LANG=C (notably SCO). | ||
747 | -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | ||
748 | -if test "${LANG+set}" = set; then LANG=C; export LANG; fi | ||
749 | +# We save the old values to restore during execute mode. | ||
750 | +if test "${LC_ALL+set}" = set; then | ||
751 | + save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL | ||
752 | +fi | ||
753 | +if test "${LANG+set}" = set; then | ||
754 | + save_LANG="$LANG"; LANG=C; export LANG | ||
755 | +fi | ||
756 | |||
757 | if test "$LTCONFIG_VERSION" != "$VERSION"; then | ||
758 | echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 | ||
759 | @@ -111,6 +128,16 @@ | ||
760 | exit 0 | ||
761 | ;; | ||
762 | |||
763 | + --config) | ||
764 | + sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 | ||
765 | + exit 0 | ||
766 | + ;; | ||
767 | + | ||
768 | + --debug) | ||
769 | + echo "$progname: enabling shell trace mode" | ||
770 | + set -x | ||
771 | + ;; | ||
772 | + | ||
773 | --dry-run | -n) | ||
774 | run=: | ||
775 | ;; | ||
776 | @@ -180,7 +207,7 @@ | ||
777 | esac | ||
778 | done | ||
779 | ;; | ||
780 | - *db | *dbx) | ||
781 | + *db | *dbx | *strace | *truss) | ||
782 | mode=execute | ||
783 | ;; | ||
784 | *install*|cp|mv) | ||
785 | @@ -238,7 +265,6 @@ | ||
786 | ;; | ||
787 | |||
788 | -static) | ||
789 | - build_libtool_libs=no | ||
790 | build_old_libs=yes | ||
791 | continue | ||
792 | ;; | ||
793 | @@ -337,7 +363,7 @@ | ||
794 | |||
795 | # Just move the object, then go on to compile the next one | ||
796 | $show "$mv $obj $libobj" | ||
797 | - $run $mv $obj $libobj || exit 1 | ||
798 | + $run $mv $obj $libobj || exit $? | ||
799 | |||
800 | # Allow error messages only from the first compilation. | ||
801 | suppress_output=' >/dev/null 2>&1' | ||
802 | @@ -374,10 +400,13 @@ | ||
803 | |||
804 | compile_shlibpath= | ||
805 | finalize_shlibpath= | ||
806 | + convenience= | ||
807 | + old_convenience= | ||
808 | deplibs= | ||
809 | dlfiles= | ||
810 | dlprefiles= | ||
811 | export_dynamic=no | ||
812 | + generated= | ||
813 | hardcode_libdirs= | ||
814 | libobjs= | ||
815 | link_against_libtool_libs= | ||
816 | @@ -410,8 +439,10 @@ | ||
817 | test -n "$old_archive_from_new_cmds" && build_old_libs=yes | ||
818 | |||
819 | # Go through the arguments, transforming them on the way. | ||
820 | - for arg | ||
821 | - do | ||
822 | + while test $# -gt 0; do | ||
823 | + arg="$1" | ||
824 | + shift | ||
825 | + | ||
826 | # If the previous option needs an argument, assign it. | ||
827 | if test -n "$prev"; then | ||
828 | case "$prev" in | ||
829 | @@ -495,7 +526,7 @@ | ||
830 | -L*) | ||
831 | dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'` | ||
832 | case "$dir" in | ||
833 | - /* | [A-Za-z]:\\*) | ||
834 | + /* | [A-Za-z]:[/\\]*) | ||
835 | # Add the corresponding hardcode_libdir_flag, if it is not identical. | ||
836 | ;; | ||
837 | *) | ||
838 | @@ -571,7 +602,7 @@ | ||
839 | |||
840 | if test "$prev" = dlprefiles; then | ||
841 | # Preload the old-style object. | ||
842 | - dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'` | ||
843 | + dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/.o/'` | ||
844 | prev= | ||
845 | fi | ||
846 | libobjs="$libobjs $arg" | ||
847 | @@ -586,7 +617,7 @@ | ||
848 | old_library= | ||
849 | |||
850 | # Check to see that this really is a libtool archive. | ||
851 | - if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : | ||
852 | + if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | ||
853 | else | ||
854 | $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 | ||
855 | exit 1 | ||
856 | @@ -598,11 +629,6 @@ | ||
857 | *) . ./$arg ;; | ||
858 | esac | ||
859 | |||
860 | - if test -z "$libdir"; then | ||
861 | - $echo "$modename: \`$arg' contains no -rpath information" 1>&2 | ||
862 | - exit 1 | ||
863 | - fi | ||
864 | - | ||
865 | # Get the name of the library we link against. | ||
866 | linklib= | ||
867 | for l in $old_library $library_names; do | ||
868 | @@ -623,6 +649,15 @@ | ||
869 | dir="$dir/$objdir" | ||
870 | fi | ||
871 | |||
872 | + if test -z "$libdir"; then | ||
873 | + # It is a libtool convenience library, so add in its objects. | ||
874 | + convenience="$convenience $dir/$old_library"l | ||
875 | + old_convenience="$old_convenience $dir/$old_library" | ||
876 | + compile_command="$compile_command $dir/$old_library" | ||
877 | + finalize_command="$finalize_command $dir/$old_library" | ||
878 | + continue | ||
879 | + fi | ||
880 | + | ||
881 | # This library was specified with -dlopen. | ||
882 | if test "$prev" = dlfiles; then | ||
883 | dlfiles="$dlfiles $arg" | ||
884 | @@ -696,8 +731,9 @@ | ||
885 | fi | ||
886 | |||
887 | |||
888 | + lib_linked=yes | ||
889 | case "$hardcode_action" in | ||
890 | - immediate) | ||
891 | + immediate | unsupported) | ||
892 | if test "$hardcode_direct" = no; then | ||
893 | compile_command="$compile_command $dir/$linklib" | ||
894 | elif test "$hardcode_minus_L" = no; then | ||
895 | @@ -705,13 +741,15 @@ | ||
896 | elif test "$hardcode_shlibpath_var" = no; then | ||
897 | compile_shlibpath="$compile_shlibpath$dir:" | ||
898 | compile_command="$compile_command -l$name" | ||
899 | + else | ||
900 | + lib_linked=no | ||
901 | fi | ||
902 | ;; | ||
903 | |||
904 | relink) | ||
905 | # We need an absolute path. | ||
906 | case "$dir" in | ||
907 | - /* | [A-Za-z]:\\*) ;; | ||
908 | + /* | [A-Za-z]:[/\\]*) ;; | ||
909 | *) | ||
910 | absdir=`cd "$dir" && pwd` | ||
911 | if test -z "$absdir"; then | ||
912 | @@ -729,15 +767,21 @@ | ||
913 | elif test "$hardcode_shlibpath_var" = yes; then | ||
914 | compile_shlibpath="$compile_shlibpath$dir:" | ||
915 | compile_command="$compile_command -l$name" | ||
916 | + else | ||
917 | + lib_linked=no | ||
918 | fi | ||
919 | ;; | ||
920 | |||
921 | - *) | ||
922 | - $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2 | ||
923 | - exit 1 | ||
924 | - ;; | ||
925 | + *) | ||
926 | + lib_linked=no | ||
927 | + ;; | ||
928 | esac | ||
929 | |||
930 | + if test "$lib_linked" != yes; then | ||
931 | + $echo "$modename: configuration error: unsupported hardcode properties" | ||
932 | + exit 1 | ||
933 | + fi | ||
934 | + | ||
935 | # Finalize command for both is simple: just hardcode it. | ||
936 | if test "$hardcode_direct" = yes; then | ||
937 | finalize_command="$finalize_command $libdir/$linklib" | ||
938 | @@ -802,14 +846,7 @@ | ||
939 | exit 1 | ||
940 | fi | ||
941 | |||
942 | - if test -n "$vinfo" && test -n "$release"; then | ||
943 | - $echo "$modename: you cannot specify both \`-version-info' and \`-release'" 1>&2 | ||
944 | - $echo "$help" 1>&2 | ||
945 | - exit 1 | ||
946 | - fi | ||
947 | - | ||
948 | - oldlib= | ||
949 | - oldobjs= | ||
950 | + oldlibs= | ||
951 | case "$output" in | ||
952 | "") | ||
953 | $echo "$modename: you must specify an output file" 1>&2 | ||
954 | @@ -819,16 +856,39 @@ | ||
955 | |||
956 | */* | *\\*) | ||
957 | $echo "$modename: output file \`$output' must have no directory components" 1>&2 | ||
958 | + $echo "$help" 1>&2 | ||
959 | exit 1 | ||
960 | ;; | ||
961 | |||
962 | *.a) | ||
963 | + if test -n "$link_against_libtool_libs"; then | ||
964 | + $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 | ||
965 | + exit 1 | ||
966 | + fi | ||
967 | + | ||
968 | + if test -n "$deplibs"; then | ||
969 | + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 | ||
970 | + fi | ||
971 | + | ||
972 | + if test -n "$dlfiles$dlprefiles"; then | ||
973 | + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 | ||
974 | + fi | ||
975 | + | ||
976 | + if test -n "$rpath"; then | ||
977 | + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 | ||
978 | + fi | ||
979 | + | ||
980 | + if test -n "$vinfo"; then | ||
981 | + $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 | ||
982 | + fi | ||
983 | + | ||
984 | + if test -n "$release"; then | ||
985 | + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 | ||
986 | + fi | ||
987 | + | ||
988 | # Now set the variables for building old libraries. | ||
989 | build_libtool_libs=no | ||
990 | - build_old_libs=yes | ||
991 | - oldlib="$output" | ||
992 | - $show "$rm $oldlib" | ||
993 | - $run $rm $oldlib | ||
994 | + oldlibs="$output" | ||
995 | ;; | ||
996 | |||
997 | *.la) | ||
998 | @@ -836,7 +896,7 @@ | ||
999 | case "$output" in | ||
1000 | lib*) ;; | ||
1001 | *) | ||
1002 | - $echo "$modename: libtool library \`$arg' must begin with \`lib'" 1>&2 | ||
1003 | + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 | ||
1004 | $echo "$help" 1>&2 | ||
1005 | exit 1 | ||
1006 | ;; | ||
1007 | @@ -849,9 +909,6 @@ | ||
1008 | library_names= | ||
1009 | old_library= | ||
1010 | dlname= | ||
1011 | - current=0 | ||
1012 | - revision=0 | ||
1013 | - age=0 | ||
1014 | |||
1015 | if test -n "$objs"; then | ||
1016 | $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 | ||
1017 | @@ -860,21 +917,12 @@ | ||
1018 | |||
1019 | # How the heck are we supposed to write a wrapper for a shared library? | ||
1020 | if test -n "$link_against_libtool_libs"; then | ||
1021 | - $echo "$modename: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2 | ||
1022 | + $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 | ||
1023 | exit 1 | ||
1024 | fi | ||
1025 | |||
1026 | if test -n "$dlfiles$dlprefiles"; then | ||
1027 | - $echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2 | ||
1028 | - # Nullify the symbol file. | ||
1029 | - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` | ||
1030 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` | ||
1031 | - fi | ||
1032 | - | ||
1033 | - if test -z "$rpath"; then | ||
1034 | - $echo "$modename: you must specify an installation directory with \`-rpath'" 1>&2 | ||
1035 | - $echo "$help" 1>&2 | ||
1036 | - exit 1 | ||
1037 | + $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 | ||
1038 | fi | ||
1039 | |||
1040 | set dummy $rpath | ||
1041 | @@ -883,203 +931,250 @@ | ||
1042 | fi | ||
1043 | install_libdir="$2" | ||
1044 | |||
1045 | - # Parse the version information argument. | ||
1046 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' | ||
1047 | - set dummy $vinfo | ||
1048 | - IFS="$save_ifs" | ||
1049 | + # Now set the variables for building old libraries. | ||
1050 | + oldlibs="$objdir/$libname.a" | ||
1051 | + if test -z "$rpath"; then | ||
1052 | + # Building a libtool convenience library. | ||
1053 | + oldlibs="$objdir/$libname.al $oldlibs" | ||
1054 | + build_libtool_libs=convenience | ||
1055 | |||
1056 | - if test -n "$5"; then | ||
1057 | - $echo "$modename: too many parameters to \`-version-info'" 1>&2 | ||
1058 | - $echo "$help" 1>&2 | ||
1059 | - exit 1 | ||
1060 | - fi | ||
1061 | + if test -n "$vinfo"; then | ||
1062 | + $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 | ||
1063 | + fi | ||
1064 | |||
1065 | - test -n "$2" && current="$2" | ||
1066 | - test -n "$3" && revision="$3" | ||
1067 | - test -n "$4" && age="$4" | ||
1068 | - | ||
1069 | - # Check that each of the things are valid numbers. | ||
1070 | - case "$current" in | ||
1071 | - 0 | [1-9] | [1-9][0-9]*) ;; | ||
1072 | - *) | ||
1073 | - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 | ||
1074 | - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
1075 | - exit 1 | ||
1076 | - ;; | ||
1077 | - esac | ||
1078 | + if test -n "$release"; then | ||
1079 | + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 | ||
1080 | + fi | ||
1081 | + else | ||
1082 | |||
1083 | - case "$revision" in | ||
1084 | - 0 | [1-9] | [1-9][0-9]*) ;; | ||
1085 | - *) | ||
1086 | - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 | ||
1087 | - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
1088 | - exit 1 | ||
1089 | - ;; | ||
1090 | - esac | ||
1091 | + # Parse the version information argument. | ||
1092 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' | ||
1093 | + set dummy $vinfo 0 0 0 | ||
1094 | + IFS="$save_ifs" | ||
1095 | + | ||
1096 | + if test -n "$8"; then | ||
1097 | + $echo "$modename: too many parameters to \`-version-info'" 1>&2 | ||
1098 | + $echo "$help" 1>&2 | ||
1099 | + exit 1 | ||
1100 | + fi | ||
1101 | |||
1102 | - case "$age" in | ||
1103 | - 0 | [1-9] | [1-9][0-9]*) ;; | ||
1104 | - *) | ||
1105 | - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 | ||
1106 | - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
1107 | - exit 1 | ||
1108 | - ;; | ||
1109 | - esac | ||
1110 | + current="$2" | ||
1111 | + revision="$3" | ||
1112 | + age="$4" | ||
1113 | + | ||
1114 | + # Check that each of the things are valid numbers. | ||
1115 | + case "$current" in | ||
1116 | + 0 | [1-9] | [1-9][0-9]*) ;; | ||
1117 | + *) | ||
1118 | + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 | ||
1119 | + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
1120 | + exit 1 | ||
1121 | + ;; | ||
1122 | + esac | ||
1123 | |||
1124 | - if test $age -gt $current; then | ||
1125 | - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 | ||
1126 | - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
1127 | - exit 1 | ||
1128 | - fi | ||
1129 | + case "$revision" in | ||
1130 | + 0 | [1-9] | [1-9][0-9]*) ;; | ||
1131 | + *) | ||
1132 | + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 | ||
1133 | + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
1134 | + exit 1 | ||
1135 | + ;; | ||
1136 | + esac | ||
1137 | |||
1138 | - # Calculate the version variables. | ||
1139 | - version_vars="version_type current age revision" | ||
1140 | - case "$version_type" in | ||
1141 | - none) ;; | ||
1142 | - | ||
1143 | - linux) | ||
1144 | - version_vars="$version_vars major versuffix" | ||
1145 | - major=`expr $current - $age` | ||
1146 | - versuffix="$major.$age.$revision" | ||
1147 | - ;; | ||
1148 | - | ||
1149 | - osf) | ||
1150 | - version_vars="$version_vars versuffix verstring" | ||
1151 | - major=`expr $current - $age` | ||
1152 | - versuffix="$current.$age.$revision" | ||
1153 | - verstring="$versuffix" | ||
1154 | - | ||
1155 | - # Add in all the interfaces that we are compatible with. | ||
1156 | - loop=$age | ||
1157 | - while test $loop != 0; do | ||
1158 | - iface=`expr $current - $loop` | ||
1159 | - loop=`expr $loop - 1` | ||
1160 | - verstring="$verstring:${iface}.0" | ||
1161 | - done | ||
1162 | + case "$age" in | ||
1163 | + 0 | [1-9] | [1-9][0-9]*) ;; | ||
1164 | + *) | ||
1165 | + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 | ||
1166 | + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
1167 | + exit 1 | ||
1168 | + ;; | ||
1169 | + esac | ||
1170 | |||
1171 | - # Make executables depend on our current version. | ||
1172 | - verstring="$verstring:${current}.0" | ||
1173 | - ;; | ||
1174 | + if test $age -gt $current; then | ||
1175 | + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 | ||
1176 | + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
1177 | + exit 1 | ||
1178 | + fi | ||
1179 | |||
1180 | - sunos) | ||
1181 | - version_vars="$version_vars major versuffix" | ||
1182 | - major="$current" | ||
1183 | - versuffix="$current.$revision" | ||
1184 | - ;; | ||
1185 | + # Calculate the version variables. | ||
1186 | + major= | ||
1187 | + versuffix= | ||
1188 | + verstring= | ||
1189 | + case "$version_type" in | ||
1190 | + none) ;; | ||
1191 | + | ||
1192 | + linux) | ||
1193 | + major=.`expr $current - $age` | ||
1194 | + versuffix="$major.$age.$revision" | ||
1195 | + ;; | ||
1196 | |||
1197 | - *) | ||
1198 | - $echo "$modename: unknown library version type \`$version_type'" 1>&2 | ||
1199 | - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 | ||
1200 | - exit 1 | ||
1201 | - ;; | ||
1202 | - esac | ||
1203 | + osf) | ||
1204 | + major=`expr $current - $age` | ||
1205 | + versuffix=".$current.$age.$revision" | ||
1206 | + verstring="$current.$age.$revision" | ||
1207 | + | ||
1208 | + # Add in all the interfaces that we are compatible with. | ||
1209 | + loop=$age | ||
1210 | + while test $loop != 0; do | ||
1211 | + iface=`expr $current - $loop` | ||
1212 | + loop=`expr $loop - 1` | ||
1213 | + verstring="$verstring:${iface}.0" | ||
1214 | + done | ||
1215 | + | ||
1216 | + # Make executables depend on our current version. | ||
1217 | + verstring="$verstring:${current}.0" | ||
1218 | + ;; | ||
1219 | + | ||
1220 | + sunos) | ||
1221 | + major=".$current" | ||
1222 | + versuffix=".$current.$revision" | ||
1223 | + ;; | ||
1224 | + | ||
1225 | + *) | ||
1226 | + $echo "$modename: unknown library version type \`$version_type'" 1>&2 | ||
1227 | + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 | ||
1228 | + exit 1 | ||
1229 | + ;; | ||
1230 | + esac | ||
1231 | + | ||
1232 | + # Clear the version info if we defaulted, and they specified a release. | ||
1233 | + if test -z "$vinfo" && test -n "$release"; then | ||
1234 | + major= | ||
1235 | + versuffix= | ||
1236 | + verstring="0.0" | ||
1237 | + fi | ||
1238 | + | ||
1239 | + # Check to see if the archive will have undefined symbols. | ||
1240 | + if test "$allow_undefined" = yes; then | ||
1241 | + if test "$allow_undefined_flag" = unsupported; then | ||
1242 | + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 | ||
1243 | + build_libtool_libs=no | ||
1244 | + build_old_libs=yes | ||
1245 | + fi | ||
1246 | + else | ||
1247 | + # Don't allow undefined symbols. | ||
1248 | + allow_undefined_flag="$no_undefined_flag" | ||
1249 | + fi | ||
1250 | + | ||
1251 | + # Add libc to deplibs on all systems. | ||
1252 | + dependency_libs="$deplibs" | ||
1253 | + deplibs="$deplibs -lc" | ||
1254 | + fi | ||
1255 | |||
1256 | # Create the output directory, or remove our outputs if we need to. | ||
1257 | if test -d $objdir; then | ||
1258 | - $show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*" | ||
1259 | - $run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.* | ||
1260 | + $show "${rm}r $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*" | ||
1261 | + $run ${rm}r $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.* | ||
1262 | else | ||
1263 | $show "$mkdir $objdir" | ||
1264 | $run $mkdir $objdir | ||
1265 | - status=$? | ||
1266 | - if test $status -eq 0 || test -d $objdir; then : | ||
1267 | - else | ||
1268 | - exit $status | ||
1269 | - fi | ||
1270 | - fi | ||
1271 | - | ||
1272 | - # Check to see if the archive will have undefined symbols. | ||
1273 | - if test "$allow_undefined" = yes; then | ||
1274 | - if test "$allow_undefined_flag" = unsupported; then | ||
1275 | - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 | ||
1276 | - build_libtool_libs=no | ||
1277 | - build_old_libs=yes | ||
1278 | + status=$? | ||
1279 | + if test $status -ne 0 && test ! -d $objdir; then | ||
1280 | + exit $status | ||
1281 | fi | ||
1282 | - else | ||
1283 | - # Don't allow undefined symbols. | ||
1284 | - allow_undefined_flag="$no_undefined_flag" | ||
1285 | fi | ||
1286 | |||
1287 | - # Add libc to deplibs on all systems. | ||
1288 | - dependency_libs="$deplibs" | ||
1289 | - deplibs="$deplibs -lc" | ||
1290 | - | ||
1291 | if test "$build_libtool_libs" = yes; then | ||
1292 | - # Get the real and link names of the library. | ||
1293 | - eval library_names=\"$library_names_spec\" | ||
1294 | - set dummy $library_names | ||
1295 | - realname="$2" | ||
1296 | - shift; shift | ||
1297 | + # Get the real and link names of the library. | ||
1298 | + eval library_names=\"$library_names_spec\" | ||
1299 | + set dummy $library_names | ||
1300 | + realname="$2" | ||
1301 | + shift; shift | ||
1302 | |||
1303 | - if test -n "$soname_spec"; then | ||
1304 | - eval soname=\"$soname_spec\" | ||
1305 | - else | ||
1306 | - soname="$realname" | ||
1307 | - fi | ||
1308 | + if test -n "$soname_spec"; then | ||
1309 | + eval soname=\"$soname_spec\" | ||
1310 | + else | ||
1311 | + soname="$realname" | ||
1312 | + fi | ||
1313 | |||
1314 | - lib="$objdir/$realname" | ||
1315 | + lib="$objdir/$realname" | ||
1316 | for link | ||
1317 | do | ||
1318 | linknames="$linknames $link" | ||
1319 | done | ||
1320 | |||
1321 | - # Use standard objects if they are PIC. | ||
1322 | - test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'` | ||
1323 | + # Use standard objects if they are PIC. | ||
1324 | + test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'` | ||
1325 | |||
1326 | - # Do each of the archive commands. | ||
1327 | - eval cmds=\"$archive_cmds\" | ||
1328 | - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' | ||
1329 | - for cmd in $cmds; do | ||
1330 | - IFS="$save_ifs" | ||
1331 | - $show "$cmd" | ||
1332 | - $run eval "$cmd" || exit $? | ||
1333 | - done | ||
1334 | - IFS="$save_ifs" | ||
1335 | + # Transform .lo files to .o files. | ||
1336 | + test "$build_old_libs" = yes && oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` | ||
1337 | |||
1338 | - # Create links to the real library. | ||
1339 | - for linkname in $linknames; do | ||
1340 | - $show "(cd $objdir && $LN_S $realname $linkname)" | ||
1341 | - $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $? | ||
1342 | - done | ||
1343 | + if test -n "$whole_archive_flag_spec"; then | ||
1344 | + if test -n "$convenience"; then | ||
1345 | + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" | ||
1346 | + fi | ||
1347 | + else | ||
1348 | + for xlib in $convenience; do | ||
1349 | + # Extract the objects. | ||
1350 | + xdir="$xlib"x | ||
1351 | + generated="$generated $xdir" | ||
1352 | + xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'` | ||
1353 | + | ||
1354 | + $show "${rm}r $xdir" | ||
1355 | + $run ${rm}r "$xdir" | ||
1356 | + $show "mkdir $xdir" | ||
1357 | + $run mkdir "$xdir" | ||
1358 | + status=$? | ||
1359 | + if test $status -ne 0 && test ! -d "$xdir"; then | ||
1360 | + exit $status | ||
1361 | + fi | ||
1362 | + $show "(cd $xdir && $AR x ../$xlib)" | ||
1363 | + $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $? | ||
1364 | |||
1365 | - # If -export-dynamic was specified, set the dlname. | ||
1366 | - if test "$export_dynamic" = yes; then | ||
1367 | - # On all known operating systems, these are identical. | ||
1368 | - dlname="$soname" | ||
1369 | - fi | ||
1370 | - fi | ||
1371 | + libobjs="$libobjs `echo $xdir/*`" | ||
1372 | + done | ||
1373 | + fi | ||
1374 | |||
1375 | - # Now set the variables for building old libraries. | ||
1376 | - oldlib="$objdir/$libname.a" | ||
1377 | + # Do each of the archive commands. | ||
1378 | + eval cmds=\"$archive_cmds\" | ||
1379 | + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' | ||
1380 | + for cmd in $cmds; do | ||
1381 | + IFS="$save_ifs" | ||
1382 | + $show "$cmd" | ||
1383 | + $run eval "$cmd" || exit $? | ||
1384 | + done | ||
1385 | + IFS="$save_ifs" | ||
1386 | + | ||
1387 | + # Create links to the real library. | ||
1388 | + for linkname in $linknames; do | ||
1389 | + if test "$realname" != "$linkname"; then | ||
1390 | + $show "(cd $objdir && $LN_S $realname $linkname)" | ||
1391 | + $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $? | ||
1392 | + fi | ||
1393 | + done | ||
1394 | + | ||
1395 | + # If -export-dynamic was specified, set the dlname. | ||
1396 | + if test "$export_dynamic" = yes; then | ||
1397 | + # On all known operating systems, these are identical. | ||
1398 | + dlname="$soname" | ||
1399 | + fi | ||
1400 | + fi | ||
1401 | ;; | ||
1402 | |||
1403 | *.lo | *.o) | ||
1404 | if test -n "$link_against_libtool_libs"; then | ||
1405 | - $echo "$modename: error: cannot link libtool libraries into reloadable objects" 1>&2 | ||
1406 | + $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 | ||
1407 | exit 1 | ||
1408 | fi | ||
1409 | |||
1410 | if test -n "$deplibs"; then | ||
1411 | - $echo "$modename: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2 | ||
1412 | + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 | ||
1413 | fi | ||
1414 | |||
1415 | if test -n "$dlfiles$dlprefiles"; then | ||
1416 | - $echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2 | ||
1417 | - # Nullify the symbol file. | ||
1418 | - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` | ||
1419 | - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` | ||
1420 | + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 | ||
1421 | fi | ||
1422 | |||
1423 | if test -n "$rpath"; then | ||
1424 | - $echo "$modename: warning: \`-rpath' is ignored while creating objects" 1>&2 | ||
1425 | + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 | ||
1426 | fi | ||
1427 | |||
1428 | if test -n "$vinfo"; then | ||
1429 | - $echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2 | ||
1430 | + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 | ||
1431 | fi | ||
1432 | |||
1433 | if test -n "$release"; then | ||
1434 | - $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 | ||
1435 | + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 | ||
1436 | fi | ||
1437 | |||
1438 | case "$output" in | ||
1439 | @@ -1139,7 +1234,7 @@ | ||
1440 | else | ||
1441 | # Just create a symlink. | ||
1442 | $show "$LN_S $obj $libobj" | ||
1443 | - $run $LN_S $obj $libobj || exit 1 | ||
1444 | + $run $LN_S $obj $libobj || exit $? | ||
1445 | fi | ||
1446 | |||
1447 | exit 0 | ||
1448 | @@ -1147,11 +1242,11 @@ | ||
1449 | |||
1450 | *) | ||
1451 | if test -n "$vinfo"; then | ||
1452 | - $echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2 | ||
1453 | + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 | ||
1454 | fi | ||
1455 | |||
1456 | if test -n "$release"; then | ||
1457 | - $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 | ||
1458 | + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 | ||
1459 | fi | ||
1460 | |||
1461 | if test -n "$rpath"; then | ||
1462 | @@ -1223,8 +1318,7 @@ | ||
1463 | $show "$mkdir $objdir" | ||
1464 | $run $mkdir $objdir | ||
1465 | status=$? | ||
1466 | - if test $status -eq 0 || test -d $objdir; then : | ||
1467 | - else | ||
1468 | + if test $status -ne 0 && test ! -d $objdir; then | ||
1469 | exit $status | ||
1470 | fi | ||
1471 | fi | ||
1472 | @@ -1355,13 +1449,11 @@ | ||
1473 | finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'` | ||
1474 | |||
1475 | # Create the binary in the object directory, then wrap it. | ||
1476 | - if test -d $objdir; then : | ||
1477 | - else | ||
1478 | + if test ! -d $objdir; then | ||
1479 | $show "$mkdir $objdir" | ||
1480 | $run $mkdir $objdir | ||
1481 | status=$? | ||
1482 | - if test $status -eq 0 || test -d $objdir; then : | ||
1483 | - else | ||
1484 | + if test $status -ne 0 && test ! -d $objdir; then | ||
1485 | exit $status | ||
1486 | fi | ||
1487 | fi | ||
1488 | @@ -1371,7 +1463,7 @@ | ||
1489 | rpath= | ||
1490 | for dir in $temp_rpath; do | ||
1491 | case "$dir" in | ||
1492 | - /* | [A-Za-z]:\\*) | ||
1493 | + /* | [A-Za-z]:[/\\]*) | ||
1494 | # Absolute path. | ||
1495 | rpath="$rpath$dir:" | ||
1496 | ;; | ||
1497 | @@ -1404,13 +1496,11 @@ | ||
1498 | finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command" | ||
1499 | fi | ||
1500 | |||
1501 | - case "$hardcode_action" in | ||
1502 | - relink) | ||
1503 | + if test "$hardcode_action" = relink; then | ||
1504 | # AGH! Flame the AIX and HP-UX people for me, will ya? | ||
1505 | $echo "$modename: warning: using a buggy system linker" 1>&2 | ||
1506 | $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2 | ||
1507 | - ;; | ||
1508 | - esac | ||
1509 | + fi | ||
1510 | |||
1511 | $show "$compile_command" | ||
1512 | $run eval "$compile_command" || exit $? | ||
1513 | @@ -1430,10 +1520,10 @@ | ||
1514 | trap "$rm $output; exit 1" 1 2 15 | ||
1515 | |||
1516 | $echo > $output "\ | ||
1517 | -#! /bin/sh | ||
1518 | +#! $SHELL | ||
1519 | |||
1520 | # $output - temporary wrapper script for $objdir/$output | ||
1521 | -# Generated by ltmain.sh - GNU $PACKAGE $VERSION | ||
1522 | +# Generated by $PROGRAM - GNU $PACKAGE $VERSION | ||
1523 | # | ||
1524 | # The $output program cannot be directly executed until all the libtool | ||
1525 | # libraries that it depends on are installed. | ||
1526 | @@ -1457,10 +1547,20 @@ | ||
1527 | finalize_command=\"$finalize_command\" | ||
1528 | else | ||
1529 | # When we are sourced in execute mode, \$file and \$echo are already set. | ||
1530 | - if test \"\$libtool_execute_magic\" = \"$magic\"; then : | ||
1531 | - else | ||
1532 | + if test \"\$libtool_execute_magic\" != \"$magic\"; then | ||
1533 | echo=\"$qecho\" | ||
1534 | file=\"\$0\" | ||
1535 | + # Make sure echo works. | ||
1536 | + if test \"X\$1\" = X--no-reexec; then | ||
1537 | + # Discard the --no-reexec flag, and continue. | ||
1538 | + shift | ||
1539 | + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then | ||
1540 | + # Yippee, \$echo works! | ||
1541 | + : | ||
1542 | + else | ||
1543 | + # Restart under the correct shell, and then maybe \$echo will work. | ||
1544 | + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} | ||
1545 | + fi | ||
1546 | fi\ | ||
1547 | " | ||
1548 | $echo >> $output "\ | ||
1549 | @@ -1477,7 +1577,7 @@ | ||
1550 | # If there was a directory component, then change thisdir. | ||
1551 | if test \"x\$destdir\" != \"x\$file\"; then | ||
1552 | case \"\$destdir\" in | ||
1553 | - /* | [A-Za-z]:\\*) thisdir=\"\$destdir\" ;; | ||
1554 | + /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;; | ||
1555 | *) thisdir=\"\$thisdir/\$destdir\" ;; | ||
1556 | esac | ||
1557 | fi | ||
1558 | @@ -1537,9 +1637,36 @@ | ||
1559 | esac | ||
1560 | |||
1561 | # See if we need to build an old-fashioned archive. | ||
1562 | - if test "$build_old_libs" = "yes"; then | ||
1563 | - # Transform .lo files to .o files. | ||
1564 | - oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` | ||
1565 | + for oldlib in $oldlibs; do | ||
1566 | + | ||
1567 | + if test "$build_libtool_libs" = convenience; then | ||
1568 | + oldobjs="$libobjs" | ||
1569 | + addlibs="$convenience" | ||
1570 | + build_libtool_libs=no | ||
1571 | + else | ||
1572 | + addlibs="$old_convenience" | ||
1573 | + fi | ||
1574 | + | ||
1575 | + # Add in members from convenience archives. | ||
1576 | + for xlib in $addlibs; do | ||
1577 | + # Extract the objects. | ||
1578 | + xdir="$xlib"x | ||
1579 | + generated="$generated $xdir" | ||
1580 | + xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'` | ||
1581 | + | ||
1582 | + $show "${rm}r $xdir" | ||
1583 | + $run ${rm}r "$xdir" | ||
1584 | + $show "mkdir $xdir" | ||
1585 | + $run mkdir "$xdir" | ||
1586 | + status=$? | ||
1587 | + if test $status -ne 0 && test ! -d "$xdir"; then | ||
1588 | + exit $status | ||
1589 | + fi | ||
1590 | + $show "(cd $xdir && $AR x ../$xlib)" | ||
1591 | + $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $? | ||
1592 | + | ||
1593 | + oldobjs="$oldobjs `echo $xdir/*`" | ||
1594 | + done | ||
1595 | |||
1596 | # Do each command in the archive commands. | ||
1597 | if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then | ||
1598 | @@ -1554,6 +1681,11 @@ | ||
1599 | $run eval "$cmd" || exit $? | ||
1600 | done | ||
1601 | IFS="$save_ifs" | ||
1602 | + done | ||
1603 | + | ||
1604 | + if test -n "$generated"; then | ||
1605 | + $show "${rm}r$generated" | ||
1606 | + $run ${rm}r$generated | ||
1607 | fi | ||
1608 | |||
1609 | # Now create the libtool archive. | ||
1610 | @@ -1561,14 +1693,13 @@ | ||
1611 | *.la) | ||
1612 | old_library= | ||
1613 | test "$build_old_libs" = yes && old_library="$libname.a" | ||
1614 | - | ||
1615 | $show "creating $output" | ||
1616 | |||
1617 | # Only create the output if not a dry run. | ||
1618 | if test -z "$run"; then | ||
1619 | $echo > $output "\ | ||
1620 | # $output - a libtool library file | ||
1621 | -# Generated by ltmain.sh - GNU $PACKAGE $VERSION | ||
1622 | +# Generated by $PROGRAM - GNU $PACKAGE $VERSION | ||
1623 | |||
1624 | # The name that we can dlopen(3). | ||
1625 | dlname='$dlname' | ||
1626 | @@ -1595,7 +1726,7 @@ | ||
1627 | # Do a symbolic link so that the libtool archive can be found in | ||
1628 | # LD_LIBRARY_PATH before the program is installed. | ||
1629 | $show "(cd $objdir && $LN_S ../$output $output)" | ||
1630 | - $run eval "(cd $objdir && $LN_S ../$output $output)" || exit 1 | ||
1631 | + $run eval "(cd $objdir && $LN_S ../$output $output)" || exit $? | ||
1632 | ;; | ||
1633 | esac | ||
1634 | exit 0 | ||
1635 | @@ -1605,7 +1736,7 @@ | ||
1636 | install) | ||
1637 | modename="$modename: install" | ||
1638 | |||
1639 | - # There may be an optional /bin/sh argument at the beginning of | ||
1640 | + # There may be an optional sh(1) argument at the beginning of | ||
1641 | # install_prog (especially on Windows NT). | ||
1642 | if test "$nonopt" = "$SHELL"; then | ||
1643 | # Aesthetically quote it. | ||
1644 | @@ -1639,7 +1770,7 @@ | ||
1645 | opts= | ||
1646 | prev= | ||
1647 | install_type= | ||
1648 | - isdir= | ||
1649 | + isdir=no | ||
1650 | stripme= | ||
1651 | for arg | ||
1652 | do | ||
1653 | @@ -1709,7 +1840,7 @@ | ||
1654 | |||
1655 | # Check to see that the destination is a directory. | ||
1656 | test -d "$dest" && isdir=yes | ||
1657 | - if test -n "$isdir"; then | ||
1658 | + if test "$isdir" = yes; then | ||
1659 | destdir="$dest" | ||
1660 | destname= | ||
1661 | else | ||
1662 | @@ -1726,7 +1857,7 @@ | ||
1663 | fi | ||
1664 | fi | ||
1665 | case "$destdir" in | ||
1666 | - /* | [A-Za-z]:\\*) ;; | ||
1667 | + /* | [A-Za-z]:[/\\]*) ;; | ||
1668 | *) | ||
1669 | for file in $files; do | ||
1670 | case "$file" in | ||
1671 | @@ -1759,7 +1890,7 @@ | ||
1672 | |||
1673 | *.la) | ||
1674 | # Check to see that this really is a libtool archive. | ||
1675 | - if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : | ||
1676 | + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | ||
1677 | else | ||
1678 | $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 | ||
1679 | $echo "$help" 1>&2 | ||
1680 | @@ -1864,7 +1995,7 @@ | ||
1681 | # Deduce the name of the destination old-style object file. | ||
1682 | case "$destfile" in | ||
1683 | *.lo) | ||
1684 | - staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'` | ||
1685 | + staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/.o/'` | ||
1686 | ;; | ||
1687 | *.o) | ||
1688 | staticdest="$destfile" | ||
1689 | @@ -1886,7 +2017,7 @@ | ||
1690 | # Install the old object if enabled. | ||
1691 | if test "$build_old_libs" = yes; then | ||
1692 | # Deduce the name of the old-style object file. | ||
1693 | - staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'` | ||
1694 | + staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/.o/'` | ||
1695 | |||
1696 | $show "$install_prog $staticobj $staticdest" | ||
1697 | $run eval "$install_prog \$staticobj \$staticdest" || exit $? | ||
1698 | @@ -1895,8 +2026,16 @@ | ||
1699 | ;; | ||
1700 | |||
1701 | *) | ||
1702 | + # Figure out destination file name, if it wasn't already specified. | ||
1703 | + if test -n "$destname"; then | ||
1704 | + destfile="$destdir/$destname" | ||
1705 | + else | ||
1706 | + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | ||
1707 | + destfile="$destdir/$destfile" | ||
1708 | + fi | ||
1709 | + | ||
1710 | # Do a test to see if this is really a libtool program. | ||
1711 | - if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then | ||
1712 | + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
1713 | link_against_libtool_libs= | ||
1714 | finalize_command= | ||
1715 | |||
1716 | @@ -1924,10 +2063,7 @@ | ||
1717 | esac | ||
1718 | fi | ||
1719 | libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" | ||
1720 | - if test -z "$libdir"; then | ||
1721 | - $echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2 | ||
1722 | - elif test -f "$libfile"; then : | ||
1723 | - else | ||
1724 | + if test -n "$libdir" && test ! -f "$libfile"; then | ||
1725 | $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 | ||
1726 | finalize=no | ||
1727 | fi | ||
1728 | @@ -1952,8 +2088,8 @@ | ||
1729 | fi | ||
1730 | fi | ||
1731 | |||
1732 | - $show "$install_prog$stripme $file $dest" | ||
1733 | - $run eval "$install_prog\$stripme \$file \$dest" || exit $? | ||
1734 | + $show "$install_prog$stripme $file $destfile" | ||
1735 | + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? | ||
1736 | ;; | ||
1737 | esac | ||
1738 | done | ||
1739 | @@ -1996,6 +2132,7 @@ | ||
1740 | finish) | ||
1741 | modename="$modename: finish" | ||
1742 | libdirs="$nonopt" | ||
1743 | + admincmds= | ||
1744 | |||
1745 | if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then | ||
1746 | for dir | ||
1747 | @@ -2011,19 +2148,21 @@ | ||
1748 | for cmd in $cmds; do | ||
1749 | IFS="$save_ifs" | ||
1750 | $show "$cmd" | ||
1751 | - $run eval "$cmd" | ||
1752 | + $run eval "$cmd" || admincmds="$admincmds | ||
1753 | + $cmd" | ||
1754 | done | ||
1755 | IFS="$save_ifs" | ||
1756 | fi | ||
1757 | if test -n "$finish_eval"; then | ||
1758 | # Do the single finish_eval. | ||
1759 | eval cmds=\"$finish_eval\" | ||
1760 | - $run eval "$cmds" | ||
1761 | + $run eval "$cmds" || admincmds="$admincmds | ||
1762 | + $cmds" | ||
1763 | fi | ||
1764 | done | ||
1765 | fi | ||
1766 | |||
1767 | - echo "------------------------------------------------------------------------------" | ||
1768 | + echo "----------------------------------------------------------------------" | ||
1769 | echo "Libraries have been installed in:" | ||
1770 | for libdir in $libdirs; do | ||
1771 | echo " $libdir" | ||
1772 | @@ -2032,7 +2171,7 @@ | ||
1773 | echo "To link against installed libraries in a given directory, LIBDIR," | ||
1774 | echo "you must use the \`-LLIBDIR' flag during linking." | ||
1775 | echo | ||
1776 | - echo " You will also need to do one of the following:" | ||
1777 | + echo " You will also need to do at least one of the following:" | ||
1778 | if test -n "$shlibpath_var"; then | ||
1779 | echo " - add LIBDIR to the \`$shlibpath_var' environment variable" | ||
1780 | echo " during execution" | ||
1781 | @@ -2047,13 +2186,16 @@ | ||
1782 | |||
1783 | echo " - use the \`$flag' linker flag" | ||
1784 | fi | ||
1785 | + if test -n "$admincmds"; then | ||
1786 | + echo " - have your system administrator run these commands:$admincmds" | ||
1787 | + fi | ||
1788 | if test -f /etc/ld.so.conf; then | ||
1789 | echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" | ||
1790 | fi | ||
1791 | echo | ||
1792 | echo "See any operating system documentation about shared libraries for" | ||
1793 | echo "more information, such as the ld(1) and ld.so(8) manual pages." | ||
1794 | - echo "------------------------------------------------------------------------------" | ||
1795 | + echo "----------------------------------------------------------------------" | ||
1796 | exit 0 | ||
1797 | ;; | ||
1798 | |||
1799 | @@ -2071,8 +2213,7 @@ | ||
1800 | |||
1801 | # Handle -dlopen flags immediately. | ||
1802 | for file in $execute_dlfiles; do | ||
1803 | - if test -f "$file"; then : | ||
1804 | - else | ||
1805 | + if test ! -f "$file"; then | ||
1806 | $echo "$modename: \`$file' is not a file" 1>&2 | ||
1807 | $echo "$help" 1>&2 | ||
1808 | exit 1 | ||
1809 | @@ -2082,7 +2223,7 @@ | ||
1810 | case "$file" in | ||
1811 | *.la) | ||
1812 | # Check to see that this really is a libtool archive. | ||
1813 | - if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : | ||
1814 | + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | ||
1815 | else | ||
1816 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | ||
1817 | $echo "$help" 1>&2 | ||
1818 | @@ -2153,7 +2294,7 @@ | ||
1819 | -*) ;; | ||
1820 | *) | ||
1821 | # Do a test to see if this is really a libtool program. | ||
1822 | - if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then | ||
1823 | + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
1824 | # If there is no directory component, then add one. | ||
1825 | case "$file" in | ||
1826 | */* | *\\*) . $file ;; | ||
1827 | @@ -2174,6 +2315,14 @@ | ||
1828 | # Export the shlibpath_var. | ||
1829 | eval "export $shlibpath_var" | ||
1830 | |||
1831 | + # Restore saved enviroment variables | ||
1832 | + if test "${save_LC_ALL+set}" = set; then | ||
1833 | + LC_ALL="$save_LC_ALL"; export LC_ALL | ||
1834 | + fi | ||
1835 | + if test "${save_LANG+set}" = set; then | ||
1836 | + LANG="$save_LANG"; export LANG | ||
1837 | + fi | ||
1838 | + | ||
1839 | # Now actually exec the command. | ||
1840 | eval "exec \$cmd$args" | ||
1841 | |||
1842 | @@ -2218,7 +2367,7 @@ | ||
1843 | case "$name" in | ||
1844 | *.la) | ||
1845 | # Possibly a libtool archive, so verify it. | ||
1846 | - if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then | ||
1847 | + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
1848 | . $dir/$name | ||
1849 | |||
1850 | # Delete the libtool libraries and symlinks. | ||
1851 | @@ -2262,7 +2411,7 @@ | ||
1852 | |||
1853 | *.lo) | ||
1854 | if test "$build_old_libs" = yes; then | ||
1855 | - oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'` | ||
1856 | + oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/.o/'` | ||
1857 | rmfiles="$rmfiles $dir/$oldobj" | ||
1858 | fi | ||
1859 | $show "$rm $rmfiles" | ||
1860 | @@ -2297,8 +2446,10 @@ | ||
1861 | |||
1862 | Provide generalized library-building support services. | ||
1863 | |||
1864 | + --config show all configuration variables | ||
1865 | + --debug enable verbose shell tracing | ||
1866 | -n, --dry-run display commands without modifying any files | ||
1867 | - --features display configuration information and exit | ||
1868 | + --features display basic configuration information and exit | ||
1869 | --finish same as \`--mode=finish' | ||
1870 | --help display this help message and exit | ||
1871 | --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] | ||
1872 | @@ -2326,6 +2477,10 @@ | ||
1873 | |||
1874 | Compile a source file into a libtool library object. | ||
1875 | |||
1876 | +This mode accepts the following additional options: | ||
1877 | + | ||
1878 | + -static always build a \`.o' file suitable for static linking | ||
1879 | + | ||
1880 | COMPILE-COMMAND is a command to be used in creating a \`standard' object file | ||
1881 | from the given SOURCEFILE. | ||
1882 |