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