3 # ltconfig - Create a system-specific libtool.
4 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
5 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
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.
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.
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.
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}
31 if test "X$1" = X--no-reexec; then
32 # Discard the --no-reexec flag, and continue.
34 elif test "X$1" = X--fallback-echo; then
35 # used as fallback echo
41 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
42 # Yippee, $echo works!
45 # Restart under the correct shell.
46 exec "$SHELL" "$0" --no-reexec ${1+"$@"}
49 # Find the correct PATH separator. Usually this is `:', but
50 # DJGPP uses `;' like DOS.
51 if test "X${PATH_SEPARATOR+set}" != "Xset"; then
52 UNAME=${UNAME-`uname 2>/dev/null`}
54 *-DOS) PATH_SEPARATOR=';' ;;
55 *) PATH_SEPARATOR=':' ;;
59 # The HP-UX ksh and POSIX shell print the target directory to stdout
61 if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
63 if test "X${echo_test_string+set}" != "Xset"; then
64 # find a string as large as possible, as long as the shell can cope with it
65 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
66 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
67 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
68 echo_test_string="`eval $cmd`" &&
69 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
75 if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
76 test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
77 # The Solaris, AIX, and Digital Unix default echo programs unquote
78 # backslashes. This makes it impossible to quote backslashes using
79 # echo "$something" | sed 's/\\/\\\\/g'
81 # So, first we look for a working echo in the user's PATH.
83 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
84 for dir in $PATH /usr/ucb; do
85 if test -f $dir/echo &&
86 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
87 test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
94 if test "X$echo" = Xecho; then
95 # We didn't find a better echo, so look for alternatives.
96 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
97 test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
98 # This shell has a builtin print -r that does the trick.
100 elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
101 # If we have ksh, try running ltconfig again with it.
102 ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
103 export ORIGINAL_CONFIG_SHELL
104 CONFIG_SHELL=/bin/ksh
106 exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
110 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
111 test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
114 elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
115 test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
116 CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
118 SHELL="$CONFIG_SHELL"
120 echo="$CONFIG_SHELL $0 --fallback-echo"
121 elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
122 test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
123 echo="$CONFIG_SHELL $0 --fallback-echo"
125 # maybe with a smaller string...
128 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
129 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
135 if test "$prev" != 'sed 50q "$0"'; then
136 echo_test_string=`eval $prev`
137 export echo_test_string
138 exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
140 # Oops. We lost completely, so just stick with echo.
148 # Sed substitution that helps us do robust quoting. It backslashifies
149 # metacharacters that are still active within double-quoted strings.
151 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
153 # Same as above, but do not quote variable references.
154 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
156 # Sed substitution to delay expansion of an escaped shell variable in a
157 # double_quote_subst'ed string.
158 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
160 # The name of this program.
161 progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
167 TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
168 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
169 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
172 help="Try \`$progname --help' for more information."
175 default_ofile=libtool
178 # All known linkers require a `.a' archive for static linking.
180 enable_fast_install=yes
181 enable_dlopen=unknown
189 ofile="$default_ofile"
202 old_CPPFLAGS="$CPPFLAGS"
207 old_DLLTOOL="$DLLTOOL"
210 # Parse the command line options.
216 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
220 # If the previous option needs an argument, assign it.
221 if test -n "$prev"; then
222 eval "$prev=\$option"
229 Usage: $progname [OPTION]... [HOST [LTMAIN]]
231 Generate a system-specific libtool script.
233 --debug enable verbose shell tracing
234 --disable-shared do not build shared libraries
235 --disable-static do not build static libraries
236 --disable-fast-install do not optimize for fast installation
237 --enable-dlopen enable dlopen support
238 --enable-dlopen-self enable support for dlopening programs
239 --help display this help and exit
240 --no-verify do not verify that HOST is a valid host type
241 -o, --output=FILE specify the output file [default=$default_ofile]
242 --quiet same as \`--silent'
243 --silent do not print informational messages
244 --srcdir=DIR find \`config.guess' in DIR
245 --version output version information and exit
246 --with-gcc assume that the GNU C compiler will be used
247 --with-gnu-ld assume that the C compiler uses the GNU linker
248 --disable-lock disable file locking
249 --cache-file=FILE configure cache file
251 LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
252 that provides basic libtool functionality.
254 HOST is the canonical host system name [default=guessed].
260 echo "$progname: enabling shell trace mode"
264 --disable-shared) enable_shared=no ;;
266 --disable-static) enable_static=no ;;
268 --disable-fast-install) enable_fast_install=no ;;
270 --enable-dlopen) enable_dlopen=yes ;;
272 --quiet | --silent) silent=yes ;;
274 --srcdir) prev=srcdir ;;
275 --srcdir=*) srcdir="$optarg" ;;
277 --no-verify) verify_host=no ;;
279 --output | -o) prev=ofile ;;
280 --output=*) ofile="$optarg" ;;
282 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
284 --with-gcc) with_gcc=yes ;;
285 --with-gnu-ld) with_gnu_ld=yes ;;
287 --disable-lock) need_locks=no ;;
289 --cache-file=*) cache_file="$optarg" ;;
292 echo "$progname: unrecognized option \`$option'" 1>&2
298 if test -z "$ltmain"; then
300 elif test -z "$host"; then
301 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
302 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
303 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
307 echo "$progname: too many arguments" 1>&2
314 if test -z "$ltmain"; then
315 echo "$progname: you must specify a LTMAIN file" 1>&2
320 if test ! -f "$ltmain"; then
321 echo "$progname: \`$ltmain' does not exist" 1>&2
326 # Quote any args containing shell metacharacters.
331 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
332 ltconfig_args="$ltconfig_args '$arg'" ;;
333 *) ltconfig_args="$ltconfig_args $arg" ;;
337 # A relevant subset of AC_INIT.
339 # File descriptor usage:
342 # 2 errors and warnings
343 # 3 some systems may open it to /dev/tty
344 # 4 used on the Kubota Titan
345 # 5 compiler messages saved in config.log
346 # 6 checking for... messages and results
347 if test "$silent" = yes; then
355 # Only set LANG and LC_ALL to C if already set.
356 # These must not be set unconditionally because not all systems understand
357 # e.g. LANG=C (notably SCO).
358 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
359 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
361 if test -n "$cache_file" && test -r "$cache_file"; then
362 echo "loading cache $cache_file within ltconfig"
366 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
367 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
368 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
375 ac_n= ac_c='\c' ac_t=
378 if test -z "$srcdir"; then
379 # Assume the source directory is the same one as the path to LTMAIN.
380 srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
381 test "$srcdir" = "$ltmain" && srcdir=.
384 trap "$rm conftest*; exit 1" 1 2 15
385 if test "$verify_host" = yes; then
386 # Check for config.guess and config.sub.
388 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
389 if test -f $ac_dir/config.guess; then
394 if test -z "$ac_aux_dir"; then
395 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
399 ac_config_guess=$ac_aux_dir/config.guess
400 ac_config_sub=$ac_aux_dir/config.sub
402 # Make sure we can run config.sub.
403 if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
405 echo "$progname: cannot run $ac_config_sub" 1>&2
410 echo $ac_n "checking host system type""... $ac_c" 1>&6
413 case "$host_alias" in
415 if host_alias=`$SHELL $ac_config_guess`; then :
417 echo "$progname: cannot guess host type; you must specify one" 1>&2
422 host=`$SHELL $ac_config_sub $host_alias`
423 echo "$ac_t$host" 1>&6
425 # Make sure the host verified.
426 test -z "$host" && exit 1
428 elif test -z "$host"; then
429 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
436 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
439 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
442 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
443 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
444 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
448 # AIX sometimes has problems with the GCC collect2 program. For some
449 # reason, if we set the COLLECT_NAMES environment variable, the problems
450 # vanish in a puff of smoke.
451 if test "${COLLECT_NAMES+set}" != set; then
458 # Determine commands to create old-style static archives.
459 old_archive_cmds='$AR cru $oldlib$oldobjs'
460 old_postinstall_cmds='chmod 644 $oldlib'
461 old_postuninstall_cmds=
463 # Set a sane default for `AR'.
464 test -z "$AR" && AR=ar
466 # If RANLIB is not set, then run the test.
467 if test "${RANLIB+set}" != "set"; then
470 echo $ac_n "checking for ranlib... $ac_c" 1>&6
471 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
473 test -z "$dir" && dir=.
474 if test -f $dir/ranlib; then
482 echo "$ac_t$result" 1>&6
485 if test -n "$RANLIB"; then
486 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
487 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
490 # Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
491 test -z "$DLLTOOL" && DLLTOOL=dlltool
492 test -z "$AS" && AS=as
494 # Check to see if we are using GCC.
495 if test "$with_gcc" != yes || test -z "$CC"; then
496 # If CC is not set, then try to find GCC or a usable CC.
497 if test -z "$CC"; then
498 echo $ac_n "checking for gcc... $ac_c" 1>&6
499 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
502 test -z "$dir" && dir=.
503 if test -f $dir/gcc; then
510 if test -n "$CC"; then
517 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
518 if test -z "$CC"; then
519 echo $ac_n "checking for cc... $ac_c" 1>&6
520 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
523 test -z "$dir" && dir=.
524 if test -f $dir/cc; then
525 if test "$dir/cc" = "/usr/ucb/cc"; then
534 if test $cc_rejected = yes; then
535 # We found a bogon in the path, so make sure we never use it.
538 if test $# -gt 0; then
539 # We chose a different compiler from the bogus one.
540 # However, it has the same name, so the bogon will be chosen
541 # first if we set CC to just the name; use the full file name.
543 set dummy "$dir/cc" "$@"
549 if test -n "$CC"; then
555 if test -z "$CC"; then
556 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
561 # Now see if the compiler is really GCC.
563 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
564 echo "$progname:564: checking whether we are using GNU C" >&5
567 cat > conftest.c <<EOF
572 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
576 echo "$ac_t$with_gcc" 1>&6
579 # Allow CC to be a program name with arguments.
583 echo $ac_n "checking for object suffix... $ac_c" 1>&6
585 echo 'int i = 1;' > conftest.c
586 echo "$progname:586: checking for object suffix" >& 5
587 if { (eval echo $progname:587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
588 # Append any warnings to the config.log.
589 cat conftest.err 1>&5
591 for ac_file in conftest.*; do
594 *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
598 cat conftest.err 1>&5
599 echo "$progname: failed program was:" >&5
603 echo "$ac_t$objext" 1>&6
605 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
607 special_shlib_compile_flags=
612 if test "$with_gcc" = yes; then
614 link_static_flag='-static'
617 beos* | irix5* | irix6* | osf3* | osf4*)
618 # PIC is the default for these OSes.
621 # Below there is a dirty hack to force normal static linking with -ldl
622 # The problem is because libdl dynamically linked with both libc and
623 # libC (AIX C++ library), which obviously doesn't included in libraries
624 # list by gcc. This cause undefined symbols with -static flags.
625 # This hack allows C programs to be linked with "-static -ldl", but
626 # we not sure about C++ programs.
627 link_static_flag="$link_static_flag ${wl}-lC"
629 cygwin* | mingw* | os2*)
630 # We can build DLLs from non-PIC.
633 # FIXME: we need at least 68020 code to build shared libraries, but
634 # adding the `-m68020' flag to GCC prevents building anything better,
636 pic_flag='-m68020 -resident32 -malways-restore-a4'
643 # PORTME Check for PIC flags for the system compiler.
646 # All AIX code is PIC.
647 link_static_flag='-bnso -bI:/lib/syscalls.exp'
650 hpux9* | hpux10* | hpux11*)
651 # Is there a better link_static_flag that works with the bundled CC?
653 link_static_flag="${wl}-a ${wl}archive"
659 link_static_flag='-non_shared'
660 # PIC (with -KPIC) is the default.
663 cygwin* | mingw* | os2*)
664 # We can build DLLs from non-PIC.
668 # All OSF/1 code is PIC.
670 link_static_flag='-non_shared'
675 link_static_flag='-dn'
676 special_shlib_compile_flags='-belf'
681 link_static_flag='-Bstatic'
687 link_static_flag='-Bstatic'
691 sysv4.2uw2* | sysv4.3* | sysv5*)
693 link_static_flag='-Bstatic'
699 link_static_flag='-Bstatic'
708 if test -n "$pic_flag"; then
709 echo "$ac_t$pic_flag" 1>&6
711 # Check to make sure the pic_flag actually works.
712 echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
714 echo "int some_variable = 0;" > conftest.c
715 save_CFLAGS="$CFLAGS"
716 CFLAGS="$CFLAGS $pic_flag -DPIC"
717 echo "$progname:717: checking if $compiler PIC flag $pic_flag works" >&5
718 if { (eval echo $progname:718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
719 # Append any warnings to the config.log.
720 cat conftest.err 1>&5
723 hpux9* | hpux10* | hpux11*)
724 # On HP-UX, both CC and GCC only warn that PIC is supported... then they
725 # create non-PIC objects. So, if there were any warnings, we assume that
726 # PIC is not supported.
727 if test -s conftest.err; then
733 pic_flag=" $pic_flag"
738 pic_flag=" $pic_flag"
742 # Append any errors to the config.log.
743 cat conftest.err 1>&5
748 CFLAGS="$save_CFLAGS"
751 echo "$ac_t"none 1>&6
754 # Check to see if options -o and -c are simultaneously supported by compiler
755 echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
757 echo "int some_variable = 0;" > conftest.c
758 save_CFLAGS="$CFLAGS"
759 CFLAGS="$CFLAGS -c -o conftest2.o"
760 echo "$progname:760: checking if $compiler supports -c -o file.o" >&5
761 if { (eval echo $progname:761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then
763 # The compiler can only warn and ignore the option if not recognized
764 # So say no if there are warnings
765 if test -s conftest.err; then
773 # Append any errors to the config.log.
774 cat conftest.err 1>&5
778 CFLAGS="$save_CFLAGS"
781 if test x"$compiler_c_o" = x"yes"; then
782 # Check to see if we can write to a .lo
783 echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
785 echo "int some_variable = 0;" > conftest.c
786 save_CFLAGS="$CFLAGS"
787 CFLAGS="$CFLAGS -c -o conftest.lo"
788 echo "$progname:788: checking if $compiler supports -c -o file.lo" >&5
789 if { (eval echo $progname:789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
791 # The compiler can only warn and ignore the option if not recognized
792 # So say no if there are warnings
793 if test -s conftest.err; then
801 # Append any errors to the config.log.
802 cat conftest.err 1>&5
806 CFLAGS="$save_CFLAGS"
812 # Check to see if we can do hard links to lock some files if needed
813 hard_links="nottested"
814 if test "$compiler_c_o" = no && test "$need_locks" != no; then
815 # do not overwrite the value of need_locks provided by the user
816 echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
819 ln conftest.a conftest.b 2>/dev/null && hard_links=no
821 ln conftest.a conftest.b 2>&5 || hard_links=no
822 ln conftest.a conftest.b 2>/dev/null && hard_links=no
823 echo "$ac_t$hard_links" 1>&6
825 if test "$hard_links" = no; then
826 echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
833 if test "$with_gcc" = yes; then
834 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
835 echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
837 echo "int some_variable = 0;" > conftest.c
838 save_CFLAGS="$CFLAGS"
839 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
840 echo "$progname:840: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
841 if { (eval echo $progname:841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.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 conftest.err; then
847 compiler_rtti_exceptions=no
850 compiler_rtti_exceptions=yes
853 # Append any errors to the config.log.
854 cat conftest.err 1>&5
855 compiler_rtti_exceptions=no
858 CFLAGS="$save_CFLAGS"
861 if test "$compiler_rtti_exceptions" = "yes"; then
862 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
864 no_builtin_flag=' -fno-builtin'
869 # Check for any special shared library compilation flags.
870 if test -n "$special_shlib_compile_flags"; then
871 echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
872 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
874 echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
879 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
881 echo 'main(){return(0);}' > conftest.c
882 save_LDFLAGS="$LDFLAGS"
883 LDFLAGS="$LDFLAGS $link_static_flag"
884 echo "$progname:884: checking if $compiler static flag $link_static_flag works" >&5
885 if { (eval echo $progname:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
886 echo "$ac_t$link_static_flag" 1>&6
888 echo "$ac_t"none 1>&6
891 LDFLAGS="$save_LDFLAGS"
894 if test -z "$LN_S"; then
895 # Check to see if we can use ln -s, or we need hard links.
896 echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
898 if ln -s X conftestdata 2>/dev/null; then
904 if test "$LN_S" = "ln -s"; then
911 # Make sure LD is an absolute path.
912 if test -z "$LD"; then
914 if test "$with_gcc" = yes; then
915 # Check if gcc -print-prog-name=ld gives a path.
916 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
917 echo "$progname:917: checking for ld used by GCC" >&5
918 ac_prog=`($CC -print-prog-name=ld) 2>&5`
920 # Accept absolute paths.
921 /* | [A-Za-z]:[\\/]*)
922 re_direlt='/[^/][^/]*/\.\./'
923 # Canonicalize the path of ld
924 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
925 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
926 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
928 test -z "$LD" && LD="$ac_prog"
931 # If it fails, then pretend we are not using GCC.
935 # If it is relative, then search for the first ld in PATH.
939 elif test "$with_gnu_ld" = yes; then
940 echo $ac_n "checking for GNU ld... $ac_c" 1>&6
941 echo "$progname:941: checking for GNU ld" >&5
943 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
944 echo "$progname:944: checking for non-GNU ld" >&5
947 if test -z "$LD"; then
948 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
949 for ac_dir in $PATH; do
950 test -z "$ac_dir" && ac_dir=.
951 if test -f "$ac_dir/$ac_prog"; then
952 LD="$ac_dir/$ac_prog"
953 # Check to see if the program is GNU ld. I'd rather use --version,
954 # but apparently some GNU ld's only accept -v.
955 # Break only if it was the GNU/non-GNU ld that we prefer.
956 if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
957 test "$with_gnu_ld" != no && break
959 test "$with_gnu_ld" != yes && break
966 if test -n "$LD"; then
972 if test -z "$LD"; then
973 echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
978 # Check to see if it really is or is not GNU ld.
979 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
980 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
981 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
986 echo "$ac_t$with_gnu_ld" 1>&6
988 # See if the linker supports building shared libraries.
989 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
991 allow_undefined_flag=
993 need_lib_prefix=unknown
995 # when you set need_version to no, make sure it does not cause -set_version
996 # flags to be left without arguments
999 old_archive_from_new_cmds=
1000 export_dynamic_flag_spec=
1001 whole_archive_flag_spec=
1002 thread_safe_flag_spec=
1003 hardcode_libdir_flag_spec=
1004 hardcode_libdir_separator=
1007 hardcode_shlibpath_var=unsupported
1009 always_export_symbols=no
1010 export_symbols_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1011 # include_expsyms should be a list of space-separated symbols to be *always*
1012 # included in the symbol list
1014 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1015 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1016 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1017 # as well as any symbol that contains `d'.
1022 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1023 # When not using gcc, we currently assume that we are using
1024 # Microsoft Visual C++.
1025 if test "$with_gcc" != yes; then
1030 freebsd2* | sunos4*)
1031 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1037 if test "$with_gnu_ld" = yes; then
1038 # If archive_cmds runs LD, not CC, wlarc should be empty
1041 # See if GNU ld supports shared libraries.
1044 # On AIX, the GNU linker is very broken
1048 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1049 *** to be unable to reliably create shared libraries on AIX.
1050 *** Therefore, libtool is disabling shared libraries support. If you
1051 *** really care for shared libraries, you may want to modify your PATH
1052 *** so that a non-GNU linker is found, and then restart.
1058 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)'
1059 hardcode_libdir_flag_spec='-L$libdir'
1060 hardcode_minus_L=yes
1064 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
1067 hardcode_minus_L=yes
1068 hardcode_shlibpath_var=no
1072 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1073 archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1080 # hardcode_libdir_flag_spec is actually meaningless, as there is
1081 # no search path for DLLs.
1082 hardcode_libdir_flag_spec='-L$libdir'
1083 allow_undefined_flag=unsupported
1084 always_export_symbols=yes
1086 # Extract the symbol export list from an `--export-all' def file,
1087 # then regenerate the def file from the symbol export list, so that
1088 # the compiled dll only exports the symbol export list.
1089 export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~
1090 sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
1091 (cd $objdir && $CC -c $soname-ltdll.c)~
1092 $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~
1093 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
1095 archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
1097 for symbol in `cat $export_symbols`; do
1098 echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
1099 _lt_hint=`expr 1 + \$_lt_hint`;
1101 $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~
1102 $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~
1103 $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~
1104 $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~
1105 $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
1107 old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
1111 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1112 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1113 archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1120 if test "$ld_shlibs" = yes; then
1121 runpath_var=LD_RUN_PATH
1122 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1123 export_dynamic_flag_spec='${wl}--export-dynamic'
1124 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1127 # PORTME fill in a description of your system's linker (not GNU ld)
1130 allow_undefined_flag=unsupported
1131 always_export_symbols=yes
1132 archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
1133 # Note: this linker hardcodes the directories in LIBPATH if there
1134 # are no directories specified by -L.
1135 hardcode_minus_L=yes
1136 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
1137 # Neither direct hardcoding nor static linking is supported with a
1139 hardcode_direct=unsupported
1144 allow_undefined_flag=
1145 if test "$with_gcc" = yes; then
1146 if strings `${CC} -print-prog-name=collect2` | \
1147 grep resolve_lib_name >/dev/null
1149 # We have reworked collect2
1152 # We have old collect2
1153 hardcode_direct=unsupported
1155 archive_cmds='$CC -shared ${wl}-bnoentry -o $objdir/$soname $libobjs $deplibs $linkopts'
1157 always_export_symbols=yes
1158 archive_expsym_cmds='$CC -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry'
1161 hardcode_minus_L=yes
1162 # Though LIBPATH variable hardcodes shlibpath into executable,
1163 # it doesn't affect searching for -l* libraries; this confuses
1165 hardcode_shlibpath_var=unsupported
1166 hardcode_libdir_flag_spec='-L$libdir'
1170 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)'
1171 hardcode_libdir_flag_spec='-L$libdir'
1172 hardcode_minus_L=yes
1176 # When not using gcc, we currently assume that we are using
1177 # Microsoft Visual C++.
1178 # hardcode_libdir_flag_spec is actually meaningless, as there is
1179 # no search path for DLLs.
1180 hardcode_libdir_flag_spec=' '
1181 allow_undefined_flag=unsupported
1182 # Tell ltmain to make .lib files, not .a files.
1184 # FIXME: Setting linknames here is a bad hack.
1185 archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1186 # The linker will automatically build a .lib file if we build a DLL.
1187 old_archive_from_new_cmds='true'
1188 # FIXME: Should let the user specify the lib program.
1189 old_archive_cmds='lib /OUT:$oldlib$oldobjs'
1190 fix_srcfile_path='`cygpath -w $srcfile`'
1198 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1199 # support. Future versions do this automatically, but an explicit c++rt0.o
1200 # does not break anything, and helps significantly (at the cost of a little
1203 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
1204 hardcode_libdir_flag_spec='-R$libdir'
1206 hardcode_minus_L=no # verified on 2.2.6
1207 hardcode_shlibpath_var=no
1210 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1212 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1214 hardcode_minus_L=yes
1215 hardcode_shlibpath_var=no
1218 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1220 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
1221 hardcode_libdir_flag_spec='-R$libdir'
1224 hardcode_shlibpath_var=no
1228 archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
1229 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1231 hardcode_minus_L=yes
1232 export_dynamic_flag_spec='${wl}-E'
1236 archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib $libobjs $deplibs $linkopts'
1237 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1239 hardcode_minus_L=yes
1240 export_dynamic_flag_spec='${wl}-E'
1244 if test "$with_gcc" = yes; then
1245 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
1247 archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
1249 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1250 hardcode_libdir_separator=:
1254 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1255 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
1257 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
1259 hardcode_libdir_flag_spec='${wl}-R$libdir'
1261 hardcode_shlibpath_var=no
1265 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1266 hardcode_libdir_flag_spec='-R$libdir'
1268 hardcode_shlibpath_var=no
1272 hardcode_libdir_flag_spec='-L$libdir'
1273 hardcode_minus_L=yes
1274 allow_undefined_flag=unsupported
1275 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
1276 old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
1280 if test "$with_gcc" = yes; then
1281 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1282 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
1284 allow_undefined_flag=' -expect_unresolved \*'
1285 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
1287 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1288 hardcode_libdir_separator=:
1292 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
1297 no_undefined_flag=' -z text'
1298 # $CC -shared without GNU ld will not create a library from C++
1299 # object files and a static libstdc++, better avoid it by now
1300 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
1301 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1302 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
1303 hardcode_libdir_flag_spec='-R$libdir'
1304 hardcode_shlibpath_var=no
1308 # Why do we need -Bstatic? To avoid inter-library dependencies, maybe...
1309 if test "$with_gcc" = yes; then
1310 # Use -fPIC here because libgcc is multilibbed
1311 archive_cmds='$CC -shared ${wl}-Bstatic -fPIC -o $lib $libobjs $deplibs $linkopts'
1313 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
1315 hardcode_libdir_flag_spec='-L$libdir'
1317 hardcode_minus_L=yes
1318 hardcode_shlibpath_var=no
1322 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1325 hardcode_shlibpath_var=no
1326 export_dynamic_flag_spec='-Bexport'
1330 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1331 hardcode_libdir_flag_spec='-L$libdir'
1334 hardcode_shlibpath_var=no
1338 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1339 hardcode_libdir_flag_spec='-L$libdir'
1342 hardcode_shlibpath_var=no
1351 echo "$ac_t$ld_shlibs" 1>&6
1353 if test -z "$NM"; then
1354 echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
1356 /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
1358 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1359 for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
1360 test -z "$ac_dir" && ac_dir=.
1361 if test -f $ac_dir/nm; then
1362 # Check to see if the nm accepts a BSD-compat flag.
1363 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1364 # nm: unknown option "B" ignored
1365 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1368 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1372 NM=${NM="$ac_dir/nm"} # keep the first match, but
1373 continue # so that we can try to find one that supports BSD flags
1378 test -z "$NM" && NM=nm
1381 echo "$ac_t$NM" 1>&6
1384 # Check for command to grab the raw symbol name followed by C symbol from nm.
1385 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1387 # These are sane defaults that work on at least a few old systems.
1388 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1390 # Character class describing NM global symbol codes.
1391 symcode='[BCDEGRST]'
1393 # Regexp to match symbols that can be accessed directly from C.
1394 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1396 # Transform the above into a raw symbol and a C symbol.
1397 symxfrm='\1 \2\3 \3'
1399 # Transform an extracted symbol line into a proper C declaration
1400 global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1402 # Define system-specific variables.
1408 symcode='[ABCDGISTW]'
1410 hpux*) # Its linker distinguishes data from code symbols
1411 global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1414 symcode='[BCDEGRST]'
1421 # If we're using GNU nm, then use its standard symbol codes.
1422 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1423 symcode='[ABCDGISTW]'
1426 # Try without a prefix undercore, then with it.
1427 for ac_symprfx in "" "_"; do
1429 # Write the raw and C identifiers.
1430 global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
1432 # Check to see that the pipe works correctly.
1435 cat > conftest.c <<EOF
1440 void nm_test_func(){}
1444 main(){nm_test_var='a';nm_test_func();return(0);}
1447 echo "$progname:1447: checking if global_symbol_pipe works" >&5
1448 if { (eval echo $progname:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
1449 # Now try to grab the symbols.
1451 if { echo "$progname:1451: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1453 # Try sorting and uniquifying the output.
1454 if sort "$nlist" | uniq > "$nlist"T; then
1455 mv -f "$nlist"T "$nlist"
1460 # Make sure that we snagged all the symbols we need.
1461 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1462 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1463 cat <<EOF > conftest.c
1469 # Now generate the symbol file.
1470 eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
1472 cat <<EOF >> conftest.c
1473 #if defined (__STDC__) && __STDC__
1474 # define lt_ptr_t void *
1476 # define lt_ptr_t char *
1480 /* The mapping between symbol names and symbols. */
1485 lt_preloaded_symbols[] =
1488 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
1489 cat <<\EOF >> conftest.c
1497 # Now try linking the two files.
1498 mv conftest.$objext conftestm.$objext
1500 save_CFLAGS="$CFLAGS"
1501 LIBS="conftestm.$objext"
1502 CFLAGS="$CFLAGS$no_builtin_flag"
1503 if { (eval echo $progname:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1506 echo "$progname: failed program was:" >&5
1511 echo "cannot find nm_test_func in $nlist" >&5
1514 echo "cannot find nm_test_var in $nlist" >&5
1517 echo "cannot run $global_symbol_pipe" >&5
1520 echo "$progname: failed program was:" >&5
1525 # Do not use the global_symbol_pipe unless it works.
1526 if test "$pipe_works" = yes; then
1532 echo "$ac_t$pipe_works" 1>&6
1534 if test -z "$global_symbol_pipe"; then
1535 global_symbol_to_cdecl=
1538 # Check hardcoding attributes.
1539 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1541 if test -n "$hardcode_libdir_flag_spec" || \
1542 test -n "$runpath_var"; then
1544 # We can hardcode non-existant directories.
1545 if test "$hardcode_direct" != no && \
1546 test "$hardcode_minus_L" != no && \
1547 test "$hardcode_shlibpath_var" != no; then
1549 # Linking always hardcodes the temporary library directory.
1550 hardcode_action=relink
1552 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1553 hardcode_action=immediate
1556 # We cannot hardcode anything, or else we can only hardcode existing
1558 hardcode_action=unsupported
1560 echo "$ac_t$hardcode_action" 1>&6
1564 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1565 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1566 # PORTME Some linkers may need a different reload flag.
1568 echo "$ac_t$reload_flag" 1>&6
1569 test -n "$reload_flag" && reload_flag=" $reload_flag"
1571 # PORTME Fill in your ld.so characteristics
1573 libname_spec='lib$name'
1580 shlibpath_overrides_runpath=unknown
1582 dynamic_linker="$host_os ld.so"
1583 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1584 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1586 file_magic_test_file=
1587 deplibs_check_method='unknown'
1588 # Need to set the preceding variable on all platforms that support
1589 # interlibrary dependencies.
1590 # 'none' -- dependencies not supported.
1591 # `unknown' -- same as none, but documents that we really don't know.
1592 # 'pass_all' -- all dependencies passed with no checks.
1593 # 'test_compile' -- check by making test program.
1594 # 'file_magic [regex]' -- check by looking for files in library path
1595 # which responds to the $file_magic_cmd with a given egrep regex.
1596 # If you have `file' or equivalent on your system and you're not sure
1597 # whether `pass_all' will *always* work, you probably want this one.
1598 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1602 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1603 shlibpath_var=LIBPATH
1605 # AIX has no versioning support, so we append a major version to the name.
1606 soname_spec='${libname}${release}.so$major'
1611 # AIX has no versioning support, so currently we can not hardcode correct
1612 # soname into executable. Probably we can add versioning support to
1613 # collect2, so additional links can be useful in future.
1614 # We preserve .a as extension for shared libraries though AIX4.2
1615 # and later linker supports .so
1616 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
1617 shlibpath_var=LIBPATH
1618 deplibs_check_method=pass_all
1622 library_names_spec='$libname.ixlibrary $libname.a'
1623 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1624 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'
1628 library_names_spec='${libname}.so'
1629 dynamic_linker="$host_os ld.so"
1630 shlibpath_var=LIBRARY_PATH
1635 library_names_spec='${libname}.so$major ${libname}.so'
1636 soname_spec='${libname}.so'
1637 finish_cmds='PATH="$PATH:/sbin" ldconfig $libdir'
1638 shlibpath_var=LD_LIBRARY_PATH
1639 deplibs_check_method='file_magic ELF 32-bit LSB shared object'
1640 file_magic_cmd=/usr/bin/file
1641 file_magic_test_file=/shlib/libc.so
1642 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1643 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1644 # the default ld.so.conf also contains /usr/contrib/lib and
1645 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1646 # libtool to hard-code these into programs
1650 version_type=windows
1651 if test "$with_gcc" = yes; then
1652 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
1654 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1656 dynamic_linker='Win32 ld.exe'
1657 deplibs_check_method='file_magic file format pei*-i386.*architecture: i386'
1658 file_magic_cmd='objdump -f'
1660 # FIXME: first we should search . and the directory the executable is in
1669 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1670 version_type=freebsd-$objformat
1671 case "$version_type" in
1673 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1674 file_magic_cmd=/usr/bin/file
1675 file_magic_test_file=`echo /usr/lib/libc.so*`
1676 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1681 deplibs_check_method=unknown
1682 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1686 finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
1687 shlibpath_var=LD_LIBRARY_PATH
1692 library_names_spec='${libname}${release}.so$versuffix ${libname}.so'
1693 shlibpath_var=LD_LIBRARY_PATH
1696 hpux9* | hpux10* | hpux11*)
1697 # Give a soname corresponding to the major version so that dld.sl refuses to
1698 # link against other versions.
1699 dynamic_linker="$host_os dld.sl"
1703 shlibpath_var=SHLIB_PATH
1704 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1705 soname_spec='${libname}${release}.sl$major'
1706 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1707 postinstall_cmds='chmod 555 $lib'
1712 soname_spec='${libname}${release}.so'
1713 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1714 shlibpath_var=LD_LIBRARY_PATH
1715 deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" # or should it be pass_all?
1716 file_magic_cmd=/usr/bin/file
1717 file_magic_test_file=`echo /lib/libc.so*`
1718 shlibpath_overrides_runpath=no
1725 soname_spec='${libname}${release}.so'
1726 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1727 case "$LD" in # libtool.m4 will add one of these switches to LD
1728 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1729 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1730 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1731 *) libsuff= shlibsuff= libmagic=never-match;;
1733 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1734 shlibpath_overrides_runpath=no
1735 # even though /usr/local/lib is always searched, the man-page says
1736 # shared libraries should not be installed there if they use an ABI
1737 # different from -32, so we'd better not search for shared libraries
1739 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1740 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1741 deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" # or should it be pass_all?
1742 file_magic_cmd=/usr/bin/file
1743 file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1746 # No shared lib support for Linux oldld, aout, or coff.
1747 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1751 # This must be Linux ELF.
1756 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1757 soname_spec='${libname}${release}.so$major'
1758 finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
1759 shlibpath_var=LD_LIBRARY_PATH
1760 shlibpath_overrides_runpath=no
1761 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
1762 file_magic_cmd=/usr/bin/file
1763 file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1765 if test -f /lib/ld.so.1; then
1766 dynamic_linker='GNU ld.so'
1768 # Only the GNU ld.so supports shared libraries on MkLinux.
1770 powerpc*) dynamic_linker=no ;;
1771 *) dynamic_linker='Linux ld.so' ;;
1778 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1779 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1780 finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
1781 dynamic_linker='NetBSD (a.out) ld.so'
1783 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1784 soname_spec='${libname}${release}.so$major'
1785 dynamic_linker='NetBSD ld.elf_so'
1787 shlibpath_var=LD_LIBRARY_PATH
1792 if test "$with_gnu_ld" = yes; then
1796 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1797 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1798 shlibpath_var=LD_LIBRARY_PATH
1802 libname_spec='$name'
1804 library_names_spec='$libname.dll $libname.a'
1805 dynamic_linker='OS/2 ld.exe'
1806 shlibpath_var=LIBPATH
1811 soname_spec='${libname}${release}.so'
1812 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1813 shlibpath_var=LD_LIBRARY_PATH
1814 # deplibs_check_method='pass_all'
1815 # Although pass_all appears to work, it copies symbols from static libraries
1816 # into shared ones and exports them. So, when a program is linked with two
1817 # or more libraries that have got copies of the same symbols, link fails
1818 # This was only tested on osf4:
1819 deplibs_check_method='file_magic COFF format alpha shared library'
1820 file_magic_cmd=/usr/bin/file
1821 file_magic_test_file=/shlib/libc.so
1822 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1823 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1828 soname_spec='${libname}${release}.so$major'
1829 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1830 shlibpath_var=LD_LIBRARY_PATH
1837 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1838 soname_spec='${libname}${release}.so$major'
1839 shlibpath_var=LD_LIBRARY_PATH
1840 shlibpath_overrides_runpath=yes
1841 # ldd complains unless libraries are executable
1842 postinstall_cmds='chmod +x $lib'
1843 deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
1844 file_magic_cmd=/usr/bin/file
1845 file_magic_test_file=/lib/libc.so
1850 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1851 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1852 shlibpath_var=LD_LIBRARY_PATH
1853 shlibpath_overrides_runpath=yes
1854 if test "$with_gnu_ld" = yes; then
1860 sysv4.2uw2* | sysv4.3* | sysv5*)
1862 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1863 soname_spec='${libname}${release}.so$major'
1864 shlibpath_var=LD_LIBRARY_PATH
1865 case "$host_vendor" in
1867 deplibs_check_method='pass_all'
1874 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1875 soname_spec='${libname}${release}.so$major'
1876 shlibpath_var=LD_LIBRARY_PATH
1883 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1884 soname_spec='${libname}${release}.so$major'
1885 shlibpath_var=LD_LIBRARY_PATH
1892 echo "$ac_t$dynamic_linker" 1>&6
1893 test "$dynamic_linker" = no && can_build_shared=no
1895 # Report the final consequences.
1896 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1898 if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
1899 case "$deplibs_check_method" in
1901 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1902 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1903 egrep "$file_magic_regex" > /dev/null; then
1908 *** Warning: the command libtool uses to detect shared libraries,
1909 *** $file_magic_cmd, produces output that libtool cannot recognize.
1910 *** The result is that libtool may fail to recognize shared libraries
1911 *** as such. This will affect the creation of libtool libraries that
1912 *** depend on shared libraries, but programs linked with such libtool
1913 *** libraries will work regardless of this problem. Nevertheless, you
1914 *** may want to report the problem to your system manager and/or to
1915 *** bug-libtool@gnu.org
1922 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
1923 test "$can_build_shared" = "no" && enable_shared=no
1925 # On AIX, shared libraries and static libraries use the same namespace, and
1926 # are all built from PIC.
1929 test "$enable_shared" = yes && enable_static=no
1930 if test -n "$RANLIB"; then
1931 archive_cmds="$archive_cmds~\$RANLIB \$lib"
1932 postinstall_cmds='$RANLIB $lib'
1937 test "$enable_shared" = yes && enable_static=no
1941 echo "$ac_t$enable_shared" 1>&6
1943 # Make sure either enable_shared or enable_static is yes.
1944 test "$enable_shared" = yes || enable_static=yes
1946 echo "checking whether to build static libraries... $enable_static" 1>&6
1948 if test "$hardcode_action" = relink; then
1949 # Fast installation is not supported
1950 enable_fast_install=no
1951 elif test "$shlibpath_overrides_runpath" = yes ||
1952 test "$enable_shared" = no; then
1953 # Fast installation is not necessary
1954 enable_fast_install=needless
1957 echo $ac_n "checking for objdir... $ac_c" 1>&6
1958 rm -f .libs 2>/dev/null
1959 mkdir .libs 2>/dev/null
1960 if test -d .libs; then
1963 # MS-DOS does not allow filenames that begin with a dot.
1966 rmdir .libs 2>/dev/null
1967 echo "$ac_t$objdir" 1>&6
1969 if test "x$enable_dlopen" != xyes; then
1970 enable_dlopen=unknown
1971 enable_dlopen_self=unknown
1972 enable_dlopen_self_static=unknown
1974 if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
1975 lt_cv_dlopen=no lt_cv_dlopen_libs=
1976 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
1977 echo "$progname:1977: checking for dlopen" >&5
1978 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
1979 echo $ac_n "(cached) $ac_c" 1>&6
1981 cat > conftest.$ac_ext <<EOF
1982 #line 1982 "ltconfig"
1983 /* System header to define __stub macros and hopefully few prototypes,
1984 which can conflict with char dlopen(); below. */
1986 /* Override any gcc2 internal prototype to avoid an error. */
1987 /* We use char because int might match the return type of a gcc2
1988 builtin and then its argument prototype would still apply. */
1993 /* The GNU C library defines this for functions which it implements
1994 to always fail with ENOSYS. Some functions are actually named
1995 something starting with __ and the normal name is an alias. */
1996 #if defined (__stub_dlopen) || defined (__stub___dlopen)
2004 if { (eval echo $progname:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2006 eval "ac_cv_func_dlopen=yes"
2008 echo "$progname: failed program was:" >&5
2009 cat conftest.$ac_ext >&5
2011 eval "ac_cv_func_dlopen=no"
2016 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
2017 echo "$ac_t""yes" 1>&6
2018 lt_cv_dlopen="dlopen"
2020 echo "$ac_t""no" 1>&6
2021 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2022 echo "$progname:2022: checking for dlopen in -ldl" >&5
2023 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2024 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2025 echo $ac_n "(cached) $ac_c" 1>&6
2027 ac_save_LIBS="$LIBS"
2029 cat > conftest.$ac_ext <<EOF
2030 #line 2030 "ltconfig"
2031 /* Override any gcc2 internal prototype to avoid an error. */
2032 /* We use char because int might match the return type of a gcc2
2033 builtin and then its argument prototype would still apply. */
2040 if { (eval echo $progname:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2042 eval "ac_cv_lib_$ac_lib_var=yes"
2044 echo "$progname: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2047 eval "ac_cv_lib_$ac_lib_var=no"
2050 LIBS="$ac_save_LIBS"
2053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2054 echo "$ac_t""yes" 1>&6
2055 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
2057 echo "$ac_t""no" 1>&6
2058 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2059 echo "$progname:2059: checking for dld_link in -ldld" >&5
2060 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
2061 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2062 echo $ac_n "(cached) $ac_c" 1>&6
2064 ac_save_LIBS="$LIBS"
2066 cat > conftest.$ac_ext <<EOF
2067 #line 2067 "ltconfig"
2068 /* Override any gcc2 internal prototype to avoid an error. */
2069 /* We use char because int might match the return type of a gcc2
2070 builtin and then its argument prototype would still apply. */
2077 if { (eval echo $progname:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2079 eval "ac_cv_lib_$ac_lib_var=yes"
2081 echo "$progname: failed program was:" >&5
2082 cat conftest.$ac_ext >&5
2084 eval "ac_cv_lib_$ac_lib_var=no"
2087 LIBS="$ac_save_LIBS"
2090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2091 echo "$ac_t""yes" 1>&6
2092 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
2094 echo "$ac_t""no" 1>&6
2095 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
2096 echo "$progname:2096: checking for shl_load" >&5
2097 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
2098 echo $ac_n "(cached) $ac_c" 1>&6
2100 cat > conftest.$ac_ext <<EOF
2101 #line 2101 "ltconfig"
2102 /* System header to define __stub macros and hopefully few prototypes,
2103 which can conflict with char shl_load(); below. */
2105 /* Override any gcc2 internal prototype to avoid an error. */
2106 /* We use char because int might match the return type of a gcc2
2107 builtin and then its argument prototype would still apply. */
2112 /* The GNU C library defines this for functions which it implements
2113 to always fail with ENOSYS. Some functions are actually named
2114 something starting with __ and the normal name is an alias. */
2115 #if defined (__stub_shl_load) || defined (__stub___shl_load)
2123 if { (eval echo $progname:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2125 eval "ac_cv_func_shl_load=yes"
2127 echo "$progname: failed program was:" >&5
2128 cat conftest.$ac_ext >&5
2130 eval "ac_cv_func_shl_load=no"
2135 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
2136 echo "$ac_t""yes" 1>&6
2137 lt_cv_dlopen="shl_load"
2139 echo "$ac_t""no" 1>&6
2140 echo $ac_n "checking for LoadLibrary""... $ac_c" 1>&6
2141 echo "$progname:2141: checking for LoadLibrary" >&5
2142 if eval "test \"`echo '$''{'ac_cv_func_LoadLibrary'+set}'`\" = set"; then
2143 echo $ac_n "(cached) $ac_c" 1>&6
2145 cat > conftest.$ac_ext <<EOF
2146 #line 2146 "ltconfig"
2147 /* System header to define __stub macros and hopefully few prototypes,
2148 which can conflict with char LoadLibrary(); below. */
2150 /* Override any gcc2 internal prototype to avoid an error. */
2151 /* We use char because int might match the return type of a gcc2
2152 builtin and then its argument prototype would still apply. */
2157 /* The GNU C library defines this for functions which it implements
2158 to always fail with ENOSYS. Some functions are actually named
2159 something starting with __ and the normal name is an alias. */
2160 #if defined (__stub_LoadLibrary) || defined (__stub___LoadLibrary)
2168 if { (eval echo $progname:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2170 eval "ac_cv_func_LoadLibrary=yes"
2172 echo "$progname: failed program was:" >&5
2173 cat conftest.$ac_ext >&5
2175 eval "ac_cv_func_LoadLibrary=no"
2180 if eval "test \"`echo '$ac_cv_func_'LoadLibrary`\" = yes"; then
2181 echo "$ac_t""yes" 1>&6
2182 lt_cv_dlopen="LoadLibrary"
2184 echo "$ac_t""no" 1>&6
2201 if test "x$lt_cv_dlopen" != xno; then
2205 case "$lt_cv_dlopen" in
2207 for ac_hdr in dlfcn.h; do
2208 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2209 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2210 echo "$progname:2210: checking for $ac_hdr" >&5
2211 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2212 echo $ac_n "(cached) $ac_c" 1>&6
2214 cat > conftest.$ac_ext <<EOF
2215 #line 2215 "ltconfig"
2219 ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
2220 { (eval echo $progname:2220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2222 if test -z "$ac_err"; then
2224 eval "ac_cv_header_$ac_safe=yes"
2227 echo "$progname: failed program was:" >&5
2228 cat conftest.$ac_ext >&5
2230 eval "ac_cv_header_$ac_safe=no"
2234 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2235 echo "$ac_t""yes" 1>&6
2237 echo "$ac_t""no" 1>&6
2241 if test "x$ac_cv_header_dlfcn_h" = xyes; then
2242 CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2244 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2245 LIBS="$lt_cv_dlopen_libs $LIBS"
2247 echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
2248 echo "$progname:2248: checking whether a program can dlopen itself" >&5
2249 if test "${lt_cv_dlopen_self+set}" = set; then
2250 echo $ac_n "(cached) $ac_c" 1>&6
2252 if test "$cross_compiling" = yes; then
2253 lt_cv_dlopen_self=cross
2255 cat > conftest.c <<EOF
2256 #line 2256 "ltconfig"
2265 # define LTDL_GLOBAL RTLD_GLOBAL
2268 # define LTDL_GLOBAL DL_GLOBAL
2270 # define LTDL_GLOBAL 0
2274 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2275 find out it does not work in some platform. */
2276 #ifndef LTDL_LAZY_OR_NOW
2278 # define LTDL_LAZY_OR_NOW RTLD_LAZY
2281 # define LTDL_LAZY_OR_NOW DL_LAZY
2284 # define LTDL_LAZY_OR_NOW RTLD_NOW
2287 # define LTDL_LAZY_OR_NOW DL_NOW
2289 # define LTDL_LAZY_OR_NOW 0
2296 fnord() { int i=42;}
2297 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2298 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2299 if(ptr1 || ptr2) exit(0); } exit(1); }
2302 if { (eval echo $progname:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2304 lt_cv_dlopen_self=yes
2306 echo "$progname: failed program was:" >&5
2307 cat conftest.$ac_ext >&5
2309 lt_cv_dlopen_self=no
2316 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
2318 if test "$lt_cv_dlopen_self" = yes; then
2319 LDFLAGS="$LDFLAGS $link_static_flag"
2320 echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
2321 echo "$progname:2321: checking whether a statically linked program can dlopen itself" >&5
2322 if test "${lt_cv_dlopen_self_static+set}" = set; then
2323 echo $ac_n "(cached) $ac_c" 1>&6
2325 if test "$cross_compiling" = yes; then
2326 lt_cv_dlopen_self_static=cross
2328 cat > conftest.c <<EOF
2329 #line 2329 "ltconfig"
2338 # define LTDL_GLOBAL RTLD_GLOBAL
2341 # define LTDL_GLOBAL DL_GLOBAL
2343 # define LTDL_GLOBAL 0
2347 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2348 find out it does not work in some platform. */
2349 #ifndef LTDL_LAZY_OR_NOW
2351 # define LTDL_LAZY_OR_NOW RTLD_LAZY
2354 # define LTDL_LAZY_OR_NOW DL_LAZY
2357 # define LTDL_LAZY_OR_NOW RTLD_NOW
2360 # define LTDL_LAZY_OR_NOW DL_NOW
2362 # define LTDL_LAZY_OR_NOW 0
2369 fnord() { int i=42;}
2370 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2371 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2372 if(ptr1 || ptr2) exit(0); } exit(1); }
2375 if { (eval echo $progname:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2377 lt_cv_dlopen_self_static=yes
2379 echo "$progname: failed program was:" >&5
2380 cat conftest.$ac_ext >&5
2382 lt_cv_dlopen_self_static=no
2389 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
2394 case "$lt_cv_dlopen_self" in
2395 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2396 *) enable_dlopen_self=unknown ;;
2399 case "$lt_cv_dlopen_self_static" in
2400 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2401 *) enable_dlopen_self_static=unknown ;;
2405 # Copy echo and quote the copy, instead of the original, because it is
2408 if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
2409 ltecho="$CONFIG_SHELL \$0 --fallback-echo"
2413 LTCONFIG_VERSION="$VERSION"
2415 # Only quote variables if we're using ltmain.sh.
2418 # Now quote all the things that may contain metacharacters.
2419 for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
2420 old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
2421 reload_flag reload_cmds wl \
2422 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2423 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2424 library_names_spec soname_spec \
2425 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2426 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
2427 file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
2428 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2429 hardcode_libdir_flag_spec hardcode_libdir_separator \
2430 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2431 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2434 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2435 old_postinstall_cmds | old_postuninstall_cmds | \
2436 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2437 postinstall_cmds | postuninstall_cmds | \
2438 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2439 # Double-quote double-evaled strings.
2440 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2443 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2449 *'\$0 --fallback-echo"')
2450 ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
2454 trap "$rm \"$ofile\"; exit 1" 1 2 15
2455 echo "creating $ofile"
2457 cat <<EOF > "$ofile"
2460 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2461 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2462 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
2464 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
2465 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2467 # This program is free software; you can redistribute it and/or modify
2468 # it under the terms of the GNU General Public License as published by
2469 # the Free Software Foundation; either version 2 of the License, or
2470 # (at your option) any later version.
2472 # This program is distributed in the hope that it will be useful, but
2473 # WITHOUT ANY WARRANTY; without even the implied warranty of
2474 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2475 # General Public License for more details.
2477 # You should have received a copy of the GNU General Public License
2478 # along with this program; if not, write to the Free Software
2479 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2481 # As a special exception to the GNU General Public License, if you
2482 # distribute this file as part of a program that contains a
2483 # configuration script generated by Autoconf, you may include it under
2484 # the same distribution terms that you use for the rest of that program.
2486 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2487 Xsed="sed -e s/^X//"
2489 # The HP-UX ksh and POSIX shell print the target directory to stdout
2491 if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
2493 ### BEGIN LIBTOOL CONFIG
2499 # Double-quote the variables that need it (for aesthetics).
2500 for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
2501 old_LN_S old_DLLTOOL old_AS; do
2502 eval "$var=\\\"\$var\\\""
2505 # Just create a config file.
2506 cfgfile="$ofile.cfg"
2507 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2508 echo "creating $cfgfile"
2510 cat <<EOF > "$cfgfile"
2511 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
2512 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2517 cat <<EOF >> "$cfgfile"
2518 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2520 # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
2521 # LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
2522 # DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
2525 # Compiler and other test output produced by $progname, useful for
2526 # debugging $progname, is in ./config.log if it exists.
2528 # The version of $progname that generated this script.
2529 LTCONFIG_VERSION=$LTCONFIG_VERSION
2531 # Shell to use when invoking shell scripts.
2534 # Whether or not to build shared libraries.
2535 build_libtool_libs=$enable_shared
2537 # Whether or not to build static libraries.
2538 build_old_libs=$enable_static
2540 # Whether or not to optimize for fast installation.
2541 fast_install=$enable_fast_install
2544 host_alias=$host_alias
2547 # An echo program that does not interpret backslashes.
2553 # The default C compiler.
2556 # The linker used to build libraries.
2559 # Whether we need hard or soft links.
2562 # A BSD-compatible nm program.
2565 # Used on cygwin: DLL creation program.
2568 # Used on cygwin: assembler.
2571 # The name of the directory that contains temporary libtool files.
2574 # How to create reloadable object files.
2575 reload_flag=$reload_flag
2576 reload_cmds=$reload_cmds
2578 # How to pass a linker flag through the compiler.
2581 # Object file suffix (normally "o").
2584 # Old archive suffix (normally "a").
2587 # Additional compiler flags for building library objects.
2590 # Does compiler simultaneously support -c and -o options
2591 compiler_c_o=$compiler_c_o
2593 # Can we write directly to a .lo ?
2594 compiler_o_lo=$compiler_o_lo
2596 # Must we lock files when doing compilation ?
2597 need_locks=$need_locks
2599 # Do we need the lib prefix for modules?
2600 need_lib_prefix=$need_lib_prefix
2602 # Do we need a version for libraries?
2603 need_version=$need_version
2605 # Whether dlopen is supported.
2606 dlopen=$enable_dlopen
2608 # Whether dlopen of programs is supported.
2609 dlopen_self=$enable_dlopen_self
2611 # Whether dlopen of statically linked programs is supported.
2612 dlopen_self_static=$enable_dlopen_self_static
2614 # Compiler flag to prevent dynamic linking.
2615 link_static_flag=$link_static_flag
2617 # Compiler flag to turn off builtin functions.
2618 no_builtin_flag=$no_builtin_flag
2620 # Compiler flag to allow reflexive dlopens.
2621 export_dynamic_flag_spec=$export_dynamic_flag_spec
2623 # Compiler flag to generate shared objects directly from archives.
2624 whole_archive_flag_spec=$whole_archive_flag_spec
2626 # Compiler flag to generate thread-safe objects.
2627 thread_safe_flag_spec=$thread_safe_flag_spec
2629 # Library versioning type.
2630 version_type=$version_type
2632 # Format of library name prefix.
2633 libname_spec=$libname_spec
2635 # List of archive names. First name is the real one, the rest are links.
2636 # The last name is the one that the linker finds with -lNAME.
2637 library_names_spec=$library_names_spec
2639 # The coded name of the library, if different from the real name.
2640 soname_spec=$soname_spec
2642 # Commands used to build and install an old-style archive.
2644 old_archive_cmds=$old_archive_cmds
2645 old_postinstall_cmds=$old_postinstall_cmds
2646 old_postuninstall_cmds=$old_postuninstall_cmds
2648 # Create an old-style archive from a shared archive.
2649 old_archive_from_new_cmds=$old_archive_from_new_cmds
2651 # Commands used to build and install a shared archive.
2652 archive_cmds=$archive_cmds
2653 archive_expsym_cmds=$archive_expsym_cmds
2654 postinstall_cmds=$postinstall_cmds
2655 postuninstall_cmds=$postuninstall_cmds
2657 # Method to check whether dependent libraries are shared objects.
2658 deplibs_check_method=$deplibs_check_method
2660 # Command to use when deplibs_check_method == file_magic
2661 file_magic_cmd=$file_magic_cmd
2663 # Flag that allows shared libraries with undefined symbols to be built.
2664 allow_undefined_flag=$allow_undefined_flag
2666 # Flag that forces no undefined symbols.
2667 no_undefined_flag=$no_undefined_flag
2669 # Commands used to finish a libtool library installation in a directory.
2670 finish_cmds=$finish_cmds
2672 # Same as above, but a single script fragment to be evaled but not shown.
2673 finish_eval=$finish_eval
2675 # Take the output of nm and produce a listing of raw symbols and C names.
2676 global_symbol_pipe=$global_symbol_pipe
2678 # Transform the output of nm in a proper C declaration
2679 global_symbol_to_cdecl=$global_symbol_to_cdecl
2681 # This is the shared library runtime path variable.
2682 runpath_var=$runpath_var
2684 # This is the shared library path variable.
2685 shlibpath_var=$shlibpath_var
2687 # Is shlibpath searched before the hard-coded library search path?
2688 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2690 # How to hardcode a shared library path into an executable.
2691 hardcode_action=$hardcode_action
2693 # Flag to hardcode \$libdir into a binary during linking.
2694 # This must work even if \$libdir does not exist.
2695 hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
2697 # Whether we need a single -rpath flag with a separated argument.
2698 hardcode_libdir_separator=$hardcode_libdir_separator
2700 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2702 hardcode_direct=$hardcode_direct
2704 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2706 hardcode_minus_L=$hardcode_minus_L
2708 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2709 # the resulting binary.
2710 hardcode_shlibpath_var=$hardcode_shlibpath_var
2712 # Compile-time system search path for libraries
2713 sys_lib_search_path_spec=$sys_lib_search_path_spec
2715 # Run-time system search path for libraries
2716 sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
2718 # Fix the shell variable \$srcfile for the compiler.
2719 fix_srcfile_path="$fix_srcfile_path"
2721 # Set to yes if exported symbols are required
2722 always_export_symbols=$always_export_symbols
2724 # The command to extract exported symbols
2725 export_symbols_cmds=$export_symbols_cmds
2727 # Symbols that should not be listed in the preloaded symbols
2728 exclude_expsyms=$exclude_expsyms
2730 # Symbols that must always be exported
2731 include_expsyms=$include_expsyms
2737 echo '### END LIBTOOL CONFIG' >> "$ofile"
2741 cat <<\EOF >> "$ofile"
2743 # AIX sometimes has problems with the GCC collect2 program. For some
2744 # reason, if we set the COLLECT_NAMES environment variable, the problems
2745 # vanish in a puff of smoke.
2746 if test "${COLLECT_NAMES+set}" != set; then
2748 export COLLECT_NAMES
2754 # Append the ltmain.sh script.
2755 cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
2761 # Compile the libtool program.
2762 echo "FIXME: would compile $ltmain"
2766 test -n "$cache_file" || exit 0
2770 cat > confcache <<\EOF
2771 # This file is a shell script that caches the results of configure
2772 # tests run on this system so they can be shared between configure
2773 # scripts and configure runs. It is not useful on other systems.
2774 # If it contains results you don't want to keep, you may remove or edit it.
2776 # By default, configure uses ./config.cache as the cache file,
2777 # creating it if it does not exist already. You can give configure
2778 # the --cache-file=FILE option to use a different cache file; that is
2779 # what configure does when it calls configure scripts in
2780 # subdirectories, so they share the cache.
2781 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2782 # config.status only pays attention to the cache file if you give it the
2783 # --recheck option to rerun configure.
2786 # The following way of writing the cache mishandles newlines in values,
2787 # but we know of no workaround that is simple, portable, and efficient.
2788 # So, don't put newlines in cache variables' values.
2789 # Ultrix sh set writes to stderr and can't be redirected directly,
2790 # and sets the high bit in the cache file unless we assign to the vars.
2792 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2794 # `set' does not quote correctly, so add quotes (double-quote substitution
2795 # turns \\\\ into \\, and sed turns \\ into \).
2797 -e "s/'/'\\\\''/g" \
2798 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2801 # `set' quotes correctly as required by POSIX, so do not add quotes.
2802 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2805 if cmp -s $cache_file confcache; then
2808 if test -w $cache_file; then
2809 echo "updating cache $cache_file"
2810 cat confcache > $cache_file
2812 echo "not updating unwritable cache $cache_file"