1 | | --- ltconfig.orig Wed Mar 25 10:25:39 1998 |
2 | | +++ ltconfig Sun Mar 16 16:58:11 2003 |
3 | | @@ -1,8 +1,8 @@ |
4 | | #! /bin/sh |
5 | | |
6 | | # ltconfig - Create a system-specific libtool. |
7 | | -# Copyright (C) 1996-1998 Free Software Foundation, Inc. |
8 | | -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
9 | | +# Copyright (C) 1996-1999 Free Software Foundation, Inc. |
10 | | +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
11 | | # |
12 | | # This file is free software; you can redistribute it and/or modify it |
13 | | # under the terms of the GNU General Public License as published by |
14 | | @@ -25,30 +25,129 @@ |
15 | | |
16 | | # A lot of this script is taken from autoconf-2.10. |
17 | | |
18 | | +# Check that we are running under the correct shell. |
19 | | +SHELL=${CONFIG_SHELL-/bin/sh} |
20 | | +echo=echo |
21 | | +if test "X$1" = X--no-reexec; then |
22 | | + # Discard the --no-reexec flag, and continue. |
23 | | + shift |
24 | | +elif test "X$1" = X--fallback-echo; then |
25 | | + # Avoid inline document here, it may be left over |
26 | | + : |
27 | | +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
28 | | + # Yippee, $echo works! |
29 | | + : |
30 | | +else |
31 | | + # Restart under the correct shell. |
32 | | + exec "$SHELL" "$0" --no-reexec ${1+"$@"} |
33 | | +fi |
34 | | + |
35 | | +if test "X$1" = X--fallback-echo; then |
36 | | + # used as fallback echo |
37 | | + shift |
38 | | + cat <<EOF |
39 | | +$* |
40 | | +EOF |
41 | | + exit 0 |
42 | | +fi |
43 | | + |
44 | | +# Find the correct PATH separator. Usually this is `:', but |
45 | | +# DJGPP uses `;' like DOS. |
46 | | +if test "X${PATH_SEPARATOR+set}" != Xset; then |
47 | | + UNAME=${UNAME-`uname 2>/dev/null`} |
48 | | + case X$UNAME in |
49 | | + *-DOS) PATH_SEPARATOR=';' ;; |
50 | | + *) PATH_SEPARATOR=':' ;; |
51 | | + esac |
52 | | +fi |
53 | | + |
54 | | # The HP-UX ksh and POSIX shell print the target directory to stdout |
55 | | # if CDPATH is set. |
56 | | -if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi |
57 | | +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
58 | | |
59 | | -echo=echo |
60 | | -if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : |
61 | | -else |
62 | | - # The Solaris and AIX default echo program unquotes backslashes. |
63 | | - # This makes it impossible to quote backslashes using |
64 | | +if test "X${echo_test_string+set}" != Xset; then |
65 | | + # find a string as large as possible, as long as the shell can cope with it |
66 | | + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do |
67 | | + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
68 | | + if (echo_test_string="`eval $cmd`") 2>/dev/null && |
69 | | + echo_test_string="`eval $cmd`" && |
70 | | + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then |
71 | | + break |
72 | | + fi |
73 | | + done |
74 | | +fi |
75 | | + |
76 | | +if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || |
77 | | + test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then |
78 | | + # The Solaris, AIX, and Digital Unix default echo programs unquote |
79 | | + # backslashes. This makes it impossible to quote backslashes using |
80 | | # echo "$something" | sed 's/\\/\\\\/g' |
81 | | - # So, we emulate echo with printf '%s\n' |
82 | | - echo="printf %s\\n" |
83 | | - if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : |
84 | | - else |
85 | | - # Oops. We have no working printf. Try to find a not-so-buggy echo. |
86 | | - echo=echo |
87 | | - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" |
88 | | - for dir in $PATH /usr/ucb; do |
89 | | - if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then |
90 | | - echo="$dir/echo" |
91 | | - break |
92 | | + # |
93 | | + # So, first we look for a working echo in the user's PATH. |
94 | | + |
95 | | + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
96 | | + for dir in $PATH /usr/ucb; do |
97 | | + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
98 | | + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
99 | | + test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
100 | | + echo="$dir/echo" |
101 | | + break |
102 | | + fi |
103 | | + done |
104 | | + IFS="$save_ifs" |
105 | | + |
106 | | + if test "X$echo" = Xecho; then |
107 | | + # We didn't find a better echo, so look for alternatives. |
108 | | + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
109 | | + test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
110 | | + # This shell has a builtin print -r that does the trick. |
111 | | + echo='print -r' |
112 | | + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
113 | | + test "X$CONFIG_SHELL" != X/bin/ksh; then |
114 | | + # If we have ksh, try running ltconfig again with it. |
115 | | + ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" |
116 | | + export ORIGINAL_CONFIG_SHELL |
117 | | + CONFIG_SHELL=/bin/ksh |
118 | | + export CONFIG_SHELL |
119 | | + exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} |
120 | | + else |
121 | | + # Try using printf. |
122 | | + echo='printf "%s\n"' |
123 | | + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
124 | | + test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
125 | | + # Cool, printf works |
126 | | + : |
127 | | + elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && |
128 | | + test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
129 | | + CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" |
130 | | + export CONFIG_SHELL |
131 | | + SHELL="$CONFIG_SHELL" |
132 | | + export SHELL |
133 | | + echo="$CONFIG_SHELL $0 --fallback-echo" |
134 | | + elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && |
135 | | + test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then |
136 | | + echo="$CONFIG_SHELL $0 --fallback-echo" |
137 | | + else |
138 | | + # maybe with a smaller string... |
139 | | + prev=: |
140 | | + |
141 | | + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do |
142 | | + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then |
143 | | + break |
144 | | + fi |
145 | | + prev="$cmd" |
146 | | + done |
147 | | + |
148 | | + if test "$prev" != 'sed 50q "$0"'; then |
149 | | + echo_test_string=`eval $prev` |
150 | | + export echo_test_string |
151 | | + exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} |
152 | | + else |
153 | | + # Oops. We lost completely, so just stick with echo. |
154 | | + echo=echo |
155 | | + fi |
156 | | fi |
157 | | - done |
158 | | - IFS="$save_ifs" |
159 | | + fi |
160 | | fi |
161 | | fi |
162 | | |
163 | | @@ -60,24 +159,34 @@ |
164 | | # Same as above, but do not quote variable references. |
165 | | double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' |
166 | | |
167 | | +# Sed substitution to delay expansion of an escaped shell variable in a |
168 | | +# double_quote_subst'ed string. |
169 | | +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
170 | | + |
171 | | # The name of this program. |
172 | | progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` |
173 | | |
174 | | # Constants: |
175 | | PROGRAM=ltconfig |
176 | | PACKAGE=libtool |
177 | | -VERSION=1.2 |
178 | | -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' |
179 | | -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' |
180 | | +VERSION=1.3.5 |
181 | | +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" |
182 | | +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
183 | | +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
184 | | rm="rm -f" |
185 | | |
186 | | help="Try \`$progname --help' for more information." |
187 | | |
188 | | # Global variables: |
189 | | +default_ofile=libtool |
190 | | can_build_shared=yes |
191 | | enable_shared=yes |
192 | | -# All known linkers require a `.a' archive for static linking. |
193 | | +# All known linkers require a `.a' archive for static linking (except M$VC, |
194 | | +# which needs '.lib'). |
195 | | enable_static=yes |
196 | | +enable_fast_install=yes |
197 | | +enable_dlopen=unknown |
198 | | +enable_win32_dll=no |
199 | | ltmain= |
200 | | silent= |
201 | | srcdir= |
202 | | @@ -85,18 +194,30 @@ |
203 | | ac_config_sub= |
204 | | host= |
205 | | nonopt= |
206 | | +ofile="$default_ofile" |
207 | | verify_host=yes |
208 | | with_gcc=no |
209 | | with_gnu_ld=no |
210 | | +need_locks=yes |
211 | | +ac_ext=c |
212 | | +objext=o |
213 | | +libext=a |
214 | | +exeext= |
215 | | +cache_file= |
216 | | |
217 | | old_AR="$AR" |
218 | | old_CC="$CC" |
219 | | old_CFLAGS="$CFLAGS" |
220 | | old_CPPFLAGS="$CPPFLAGS" |
221 | | +old_LDFLAGS="$LDFLAGS" |
222 | | old_LD="$LD" |
223 | | old_LN_S="$LN_S" |
224 | | +old_LIBS="$LIBS" |
225 | | old_NM="$NM" |
226 | | old_RANLIB="$RANLIB" |
227 | | +old_DLLTOOL="$DLLTOOL" |
228 | | +old_OBJDUMP="$OBJDUMP" |
229 | | +old_AS="$AS" |
230 | | |
231 | | # Parse the command line options. |
232 | | args= |
233 | | @@ -117,33 +238,51 @@ |
234 | | |
235 | | case "$option" in |
236 | | --help) cat <<EOM |
237 | | -Usage: $progname [OPTION]... LTMAIN [HOST] |
238 | | +Usage: $progname [OPTION]... [HOST [LTMAIN]] |
239 | | |
240 | | Generate a system-specific libtool script. |
241 | | |
242 | | + --debug enable verbose shell tracing |
243 | | --disable-shared do not build shared libraries |
244 | | --disable-static do not build static libraries |
245 | | + --disable-fast-install do not optimize for fast installation |
246 | | + --enable-dlopen enable dlopen support |
247 | | + --enable-win32-dll enable building dlls on win32 hosts |
248 | | --help display this help and exit |
249 | | --no-verify do not verify that HOST is a valid host type |
250 | | +-o, --output=FILE specify the output file [default=$default_ofile] |
251 | | --quiet same as \`--silent' |
252 | | --silent do not print informational messages |
253 | | --srcdir=DIR find \`config.guess' in DIR |
254 | | --version output version information and exit |
255 | | --with-gcc assume that the GNU C compiler will be used |
256 | | --with-gnu-ld assume that the C compiler uses the GNU linker |
257 | | + --disable-lock disable file locking |
258 | | + --cache-file=FILE configure cache file |
259 | | |
260 | | -LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool |
261 | | -functionality. |
262 | | +LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program |
263 | | +that provides basic libtool functionality. |
264 | | |
265 | | HOST is the canonical host system name [default=guessed]. |
266 | | EOM |
267 | | exit 0 |
268 | | ;; |
269 | | |
270 | | + --debug) |
271 | | + echo "$progname: enabling shell trace mode" |
272 | | + set -x |
273 | | + ;; |
274 | | + |
275 | | --disable-shared) enable_shared=no ;; |
276 | | |
277 | | --disable-static) enable_static=no ;; |
278 | | |
279 | | + --disable-fast-install) enable_fast_install=no ;; |
280 | | + |
281 | | + --enable-dlopen) enable_dlopen=yes ;; |
282 | | + |
283 | | + --enable-win32-dll) enable_win32_dll=yes ;; |
284 | | + |
285 | | --quiet | --silent) silent=yes ;; |
286 | | |
287 | | --srcdir) prev=srcdir ;; |
288 | | @@ -151,11 +290,18 @@ |
289 | | |
290 | | --no-verify) verify_host=no ;; |
291 | | |
292 | | - --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;; |
293 | | + --output | -o) prev=ofile ;; |
294 | | + --output=*) ofile="$optarg" ;; |
295 | | + |
296 | | + --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;; |
297 | | |
298 | | --with-gcc) with_gcc=yes ;; |
299 | | --with-gnu-ld) with_gnu_ld=yes ;; |
300 | | |
301 | | + --disable-lock) need_locks=no ;; |
302 | | + |
303 | | + --cache-file=*) cache_file="$optarg" ;; |
304 | | + |
305 | | -*) |
306 | | echo "$progname: unrecognized option \`$option'" 1>&2 |
307 | | echo "$help" 1>&2 |
308 | | @@ -185,8 +331,7 @@ |
309 | | exit 1 |
310 | | fi |
311 | | |
312 | | -if test -f "$ltmain"; then : |
313 | | -else |
314 | | +if test ! -f "$ltmain"; then |
315 | | echo "$progname: \`$ltmain' does not exist" 1>&2 |
316 | | echo "$help" 1>&2 |
317 | | exit 1 |
318 | | @@ -224,8 +369,13 @@ |
319 | | # Only set LANG and LC_ALL to C if already set. |
320 | | # These must not be set unconditionally because not all systems understand |
321 | | # e.g. LANG=C (notably SCO). |
322 | | -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
323 | | -if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
324 | | +if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi |
325 | | +if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi |
326 | | + |
327 | | +if test -n "$cache_file" && test -r "$cache_file"; then |
328 | | + echo "loading cache $cache_file within ltconfig" |
329 | | + . $cache_file |
330 | | +fi |
331 | | |
332 | | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
333 | | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
334 | | @@ -240,8 +390,8 @@ |
335 | | fi |
336 | | |
337 | | if test -z "$srcdir"; then |
338 | | - # Assume the source directory is the same one as the path to ltmain.sh. |
339 | | - srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` |
340 | | + # Assume the source directory is the same one as the path to LTMAIN. |
341 | | + srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` |
342 | | test "$srcdir" = "$ltmain" && srcdir=. |
343 | | fi |
344 | | |
345 | | @@ -264,7 +414,7 @@ |
346 | | ac_config_sub=$ac_aux_dir/config.sub |
347 | | |
348 | | # Make sure we can run config.sub. |
349 | | - if $ac_config_sub sun4 >/dev/null 2>&1; then : |
350 | | + if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : |
351 | | else |
352 | | echo "$progname: cannot run $ac_config_sub" 1>&2 |
353 | | echo "$help" 1>&2 |
354 | | @@ -276,14 +426,14 @@ |
355 | | host_alias=$host |
356 | | case "$host_alias" in |
357 | | "") |
358 | | - if host_alias=`$ac_config_guess`; then : |
359 | | + if host_alias=`$SHELL $ac_config_guess`; then : |
360 | | else |
361 | | echo "$progname: cannot guess host type; you must specify one" 1>&2 |
362 | | echo "$help" 1>&2 |
363 | | exit 1 |
364 | | fi ;; |
365 | | esac |
366 | | - host=`$ac_config_sub $host_alias` |
367 | | + host=`$SHELL $ac_config_sub $host_alias` |
368 | | echo "$ac_t$host" 1>&6 |
369 | | |
370 | | # Make sure the host verified. |
371 | | @@ -312,7 +462,7 @@ |
372 | | # AIX sometimes has problems with the GCC collect2 program. For some |
373 | | # reason, if we set the COLLECT_NAMES environment variable, the problems |
374 | | # vanish in a puff of smoke. |
375 | | - if test "${COLLECT_NAMES+set}" != set; then |
376 | | + if test "X${COLLECT_NAMES+set}" != Xset; then |
377 | | COLLECT_NAMES= |
378 | | export COLLECT_NAMES |
379 | | fi |
380 | | @@ -327,15 +477,18 @@ |
381 | | # Set a sane default for `AR'. |
382 | | test -z "$AR" && AR=ar |
383 | | |
384 | | +# Set a sane default for `OBJDUMP'. |
385 | | +test -z "$OBJDUMP" && OBJDUMP=objdump |
386 | | + |
387 | | # If RANLIB is not set, then run the test. |
388 | | if test "${RANLIB+set}" != "set"; then |
389 | | result=no |
390 | | |
391 | | echo $ac_n "checking for ranlib... $ac_c" 1>&6 |
392 | | - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" |
393 | | + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
394 | | for dir in $PATH; do |
395 | | test -z "$dir" && dir=. |
396 | | - if test -f $dir/ranlib; then |
397 | | + if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then |
398 | | RANLIB="ranlib" |
399 | | result="ranlib" |
400 | | break |
401 | | @@ -347,20 +500,24 @@ |
402 | | fi |
403 | | |
404 | | if test -n "$RANLIB"; then |
405 | | - old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" |
406 | | - old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds" |
407 | | + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
408 | | + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
409 | | fi |
410 | | |
411 | | +# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. |
412 | | +test -z "$DLLTOOL" && DLLTOOL=dlltool |
413 | | +test -z "$OBJDUMP" && OBJDUMP=objdump |
414 | | +test -z "$AS" && AS=as |
415 | | + |
416 | | # Check to see if we are using GCC. |
417 | | if test "$with_gcc" != yes || test -z "$CC"; then |
418 | | # If CC is not set, then try to find GCC or a usable CC. |
419 | | if test -z "$CC"; then |
420 | | echo $ac_n "checking for gcc... $ac_c" 1>&6 |
421 | | - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" |
422 | | + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
423 | | for dir in $PATH; do |
424 | | - IFS="$save_ifs" |
425 | | test -z "$dir" && dir=. |
426 | | - if test -f $dir/gcc; then |
427 | | + if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then |
428 | | CC="gcc" |
429 | | break |
430 | | fi |
431 | | @@ -377,11 +534,11 @@ |
432 | | # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". |
433 | | if test -z "$CC"; then |
434 | | echo $ac_n "checking for cc... $ac_c" 1>&6 |
435 | | - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" |
436 | | + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
437 | | cc_rejected=no |
438 | | for dir in $PATH; do |
439 | | test -z "$dir" && dir=. |
440 | | - if test -f $dir/cc; then |
441 | | + if test -f $dir/cc || test -f $dir/cc$ac_exeext; then |
442 | | if test "$dir/cc" = "/usr/ucb/cc"; then |
443 | | cc_rejected=yes |
444 | | continue |
445 | | @@ -421,7 +578,7 @@ |
446 | | # Now see if the compiler is really GCC. |
447 | | with_gcc=no |
448 | | echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 |
449 | | - echo "$progname:424: checking whether we are using GNU C" >&5 |
450 | | + echo "$progname:581: checking whether we are using GNU C" >&5 |
451 | | |
452 | | $rm conftest.c |
453 | | cat > conftest.c <<EOF |
454 | | @@ -429,7 +586,7 @@ |
455 | | yes; |
456 | | #endif |
457 | | EOF |
458 | | - 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 |
459 | | + if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
460 | | with_gcc=yes |
461 | | fi |
462 | | $rm conftest.c |
463 | | @@ -440,6 +597,60 @@ |
464 | | set dummy $CC |
465 | | compiler="$2" |
466 | | |
467 | | +echo $ac_n "checking for object suffix... $ac_c" 1>&6 |
468 | | +$rm conftest* |
469 | | +echo 'int i = 1;' > conftest.c |
470 | | +echo "$progname:603: checking for object suffix" >& 5 |
471 | | +if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then |
472 | | + # Append any warnings to the config.log. |
473 | | + cat conftest.err 1>&5 |
474 | | + |
475 | | + for ac_file in conftest.*; do |
476 | | + case $ac_file in |
477 | | + *.c) ;; |
478 | | + *) objext=`echo $ac_file | sed -e s/conftest.//` ;; |
479 | | + esac |
480 | | + done |
481 | | +else |
482 | | + cat conftest.err 1>&5 |
483 | | + echo "$progname: failed program was:" >&5 |
484 | | + cat conftest.c >&5 |
485 | | +fi |
486 | | +$rm conftest* |
487 | | +echo "$ac_t$objext" 1>&6 |
488 | | + |
489 | | +echo $ac_n "checking for executable suffix... $ac_c" 1>&6 |
490 | | +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
491 | | + echo $ac_n "(cached) $ac_c" 1>&6 |
492 | | +else |
493 | | + ac_cv_exeext="no" |
494 | | + $rm conftest* |
495 | | + echo 'main () { return 0; }' > conftest.c |
496 | | + echo "$progname:629: checking for executable suffix" >& 5 |
497 | | + if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then |
498 | | + # Append any warnings to the config.log. |
499 | | + cat conftest.err 1>&5 |
500 | | + |
501 | | + for ac_file in conftest.*; do |
502 | | + case $ac_file in |
503 | | + *.c | *.err | *.$objext ) ;; |
504 | | + *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; |
505 | | + esac |
506 | | + done |
507 | | + else |
508 | | + cat conftest.err 1>&5 |
509 | | + echo "$progname: failed program was:" >&5 |
510 | | + cat conftest.c >&5 |
511 | | + fi |
512 | | + $rm conftest* |
513 | | +fi |
514 | | +if test "X$ac_cv_exeext" = Xno; then |
515 | | + exeext="" |
516 | | +else |
517 | | + exeext="$ac_cv_exeext" |
518 | | +fi |
519 | | +echo "$ac_t$ac_cv_exeext" 1>&6 |
520 | | + |
521 | | echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 |
522 | | pic_flag= |
523 | | special_shlib_compile_flags= |
524 | | @@ -450,21 +661,39 @@ |
525 | | if test "$with_gcc" = yes; then |
526 | | wl='-Wl,' |
527 | | link_static_flag='-static' |
528 | | - no_builtin_flag=' -fno-builtin' |
529 | | |
530 | | case "$host_os" in |
531 | | - aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) |
532 | | + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) |
533 | | # PIC is the default for these OSes. |
534 | | ;; |
535 | | - os2*) |
536 | | + aix*) |
537 | | + # Below there is a dirty hack to force normal static linking with -ldl |
538 | | + # The problem is because libdl dynamically linked with both libc and |
539 | | + # libC (AIX C++ library), which obviously doesn't included in libraries |
540 | | + # list by gcc. This cause undefined symbols with -static flags. |
541 | | + # This hack allows C programs to be linked with "-static -ldl", but |
542 | | + # we not sure about C++ programs. |
543 | | + link_static_flag="$link_static_flag ${wl}-lC" |
544 | | + ;; |
545 | | + cygwin* | mingw* | os2*) |
546 | | # We can build DLLs from non-PIC. |
547 | | ;; |
548 | | + darwin* | rhapsody*) |
549 | | + # PIC is the default on this platform |
550 | | + # Common symbols not allowed in MH_DYLIB files |
551 | | + pic_flag='-fno-common' |
552 | | + ;; |
553 | | amigaos*) |
554 | | # FIXME: we need at least 68020 code to build shared libraries, but |
555 | | # adding the `-m68020' flag to GCC prevents building anything better, |
556 | | # like `-m68040'. |
557 | | pic_flag='-m68020 -resident32 -malways-restore-a4' |
558 | | ;; |
559 | | + sysv4*MP*) |
560 | | + if test -d /usr/nec; then |
561 | | + pic_flag=-Kconform_pic |
562 | | + fi |
563 | | + ;; |
564 | | *) |
565 | | pic_flag='-fPIC' |
566 | | ;; |
567 | | @@ -477,7 +706,7 @@ |
568 | | link_static_flag='-bnso -bI:/lib/syscalls.exp' |
569 | | ;; |
570 | | |
571 | | - hpux9* | hpux10*) |
572 | | + hpux9* | hpux10* | hpux11*) |
573 | | # Is there a better link_static_flag that works with the bundled CC? |
574 | | wl='-Wl,' |
575 | | link_static_flag="${wl}-a ${wl}archive" |
576 | | @@ -490,11 +719,11 @@ |
577 | | # PIC (with -KPIC) is the default. |
578 | | ;; |
579 | | |
580 | | - os2*) |
581 | | + cygwin* | mingw* | os2*) |
582 | | # We can build DLLs from non-PIC. |
583 | | ;; |
584 | | |
585 | | - osf3* | osf4*) |
586 | | + osf3* | osf4* | osf5*) |
587 | | # All OSF/1 code is PIC. |
588 | | wl='-Wl,' |
589 | | link_static_flag='-non_shared' |
590 | | @@ -506,7 +735,7 @@ |
591 | | special_shlib_compile_flags='-belf' |
592 | | ;; |
593 | | |
594 | | - solaris2*) |
595 | | + solaris*) |
596 | | pic_flag='-KPIC' |
597 | | link_static_flag='-Bstatic' |
598 | | wl='-Wl,' |
599 | | @@ -518,7 +747,7 @@ |
600 | | wl='-Qoption ld ' |
601 | | ;; |
602 | | |
603 | | - sysv4.2uw2*) |
604 | | + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
605 | | pic_flag='-KPIC' |
606 | | link_static_flag='-Bstatic' |
607 | | wl='-Wl,' |
608 | | @@ -528,7 +757,12 @@ |
609 | | pic_flag='-pic' |
610 | | link_static_flag='-Bstatic' |
611 | | ;; |
612 | | - |
613 | | + sysv4*MP*) |
614 | | + if test -d /usr/nec ;then |
615 | | + pic_flag='-Kconform_pic' |
616 | | + link_static_flag='-Bstatic' |
617 | | + fi |
618 | | + ;; |
619 | | *) |
620 | | can_build_shared=no |
621 | | ;; |
622 | | @@ -541,25 +775,33 @@ |
623 | | # Check to make sure the pic_flag actually works. |
624 | | echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 |
625 | | $rm conftest* |
626 | | - echo > conftest.c |
627 | | + echo "int some_variable = 0;" > conftest.c |
628 | | save_CFLAGS="$CFLAGS" |
629 | | CFLAGS="$CFLAGS $pic_flag -DPIC" |
630 | | - echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5 |
631 | | - if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then |
632 | | + echo "$progname:781: checking if $compiler PIC flag $pic_flag works" >&5 |
633 | | + if { (eval echo $progname:782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then |
634 | | # Append any warnings to the config.log. |
635 | | cat conftest.err 1>&5 |
636 | | - |
637 | | - # On HP-UX, both CC and GCC only warn that PIC is supported... then they |
638 | | - # create non-PIC objects. So, if there were any warnings, we assume that |
639 | | - # PIC is not supported. |
640 | | - if test -s conftest.err; then |
641 | | - echo "$ac_t"no 1>&6 |
642 | | - can_build_shared=no |
643 | | - pic_flag= |
644 | | - else |
645 | | + |
646 | | + case "$host_os" in |
647 | | + hpux9* | hpux10* | hpux11*) |
648 | | + # On HP-UX, both CC and GCC only warn that PIC is supported... then they |
649 | | + # create non-PIC objects. So, if there were any warnings, we assume that |
650 | | + # PIC is not supported. |
651 | | + if test -s conftest.err; then |
652 | | + echo "$ac_t"no 1>&6 |
653 | | + can_build_shared=no |
654 | | + pic_flag= |
655 | | + else |
656 | | + echo "$ac_t"yes 1>&6 |
657 | | + pic_flag=" $pic_flag" |
658 | | + fi |
659 | | + ;; |
660 | | + *) |
661 | | echo "$ac_t"yes 1>&6 |
662 | | pic_flag=" $pic_flag" |
663 | | - fi |
664 | | + ;; |
665 | | + esac |
666 | | else |
667 | | # Append any errors to the config.log. |
668 | | cat conftest.err 1>&5 |
669 | | @@ -573,6 +815,136 @@ |
670 | | echo "$ac_t"none 1>&6 |
671 | | fi |
672 | | |
673 | | +# Check to see if options -o and -c are simultaneously supported by compiler |
674 | | +echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 |
675 | | +$rm -r conftest 2>/dev/null |
676 | | +mkdir conftest |
677 | | +cd conftest |
678 | | +$rm conftest* |
679 | | +echo "int some_variable = 0;" > conftest.c |
680 | | +mkdir out |
681 | | +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
682 | | +# that will create temporary files in the current directory regardless of |
683 | | +# the output directory. Thus, making CWD read-only will cause this test |
684 | | +# to fail, enabling locking or at least warning the user not to do parallel |
685 | | +# builds. |
686 | | +chmod -w . |
687 | | +save_CFLAGS="$CFLAGS" |
688 | | +CFLAGS="$CFLAGS -o out/conftest2.o" |
689 | | +echo "$progname:834: checking if $compiler supports -c -o file.o" >&5 |
690 | | +if { (eval echo $progname:835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then |
691 | | + |
692 | | + # The compiler can only warn and ignore the option if not recognized |
693 | | + # So say no if there are warnings |
694 | | + if test -s out/conftest.err; then |
695 | | + echo "$ac_t"no 1>&6 |
696 | | + compiler_c_o=no |
697 | | + else |
698 | | + echo "$ac_t"yes 1>&6 |
699 | | + compiler_c_o=yes |
700 | | + fi |
701 | | +else |
702 | | + # Append any errors to the config.log. |
703 | | + cat out/conftest.err 1>&5 |
704 | | + compiler_c_o=no |
705 | | + echo "$ac_t"no 1>&6 |
706 | | +fi |
707 | | +CFLAGS="$save_CFLAGS" |
708 | | +chmod u+w . |
709 | | +$rm conftest* out/* |
710 | | +rmdir out |
711 | | +cd .. |
712 | | +rmdir conftest |
713 | | +$rm -r conftest 2>/dev/null |
714 | | + |
715 | | +if test x"$compiler_c_o" = x"yes"; then |
716 | | + # Check to see if we can write to a .lo |
717 | | + echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 |
718 | | + $rm conftest* |
719 | | + echo "int some_variable = 0;" > conftest.c |
720 | | + save_CFLAGS="$CFLAGS" |
721 | | + CFLAGS="$CFLAGS -c -o conftest.lo" |
722 | | + echo "$progname:867: checking if $compiler supports -c -o file.lo" >&5 |
723 | | +if { (eval echo $progname:868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then |
724 | | + |
725 | | + # The compiler can only warn and ignore the option if not recognized |
726 | | + # So say no if there are warnings |
727 | | + if test -s conftest.err; then |
728 | | + echo "$ac_t"no 1>&6 |
729 | | + compiler_o_lo=no |
730 | | + else |
731 | | + echo "$ac_t"yes 1>&6 |
732 | | + compiler_o_lo=yes |
733 | | + fi |
734 | | + else |
735 | | + # Append any errors to the config.log. |
736 | | + cat conftest.err 1>&5 |
737 | | + compiler_o_lo=no |
738 | | + echo "$ac_t"no 1>&6 |
739 | | + fi |
740 | | + CFLAGS="$save_CFLAGS" |
741 | | + $rm conftest* |
742 | | +else |
743 | | + compiler_o_lo=no |
744 | | +fi |
745 | | + |
746 | | +# Check to see if we can do hard links to lock some files if needed |
747 | | +hard_links="nottested" |
748 | | +if test "$compiler_c_o" = no && test "$need_locks" != no; then |
749 | | + # do not overwrite the value of need_locks provided by the user |
750 | | + echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 |
751 | | + hard_links=yes |
752 | | + $rm conftest* |
753 | | + ln conftest.a conftest.b 2>/dev/null && hard_links=no |
754 | | + touch conftest.a |
755 | | + ln conftest.a conftest.b 2>&5 || hard_links=no |
756 | | + ln conftest.a conftest.b 2>/dev/null && hard_links=no |
757 | | + echo "$ac_t$hard_links" 1>&6 |
758 | | + $rm conftest* |
759 | | + if test "$hard_links" = no; then |
760 | | + echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 |
761 | | + need_locks=warn |
762 | | + fi |
763 | | +else |
764 | | + need_locks=no |
765 | | +fi |
766 | | + |
767 | | +if test "$with_gcc" = yes; then |
768 | | + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler |
769 | | + echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 |
770 | | + $rm conftest* |
771 | | + echo "int some_variable = 0;" > conftest.c |
772 | | + save_CFLAGS="$CFLAGS" |
773 | | + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" |
774 | | + echo "$progname:919: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 |
775 | | + if { (eval echo $progname:920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then |
776 | | + |
777 | | + # The compiler can only warn and ignore the option if not recognized |
778 | | + # So say no if there are warnings |
779 | | + if test -s conftest.err; then |
780 | | + echo "$ac_t"no 1>&6 |
781 | | + compiler_rtti_exceptions=no |
782 | | + else |
783 | | + echo "$ac_t"yes 1>&6 |
784 | | + compiler_rtti_exceptions=yes |
785 | | + fi |
786 | | + else |
787 | | + # Append any errors to the config.log. |
788 | | + cat conftest.err 1>&5 |
789 | | + compiler_rtti_exceptions=no |
790 | | + echo "$ac_t"no 1>&6 |
791 | | + fi |
792 | | + CFLAGS="$save_CFLAGS" |
793 | | + $rm conftest* |
794 | | + |
795 | | + if test "$compiler_rtti_exceptions" = "yes"; then |
796 | | + no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' |
797 | | + else |
798 | | + no_builtin_flag=' -fno-builtin' |
799 | | + fi |
800 | | + |
801 | | +fi |
802 | | + |
803 | | # Check for any special shared library compilation flags. |
804 | | if test -n "$special_shlib_compile_flags"; then |
805 | | echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 |
806 | | @@ -588,8 +960,8 @@ |
807 | | echo 'main(){return(0);}' > conftest.c |
808 | | save_LDFLAGS="$LDFLAGS" |
809 | | LDFLAGS="$LDFLAGS $link_static_flag" |
810 | | -echo "$progname:591: checking if $compiler static flag $link_static_flag works" >&5 |
811 | | -if { (eval echo $progname:592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
812 | | +echo "$progname:963: checking if $compiler static flag $link_static_flag works" >&5 |
813 | | +if { (eval echo $progname:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
814 | | echo "$ac_t$link_static_flag" 1>&6 |
815 | | else |
816 | | echo "$ac_t"none 1>&6 |
817 | | @@ -601,9 +973,9 @@ |
818 | | if test -z "$LN_S"; then |
819 | | # Check to see if we can use ln -s, or we need hard links. |
820 | | echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 |
821 | | - $rm conftestdata |
822 | | - if ln -s X conftestdata 2>/dev/null; then |
823 | | - $rm conftestdata |
824 | | + $rm conftest.dat |
825 | | + if ln -s X conftest.dat 2>/dev/null; then |
826 | | + $rm conftest.dat |
827 | | LN_S="ln -s" |
828 | | else |
829 | | LN_S=ln |
830 | | @@ -621,11 +993,17 @@ |
831 | | if test "$with_gcc" = yes; then |
832 | | # Check if gcc -print-prog-name=ld gives a path. |
833 | | echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 |
834 | | - echo "$progname:624: checking for ld used by GCC" >&5 |
835 | | + echo "$progname:996: checking for ld used by GCC" >&5 |
836 | | ac_prog=`($CC -print-prog-name=ld) 2>&5` |
837 | | case "$ac_prog" in |
838 | | # Accept absolute paths. |
839 | | - /* | [A-Za-z]:\\*) |
840 | | + [\\/]* | [A-Za-z]:[\\/]*) |
841 | | + re_direlt='/[^/][^/]*/\.\./' |
842 | | + # Canonicalize the path of ld |
843 | | + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
844 | | + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
845 | | + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
846 | | + done |
847 | | test -z "$LD" && LD="$ac_prog" |
848 | | ;; |
849 | | "") |
850 | | @@ -639,17 +1017,17 @@ |
851 | | esac |
852 | | elif test "$with_gnu_ld" = yes; then |
853 | | echo $ac_n "checking for GNU ld... $ac_c" 1>&6 |
854 | | - echo "$progname:642: checking for GNU ld" >&5 |
855 | | + echo "$progname:1020: checking for GNU ld" >&5 |
856 | | else |
857 | | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 |
858 | | - echo "$progname:645: checking for non-GNU ld" >&5 |
859 | | + echo "$progname:1023: checking for non-GNU ld" >&5 |
860 | | fi |
861 | | |
862 | | if test -z "$LD"; then |
863 | | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
864 | | + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
865 | | for ac_dir in $PATH; do |
866 | | test -z "$ac_dir" && ac_dir=. |
867 | | - if test -f "$ac_dir/$ac_prog"; then |
868 | | + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
869 | | LD="$ac_dir/$ac_prog" |
870 | | # Check to see if the program is GNU ld. I'd rather use --version, |
871 | | # but apparently some GNU ld's only accept -v. |
872 | | @@ -691,48 +1069,208 @@ |
873 | | |
874 | | allow_undefined_flag= |
875 | | no_undefined_flag= |
876 | | +need_lib_prefix=unknown |
877 | | +need_version=unknown |
878 | | +# when you set need_version to no, make sure it does not cause -set_version |
879 | | +# flags to be left without arguments |
880 | | archive_cmds= |
881 | | +archive_expsym_cmds= |
882 | | old_archive_from_new_cmds= |
883 | | export_dynamic_flag_spec= |
884 | | +whole_archive_flag_spec= |
885 | | +thread_safe_flag_spec= |
886 | | hardcode_libdir_flag_spec= |
887 | | hardcode_libdir_separator= |
888 | | hardcode_direct=no |
889 | | hardcode_minus_L=no |
890 | | hardcode_shlibpath_var=unsupported |
891 | | runpath_var= |
892 | | +always_export_symbols=no |
893 | | +export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
894 | | +# include_expsyms should be a list of space-separated symbols to be *always* |
895 | | +# included in the symbol list |
896 | | +include_expsyms= |
897 | | +# exclude_expsyms can be an egrep regular expression of symbols to exclude |
898 | | +# it will be wrapped by ` (' and `)$', so one must not match beginning or |
899 | | +# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
900 | | +# as well as any symbol that contains `d'. |
901 | | +exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
902 | | +# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
903 | | +# platforms (ab)use it in PIC code, but their linkers get confused if |
904 | | +# the symbol is explicitly referenced. Since portable code cannot |
905 | | +# rely on this symbol name, it's probably fine to never include it in |
906 | | +# preloaded symbol tables. |
907 | | |
908 | | case "$host_os" in |
909 | | -amigaos* | sunos4*) |
910 | | - # On these operating systems, we should treat GNU ld like the system ld. |
911 | | - gnu_ld_acts_native=yes |
912 | | - ;; |
913 | | -*) |
914 | | - gnu_ld_acts_native=no |
915 | | +cygwin* | mingw*) |
916 | | + # FIXME: the MSVC++ port hasn't been tested in a loooong time |
917 | | + # When not using gcc, we currently assume that we are using |
918 | | + # Microsoft Visual C++. |
919 | | + if test "$with_gcc" != yes; then |
920 | | + with_gnu_ld=no |
921 | | + fi |
922 | | ;; |
923 | | + |
924 | | esac |
925 | | |
926 | | ld_shlibs=yes |
927 | | -if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then |
928 | | +if test "$with_gnu_ld" = yes; then |
929 | | + # If archive_cmds runs LD, not CC, wlarc should be empty |
930 | | + wlarc='${wl}' |
931 | | |
932 | | # See if GNU ld supports shared libraries. |
933 | | - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
934 | | - archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' |
935 | | - runpath_var=LD_RUN_PATH |
936 | | - ld_shlibs=yes |
937 | | - else |
938 | | + case "$host_os" in |
939 | | + aix3* | aix4*) |
940 | | + # On AIX, the GNU linker is very broken |
941 | | ld_shlibs=no |
942 | | - fi |
943 | | + cat <<EOF 1>&2 |
944 | | + |
945 | | +*** Warning: the GNU linker, at least up to release 2.9.1, is reported |
946 | | +*** to be unable to reliably create shared libraries on AIX. |
947 | | +*** Therefore, libtool is disabling shared libraries support. If you |
948 | | +*** really care for shared libraries, you may want to modify your PATH |
949 | | +*** so that a non-GNU linker is found, and then restart. |
950 | | + |
951 | | +EOF |
952 | | + ;; |
953 | | + |
954 | | + amigaos*) |
955 | | + 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)' |
956 | | + hardcode_libdir_flag_spec='-L$libdir' |
957 | | + hardcode_minus_L=yes |
958 | | + |
959 | | + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
960 | | + # that the semantics of dynamic libraries on AmigaOS, at least up |
961 | | + # to version 4, is to share data among multiple programs linked |
962 | | + # with the same dynamic library. Since this doesn't match the |
963 | | + # behavior of shared libraries on other platforms, we can use |
964 | | + # them. |
965 | | + ld_shlibs=no |
966 | | + ;; |
967 | | + |
968 | | + beos*) |
969 | | + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
970 | | + allow_undefined_flag=unsupported |
971 | | + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
972 | | + # support --undefined. This deserves some investigation. FIXME |
973 | | + archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' |
974 | | + else |
975 | | + ld_shlibs=no |
976 | | + fi |
977 | | + ;; |
978 | | + |
979 | | + cygwin* | mingw*) |
980 | | + # hardcode_libdir_flag_spec is actually meaningless, as there is |
981 | | + # no search path for DLLs. |
982 | | + hardcode_libdir_flag_spec='-L$libdir' |
983 | | + allow_undefined_flag=unsupported |
984 | | + always_export_symbols=yes |
985 | | + |
986 | | + # Extract the symbol export list from an `--export-all' def file, |
987 | | + # then regenerate the def file from the symbol export list, so that |
988 | | + # the compiled dll only exports the symbol export list. |
989 | | + # Be careful not to strip the DATA tag left by newer dlltools. |
990 | | + export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ |
991 | | + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ |
992 | | + $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ |
993 | | + sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' |
994 | | + |
995 | | + # If DATA tags from a recent dlltool are present, honour them! |
996 | | + archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ |
997 | | + _lt_hint=1; |
998 | | + cat $export_symbols | while read symbol; do |
999 | | + set dummy \$symbol; |
1000 | | + case \$# in |
1001 | | + 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; |
1002 | | + *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; |
1003 | | + esac; |
1004 | | + _lt_hint=`expr 1 + \$_lt_hint`; |
1005 | | + done~ |
1006 | | + test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ |
1007 | | + test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ |
1008 | | + $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ |
1009 | | + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ |
1010 | | + $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ |
1011 | | + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ |
1012 | | + $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' |
1013 | | + |
1014 | | + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' |
1015 | | + ;; |
1016 | | + |
1017 | | + netbsd*) |
1018 | | + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
1019 | | + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' |
1020 | | + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
1021 | | + else |
1022 | | + archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' |
1023 | | + # can we support soname and/or expsyms with a.out? -oliva |
1024 | | + fi |
1025 | | + ;; |
1026 | | + |
1027 | | + solaris* | sysv5*) |
1028 | | + if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
1029 | | + ld_shlibs=no |
1030 | | + cat <<EOF 1>&2 |
1031 | | + |
1032 | | +*** Warning: The releases 2.8.* of the GNU linker cannot reliably |
1033 | | +*** create shared libraries on Solaris systems. Therefore, libtool |
1034 | | +*** is disabling shared libraries support. We urge you to upgrade GNU |
1035 | | +*** binutils to release 2.9.1 or newer. Another option is to modify |
1036 | | +*** your PATH or compiler configuration so that the native linker is |
1037 | | +*** used, and then restart. |
1038 | | + |
1039 | | +EOF |
1040 | | + elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
1041 | | + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' |
1042 | | + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
1043 | | + else |
1044 | | + ld_shlibs=no |
1045 | | + fi |
1046 | | + ;; |
1047 | | + |
1048 | | + sunos4*) |
1049 | | + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' |
1050 | | + wlarc= |
1051 | | + hardcode_direct=yes |
1052 | | + hardcode_shlibpath_var=no |
1053 | | + ;; |
1054 | | + |
1055 | | + *) |
1056 | | + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
1057 | | + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' |
1058 | | + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
1059 | | + else |
1060 | | + ld_shlibs=no |
1061 | | + fi |
1062 | | + ;; |
1063 | | + esac |
1064 | | |
1065 | | if test "$ld_shlibs" = yes; then |
1066 | | + runpath_var=LD_RUN_PATH |
1067 | | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
1068 | | export_dynamic_flag_spec='${wl}--export-dynamic' |
1069 | | + case $host_os in |
1070 | | + cygwin* | mingw*) |
1071 | | + # dlltool doesn't understand --whole-archive et. al. |
1072 | | + whole_archive_flag_spec= |
1073 | | + ;; |
1074 | | + *) |
1075 | | + # ancient GNU ld didn't support --whole-archive et. al. |
1076 | | + if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
1077 | | + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
1078 | | + else |
1079 | | + whole_archive_flag_spec= |
1080 | | + fi |
1081 | | + ;; |
1082 | | + esac |
1083 | | fi |
1084 | | else |
1085 | | # PORTME fill in a description of your system's linker (not GNU ld) |
1086 | | case "$host_os" in |
1087 | | aix3*) |
1088 | | allow_undefined_flag=unsupported |
1089 | | - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' |
1090 | | + always_export_symbols=yes |
1091 | | + archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' |
1092 | | # Note: this linker hardcodes the directories in LIBPATH if there |
1093 | | # are no directories specified by -L. |
1094 | | hardcode_minus_L=yes |
1095 | | @@ -744,16 +1282,67 @@ |
1096 | | ;; |
1097 | | |
1098 | | aix4*) |
1099 | | - allow_undefined_flag=unsupported |
1100 | | - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' |
1101 | | - hardcode_direct=yes |
1102 | | - hardcode_minus_L=yes |
1103 | | - ;; |
1104 | | + hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' |
1105 | | + hardcode_libdir_separator=':' |
1106 | | + if test "$with_gcc" = yes; then |
1107 | | + collect2name=`${CC} -print-prog-name=collect2` |
1108 | | + if test -f "$collect2name" && \ |
1109 | | + strings "$collect2name" | grep resolve_lib_name >/dev/null |
1110 | | + then |
1111 | | + # We have reworked collect2 |
1112 | | + hardcode_direct=yes |
1113 | | + else |
1114 | | + # We have old collect2 |
1115 | | + hardcode_direct=unsupported |
1116 | | + # It fails to find uninstalled libraries when the uninstalled |
1117 | | + # path is not listed in the libpath. Setting hardcode_minus_L |
1118 | | + # to unsupported forces relinking |
1119 | | + hardcode_minus_L=yes |
1120 | | + hardcode_libdir_flag_spec='-L$libdir' |
1121 | | + hardcode_libdir_separator= |
1122 | | + fi |
1123 | | + shared_flag='-shared' |
1124 | | + else |
1125 | | + shared_flag='${wl}-bM:SRE' |
1126 | | + hardcode_direct=yes |
1127 | | + fi |
1128 | | + allow_undefined_flag=' ${wl}-berok' |
1129 | | + archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' |
1130 | | + archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' |
1131 | | + case "$host_os" in aix4.[01]|aix4.[01].*) |
1132 | | + # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on |
1133 | | + always_export_symbols=yes ;; |
1134 | | + esac |
1135 | | + ;; |
1136 | | |
1137 | | amigaos*) |
1138 | | - 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)' |
1139 | | + 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)' |
1140 | | hardcode_libdir_flag_spec='-L$libdir' |
1141 | | hardcode_minus_L=yes |
1142 | | + # see comment about different semantics on the GNU ld section |
1143 | | + ld_shlibs=no |
1144 | | + ;; |
1145 | | + |
1146 | | + cygwin* | mingw*) |
1147 | | + # When not using gcc, we currently assume that we are using |
1148 | | + # Microsoft Visual C++. |
1149 | | + # hardcode_libdir_flag_spec is actually meaningless, as there is |
1150 | | + # no search path for DLLs. |
1151 | | + hardcode_libdir_flag_spec=' ' |
1152 | | + allow_undefined_flag=unsupported |
1153 | | + # Tell ltmain to make .lib files, not .a files. |
1154 | | + libext=lib |
1155 | | + # FIXME: Setting linknames here is a bad hack. |
1156 | | + archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
1157 | | + # The linker will automatically build a .lib file if we build a DLL. |
1158 | | + old_archive_from_new_cmds='true' |
1159 | | + # FIXME: Should let the user specify the lib program. |
1160 | | + old_archive_cmds='lib /OUT:$oldlib$oldobjs' |
1161 | | + fix_srcfile_path='`cygpath -w $srcfile`' |
1162 | | + ;; |
1163 | | + |
1164 | | + freebsd1*) |
1165 | | + ld_shlibs=no |
1166 | | ;; |
1167 | | |
1168 | | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
1169 | | @@ -761,61 +1350,81 @@ |
1170 | | # does not break anything, and helps significantly (at the cost of a little |
1171 | | # extra space). |
1172 | | freebsd2.2*) |
1173 | | - archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o' |
1174 | | + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' |
1175 | | hardcode_libdir_flag_spec='-R$libdir' |
1176 | | hardcode_direct=yes |
1177 | | - hardcode_minus_L=yes |
1178 | | hardcode_shlibpath_var=no |
1179 | | ;; |
1180 | | |
1181 | | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
1182 | | freebsd2*) |
1183 | | - archive_cmds='$LD -Bshareable -o $lib$libobjs' |
1184 | | + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' |
1185 | | hardcode_direct=yes |
1186 | | hardcode_minus_L=yes |
1187 | | hardcode_shlibpath_var=no |
1188 | | ;; |
1189 | | |
1190 | | - # FreeBSD 3, at last, uses gcc -shared to do shared libraries. |
1191 | | - freebsd3*) |
1192 | | - archive_cmds='$CC -shared -o $lib$libobjs' |
1193 | | + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
1194 | | + freebsd*) |
1195 | | + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' |
1196 | | hardcode_libdir_flag_spec='-R$libdir' |
1197 | | hardcode_direct=yes |
1198 | | - hardcode_minus_L=yes |
1199 | | hardcode_shlibpath_var=no |
1200 | | ;; |
1201 | | |
1202 | | - hpux9*) |
1203 | | - archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib' |
1204 | | - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
1205 | | + darwin* | rhapsody*) |
1206 | | + case "$host_os" in |
1207 | | + rhapsody* | darwin1.[012]) |
1208 | | + allow_undefined_flag='-undefined suppress' |
1209 | | + ;; |
1210 | | + *) # Darwin 1.3 on |
1211 | | + allow_undefined_flag='-flat_namespace -undefined suppress' |
1212 | | + ;; |
1213 | | + esac |
1214 | | + archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' |
1215 | | + # We need to add '_' to the symbols in $export_symbols first |
1216 | | + #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib' |
1217 | | hardcode_direct=yes |
1218 | | - hardcode_minus_L=yes |
1219 | | - export_dynamic_flag_spec='${wl}-E' |
1220 | | + hardcode_shlibpath_var=no |
1221 | | + whole_archive_flag_spec='-all_load $convenience' |
1222 | | ;; |
1223 | | |
1224 | | - hpux10*) |
1225 | | - archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs' |
1226 | | + hpux9* | hpux10* | hpux11*) |
1227 | | + case "$host_os" in |
1228 | | + hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; |
1229 | | + *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; |
1230 | | + esac |
1231 | | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
1232 | | + hardcode_libdir_separator=: |
1233 | | hardcode_direct=yes |
1234 | | - hardcode_minus_L=yes |
1235 | | + hardcode_minus_L=yes # Not in the search PATH, but as the default |
1236 | | + # location of the library. |
1237 | | export_dynamic_flag_spec='${wl}-E' |
1238 | | ;; |
1239 | | |
1240 | | irix5* | irix6*) |
1241 | | - archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' |
1242 | | + if test "$with_gcc" = yes; then |
1243 | | + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
1244 | | + else |
1245 | | + archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
1246 | | + fi |
1247 | | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
1248 | | + hardcode_libdir_separator=: |
1249 | | ;; |
1250 | | |
1251 | | netbsd*) |
1252 | | - # Tested with NetBSD 1.2 ld |
1253 | | - archive_cmds='$LD -Bshareable -o $lib$libobjs' |
1254 | | - hardcode_libdir_flag_spec='-R$libdir' |
1255 | | + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
1256 | | + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out |
1257 | | + else |
1258 | | + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF |
1259 | | + fi |
1260 | | + hardcode_libdir_flag_spec='${wl}-R$libdir' |
1261 | | hardcode_direct=yes |
1262 | | hardcode_shlibpath_var=no |
1263 | | ;; |
1264 | | |
1265 | | openbsd*) |
1266 | | - archive_cmds='$LD -Bshareable -o $lib$libobjs' |
1267 | | + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' |
1268 | | hardcode_libdir_flag_spec='-R$libdir' |
1269 | | hardcode_direct=yes |
1270 | | hardcode_shlibpath_var=no |
1271 | | @@ -825,88 +1434,163 @@ |
1272 | | hardcode_libdir_flag_spec='-L$libdir' |
1273 | | hardcode_minus_L=yes |
1274 | | allow_undefined_flag=unsupported |
1275 | | - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def' |
1276 | | + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' |
1277 | | old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' |
1278 | | ;; |
1279 | | |
1280 | | - osf3* | osf4*) |
1281 | | - allow_undefined_flag=' -expect_unresolved \*' |
1282 | | - archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs' |
1283 | | + osf3*) |
1284 | | + if test "$with_gcc" = yes; then |
1285 | | + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
1286 | | + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
1287 | | + else |
1288 | | + allow_undefined_flag=' -expect_unresolved \*' |
1289 | | + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
1290 | | + fi |
1291 | | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
1292 | | hardcode_libdir_separator=: |
1293 | | ;; |
1294 | | |
1295 | | + osf4* | osf5*) # As osf3* with the addition of the -msym flag |
1296 | | + if test "$with_gcc" = yes; then |
1297 | | + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
1298 | | + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
1299 | | + else |
1300 | | + allow_undefined_flag=' -expect_unresolved \*' |
1301 | | + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
1302 | | + fi |
1303 | | + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
1304 | | + hardcode_libdir_separator=: |
1305 | | + ;; |
1306 | | + |
1307 | | sco3.2v5*) |
1308 | | - archive_cmds='$LD -G -o $lib$libobjs' |
1309 | | - hardcode_direct=yes |
1310 | | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
1311 | | + hardcode_shlibpath_var=no |
1312 | | + runpath_var=LD_RUN_PATH |
1313 | | + hardcode_runpath_var=yes |
1314 | | ;; |
1315 | | |
1316 | | - solaris2*) |
1317 | | + solaris*) |
1318 | | no_undefined_flag=' -z text' |
1319 | | - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs' |
1320 | | + # $CC -shared without GNU ld will not create a library from C++ |
1321 | | + # object files and a static libstdc++, better avoid it by now |
1322 | | + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' |
1323 | | + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
1324 | | + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' |
1325 | | hardcode_libdir_flag_spec='-R$libdir' |
1326 | | hardcode_shlibpath_var=no |
1327 | | - |
1328 | | - # Solaris 2 before 2.5 hardcodes -L paths. |
1329 | | case "$host_os" in |
1330 | | - solaris2.[0-4]*) |
1331 | | - hardcode_minus_L=yes |
1332 | | - ;; |
1333 | | + solaris2.[0-5] | solaris2.[0-5].*) ;; |
1334 | | + *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
1335 | | + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
1336 | | esac |
1337 | | ;; |
1338 | | |
1339 | | sunos4*) |
1340 | | - if test "$with_gcc" = yes; then |
1341 | | - archive_cmds='$CC -shared -o $lib$libobjs' |
1342 | | - else |
1343 | | - archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' |
1344 | | - fi |
1345 | | - |
1346 | | - if test "$with_gnu_ld" = yes; then |
1347 | | - export_dynamic_flag_spec='${wl}-export-dynamic' |
1348 | | - fi |
1349 | | + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' |
1350 | | hardcode_libdir_flag_spec='-L$libdir' |
1351 | | hardcode_direct=yes |
1352 | | hardcode_minus_L=yes |
1353 | | hardcode_shlibpath_var=no |
1354 | | ;; |
1355 | | |
1356 | | - uts4*) |
1357 | | - archive_cmds='$LD -G -h $soname -o $lib$libobjs' |
1358 | | - hardcode_libdir_flag_spec='-L$libdir' |
1359 | | - hardcode_direct=no |
1360 | | - hardcode_minus_L=no |
1361 | | + sysv4) |
1362 | | + if test "x$host_vendor" = xsequent; then |
1363 | | + # Use $CC to link under sequent, because it throws in some extra .o |
1364 | | + # files that make .init and .fini sections work. |
1365 | | + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' |
1366 | | + else |
1367 | | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
1368 | | + fi |
1369 | | + runpath_var='LD_RUN_PATH' |
1370 | | + hardcode_shlibpath_var=no |
1371 | | + hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
1372 | | + ;; |
1373 | | + |
1374 | | + sysv4.3*) |
1375 | | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
1376 | | + hardcode_shlibpath_var=no |
1377 | | + export_dynamic_flag_spec='-Bexport' |
1378 | | + ;; |
1379 | | + |
1380 | | + sysv5*) |
1381 | | + no_undefined_flag=' -z text' |
1382 | | + # $CC -shared without GNU ld will not create a library from C++ |
1383 | | + # object files and a static libstdc++, better avoid it by now |
1384 | | + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' |
1385 | | + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
1386 | | + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' |
1387 | | + hardcode_libdir_flag_spec= |
1388 | | + hardcode_shlibpath_var=no |
1389 | | + runpath_var='LD_RUN_PATH' |
1390 | | + ;; |
1391 | | + |
1392 | | + uts4*) |
1393 | | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
1394 | | + hardcode_libdir_flag_spec='-L$libdir' |
1395 | | + hardcode_shlibpath_var=no |
1396 | | + ;; |
1397 | | + |
1398 | | + dgux*) |
1399 | | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
1400 | | + hardcode_libdir_flag_spec='-L$libdir' |
1401 | | + hardcode_shlibpath_var=no |
1402 | | + ;; |
1403 | | + |
1404 | | + sysv4*MP*) |
1405 | | + if test -d /usr/nec; then |
1406 | | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
1407 | | + hardcode_shlibpath_var=no |
1408 | | + runpath_var=LD_RUN_PATH |
1409 | | + hardcode_runpath_var=yes |
1410 | | + ld_shlibs=yes |
1411 | | + fi |
1412 | | + ;; |
1413 | | + |
1414 | | + sysv4.2uw2*) |
1415 | | + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' |
1416 | | + hardcode_direct=yes |
1417 | | + hardcode_minus_L=no |
1418 | | + hardcode_shlibpath_var=no |
1419 | | + hardcode_runpath_var=yes |
1420 | | + runpath_var=LD_RUN_PATH |
1421 | | + ;; |
1422 | | + |
1423 | | + unixware7*) |
1424 | | + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' |
1425 | | + runpath_var='LD_RUN_PATH' |
1426 | | hardcode_shlibpath_var=no |
1427 | | ;; |
1428 | | |
1429 | | *) |
1430 | | ld_shlibs=no |
1431 | | - can_build_shared=no |
1432 | | ;; |
1433 | | esac |
1434 | | fi |
1435 | | echo "$ac_t$ld_shlibs" 1>&6 |
1436 | | +test "$ld_shlibs" = no && can_build_shared=no |
1437 | | |
1438 | | if test -z "$NM"; then |
1439 | | echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 |
1440 | | case "$NM" in |
1441 | | - /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path. |
1442 | | + [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. |
1443 | | *) |
1444 | | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
1445 | | - for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do |
1446 | | + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" |
1447 | | + for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do |
1448 | | test -z "$ac_dir" && ac_dir=. |
1449 | | - if test -f $ac_dir/nm; then |
1450 | | - # Check to see if the nm accepts a BSD-compat flag. |
1451 | | - # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
1452 | | - # nm: unknown option "B" ignored |
1453 | | - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
1454 | | - NM="$ac_dir/nm -B" |
1455 | | - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
1456 | | - NM="$ac_dir/nm -p" |
1457 | | + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then |
1458 | | + # Check to see if the nm accepts a BSD-compat flag. |
1459 | | + # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
1460 | | + # nm: unknown option "B" ignored |
1461 | | + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
1462 | | + NM="$ac_dir/nm -B" |
1463 | | + break |
1464 | | + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
1465 | | + NM="$ac_dir/nm -p" |
1466 | | + break |
1467 | | else |
1468 | | - NM="$ac_dir/nm" |
1469 | | + NM=${NM="$ac_dir/nm"} # keep the first match, but |
1470 | | + continue # so that we can try to find one that supports BSD flags |
1471 | | fi |
1472 | | - break |
1473 | | fi |
1474 | | done |
1475 | | IFS="$ac_save_ifs" |
1476 | | @@ -923,40 +1607,54 @@ |
1477 | | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
1478 | | |
1479 | | # Character class describing NM global symbol codes. |
1480 | | -symcode='[BCDEGRSTU]' |
1481 | | +symcode='[BCDEGRST]' |
1482 | | |
1483 | | # Regexp to match symbols that can be accessed directly from C. |
1484 | | sympat='\([_A-Za-z][_A-Za-z0-9]*\)' |
1485 | | |
1486 | | # Transform the above into a raw symbol and a C symbol. |
1487 | | -symxfrm='\1 \1' |
1488 | | +symxfrm='\1 \2\3 \3' |
1489 | | + |
1490 | | +# Transform an extracted symbol line into a proper C declaration |
1491 | | +global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
1492 | | |
1493 | | # Define system-specific variables. |
1494 | | case "$host_os" in |
1495 | | aix*) |
1496 | | - symcode='[BCDTU]' |
1497 | | + symcode='[BCDT]' |
1498 | | + ;; |
1499 | | +cygwin* | mingw*) |
1500 | | + symcode='[ABCDGISTW]' |
1501 | | + ;; |
1502 | | +hpux*) # Its linker distinguishes data from code symbols |
1503 | | + global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" |
1504 | | ;; |
1505 | | irix*) |
1506 | | - # Cannot use undefined symbols on IRIX because inlined functions mess us up. |
1507 | | symcode='[BCDEGRST]' |
1508 | | ;; |
1509 | | -solaris2*) |
1510 | | - symcode='[BDTU]' |
1511 | | +solaris*) |
1512 | | + symcode='[BDT]' |
1513 | | + ;; |
1514 | | +sysv4) |
1515 | | + symcode='[DFNSTU]' |
1516 | | ;; |
1517 | | esac |
1518 | | |
1519 | | # If we're using GNU nm, then use its standard symbol codes. |
1520 | | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
1521 | | - symcode='[ABCDGISTUW]' |
1522 | | + symcode='[ABCDGISTW]' |
1523 | | fi |
1524 | | |
1525 | | -# Write the raw and C identifiers. |
1526 | | -global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'" |
1527 | | +# Try without a prefix undercore, then with it. |
1528 | | +for ac_symprfx in "" "_"; do |
1529 | | |
1530 | | -# Check to see that the pipe works correctly. |
1531 | | -pipe_works=no |
1532 | | -$rm conftest* |
1533 | | -cat > conftest.c <<EOF |
1534 | | + # Write the raw and C identifiers. |
1535 | | + global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" |
1536 | | + |
1537 | | + # Check to see that the pipe works correctly. |
1538 | | + pipe_works=no |
1539 | | + $rm conftest* |
1540 | | + cat > conftest.c <<EOF |
1541 | | #ifdef __cplusplus |
1542 | | extern "C" { |
1543 | | #endif |
1544 | | @@ -968,93 +1666,100 @@ |
1545 | | main(){nm_test_var='a';nm_test_func();return(0);} |
1546 | | EOF |
1547 | | |
1548 | | -echo "$progname:971: checking if global_symbol_pipe works" >&5 |
1549 | | -if { (eval echo $progname:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then |
1550 | | - # Now try to grab the symbols. |
1551 | | - nlist=conftest.nm |
1552 | | - 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 |
1553 | | - |
1554 | | - # Try sorting and uniquifying the output. |
1555 | | - if sort "$nlist" | uniq > "$nlist"T; then |
1556 | | - mv -f "$nlist"T "$nlist" |
1557 | | - wcout=`wc "$nlist" 2>/dev/null` |
1558 | | - count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` |
1559 | | - (test "$count" -ge 0) 2>/dev/null || count=-1 |
1560 | | - else |
1561 | | - rm -f "$nlist"T |
1562 | | - count=-1 |
1563 | | - fi |
1564 | | + echo "$progname:1669: checking if global_symbol_pipe works" >&5 |
1565 | | + if { (eval echo $progname:1670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then |
1566 | | + # Now try to grab the symbols. |
1567 | | + nlist=conftest.nm |
1568 | | + if { echo "$progname:1673: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then |
1569 | | + |
1570 | | + # Try sorting and uniquifying the output. |
1571 | | + if sort "$nlist" | uniq > "$nlist"T; then |
1572 | | + mv -f "$nlist"T "$nlist" |
1573 | | + else |
1574 | | + rm -f "$nlist"T |
1575 | | + fi |
1576 | | |
1577 | | - # Make sure that we snagged all the symbols we need. |
1578 | | - if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
1579 | | - if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
1580 | | - cat <<EOF > conftest.c |
1581 | | + # Make sure that we snagged all the symbols we need. |
1582 | | + if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
1583 | | + if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
1584 | | + cat <<EOF > conftest.c |
1585 | | #ifdef __cplusplus |
1586 | | extern "C" { |
1587 | | #endif |
1588 | | |
1589 | | EOF |
1590 | | - # Now generate the symbol file. |
1591 | | - sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c |
1592 | | + # Now generate the symbol file. |
1593 | | + eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' |
1594 | | |
1595 | | - cat <<EOF >> conftest.c |
1596 | | + cat <<EOF >> conftest.c |
1597 | | #if defined (__STDC__) && __STDC__ |
1598 | | -# define __ptr_t void * |
1599 | | +# define lt_ptr_t void * |
1600 | | #else |
1601 | | -# define __ptr_t char * |
1602 | | +# define lt_ptr_t char * |
1603 | | +# define const |
1604 | | #endif |
1605 | | |
1606 | | -/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ |
1607 | | -int dld_preloaded_symbol_count = $count; |
1608 | | - |
1609 | | /* The mapping between symbol names and symbols. */ |
1610 | | -struct { |
1611 | | - char *name; |
1612 | | - __ptr_t address; |
1613 | | +const struct { |
1614 | | + const char *name; |
1615 | | + lt_ptr_t address; |
1616 | | } |
1617 | | -dld_preloaded_symbols[] = |
1618 | | +lt_preloaded_symbols[] = |
1619 | | { |
1620 | | EOF |
1621 | | - sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c |
1622 | | - cat <<\EOF >> conftest.c |
1623 | | - {0, (__ptr_t) 0} |
1624 | | + sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c |
1625 | | + cat <<\EOF >> conftest.c |
1626 | | + {0, (lt_ptr_t) 0} |
1627 | | }; |
1628 | | |
1629 | | #ifdef __cplusplus |
1630 | | } |
1631 | | #endif |
1632 | | EOF |
1633 | | - # Now try linking the two files. |
1634 | | - mv conftest.o conftestm.o |
1635 | | - save_LIBS="$LIBS" |
1636 | | - save_CFLAGS="$CFLAGS" |
1637 | | - LIBS='conftestm.o' |
1638 | | - CFLAGS="$CFLAGS$no_builtin_flag" |
1639 | | - if { (eval echo $progname:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1640 | | - pipe_works=yes |
1641 | | - else |
1642 | | - echo "$progname: failed program was:" >&5 |
1643 | | - cat conftest.c >&5 |
1644 | | - fi |
1645 | | - LIBS="$save_LIBS" |
1646 | | + # Now try linking the two files. |
1647 | | + mv conftest.$objext conftstm.$objext |
1648 | | + save_LIBS="$LIBS" |
1649 | | + save_CFLAGS="$CFLAGS" |
1650 | | + LIBS="conftstm.$objext" |
1651 | | + CFLAGS="$CFLAGS$no_builtin_flag" |
1652 | | + if { (eval echo $progname:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
1653 | | + pipe_works=yes |
1654 | | + else |
1655 | | + echo "$progname: failed program was:" >&5 |
1656 | | + cat conftest.c >&5 |
1657 | | + fi |
1658 | | + LIBS="$save_LIBS" |
1659 | | + else |
1660 | | + echo "cannot find nm_test_func in $nlist" >&5 |
1661 | | + fi |
1662 | | else |
1663 | | - echo "cannot find nm_test_func in $nlist" >&5 |
1664 | | + echo "cannot find nm_test_var in $nlist" >&5 |
1665 | | fi |
1666 | | else |
1667 | | - echo "cannot find nm_test_var in $nlist" >&5 |
1668 | | + echo "cannot run $global_symbol_pipe" >&5 |
1669 | | fi |
1670 | | else |
1671 | | - echo "cannot run $global_symbol_pipe" >&5 |
1672 | | + echo "$progname: failed program was:" >&5 |
1673 | | + cat conftest.c >&5 |
1674 | | fi |
1675 | | + $rm conftest* conftst* |
1676 | | + |
1677 | | + # Do not use the global_symbol_pipe unless it works. |
1678 | | + if test "$pipe_works" = yes; then |
1679 | | + break |
1680 | | + else |
1681 | | + global_symbol_pipe= |
1682 | | + fi |
1683 | | +done |
1684 | | +if test "$pipe_works" = yes; then |
1685 | | + echo "${ac_t}ok" 1>&6 |
1686 | | else |
1687 | | - echo "$progname: failed program was:" >&5 |
1688 | | - cat conftest.c >&5 |
1689 | | + echo "${ac_t}failed" 1>&6 |
1690 | | fi |
1691 | | -$rm conftest* |
1692 | | |
1693 | | -# Do not use the global_symbol_pipe unless it works. |
1694 | | -echo "$ac_t$pipe_works" 1>&6 |
1695 | | -test "$pipe_works" = yes || global_symbol_pipe= |
1696 | | +if test -z "$global_symbol_pipe"; then |
1697 | | + global_symbol_to_cdecl= |
1698 | | +fi |
1699 | | |
1700 | | # Check hardcoding attributes. |
1701 | | echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 |
1702 | | @@ -1063,35 +1768,32 @@ |
1703 | | test -n "$runpath_var"; then |
1704 | | |
1705 | | # We can hardcode non-existant directories. |
1706 | | - if test "$hardcode_direct" != no && \ |
1707 | | - test "$hardcode_minus_L" != no && \ |
1708 | | - test "$hardcode_shlibpath_var" != no; then |
1709 | | - |
1710 | | + if test "$hardcode_direct" != no && |
1711 | | + # If the only mechanism to avoid hardcoding is shlibpath_var, we |
1712 | | + # have to relink, otherwise we might link with an installed library |
1713 | | + # when we should be linking with a yet-to-be-installed one |
1714 | | + ## test "$hardcode_shlibpath_var" != no && |
1715 | | + test "$hardcode_minus_L" != no; then |
1716 | | # Linking always hardcodes the temporary library directory. |
1717 | | hardcode_action=relink |
1718 | | else |
1719 | | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
1720 | | hardcode_action=immediate |
1721 | | fi |
1722 | | -elif test "$hardcode_direct" != yes && \ |
1723 | | - test "$hardcode_minus_L" != yes && \ |
1724 | | - test "$hardcode_shlibpath_var" != yes; then |
1725 | | - # We cannot hardcode anything. |
1726 | | - hardcode_action=unsupported |
1727 | | else |
1728 | | - # We can only hardcode existing directories. |
1729 | | - hardcode_action=relink |
1730 | | + # We cannot hardcode anything, or else we can only hardcode existing |
1731 | | + # directories. |
1732 | | + hardcode_action=unsupported |
1733 | | fi |
1734 | | echo "$ac_t$hardcode_action" 1>&6 |
1735 | | -test "$hardcode_action" = unsupported && can_build_shared=no |
1736 | | |
1737 | | |
1738 | | reload_flag= |
1739 | | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
1740 | | echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 |
1741 | | -# PORTME Some linker may need a different reload flag. |
1742 | | +# PORTME Some linkers may need a different reload flag. |
1743 | | reload_flag='-r' |
1744 | | -echo "$ac_t$reload_flag" |
1745 | | +echo "$ac_t$reload_flag" 1>&6 |
1746 | | test -n "$reload_flag" && reload_flag=" $reload_flag" |
1747 | | |
1748 | | # PORTME Fill in your ld.so characteristics |
1749 | | @@ -1103,18 +1805,45 @@ |
1750 | | finish_cmds= |
1751 | | finish_eval= |
1752 | | shlibpath_var= |
1753 | | +shlibpath_overrides_runpath=unknown |
1754 | | version_type=none |
1755 | | dynamic_linker="$host_os ld.so" |
1756 | | - |
1757 | | +sys_lib_dlsearch_path_spec="/lib /usr/lib" |
1758 | | +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
1759 | | +file_magic_cmd= |
1760 | | +file_magic_test_file= |
1761 | | +deplibs_check_method='unknown' |
1762 | | +# Need to set the preceding variable on all platforms that support |
1763 | | +# interlibrary dependencies. |
1764 | | +# 'none' -- dependencies not supported. |
1765 | | +# `unknown' -- same as none, but documents that we really don't know. |
1766 | | +# 'pass_all' -- all dependencies passed with no checks. |
1767 | | +# 'test_compile' -- check by making test program. |
1768 | | +# 'file_magic [regex]' -- check by looking for files in library path |
1769 | | +# which responds to the $file_magic_cmd with a given egrep regex. |
1770 | | +# If you have `file' or equivalent on your system and you're not sure |
1771 | | +# whether `pass_all' will *always* work, you probably want this one. |
1772 | | echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 |
1773 | | case "$host_os" in |
1774 | | -aix3* | aix4*) |
1775 | | +aix3*) |
1776 | | version_type=linux |
1777 | | - library_names_spec='${libname}${release}.so.$versuffix $libname.a' |
1778 | | + library_names_spec='${libname}${release}.so$versuffix $libname.a' |
1779 | | shlibpath_var=LIBPATH |
1780 | | |
1781 | | # AIX has no versioning support, so we append a major version to the name. |
1782 | | - soname_spec='${libname}${release}.so.$major' |
1783 | | + soname_spec='${libname}${release}.so$major' |
1784 | | + ;; |
1785 | | + |
1786 | | +aix4*) |
1787 | | + version_type=linux |
1788 | | + # AIX has no versioning support, so currently we can not hardcode correct |
1789 | | + # soname into executable. Probably we can add versioning support to |
1790 | | + # collect2, so additional links can be useful in future. |
1791 | | + # We preserve .a as extension for shared libraries though AIX4.2 |
1792 | | + # and later linker supports .so |
1793 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' |
1794 | | + shlibpath_var=LIBPATH |
1795 | | + deplibs_check_method=pass_all |
1796 | | ;; |
1797 | | |
1798 | | amigaos*) |
1799 | | @@ -1123,36 +1852,166 @@ |
1800 | | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' |
1801 | | ;; |
1802 | | |
1803 | | -freebsd2* | freebsd3*) |
1804 | | - version_type=sunos |
1805 | | - library_names_spec='${libname}${release}.so.$versuffix $libname.so' |
1806 | | - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' |
1807 | | +beos*) |
1808 | | + library_names_spec='${libname}.so' |
1809 | | + dynamic_linker="$host_os ld.so" |
1810 | | + shlibpath_var=LIBRARY_PATH |
1811 | | + deplibs_check_method=pass_all |
1812 | | + lt_cv_dlopen="load_add_on" |
1813 | | + lt_cv_dlopen_libs= |
1814 | | + lt_cv_dlopen_self=yes |
1815 | | + ;; |
1816 | | + |
1817 | | +bsdi4*) |
1818 | | + version_type=linux |
1819 | | + need_version=no |
1820 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
1821 | | + soname_spec='${libname}${release}.so$major' |
1822 | | + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
1823 | | shlibpath_var=LD_LIBRARY_PATH |
1824 | | + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' |
1825 | | + file_magic_cmd=/usr/bin/file |
1826 | | + file_magic_test_file=/shlib/libc.so |
1827 | | + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
1828 | | + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
1829 | | + export_dynamic_flag_spec=-rdynamic |
1830 | | + # the default ld.so.conf also contains /usr/contrib/lib and |
1831 | | + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
1832 | | + # libtool to hard-code these into programs |
1833 | | + ;; |
1834 | | + |
1835 | | +cygwin* | mingw*) |
1836 | | + version_type=windows |
1837 | | + need_version=no |
1838 | | + need_lib_prefix=no |
1839 | | + if test "$with_gcc" = yes; then |
1840 | | + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' |
1841 | | + else |
1842 | | + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' |
1843 | | + fi |
1844 | | + dynamic_linker='Win32 ld.exe' |
1845 | | + deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
1846 | | + file_magic_cmd='${OBJDUMP} -f' |
1847 | | + # FIXME: first we should search . and the directory the executable is in |
1848 | | + shlibpath_var=PATH |
1849 | | + lt_cv_dlopen="LoadLibrary" |
1850 | | + lt_cv_dlopen_libs= |
1851 | | + ;; |
1852 | | + |
1853 | | +freebsd1*) |
1854 | | + dynamic_linker=no |
1855 | | + ;; |
1856 | | + |
1857 | | +freebsd*) |
1858 | | + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
1859 | | + version_type=freebsd-$objformat |
1860 | | + case "$version_type" in |
1861 | | + freebsd-elf*) |
1862 | | + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' |
1863 | | + file_magic_cmd=/usr/bin/file |
1864 | | + file_magic_test_file=`echo /usr/lib/libc.so*` |
1865 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
1866 | | + need_version=no |
1867 | | + need_lib_prefix=no |
1868 | | + ;; |
1869 | | + freebsd-*) |
1870 | | + deplibs_check_method=unknown |
1871 | | + library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' |
1872 | | + need_version=yes |
1873 | | + ;; |
1874 | | + esac |
1875 | | + shlibpath_var=LD_LIBRARY_PATH |
1876 | | + case "$host_os" in |
1877 | | + freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) |
1878 | | + shlibpath_overrides_runpath=yes |
1879 | | + ;; |
1880 | | + *) # from 3.2 on |
1881 | | + shlibpath_overrides_runpath=no |
1882 | | + ;; |
1883 | | + esac |
1884 | | + ;; |
1885 | | + |
1886 | | +darwin* | rhapsody*) |
1887 | | + dynamic_linker="$host_os dyld" |
1888 | | + version_type=darwin |
1889 | | + need_lib_prefix=no |
1890 | | + need_version=no |
1891 | | + deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
1892 | | + file_magic_cmd='/usr/bin/file -L' |
1893 | | + case "$host_os" in |
1894 | | + rhapsody* | darwin1.[012]) |
1895 | | + file_magic_test_file='/System/Library/Frameworks/System.framework/System' |
1896 | | + ;; |
1897 | | + *) # Darwin 1.3 on |
1898 | | + file_magic_test_file='/usr/lib/libSystem.dylib' |
1899 | | + ;; |
1900 | | + esac |
1901 | | + library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' |
1902 | | + soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' |
1903 | | + shlibpath_overrides_runpath=yes |
1904 | | + shlibpath_var=DYLD_LIBRARY_PATH |
1905 | | ;; |
1906 | | |
1907 | | gnu*) |
1908 | | - version_type=sunos |
1909 | | - library_names_spec='${libname}${release}.so.$versuffix' |
1910 | | + version_type=linux |
1911 | | + need_lib_prefix=no |
1912 | | + need_version=no |
1913 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' |
1914 | | + soname_spec='${libname}${release}.so$major' |
1915 | | shlibpath_var=LD_LIBRARY_PATH |
1916 | | ;; |
1917 | | |
1918 | | -hpux9* | hpux10*) |
1919 | | +hpux9* | hpux10* | hpux11*) |
1920 | | # Give a soname corresponding to the major version so that dld.sl refuses to |
1921 | | # link against other versions. |
1922 | | dynamic_linker="$host_os dld.sl" |
1923 | | version_type=sunos |
1924 | | + need_lib_prefix=no |
1925 | | + need_version=no |
1926 | | shlibpath_var=SHLIB_PATH |
1927 | | - library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl' |
1928 | | - soname_spec='${libname}${release}.sl.$major' |
1929 | | + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
1930 | | + library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' |
1931 | | + soname_spec='${libname}${release}.sl$major' |
1932 | | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
1933 | | postinstall_cmds='chmod 555 $lib' |
1934 | | + case "$host_os" in |
1935 | | + hpux10.20*) |
1936 | | + # TODO: Does this work for hpux-11 too? |
1937 | | + deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' |
1938 | | + file_magic_cmd=/usr/bin/file |
1939 | | + file_magic_test_file=/usr/lib/libc.sl |
1940 | | + ;; |
1941 | | + esac |
1942 | | ;; |
1943 | | |
1944 | | irix5* | irix6*) |
1945 | | - version_type=osf |
1946 | | - soname_spec='${libname}${release}.so' |
1947 | | - library_names_spec='${libname}${release}.so.$versuffix $libname.so' |
1948 | | - shlibpath_var=LD_LIBRARY_PATH |
1949 | | + version_type=irix |
1950 | | + need_lib_prefix=no |
1951 | | + need_version=no |
1952 | | + soname_spec='${libname}${release}.so.$major' |
1953 | | + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' |
1954 | | + case "$host_os" in |
1955 | | + irix5*) |
1956 | | + libsuff= shlibsuff= |
1957 | | + # this will be overridden with pass_all, but let us keep it just in case |
1958 | | + deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
1959 | | + ;; |
1960 | | + *) |
1961 | | + case "$LD" in # libtool.m4 will add one of these switches to LD |
1962 | | + *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; |
1963 | | + *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; |
1964 | | + *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; |
1965 | | + *) libsuff= shlibsuff= libmagic=never-match;; |
1966 | | + esac |
1967 | | + ;; |
1968 | | + esac |
1969 | | + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
1970 | | + shlibpath_overrides_runpath=no |
1971 | | + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
1972 | | + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
1973 | | + file_magic_cmd=/usr/bin/file |
1974 | | + file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
1975 | | + deplibs_check_method='pass_all' |
1976 | | ;; |
1977 | | |
1978 | | # No shared lib support for Linux oldld, aout, or coff. |
1979 | | @@ -1163,10 +2022,14 @@ |
1980 | | # This must be Linux ELF. |
1981 | | linux-gnu*) |
1982 | | version_type=linux |
1983 | | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
1984 | | - soname_spec='${libname}${release}.so.$major' |
1985 | | - finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir' |
1986 | | + need_lib_prefix=no |
1987 | | + need_version=no |
1988 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
1989 | | + soname_spec='${libname}${release}.so$major' |
1990 | | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
1991 | | shlibpath_var=LD_LIBRARY_PATH |
1992 | | + shlibpath_overrides_runpath=no |
1993 | | + deplibs_check_method=pass_all |
1994 | | |
1995 | | if test -f /lib/ld.so.1; then |
1996 | | dynamic_linker='GNU ld.so' |
1997 | | @@ -1179,85 +2042,200 @@ |
1998 | | fi |
1999 | | ;; |
2000 | | |
2001 | | -netbsd* | openbsd*) |
2002 | | +netbsd*) |
2003 | | + version_type=sunos |
2004 | | + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
2005 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
2006 | | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
2007 | | + dynamic_linker='NetBSD (a.out) ld.so' |
2008 | | + else |
2009 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' |
2010 | | + soname_spec='${libname}${release}.so$major' |
2011 | | + dynamic_linker='NetBSD ld.elf_so' |
2012 | | + fi |
2013 | | + shlibpath_var=LD_LIBRARY_PATH |
2014 | | + ;; |
2015 | | + |
2016 | | +openbsd*) |
2017 | | version_type=sunos |
2018 | | - library_names_spec='${libname}${release}.so.$versuffix' |
2019 | | - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' |
2020 | | + if test "$with_gnu_ld" = yes; then |
2021 | | + need_lib_prefix=no |
2022 | | + need_version=no |
2023 | | + fi |
2024 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
2025 | | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
2026 | | shlibpath_var=LD_LIBRARY_PATH |
2027 | | ;; |
2028 | | |
2029 | | os2*) |
2030 | | libname_spec='$name' |
2031 | | + need_lib_prefix=no |
2032 | | library_names_spec='$libname.dll $libname.a' |
2033 | | dynamic_linker='OS/2 ld.exe' |
2034 | | shlibpath_var=LIBPATH |
2035 | | ;; |
2036 | | |
2037 | | -osf3* | osf4*) |
2038 | | +osf3* | osf4* | osf5*) |
2039 | | version_type=osf |
2040 | | + need_version=no |
2041 | | soname_spec='${libname}${release}.so' |
2042 | | - library_names_spec='${libname}${release}.so.$versuffix $libname.so' |
2043 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
2044 | | shlibpath_var=LD_LIBRARY_PATH |
2045 | | + # this will be overridden with pass_all, but let us keep it just in case |
2046 | | + deplibs_check_method='file_magic COFF format alpha shared library' |
2047 | | + file_magic_cmd=/usr/bin/file |
2048 | | + file_magic_test_file=/shlib/libc.so |
2049 | | + deplibs_check_method='pass_all' |
2050 | | + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
2051 | | + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
2052 | | ;; |
2053 | | |
2054 | | sco3.2v5*) |
2055 | | version_type=osf |
2056 | | - soname_spec='${libname}${release}.so.$major' |
2057 | | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
2058 | | + soname_spec='${libname}${release}.so$major' |
2059 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
2060 | | shlibpath_var=LD_LIBRARY_PATH |
2061 | | ;; |
2062 | | |
2063 | | -solaris2*) |
2064 | | +solaris*) |
2065 | | version_type=linux |
2066 | | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
2067 | | - soname_spec='${libname}${release}.so.$major' |
2068 | | + need_lib_prefix=no |
2069 | | + need_version=no |
2070 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
2071 | | + soname_spec='${libname}${release}.so$major' |
2072 | | shlibpath_var=LD_LIBRARY_PATH |
2073 | | + shlibpath_overrides_runpath=yes |
2074 | | + # ldd complains unless libraries are executable |
2075 | | + postinstall_cmds='chmod +x $lib' |
2076 | | + deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" |
2077 | | + file_magic_cmd=/usr/bin/file |
2078 | | + file_magic_test_file=/lib/libc.so |
2079 | | ;; |
2080 | | |
2081 | | sunos4*) |
2082 | | version_type=sunos |
2083 | | - library_names_spec='${libname}${release}.so.$versuffix' |
2084 | | - finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir' |
2085 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
2086 | | + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
2087 | | shlibpath_var=LD_LIBRARY_PATH |
2088 | | + shlibpath_overrides_runpath=yes |
2089 | | + if test "$with_gnu_ld" = yes; then |
2090 | | + need_lib_prefix=no |
2091 | | + fi |
2092 | | + need_version=yes |
2093 | | ;; |
2094 | | |
2095 | | -sysv4.2uw2*) |
2096 | | +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
2097 | | version_type=linux |
2098 | | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
2099 | | - soname_spec='${libname}${release}.so.$major' |
2100 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
2101 | | + soname_spec='${libname}${release}.so$major' |
2102 | | shlibpath_var=LD_LIBRARY_PATH |
2103 | | + case "$host_vendor" in |
2104 | | + sequent) |
2105 | | + file_magic_cmd='/bin/file' |
2106 | | + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' |
2107 | | + ;; |
2108 | | + ncr) |
2109 | | + deplibs_check_method='pass_all' |
2110 | | + ;; |
2111 | | + motorola) |
2112 | | + need_lib_prefix=no |
2113 | | + need_version=no |
2114 | | + shlibpath_overrides_runpath=no |
2115 | | + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
2116 | | + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' |
2117 | | + file_magic_cmd=/usr/bin/file |
2118 | | + file_magic_test_file=`echo /usr/lib/libc.so*` |
2119 | | + ;; |
2120 | | + esac |
2121 | | ;; |
2122 | | |
2123 | | uts4*) |
2124 | | version_type=linux |
2125 | | - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' |
2126 | | - soname_spec='${libname}${release}.so.$major' |
2127 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
2128 | | + soname_spec='${libname}${release}.so$major' |
2129 | | + shlibpath_var=LD_LIBRARY_PATH |
2130 | | + ;; |
2131 | | + |
2132 | | +dgux*) |
2133 | | + version_type=linux |
2134 | | + need_lib_prefix=no |
2135 | | + need_version=no |
2136 | | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
2137 | | + soname_spec='${libname}${release}.so$major' |
2138 | | shlibpath_var=LD_LIBRARY_PATH |
2139 | | ;; |
2140 | | |
2141 | | +sysv4*MP*) |
2142 | | + if test -d /usr/nec ;then |
2143 | | + version_type=linux |
2144 | | + library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' |
2145 | | + soname_spec='$libname.so.$major' |
2146 | | + shlibpath_var=LD_LIBRARY_PATH |
2147 | | + fi |
2148 | | + ;; |
2149 | | + |
2150 | | *) |
2151 | | dynamic_linker=no |
2152 | | ;; |
2153 | | esac |
2154 | | -echo "$ac_t$dynamic_linker" |
2155 | | +echo "$ac_t$dynamic_linker" 1>&6 |
2156 | | test "$dynamic_linker" = no && can_build_shared=no |
2157 | | |
2158 | | # Report the final consequences. |
2159 | | echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 |
2160 | | |
2161 | | +# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in |
2162 | | +# configure.in, otherwise build static only libraries. |
2163 | | +case "$host_os" in |
2164 | | +cygwin* | mingw* | os2*) |
2165 | | + if test x$can_build_shared = xyes; then |
2166 | | + test x$enable_win32_dll = xno && can_build_shared=no |
2167 | | + echo "checking if package supports dlls... $can_build_shared" 1>&6 |
2168 | | + fi |
2169 | | +;; |
2170 | | +esac |
2171 | | + |
2172 | | +if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then |
2173 | | + case "$deplibs_check_method" in |
2174 | | + "file_magic "*) |
2175 | | + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
2176 | | + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
2177 | | + egrep "$file_magic_regex" > /dev/null; then |
2178 | | + : |
2179 | | + else |
2180 | | + cat <<EOF 1>&2 |
2181 | | + |
2182 | | +*** Warning: the command libtool uses to detect shared libraries, |
2183 | | +*** $file_magic_cmd, produces output that libtool cannot recognize. |
2184 | | +*** The result is that libtool may fail to recognize shared libraries |
2185 | | +*** as such. This will affect the creation of libtool libraries that |
2186 | | +*** depend on shared libraries, but programs linked with such libtool |
2187 | | +*** libraries will work regardless of this problem. Nevertheless, you |
2188 | | +*** may want to report the problem to your system manager and/or to |
2189 | | +*** bug-libtool@gnu.org |
2190 | | + |
2191 | | +EOF |
2192 | | + fi ;; |
2193 | | + esac |
2194 | | +fi |
2195 | | + |
2196 | | echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 |
2197 | | test "$can_build_shared" = "no" && enable_shared=no |
2198 | | |
2199 | | # On AIX, shared libraries and static libraries use the same namespace, and |
2200 | | # are all built from PIC. |
2201 | | case "$host_os" in |
2202 | | -aix*) |
2203 | | +aix3*) |
2204 | | test "$enable_shared" = yes && enable_static=no |
2205 | | if test -n "$RANLIB"; then |
2206 | | - archive_cmds="$archive_cmds;\$RANLIB \$lib" |
2207 | | + archive_cmds="$archive_cmds~\$RANLIB \$lib" |
2208 | | postinstall_cmds='$RANLIB $lib' |
2209 | | fi |
2210 | | ;; |
2211 | | + |
2212 | | +aix4*) |
2213 | | + test "$enable_shared" = yes && enable_static=no |
2214 | | + ;; |
2215 | | esac |
2216 | | |
2217 | | echo "$ac_t$enable_shared" 1>&6 |
2218 | | @@ -1267,6 +2245,15 @@ |
2219 | | |
2220 | | echo "checking whether to build static libraries... $enable_static" 1>&6 |
2221 | | |
2222 | | +if test "$hardcode_action" = relink; then |
2223 | | + # Fast installation is not supported |
2224 | | + enable_fast_install=no |
2225 | | +elif test "$shlibpath_overrides_runpath" = yes || |
2226 | | + test "$enable_shared" = no; then |
2227 | | + # Fast installation is not necessary |
2228 | | + enable_fast_install=needless |
2229 | | +fi |
2230 | | + |
2231 | | echo $ac_n "checking for objdir... $ac_c" 1>&6 |
2232 | | rm -f .libs 2>/dev/null |
2233 | | mkdir .libs 2>/dev/null |
2234 | | @@ -1279,47 +2266,512 @@ |
2235 | | rmdir .libs 2>/dev/null |
2236 | | echo "$ac_t$objdir" 1>&6 |
2237 | | |
2238 | | +if test "x$enable_dlopen" != xyes; then |
2239 | | + enable_dlopen=unknown |
2240 | | + enable_dlopen_self=unknown |
2241 | | + enable_dlopen_self_static=unknown |
2242 | | +else |
2243 | | +if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then |
2244 | | + lt_cv_dlopen=no lt_cv_dlopen_libs= |
2245 | | +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
2246 | | +echo "$progname:2277: checking for dlopen in -ldl" >&5 |
2247 | | +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
2248 | | +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
2249 | | + echo $ac_n "(cached) $ac_c" 1>&6 |
2250 | | +else |
2251 | | + ac_save_LIBS="$LIBS" |
2252 | | +LIBS="-ldl $LIBS" |
2253 | | +cat > conftest.$ac_ext <<EOF |
2254 | | +#line 2285 "ltconfig" |
2255 | | +/* Override any gcc2 internal prototype to avoid an error. */ |
2256 | | +/* We use char because int might match the return type of a gcc2 |
2257 | | + builtin and then its argument prototype would still apply. */ |
2258 | | +#ifdef __cplusplus |
2259 | | +extern "C" |
2260 | | +#endif |
2261 | | +char dlopen(); |
2262 | | + |
2263 | | +int main() { |
2264 | | +dlopen() |
2265 | | +; return 0; } |
2266 | | +EOF |
2267 | | +if { (eval echo $progname:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2268 | | + rm -rf conftest* |
2269 | | + eval "ac_cv_lib_$ac_lib_var=yes" |
2270 | | +else |
2271 | | + echo "$progname: failed program was:" >&5 |
2272 | | + cat conftest.$ac_ext >&5 |
2273 | | + rm -rf conftest* |
2274 | | + eval "ac_cv_lib_$ac_lib_var=no" |
2275 | | +fi |
2276 | | +rm -f conftest* |
2277 | | +LIBS="$ac_save_LIBS" |
2278 | | + |
2279 | | +fi |
2280 | | +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
2281 | | + echo "$ac_t""yes" 1>&6 |
2282 | | + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" |
2283 | | +else |
2284 | | + echo "$ac_t""no" 1>&6 |
2285 | | +echo $ac_n "checking for dlopen""... $ac_c" 1>&6 |
2286 | | +echo "$progname:2317: checking for dlopen" >&5 |
2287 | | +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then |
2288 | | + echo $ac_n "(cached) $ac_c" 1>&6 |
2289 | | +else |
2290 | | + cat > conftest.$ac_ext <<EOF |
2291 | | +#line 2322 "ltconfig" |
2292 | | +/* System header to define __stub macros and hopefully few prototypes, |
2293 | | + which can conflict with char dlopen(); below. */ |
2294 | | +#include <assert.h> |
2295 | | +/* Override any gcc2 internal prototype to avoid an error. */ |
2296 | | +/* We use char because int might match the return type of a gcc2 |
2297 | | + builtin and then its argument prototype would still apply. */ |
2298 | | +#ifdef __cplusplus |
2299 | | +extern "C" |
2300 | | +#endif |
2301 | | +char dlopen(); |
2302 | | + |
2303 | | +int main() { |
2304 | | + |
2305 | | +/* The GNU C library defines this for functions which it implements |
2306 | | + to always fail with ENOSYS. Some functions are actually named |
2307 | | + something starting with __ and the normal name is an alias. */ |
2308 | | +#if defined (__stub_dlopen) || defined (__stub___dlopen) |
2309 | | +choke me |
2310 | | +#else |
2311 | | +dlopen(); |
2312 | | +#endif |
2313 | | + |
2314 | | +; return 0; } |
2315 | | +EOF |
2316 | | +if { (eval echo $progname:2347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2317 | | + rm -rf conftest* |
2318 | | + eval "ac_cv_func_dlopen=yes" |
2319 | | +else |
2320 | | + echo "$progname: failed program was:" >&5 |
2321 | | + cat conftest.$ac_ext >&5 |
2322 | | + rm -rf conftest* |
2323 | | + eval "ac_cv_func_dlopen=no" |
2324 | | +fi |
2325 | | +rm -f conftest* |
2326 | | +fi |
2327 | | +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then |
2328 | | + echo "$ac_t""yes" 1>&6 |
2329 | | + lt_cv_dlopen="dlopen" |
2330 | | +else |
2331 | | + echo "$ac_t""no" 1>&6 |
2332 | | +echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 |
2333 | | +echo "$progname:2364: checking for dld_link in -ldld" >&5 |
2334 | | +ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` |
2335 | | +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
2336 | | + echo $ac_n "(cached) $ac_c" 1>&6 |
2337 | | +else |
2338 | | + ac_save_LIBS="$LIBS" |
2339 | | +LIBS="-ldld $LIBS" |
2340 | | +cat > conftest.$ac_ext <<EOF |
2341 | | +#line 2372 "ltconfig" |
2342 | | +/* Override any gcc2 internal prototype to avoid an error. */ |
2343 | | +/* We use char because int might match the return type of a gcc2 |
2344 | | + builtin and then its argument prototype would still apply. */ |
2345 | | +#ifdef __cplusplus |
2346 | | +extern "C" |
2347 | | +#endif |
2348 | | +char dld_link(); |
2349 | | + |
2350 | | +int main() { |
2351 | | +dld_link() |
2352 | | +; return 0; } |
2353 | | +EOF |
2354 | | +if { (eval echo $progname:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2355 | | + rm -rf conftest* |
2356 | | + eval "ac_cv_lib_$ac_lib_var=yes" |
2357 | | +else |
2358 | | + echo "$progname: failed program was:" >&5 |
2359 | | + cat conftest.$ac_ext >&5 |
2360 | | + rm -rf conftest* |
2361 | | + eval "ac_cv_lib_$ac_lib_var=no" |
2362 | | +fi |
2363 | | +rm -f conftest* |
2364 | | +LIBS="$ac_save_LIBS" |
2365 | | + |
2366 | | +fi |
2367 | | +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
2368 | | + echo "$ac_t""yes" 1>&6 |
2369 | | + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" |
2370 | | +else |
2371 | | + echo "$ac_t""no" 1>&6 |
2372 | | +echo $ac_n "checking for shl_load""... $ac_c" 1>&6 |
2373 | | +echo "$progname:2404: checking for shl_load" >&5 |
2374 | | +if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then |
2375 | | + echo $ac_n "(cached) $ac_c" 1>&6 |
2376 | | +else |
2377 | | + cat > conftest.$ac_ext <<EOF |
2378 | | +#line 2409 "ltconfig" |
2379 | | +/* System header to define __stub macros and hopefully few prototypes, |
2380 | | + which can conflict with char shl_load(); below. */ |
2381 | | +#include <assert.h> |
2382 | | +/* Override any gcc2 internal prototype to avoid an error. */ |
2383 | | +/* We use char because int might match the return type of a gcc2 |
2384 | | + builtin and then its argument prototype would still apply. */ |
2385 | | +#ifdef __cplusplus |
2386 | | +extern "C" |
2387 | | +#endif |
2388 | | +char shl_load(); |
2389 | | + |
2390 | | +int main() { |
2391 | | + |
2392 | | +/* The GNU C library defines this for functions which it implements |
2393 | | + to always fail with ENOSYS. Some functions are actually named |
2394 | | + something starting with __ and the normal name is an alias. */ |
2395 | | +#if defined (__stub_shl_load) || defined (__stub___shl_load) |
2396 | | +choke me |
2397 | | +#else |
2398 | | +shl_load(); |
2399 | | +#endif |
2400 | | + |
2401 | | +; return 0; } |
2402 | | +EOF |
2403 | | +if { (eval echo $progname:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2404 | | + rm -rf conftest* |
2405 | | + eval "ac_cv_func_shl_load=yes" |
2406 | | +else |
2407 | | + echo "$progname: failed program was:" >&5 |
2408 | | + cat conftest.$ac_ext >&5 |
2409 | | + rm -rf conftest* |
2410 | | + eval "ac_cv_func_shl_load=no" |
2411 | | +fi |
2412 | | +rm -f conftest* |
2413 | | +fi |
2414 | | + |
2415 | | +if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then |
2416 | | + echo "$ac_t""yes" 1>&6 |
2417 | | + lt_cv_dlopen="shl_load" |
2418 | | +else |
2419 | | + echo "$ac_t""no" 1>&6 |
2420 | | +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
2421 | | +echo "$progname:2452: checking for shl_load in -ldld" >&5 |
2422 | | +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
2423 | | +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
2424 | | + echo $ac_n "(cached) $ac_c" 1>&6 |
2425 | | +else |
2426 | | + ac_save_LIBS="$LIBS" |
2427 | | +LIBS="-ldld $LIBS" |
2428 | | +cat > conftest.$ac_ext <<EOF |
2429 | | +#line 2460 "ltconfig" |
2430 | | +#include "confdefs.h" |
2431 | | +/* Override any gcc2 internal prototype to avoid an error. */ |
2432 | | +/* We use char because int might match the return type of a gcc2 |
2433 | | + builtin and then its argument prototype would still apply. */ |
2434 | | +#ifdef __cplusplus |
2435 | | +extern "C" |
2436 | | +#endif |
2437 | | +char shl_load(); |
2438 | | + |
2439 | | +int main() { |
2440 | | +shl_load() |
2441 | | +; return 0; } |
2442 | | +EOF |
2443 | | +if { (eval echo $progname:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2444 | | + rm -rf conftest* |
2445 | | + eval "ac_cv_lib_$ac_lib_var=yes" |
2446 | | +else |
2447 | | + echo "$progname: failed program was:" >&5 |
2448 | | + cat conftest.$ac_ext >&5 |
2449 | | + rm -rf conftest* |
2450 | | + eval "ac_cv_lib_$ac_lib_var=no" |
2451 | | +fi |
2452 | | +rm -f conftest* |
2453 | | +LIBS="$ac_save_LIBS" |
2454 | | + |
2455 | | +fi |
2456 | | +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
2457 | | + echo "$ac_t""yes" 1>&6 |
2458 | | + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" |
2459 | | +else |
2460 | | + echo "$ac_t""no" 1>&6 |
2461 | | +fi |
2462 | | + |
2463 | | + |
2464 | | +fi |
2465 | | + |
2466 | | + |
2467 | | +fi |
2468 | | + |
2469 | | + |
2470 | | +fi |
2471 | | + |
2472 | | + |
2473 | | +fi |
2474 | | + |
2475 | | +fi |
2476 | | + |
2477 | | + if test "x$lt_cv_dlopen" != xno; then |
2478 | | + enable_dlopen=yes |
2479 | | + fi |
2480 | | + |
2481 | | + case "$lt_cv_dlopen" in |
2482 | | + dlopen) |
2483 | | +for ac_hdr in dlfcn.h; do |
2484 | | +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
2485 | | +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
2486 | | +echo "$progname:2517: checking for $ac_hdr" >&5 |
2487 | | +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2488 | | + echo $ac_n "(cached) $ac_c" 1>&6 |
2489 | | +else |
2490 | | + cat > conftest.$ac_ext <<EOF |
2491 | | +#line 2522 "ltconfig" |
2492 | | +#include <$ac_hdr> |
2493 | | +int fnord = 0; |
2494 | | +EOF |
2495 | | +ac_try="$ac_compile >/dev/null 2>conftest.out" |
2496 | | +{ (eval echo $progname:2527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2497 | | +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2498 | | +if test -z "$ac_err"; then |
2499 | | + rm -rf conftest* |
2500 | | + eval "ac_cv_header_$ac_safe=yes" |
2501 | | +else |
2502 | | + echo "$ac_err" >&5 |
2503 | | + echo "$progname: failed program was:" >&5 |
2504 | | + cat conftest.$ac_ext >&5 |
2505 | | + rm -rf conftest* |
2506 | | + eval "ac_cv_header_$ac_safe=no" |
2507 | | +fi |
2508 | | +rm -f conftest* |
2509 | | +fi |
2510 | | +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
2511 | | + echo "$ac_t""yes" 1>&6 |
2512 | | +else |
2513 | | + echo "$ac_t""no" 1>&6 |
2514 | | +fi |
2515 | | +done |
2516 | | + |
2517 | | + if test "x$ac_cv_header_dlfcn_h" = xyes; then |
2518 | | + CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
2519 | | + fi |
2520 | | + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
2521 | | + LIBS="$lt_cv_dlopen_libs $LIBS" |
2522 | | + |
2523 | | + echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 |
2524 | | +echo "$progname:2555: checking whether a program can dlopen itself" >&5 |
2525 | | +if test "${lt_cv_dlopen_self+set}" = set; then |
2526 | | + echo $ac_n "(cached) $ac_c" 1>&6 |
2527 | | +else |
2528 | | + if test "$cross_compiling" = yes; then |
2529 | | + lt_cv_dlopen_self=cross |
2530 | | + else |
2531 | | + cat > conftest.c <<EOF |
2532 | | +#line 2563 "ltconfig" |
2533 | | + |
2534 | | +#if HAVE_DLFCN_H |
2535 | | +#include <dlfcn.h> |
2536 | | +#endif |
2537 | | + |
2538 | | +#include <stdio.h> |
2539 | | + |
2540 | | +#ifdef RTLD_GLOBAL |
2541 | | +# define LTDL_GLOBAL RTLD_GLOBAL |
2542 | | +#else |
2543 | | +# ifdef DL_GLOBAL |
2544 | | +# define LTDL_GLOBAL DL_GLOBAL |
2545 | | +# else |
2546 | | +# define LTDL_GLOBAL 0 |
2547 | | +# endif |
2548 | | +#endif |
2549 | | + |
2550 | | +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we |
2551 | | + find out it does not work in some platform. */ |
2552 | | +#ifndef LTDL_LAZY_OR_NOW |
2553 | | +# ifdef RTLD_LAZY |
2554 | | +# define LTDL_LAZY_OR_NOW RTLD_LAZY |
2555 | | +# else |
2556 | | +# ifdef DL_LAZY |
2557 | | +# define LTDL_LAZY_OR_NOW DL_LAZY |
2558 | | +# else |
2559 | | +# ifdef RTLD_NOW |
2560 | | +# define LTDL_LAZY_OR_NOW RTLD_NOW |
2561 | | +# else |
2562 | | +# ifdef DL_NOW |
2563 | | +# define LTDL_LAZY_OR_NOW DL_NOW |
2564 | | +# else |
2565 | | +# define LTDL_LAZY_OR_NOW 0 |
2566 | | +# endif |
2567 | | +# endif |
2568 | | +# endif |
2569 | | +# endif |
2570 | | +#endif |
2571 | | + |
2572 | | +fnord() { int i=42;} |
2573 | | +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); |
2574 | | + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); |
2575 | | + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } |
2576 | | + |
2577 | | +EOF |
2578 | | +if { (eval echo $progname:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
2579 | | +then |
2580 | | + lt_cv_dlopen_self=yes |
2581 | | +else |
2582 | | + echo "$progname: failed program was:" >&5 |
2583 | | + cat conftest.$ac_ext >&5 |
2584 | | + rm -fr conftest* |
2585 | | + lt_cv_dlopen_self=no |
2586 | | +fi |
2587 | | +rm -fr conftest* |
2588 | | +fi |
2589 | | + |
2590 | | +fi |
2591 | | + |
2592 | | +echo "$ac_t""$lt_cv_dlopen_self" 1>&6 |
2593 | | + |
2594 | | + if test "$lt_cv_dlopen_self" = yes; then |
2595 | | + LDFLAGS="$LDFLAGS $link_static_flag" |
2596 | | + echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 |
2597 | | +echo "$progname:2628: checking whether a statically linked program can dlopen itself" >&5 |
2598 | | +if test "${lt_cv_dlopen_self_static+set}" = set; then |
2599 | | + echo $ac_n "(cached) $ac_c" 1>&6 |
2600 | | +else |
2601 | | + if test "$cross_compiling" = yes; then |
2602 | | + lt_cv_dlopen_self_static=cross |
2603 | | + else |
2604 | | + cat > conftest.c <<EOF |
2605 | | +#line 2636 "ltconfig" |
2606 | | + |
2607 | | +#if HAVE_DLFCN_H |
2608 | | +#include <dlfcn.h> |
2609 | | +#endif |
2610 | | + |
2611 | | +#include <stdio.h> |
2612 | | + |
2613 | | +#ifdef RTLD_GLOBAL |
2614 | | +# define LTDL_GLOBAL RTLD_GLOBAL |
2615 | | +#else |
2616 | | +# ifdef DL_GLOBAL |
2617 | | +# define LTDL_GLOBAL DL_GLOBAL |
2618 | | +# else |
2619 | | +# define LTDL_GLOBAL 0 |
2620 | | +# endif |
2621 | | +#endif |
2622 | | + |
2623 | | +/* We may have to define LTDL_LAZY_OR_NOW in the command line if we |
2624 | | + find out it does not work in some platform. */ |
2625 | | +#ifndef LTDL_LAZY_OR_NOW |
2626 | | +# ifdef RTLD_LAZY |
2627 | | +# define LTDL_LAZY_OR_NOW RTLD_LAZY |
2628 | | +# else |
2629 | | +# ifdef DL_LAZY |
2630 | | +# define LTDL_LAZY_OR_NOW DL_LAZY |
2631 | | +# else |
2632 | | +# ifdef RTLD_NOW |
2633 | | +# define LTDL_LAZY_OR_NOW RTLD_NOW |
2634 | | +# else |
2635 | | +# ifdef DL_NOW |
2636 | | +# define LTDL_LAZY_OR_NOW DL_NOW |
2637 | | +# else |
2638 | | +# define LTDL_LAZY_OR_NOW 0 |
2639 | | +# endif |
2640 | | +# endif |
2641 | | +# endif |
2642 | | +# endif |
2643 | | +#endif |
2644 | | + |
2645 | | +fnord() { int i=42;} |
2646 | | +main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); |
2647 | | + if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); |
2648 | | + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } |
2649 | | + |
2650 | | +EOF |
2651 | | +if { (eval echo $progname:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
2652 | | +then |
2653 | | + lt_cv_dlopen_self_static=yes |
2654 | | +else |
2655 | | + echo "$progname: failed program was:" >&5 |
2656 | | + cat conftest.$ac_ext >&5 |
2657 | | + rm -fr conftest* |
2658 | | + lt_cv_dlopen_self_static=no |
2659 | | +fi |
2660 | | +rm -fr conftest* |
2661 | | +fi |
2662 | | + |
2663 | | +fi |
2664 | | + |
2665 | | +echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 |
2666 | | +fi |
2667 | | + ;; |
2668 | | + esac |
2669 | | + |
2670 | | + case "$lt_cv_dlopen_self" in |
2671 | | + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
2672 | | + *) enable_dlopen_self=unknown ;; |
2673 | | + esac |
2674 | | + |
2675 | | + case "$lt_cv_dlopen_self_static" in |
2676 | | + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
2677 | | + *) enable_dlopen_self_static=unknown ;; |
2678 | | + esac |
2679 | | +fi |
2680 | | + |
2681 | | # Copy echo and quote the copy, instead of the original, because it is |
2682 | | # used later. |
2683 | | ltecho="$echo" |
2684 | | +if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then |
2685 | | + ltecho="$CONFIG_SHELL \$0 --fallback-echo" |
2686 | | +fi |
2687 | | +LTSHELL="$SHELL" |
2688 | | |
2689 | | -# Now quote all the things that may contain metacharacters. |
2690 | | -for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ |
2691 | | - old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \ |
2692 | | - link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
2693 | | - libname_spec library_names_spec soname_spec RANLIB \ |
2694 | | - old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
2695 | | - old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \ |
2696 | | - allow_undefined_flag no_undefined_flag \ |
2697 | | - finish_cmds finish_eval global_symbol_pipe \ |
2698 | | - hardcode_libdir_flag_spec hardcode_libdir_separator; do |
2699 | | - |
2700 | | - case "$var" in |
2701 | | - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
2702 | | - old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \ |
2703 | | - postinstall_cmds | postuninstall_cmds | finish_cmds) |
2704 | | - # Double-quote double-evaled strings. |
2705 | | - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`" |
2706 | | - ;; |
2707 | | - *) |
2708 | | - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`" |
2709 | | +LTCONFIG_VERSION="$VERSION" |
2710 | | + |
2711 | | +# Only quote variables if we're using ltmain.sh. |
2712 | | +case "$ltmain" in |
2713 | | +*.sh) |
2714 | | + # Now quote all the things that may contain metacharacters. |
2715 | | + for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ |
2716 | | + old_LD old_LDFLAGS old_LIBS \ |
2717 | | + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ |
2718 | | + AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ |
2719 | | + reload_flag reload_cmds wl \ |
2720 | | + pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
2721 | | + thread_safe_flag_spec whole_archive_flag_spec libname_spec \ |
2722 | | + library_names_spec soname_spec \ |
2723 | | + RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
2724 | | + old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ |
2725 | | + file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ |
2726 | | + finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ |
2727 | | + hardcode_libdir_flag_spec hardcode_libdir_separator \ |
2728 | | + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
2729 | | + compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do |
2730 | | + |
2731 | | + case "$var" in |
2732 | | + reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
2733 | | + old_postinstall_cmds | old_postuninstall_cmds | \ |
2734 | | + export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ |
2735 | | + postinstall_cmds | postuninstall_cmds | \ |
2736 | | + finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
2737 | | + # Double-quote double-evaled strings. |
2738 | | + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
2739 | | + ;; |
2740 | | + *) |
2741 | | + eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
2742 | | + ;; |
2743 | | + esac |
2744 | | + done |
2745 | | + |
2746 | | + case "$ltecho" in |
2747 | | + *'\$0 --fallback-echo"') |
2748 | | + ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` |
2749 | | ;; |
2750 | | esac |
2751 | | -done |
2752 | | |
2753 | | -ofile=libtool |
2754 | | -trap "$rm $ofile; exit 1" 1 2 15 |
2755 | | -echo creating $ofile |
2756 | | -$rm $ofile |
2757 | | -cat <<EOF > $ofile |
2758 | | -#! /bin/sh |
2759 | | + trap "$rm \"$ofile\"; exit 1" 1 2 15 |
2760 | | + echo "creating $ofile" |
2761 | | + $rm "$ofile" |
2762 | | + cat <<EOF > "$ofile" |
2763 | | +#! $SHELL |
2764 | | |
2765 | | -# libtool - Provide generalized library-building support services. |
2766 | | -# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION |
2767 | | +# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
2768 | | +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
2769 | | # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. |
2770 | | # |
2771 | | -# Copyright (C) 1996-1998 Free Software Foundation, Inc. |
2772 | | -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
2773 | | +# Copyright (C) 1996-1999 Free Software Foundation, Inc. |
2774 | | +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
2775 | | # |
2776 | | # This program is free software; you can redistribute it and/or modify |
2777 | | # it under the terms of the GNU General Public License as published by |
2778 | | @@ -1340,120 +2792,208 @@ |
2779 | | # configuration script generated by Autoconf, you may include it under |
2780 | | # the same distribution terms that you use for the rest of that program. |
2781 | | |
2782 | | -# This program was configured as follows, |
2783 | | -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
2784 | | -# |
2785 | | -# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ |
2786 | | -# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ |
2787 | | -# $0$ltconfig_args |
2788 | | -# |
2789 | | -# Compiler and other test output produced by $progname, useful for |
2790 | | -# debugging $progname, is in ./config.log if it exists. |
2791 | | - |
2792 | | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
2793 | | Xsed="sed -e s/^X//" |
2794 | | |
2795 | | # The HP-UX ksh and POSIX shell print the target directory to stdout |
2796 | | # if CDPATH is set. |
2797 | | -if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi |
2798 | | +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
2799 | | |
2800 | | -# An echo program that does not interpret backslashes. |
2801 | | -echo="$ltecho" |
2802 | | +### BEGIN LIBTOOL CONFIG |
2803 | | +EOF |
2804 | | + cfgfile="$ofile" |
2805 | | + ;; |
2806 | | + |
2807 | | +*) |
2808 | | + # Double-quote the variables that need it (for aesthetics). |
2809 | | + for var in old_CC old_CFLAGS old_CPPFLAGS \ |
2810 | | + old_LD old_LDFLAGS old_LIBS \ |
2811 | | + old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do |
2812 | | + eval "$var=\\\"\$var\\\"" |
2813 | | + done |
2814 | | + |
2815 | | + # Just create a config file. |
2816 | | + cfgfile="$ofile.cfg" |
2817 | | + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 |
2818 | | + echo "creating $cfgfile" |
2819 | | + $rm "$cfgfile" |
2820 | | + cat <<EOF > "$cfgfile" |
2821 | | +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. |
2822 | | +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
2823 | | +EOF |
2824 | | + ;; |
2825 | | +esac |
2826 | | + |
2827 | | +cat <<EOF >> "$cfgfile" |
2828 | | +# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
2829 | | +# |
2830 | | +# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ |
2831 | | +# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ |
2832 | | +# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ |
2833 | | +# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ |
2834 | | +# $0$ltconfig_args |
2835 | | +# |
2836 | | +# Compiler and other test output produced by $progname, useful for |
2837 | | +# debugging $progname, is in ./config.log if it exists. |
2838 | | |
2839 | | # The version of $progname that generated this script. |
2840 | | -LTCONFIG_VERSION="$VERSION" |
2841 | | +LTCONFIG_VERSION=$LTCONFIG_VERSION |
2842 | | |
2843 | | # Shell to use when invoking shell scripts. |
2844 | | -SHELL=${CONFIG_SHELL-/bin/sh} |
2845 | | +SHELL=$LTSHELL |
2846 | | |
2847 | | -# Whether or not to build libtool libraries. |
2848 | | +# Whether or not to build shared libraries. |
2849 | | build_libtool_libs=$enable_shared |
2850 | | |
2851 | | -# Whether or not to build old-style libraries. |
2852 | | +# Whether or not to build static libraries. |
2853 | | build_old_libs=$enable_static |
2854 | | |
2855 | | +# Whether or not to optimize for fast installation. |
2856 | | +fast_install=$enable_fast_install |
2857 | | + |
2858 | | # The host system. |
2859 | | -host_alias="$host_alias" |
2860 | | -host="$host" |
2861 | | +host_alias=$host_alias |
2862 | | +host=$host |
2863 | | + |
2864 | | +# An echo program that does not interpret backslashes. |
2865 | | +echo=$ltecho |
2866 | | |
2867 | | # The archiver. |
2868 | | -AR="$AR" |
2869 | | +AR=$AR |
2870 | | |
2871 | | # The default C compiler. |
2872 | | -CC="$CC" |
2873 | | +CC=$CC |
2874 | | |
2875 | | # The linker used to build libraries. |
2876 | | -LD="$LD" |
2877 | | +LD=$LD |
2878 | | |
2879 | | # Whether we need hard or soft links. |
2880 | | -LN_S="$LN_S" |
2881 | | +LN_S=$LN_S |
2882 | | |
2883 | | # A BSD-compatible nm program. |
2884 | | -NM="$NM" |
2885 | | +NM=$NM |
2886 | | + |
2887 | | +# Used on cygwin: DLL creation program. |
2888 | | +DLLTOOL="$DLLTOOL" |
2889 | | + |
2890 | | +# Used on cygwin: object dumper. |
2891 | | +OBJDUMP="$OBJDUMP" |
2892 | | + |
2893 | | +# Used on cygwin: assembler. |
2894 | | +AS="$AS" |
2895 | | |
2896 | | # The name of the directory that contains temporary libtool files. |
2897 | | -objdir="$objdir" |
2898 | | +objdir=$objdir |
2899 | | |
2900 | | # How to create reloadable object files. |
2901 | | -reload_flag="$reload_flag" |
2902 | | -reload_cmds="$reload_cmds" |
2903 | | +reload_flag=$reload_flag |
2904 | | +reload_cmds=$reload_cmds |
2905 | | |
2906 | | # How to pass a linker flag through the compiler. |
2907 | | -wl="$wl" |
2908 | | +wl=$wl |
2909 | | + |
2910 | | +# Object file suffix (normally "o"). |
2911 | | +objext="$objext" |
2912 | | + |
2913 | | +# Old archive suffix (normally "a"). |
2914 | | +libext="$libext" |
2915 | | + |
2916 | | +# Executable file suffix (normally ""). |
2917 | | +exeext="$exeext" |
2918 | | |
2919 | | # Additional compiler flags for building library objects. |
2920 | | -pic_flag="$pic_flag" |
2921 | | +pic_flag=$pic_flag |
2922 | | + |
2923 | | +# Does compiler simultaneously support -c and -o options? |
2924 | | +compiler_c_o=$compiler_c_o |
2925 | | + |
2926 | | +# Can we write directly to a .lo ? |
2927 | | +compiler_o_lo=$compiler_o_lo |
2928 | | + |
2929 | | +# Must we lock files when doing compilation ? |
2930 | | +need_locks=$need_locks |
2931 | | + |
2932 | | +# Do we need the lib prefix for modules? |
2933 | | +need_lib_prefix=$need_lib_prefix |
2934 | | + |
2935 | | +# Do we need a version for libraries? |
2936 | | +need_version=$need_version |
2937 | | + |
2938 | | +# Whether dlopen is supported. |
2939 | | +dlopen=$enable_dlopen |
2940 | | + |
2941 | | +# Whether dlopen of programs is supported. |
2942 | | +dlopen_self=$enable_dlopen_self |
2943 | | + |
2944 | | +# Whether dlopen of statically linked programs is supported. |
2945 | | +dlopen_self_static=$enable_dlopen_self_static |
2946 | | |
2947 | | # Compiler flag to prevent dynamic linking. |
2948 | | -link_static_flag="$link_static_flag" |
2949 | | +link_static_flag=$link_static_flag |
2950 | | |
2951 | | # Compiler flag to turn off builtin functions. |
2952 | | -no_builtin_flag="$no_builtin_flag" |
2953 | | +no_builtin_flag=$no_builtin_flag |
2954 | | |
2955 | | # Compiler flag to allow reflexive dlopens. |
2956 | | -export_dynamic_flag_spec="$export_dynamic_flag_spec" |
2957 | | +export_dynamic_flag_spec=$export_dynamic_flag_spec |
2958 | | + |
2959 | | +# Compiler flag to generate shared objects directly from archives. |
2960 | | +whole_archive_flag_spec=$whole_archive_flag_spec |
2961 | | + |
2962 | | +# Compiler flag to generate thread-safe objects. |
2963 | | +thread_safe_flag_spec=$thread_safe_flag_spec |
2964 | | |
2965 | | # Library versioning type. |
2966 | | version_type=$version_type |
2967 | | |
2968 | | # Format of library name prefix. |
2969 | | -libname_spec="$libname_spec" |
2970 | | +libname_spec=$libname_spec |
2971 | | |
2972 | | # List of archive names. First name is the real one, the rest are links. |
2973 | | # The last name is the one that the linker finds with -lNAME. |
2974 | | -library_names_spec="$library_names_spec" |
2975 | | +library_names_spec=$library_names_spec |
2976 | | |
2977 | | # The coded name of the library, if different from the real name. |
2978 | | -soname_spec="$soname_spec" |
2979 | | +soname_spec=$soname_spec |
2980 | | |
2981 | | # Commands used to build and install an old-style archive. |
2982 | | -RANLIB="$RANLIB" |
2983 | | -old_archive_cmds="$old_archive_cmds" |
2984 | | -old_postinstall_cmds="$old_postinstall_cmds" |
2985 | | -old_postuninstall_cmds="$old_postuninstall_cmds" |
2986 | | +RANLIB=$RANLIB |
2987 | | +old_archive_cmds=$old_archive_cmds |
2988 | | +old_postinstall_cmds=$old_postinstall_cmds |
2989 | | +old_postuninstall_cmds=$old_postuninstall_cmds |
2990 | | |
2991 | | # Create an old-style archive from a shared archive. |
2992 | | -old_archive_from_new_cmds="$old_archive_from_new_cmds" |
2993 | | +old_archive_from_new_cmds=$old_archive_from_new_cmds |
2994 | | |
2995 | | # Commands used to build and install a shared archive. |
2996 | | -archive_cmds="$archive_cmds" |
2997 | | -postinstall_cmds="$postinstall_cmds" |
2998 | | -postuninstall_cmds="$postuninstall_cmds" |
2999 | | +archive_cmds=$archive_cmds |
3000 | | +archive_expsym_cmds=$archive_expsym_cmds |
3001 | | +postinstall_cmds=$postinstall_cmds |
3002 | | +postuninstall_cmds=$postuninstall_cmds |
3003 | | + |
3004 | | +# Method to check whether dependent libraries are shared objects. |
3005 | | +deplibs_check_method=$deplibs_check_method |
3006 | | + |
3007 | | +# Command to use when deplibs_check_method == file_magic. |
3008 | | +file_magic_cmd=$file_magic_cmd |
3009 | | |
3010 | | # Flag that allows shared libraries with undefined symbols to be built. |
3011 | | -allow_undefined_flag="$allow_undefined_flag" |
3012 | | +allow_undefined_flag=$allow_undefined_flag |
3013 | | |
3014 | | # Flag that forces no undefined symbols. |
3015 | | -no_undefined_flag="$no_undefined_flag" |
3016 | | +no_undefined_flag=$no_undefined_flag |
3017 | | |
3018 | | # Commands used to finish a libtool library installation in a directory. |
3019 | | -finish_cmds="$finish_cmds" |
3020 | | +finish_cmds=$finish_cmds |
3021 | | |
3022 | | # Same as above, but a single script fragment to be evaled but not shown. |
3023 | | -finish_eval="$finish_eval" |
3024 | | +finish_eval=$finish_eval |
3025 | | |
3026 | | # Take the output of nm and produce a listing of raw symbols and C names. |
3027 | | -global_symbol_pipe="$global_symbol_pipe" |
3028 | | +global_symbol_pipe=$global_symbol_pipe |
3029 | | + |
3030 | | +# Transform the output of nm in a proper C declaration |
3031 | | +global_symbol_to_cdecl=$global_symbol_to_cdecl |
3032 | | |
3033 | | # This is the shared library runtime path variable. |
3034 | | runpath_var=$runpath_var |
3035 | | @@ -1461,15 +3001,18 @@ |
3036 | | # This is the shared library path variable. |
3037 | | shlibpath_var=$shlibpath_var |
3038 | | |
3039 | | +# Is shlibpath searched before the hard-coded library search path? |
3040 | | +shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
3041 | | + |
3042 | | # How to hardcode a shared library path into an executable. |
3043 | | hardcode_action=$hardcode_action |
3044 | | |
3045 | | # Flag to hardcode \$libdir into a binary during linking. |
3046 | | # This must work even if \$libdir does not exist. |
3047 | | -hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec" |
3048 | | +hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec |
3049 | | |
3050 | | # Whether we need a single -rpath flag with a separated argument. |
3051 | | -hardcode_libdir_separator="$hardcode_libdir_separator" |
3052 | | +hardcode_libdir_separator=$hardcode_libdir_separator |
3053 | | |
3054 | | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
3055 | | # resulting binary. |
3056 | | @@ -1483,27 +3026,115 @@ |
3057 | | # the resulting binary. |
3058 | | hardcode_shlibpath_var=$hardcode_shlibpath_var |
3059 | | |
3060 | | +# Compile-time system search path for libraries |
3061 | | +sys_lib_search_path_spec=$sys_lib_search_path_spec |
3062 | | + |
3063 | | +# Run-time system search path for libraries |
3064 | | +sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec |
3065 | | + |
3066 | | +# Fix the shell variable \$srcfile for the compiler. |
3067 | | +fix_srcfile_path="$fix_srcfile_path" |
3068 | | + |
3069 | | +# Set to yes if exported symbols are required. |
3070 | | +always_export_symbols=$always_export_symbols |
3071 | | + |
3072 | | +# The commands to list exported symbols. |
3073 | | +export_symbols_cmds=$export_symbols_cmds |
3074 | | + |
3075 | | +# Symbols that should not be listed in the preloaded symbols. |
3076 | | +exclude_expsyms=$exclude_expsyms |
3077 | | + |
3078 | | +# Symbols that must always be exported. |
3079 | | +include_expsyms=$include_expsyms |
3080 | | + |
3081 | | EOF |
3082 | | |
3083 | | -case "$host_os" in |
3084 | | -aix3*) |
3085 | | - cat <<\EOF >> $ofile |
3086 | | +case "$ltmain" in |
3087 | | +*.sh) |
3088 | | + echo '### END LIBTOOL CONFIG' >> "$ofile" |
3089 | | + echo >> "$ofile" |
3090 | | + case "$host_os" in |
3091 | | + aix3*) |
3092 | | + cat <<\EOF >> "$ofile" |
3093 | | + |
3094 | | # AIX sometimes has problems with the GCC collect2 program. For some |
3095 | | # reason, if we set the COLLECT_NAMES environment variable, the problems |
3096 | | # vanish in a puff of smoke. |
3097 | | -if test "${COLLECT_NAMES+set}" != set; then |
3098 | | +if test "X${COLLECT_NAMES+set}" != Xset; then |
3099 | | COLLECT_NAMES= |
3100 | | export COLLECT_NAMES |
3101 | | fi |
3102 | | - |
3103 | | EOF |
3104 | | + ;; |
3105 | | + esac |
3106 | | + |
3107 | | + # Append the ltmain.sh script. |
3108 | | + sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) |
3109 | | + # We use sed instead of cat because bash on DJGPP gets confused if |
3110 | | + # if finds mixed CR/LF and LF-only lines. Since sed operates in |
3111 | | + # text mode, it properly converts lines to CR/LF. This bash problem |
3112 | | + # is reportedly fixed, but why not run on old versions too? |
3113 | | + |
3114 | | + chmod +x "$ofile" |
3115 | | + ;; |
3116 | | + |
3117 | | +*) |
3118 | | + # Compile the libtool program. |
3119 | | + echo "FIXME: would compile $ltmain" |
3120 | | ;; |
3121 | | esac |
3122 | | |
3123 | | -# Append the ltmain.sh script. |
3124 | | -cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1) |
3125 | | +test -n "$cache_file" || exit 0 |
3126 | | + |
3127 | | +# AC_CACHE_SAVE |
3128 | | +trap '' 1 2 15 |
3129 | | +cat > confcache <<\EOF |
3130 | | +# This file is a shell script that caches the results of configure |
3131 | | +# tests run on this system so they can be shared between configure |
3132 | | +# scripts and configure runs. It is not useful on other systems. |
3133 | | +# If it contains results you don't want to keep, you may remove or edit it. |
3134 | | +# |
3135 | | +# By default, configure uses ./config.cache as the cache file, |
3136 | | +# creating it if it does not exist already. You can give configure |
3137 | | +# the --cache-file=FILE option to use a different cache file; that is |
3138 | | +# what configure does when it calls configure scripts in |
3139 | | +# subdirectories, so they share the cache. |
3140 | | +# Giving --cache-file=/dev/null disables caching, for debugging configure. |
3141 | | +# config.status only pays attention to the cache file if you give it the |
3142 | | +# --recheck option to rerun configure. |
3143 | | +# |
3144 | | +EOF |
3145 | | +# The following way of writing the cache mishandles newlines in values, |
3146 | | +# but we know of no workaround that is simple, portable, and efficient. |
3147 | | +# So, don't put newlines in cache variables' values. |
3148 | | +# Ultrix sh set writes to stderr and can't be redirected directly, |
3149 | | +# and sets the high bit in the cache file unless we assign to the vars. |
3150 | | +(set) 2>&1 | |
3151 | | + case `(ac_space=' '; set | grep ac_space) 2>&1` in |
3152 | | + *ac_space=\ *) |
3153 | | + # `set' does not quote correctly, so add quotes (double-quote substitution |
3154 | | + # turns \\\\ into \\, and sed turns \\ into \). |
3155 | | + sed -n \ |
3156 | | + -e "s/'/'\\\\''/g" \ |
3157 | | + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
3158 | | + ;; |
3159 | | + *) |
3160 | | + # `set' quotes correctly as required by POSIX, so do not add quotes. |
3161 | | + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
3162 | | + ;; |
3163 | | + esac >> confcache |
3164 | | +if cmp -s $cache_file confcache; then |
3165 | | + : |
3166 | | +else |
3167 | | + if test -w $cache_file; then |
3168 | | + echo "updating cache $cache_file" |
3169 | | + cat confcache > $cache_file |
3170 | | + else |
3171 | | + echo "not updating unwritable cache $cache_file" |
3172 | | + fi |
3173 | | +fi |
3174 | | +rm -f confcache |
3175 | | |
3176 | | -chmod +x $ofile |
3177 | | exit 0 |
3178 | | |
3179 | | # Local Variables: |