3 # ltconfig - Create a system-specific libtool.
4 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
5 # Originally by 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 # Avoid inline document here, it may be left over
37 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
38 # Yippee, $echo works!
41 # Restart under the correct shell.
42 exec "$SHELL" "$0" --no-reexec ${1+"$@"}
45 if test "X$1" = X--fallback-echo
; then
46 # used as fallback echo
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`}
59 *-DOS) PATH_SEPARATOR
=';' ;;
60 *) PATH_SEPARATOR
=':' ;;
64 # The HP-UX ksh and POSIX shell print the target directory to stdout
66 if test "X${CDPATH+set}" = Xset
; 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
80 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
81 echo_testing_string
=`($echo "$echo_test_string") 2>/dev/null` &&
82 test "X$echo_testing_string" = "X$echo_test_string"; then
85 # The Solaris, AIX, and Digital Unix default echo programs unquote
86 # backslashes. This makes it impossible to quote backslashes using
87 # echo "$something" | sed 's/\\/\\\\/g'
89 # So, first we look for a working echo in the user's PATH.
91 IFS
="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
92 for dir
in $PATH /usr
/ucb
; do
93 if (test -f $dir/echo ||
test -f $dir/echo$ac_exeext) &&
94 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
95 echo_testing_string
=`($dir/echo "$echo_test_string") 2>/dev/null` &&
96 test "X$echo_testing_string" = "X$echo_test_string"; then
103 if test "X$echo" = Xecho
; then
104 # We didn't find a better echo, so look for alternatives.
105 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
106 echo_testing_string
=`(print -r "$echo_test_string") 2>/dev/null` &&
107 test "X$echo_testing_string" = "X$echo_test_string"; then
108 # This shell has a builtin print -r that does the trick.
110 elif (test -f /bin
/ksh ||
test -f /bin
/ksh
$ac_exeext) &&
111 test "X$CONFIG_SHELL" != X
/bin
/ksh
; then
112 # If we have ksh, try running ltconfig again with it.
113 ORIGINAL_CONFIG_SHELL
="${CONFIG_SHELL-/bin/sh}"
114 export ORIGINAL_CONFIG_SHELL
115 CONFIG_SHELL
=/bin
/ksh
117 exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
121 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
122 echo_testing_string
=`($echo "$echo_test_string") 2>/dev/null` &&
123 test "X$echo_testing_string" = "X$echo_test_string"; then
126 elif echo_testing_string
=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
127 test "X$echo_testing_string" = 'X\t' &&
128 echo_testing_string
=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
129 test "X$echo_testing_string" = "X$echo_test_string"; then
130 CONFIG_SHELL
="$ORIGINAL_CONFIG_SHELL"
132 SHELL
="$CONFIG_SHELL"
134 echo="$CONFIG_SHELL $0 --fallback-echo"
135 elif echo_testing_string
=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
136 test "X$echo_testing_string" = 'X\t' &&
137 echo_testing_string
=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
138 test "X$echo_testing_string" = "X$echo_test_string"; then
139 echo="$CONFIG_SHELL $0 --fallback-echo"
141 # maybe with a smaller string...
144 for cmd
in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
145 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev
/null
; then
151 if test "$prev" != 'sed 50q "$0"'; then
152 echo_test_string
=`eval $prev`
153 export echo_test_string
154 exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"}
156 # Oops. We lost completely, so just stick with echo.
164 # Sed substitution that helps us do robust quoting. It backslashifies
165 # metacharacters that are still active within double-quoted strings.
167 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
169 # Same as above, but do not quote variable references.
170 double_quote_subst='s/\([\\"\\`\\\\]\
)/\\\
1/g
'
172 # Sed substitution to delay expansion of an escaped shell variable in a
173 # double_quote_subst'ed string.
174 delay_variable_subst
='s/\\\\\\\\\\\$/\\\\\\$/g'
176 # The name of this program.
177 progname
=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
183 TIMESTAMP
=" (1.731 2000/07/10 09:42:21)"
184 ac_compile
='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
185 ac_link
='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
188 help="Try \`$progname --help' for more information."
191 default_ofile
=libtool
194 # All known linkers require a `.a' archive for static linking (except M$VC,
195 # which needs '.lib').
197 enable_fast_install
=yes
198 enable_dlopen
=unknown
209 ofile
="$default_ofile"
219 old_AR_FLAGS
="$AR_FLAGS"
222 old_CPPFLAGS
="$CPPFLAGS"
223 old_LDFLAGS
="$LDFLAGS"
232 old_DLLTOOL
="$DLLTOOL"
233 old_OBJDUMP
="$OBJDUMP"
236 old_reload_Flag
="$reload_flag"
237 old_deplibs_check_method
="$deplibs_check_method"
238 old_file_magic_cmd
="$file_magic_cmd"
240 # Parse the command line options.
246 -*=*) optarg
=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
250 # If the previous option needs an argument, assign it.
251 if test -n "$prev"; then
252 eval "$prev=\$option"
259 Usage: $progname [OPTION]... LTMAIN [HOST]
261 Generate a system-specific libtool script.
263 --build configure for building on BUILD [BUILD=HOST]
264 --debug enable verbose shell tracing
265 --disable-shared do not build shared libraries
266 --disable-static do not build static libraries
267 --disable-fast-install do not optimize for fast installation
268 --enable-dlopen enable dlopen support
269 --enable-win32-dll enable building dlls on win32 hosts
270 --help display this help and exit
271 --no-verify do not verify that HOST is a valid host type
272 -o, --output=FILE specify the output file [default=$default_ofile]
273 --quiet same as \`--silent'
274 --silent do not print informational messages
275 --srcdir=DIR find \`config.guess' in DIR
276 --version output version information and exit
277 --with-gcc assume that the GNU C compiler will be used
278 --with-gnu-ld assume that the C compiler uses the GNU linker
279 --prefer-pic try to use only PIC objects
280 --prefer-non-pic try to use only non-PIC objects
281 --disable-lock disable file locking
282 --cache-file=FILE configure cache file
284 LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
285 that provides basic libtool functionality.
287 HOST is the canonical host system name [default=guessed].
292 --build) prev
=build
;;
293 --build=*) build
="$optarg" ;;
296 echo "$progname: enabling shell trace mode"
300 --disable-shared) enable_shared
=no
;;
302 --disable-static) enable_static
=no
;;
304 --disable-fast-install) enable_fast_install
=no
;;
306 --enable-dlopen) enable_dlopen
=yes ;;
308 --enable-win32-dll) enable_win32_dll
=yes ;;
310 --quiet |
--silent) silent
=yes ;;
312 --srcdir) prev
=srcdir
;;
313 --srcdir=*) srcdir
="$optarg" ;;
315 --no-verify) verify_host
=no
;;
317 --output |
-o) prev
=ofile
;;
318 --output=*) ofile
="$optarg" ;;
320 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
322 --with-gcc) with_gcc
=yes ;;
323 --with-gnu-ld) with_gnu_ld
=yes ;;
325 --prefer-pic) pic_mode
=yes ;;
326 --prefer-non-pic) pic_mode
=no
;;
328 --disable-lock) need_locks
=no
;;
330 --cache-file=*) cache_file
="$optarg" ;;
333 echo "$progname: unrecognized option \`$option'" 1>&2
339 if test -z "$ltmain"; then
341 elif test -z "$host"; then
342 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
343 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
344 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
348 echo "$progname: too many arguments" 1>&2
355 if test -z "$ltmain"; then
356 echo "$progname: you must specify a LTMAIN file" 1>&2
361 if test ! -f "$ltmain"; then
362 echo "$progname: \`$ltmain' does not exist" 1>&2
367 # Quote any args containing shell metacharacters.
372 *" "*|
*" "*|
*[\
[\
]\~\
#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
373 ltconfig_args
="$ltconfig_args '$arg'" ;;
374 *) ltconfig_args
="$ltconfig_args $arg" ;;
378 # A relevant subset of AC_INIT.
380 # File descriptor usage:
383 # 2 errors and warnings
384 # 3 some systems may open it to /dev/tty
385 # 4 used on the Kubota Titan
386 # 5 compiler messages saved in config.log
387 # 6 checking for... messages and results
388 if test "$silent" = yes; then
396 # Only set LANG and LC_ALL to C if already set.
397 # These must not be set unconditionally because not all systems understand
398 # e.g. LANG=C (notably SCO).
399 if test "X${LC_ALL+set}" = Xset
; then LC_ALL
=C
; export LC_ALL
; fi
400 if test "X${LANG+set}" = Xset
; then LANG
=C
; export LANG
; fi
402 if test -n "$cache_file" && test -r "$cache_file"; then
403 echo "loading cache $cache_file within ltconfig"
407 if (echo "testing\c"; echo 1,2,3) |
grep c
>/dev
/null
; then
408 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
409 if (echo -n testing
; echo 1,2,3) |
sed s
/-n/xn
/ |
grep xn
>/dev
/null
; then
416 ac_n
= ac_c
='\c' ac_t
=
419 if test -z "$srcdir"; then
420 # Assume the source directory is the same one as the path to LTMAIN.
421 srcdir
=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
422 test "$srcdir" = "$ltmain" && srcdir
=.
425 trap "$rm conftest*; exit 1" 1 2 15
426 if test "$verify_host" = yes; then
427 # Check for config.guess and config.sub.
429 for ac_dir
in $srcdir $srcdir/..
$srcdir/..
/..
; do
430 if test -f $ac_dir/config.guess
; then
435 if test -z "$ac_aux_dir"; then
436 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
440 ac_config_guess
=$ac_aux_dir/config.guess
441 ac_config_sub
=$ac_aux_dir/config.sub
443 # Make sure we can run config.sub.
444 if $SHELL $ac_config_sub sun4
>/dev
/null
2>&1; then :
446 echo "$progname: cannot run $ac_config_sub" 1>&2
451 echo $ac_n "checking host system type""... $ac_c" 1>&6
454 case "$host_alias" in
456 if host_alias
=`$SHELL $ac_config_guess`; then :
458 echo "$progname: cannot guess host type; you must specify one" 1>&2
463 host=`$SHELL $ac_config_sub $host_alias`
464 echo "$ac_t$host" 1>&6
466 # Make sure the host verified.
467 test -z "$host" && exit 1
469 # Check for the build system type
470 echo $ac_n "checking build system type... $ac_c" 1>&6
473 case "$build_alias" in
476 NONE
) build_alias
=$host_alias ;;
477 *) build_alias
=$nonopt ;;
481 build
=`$SHELL $ac_config_sub $build_alias`
482 build_cpu
=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
483 build_vendor
=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
484 build_os
=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
485 echo "$ac_t""$build" 1>&6
487 elif test -z "$host"; then
488 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
493 build_alias
=$host_alias
497 if test x
"$host" != x
"$build"; then
498 ac_tool_prefix
=${host_alias}-
503 host_cpu
=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
504 host_vendor
=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
505 host_os
=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
507 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
510 linux
*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
515 # AIX sometimes has problems with the GCC collect2 program. For some
516 # reason, if we set the COLLECT_NAMES environment variable, the problems
517 # vanish in a puff of smoke.
518 if test "X${COLLECT_NAMES+set}" != Xset
; then
525 # Determine commands to create old-style static archives.
526 old_archive_cmds
='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
527 old_postinstall_cmds
='chmod 644 $oldlib'
528 old_postuninstall_cmds
=
530 # Set sane defaults for various variables
531 test -z "$AR" && AR
=ar
532 test -z "$AR_FLAGS" && AR_FLAGS
=cru
533 test -z "$AS" && AS
=as
534 test -z "$CC" && CC
=cc
535 test -z "$DLLTOOL" && DLLTOOL
=dlltool
536 test -z "$MAGIC" && MAGIC
=file
537 test -z "$LD" && LD
=ld
538 test -z "$LN_S" && LN_S
="ln -s"
539 test -z "$NM" && NM
=nm
540 test -z "$OBJDUMP" && OBJDUMP
=objdump
541 test -z "$RANLIB" && RANLIB
=:
542 test -z "$STRIP" && STRIP
=:
543 test -z "$objext" && objext
=o
545 echo $ac_n "checking for objdir... $ac_c" 1>&6
546 rm -f .libs
2>/dev
/null
547 mkdir .libs
2>/dev
/null
548 if test -d .libs
; then
551 # MS-DOS does not allow filenames that begin with a dot.
554 rmdir .libs
2>/dev
/null
555 echo "$ac_t$objdir" 1>&6
557 # Allow CC to be a program name with arguments.
561 # We assume here that the value for ac_cv_prog_cc_pic will not be cached
562 # in isolation, and that seeing it set (from the cache) indicates that
563 # the associated values are set (in the cache) correctly too.
564 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
565 echo "$progname:565:checking for $compiler option to produce PIC" 1>&5
566 if test "X${ac_cv_prog_cc_pic+set}" = Xset
; then
567 echo $ac_n "(cached) $ac_c" 1>&6
572 ac_cv_prog_cc_static
=
573 ac_cv_prog_cc_no_builtin
=
574 ac_cv_prog_cc_can_build_shared
=$can_build_shared
576 if test "$with_gcc" = yes; then
577 ac_cv_prog_cc_wl
='-Wl,'
578 ac_cv_prog_cc_static
='-static'
581 beos
* | irix5
* | irix6
* | osf3
* | osf4
* | osf5
*)
582 # PIC is the default for these OSes.
585 # Below there is a dirty hack to force normal static linking with -ldl
586 # The problem is because libdl dynamically linked with both libc and
587 # libC (AIX C++ library), which obviously doesn't included in libraries
588 # list by gcc. This cause undefined symbols with -static flags.
589 # This hack allows C programs to be linked with "-static -ldl", but
590 # we not sure about C++ programs.
591 ac_cv_prog_cc_static
="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
593 cygwin
* | mingw
* | os2
*)
594 # This hack is so that the source file can tell whether it is being
595 # built for inclusion in a dll (and should export symbols for example).
596 ac_cv_prog_cc_pic
='-DDLL_EXPORT'
599 # FIXME: we need at least 68020 code to build shared libraries, but
600 # adding the `-m68020' flag to GCC prevents building anything better,
602 ac_cv_prog_cc_pic
='-m68020 -resident32 -malways-restore-a4'
605 if test -d /usr
/nec
; then
606 ac_cv_prog_cc_pic
=-Kconform_pic
610 ac_cv_prog_cc_pic
='-fPIC'
614 # PORTME Check for PIC flags for the system compiler.
617 # All AIX code is PIC.
618 ac_cv_prog_cc_static
='-bnso -bI:/lib/syscalls.exp'
621 hpux9
* | hpux10
* | hpux11
*)
622 # Is there a better ac_cv_prog_cc_static that works with the bundled CC?
623 ac_cv_prog_cc_wl
='-Wl,'
624 ac_cv_prog_cc_static
="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
625 ac_cv_prog_cc_pic
='+Z'
629 ac_cv_prog_cc_wl
='-Wl,'
630 ac_cv_prog_cc_static
='-non_shared'
631 # PIC (with -KPIC) is the default.
634 cygwin
* | mingw
* | os2
*)
635 # This hack is so that the source file can tell whether it is being
636 # built for inclusion in a dll (and should export symbols for example).
637 ac_cv_prog_cc_pic
='-DDLL_EXPORT'
640 osf3
* | osf4
* | osf5
*)
641 # All OSF/1 code is PIC.
642 ac_cv_prog_cc_wl
='-Wl,'
643 ac_cv_prog_cc_static
='-non_shared'
647 ac_cv_prog_cc_pic
='-Kpic'
648 ac_cv_prog_cc_static
='-dn'
649 ac_cv_prog_cc_shlib
='-belf'
653 ac_cv_prog_cc_pic
='-KPIC'
654 ac_cv_prog_cc_static
='-Bstatic'
655 ac_cv_prog_cc_wl
='-Wl,'
659 ac_cv_prog_cc_pic
='-PIC'
660 ac_cv_prog_cc_static
='-Bstatic'
661 ac_cv_prog_cc_wl
='-Qoption ld '
664 sysv4 | sysv4.2uw2
* | sysv4.3
* | sysv5
*)
665 ac_cv_prog_cc_pic
='-KPIC'
666 ac_cv_prog_cc_static
='-Bstatic'
667 ac_cv_prog_cc_wl
='-Wl,'
671 ac_cv_prog_cc_pic
='-pic'
672 ac_cv_prog_cc_static
='-Bstatic'
676 if test -d /usr
/nec
;then
677 ac_cv_prog_cc_pic
='-Kconform_pic'
678 ac_cv_prog_cc_static
='-Bstatic'
683 ac_cv_prog_cc_can_build_shared
=no
688 if test -z "$ac_cv_prog_cc_pic"; then
689 echo "$ac_t"none
1>&6
691 echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6
693 # Check to make sure the pic_flag actually works.
694 echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
695 echo "$progname:695:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
696 if test "X${ac_cv_prog_cc_pic_works+set}" = Xset
; then
697 echo $ac_n "(cached) $ac_c" 1>&6
699 ac_cv_prog_cc_pic_works
=yes
701 echo "int some_variable = 0;" > conftest.c
702 save_CFLAGS
="$CFLAGS"
703 CFLAGS
="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
704 if { (eval echo $progname:704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err
; } && test -s conftest.
$objext; then
705 # Append any warnings to the config.log.
706 cat conftest.err
1>&5
709 hpux9
* | hpux10
* | hpux11
*)
710 # On HP-UX, both CC and GCC only warn that PIC is supported... then
711 # they create non-PIC objects. So, if there were any warnings, we
712 # assume that PIC is not supported.
713 if test -s conftest.err
; then
714 ac_cv_prog_cc_pic_works
=no
715 ac_cv_prog_cc_can_build_shared
=no
718 ac_cv_prog_cc_pic_works
=yes
719 ac_cv_prog_cc_pic
=" $ac_cv_prog_cc_pic"
723 ac_cv_prog_cc_pic_works
=yes
724 ac_cv_prog_cc_pic
=" $ac_cv_prog_cc_pic"
728 # Append any errors to the config.log.
729 cat conftest.err
1>&5
730 ac_cv_prog_cc_pic_works
=no
731 ac_cv_prog_cc_can_build_shared
=no
734 CFLAGS
="$save_CFLAGS"
737 # Belt *and* braces to stop my trousers falling down:
738 if test "X$ac_cv_prog_cc_pic_works" = Xno
; then
740 ac_cv_prog_cc_can_build_shared
=no
742 echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6
745 # Check for any special shared library compilation flags.
746 if test -n "$ac_cv_prog_cc_shlib"; then
747 echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2
748 if echo "$old_CC $old_CFLAGS " |
egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev
/null
; then :
750 echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
751 ac_cv_prog_cc_can_build_shared
=no
755 echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
756 echo "$progname:756: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
757 if test "X${ac_cv_prog_cc_static_works+set}" = Xset
; then
758 echo $ac_n "(cached) $ac_c" 1>&6
761 echo 'main(){return(0);}' > conftest.c
762 save_LDFLAGS
="$LDFLAGS"
763 LDFLAGS
="$LDFLAGS $ac_cv_prog_cc_static"
764 if { (eval echo $progname:764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
; then
765 ac_cv_prog_cc_static_works
=yes
767 ac_cv_prog_cc_static_works
=no
768 ac_cv_prog_cc_static
=
770 LDFLAGS
="$save_LDFLAGS"
773 # Belt *and* braces to stop my trousers falling down:
774 if test "X$ac_cv_prog_cc_static_works" = Xno
; then
775 ac_cv_prog_cc_static
=
777 echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6
778 pic_flag
="$ac_cv_prog_cc_pic"
779 special_shlib_compile_flags
="$ac_cv_prog_cc_shlib"
780 wl
="$ac_cv_prog_cc_wl"
781 link_static_flag
="$ac_cv_prog_cc_static"
782 no_builtin_flag
="$ac_cv_prog_cc_no_builtin"
783 can_build_shared
="$ac_cv_prog_cc_can_build_shared"
785 # Check to see if options -o and -c are simultaneously supported by compiler
786 echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
787 $rm -r conftest
2>/dev
/null
791 echo "int some_variable = 0;" > conftest.c
793 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
794 # that will create temporary files in the current directory regardless of
795 # the output directory. Thus, making CWD read-only will cause this test
796 # to fail, enabling locking or at least warning the user not to do parallel
799 save_CFLAGS
="$CFLAGS"
800 CFLAGS
="$CFLAGS -o out/conftest2.o"
801 echo "$progname:801: checking if $compiler supports -c -o file.o" >&5
802 if { (eval echo $progname:802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out
/conftest.err
; } && test -s out
/conftest2.o
; then
804 # The compiler can only warn and ignore the option if not recognized
805 # So say no if there are warnings
806 if test -s out
/conftest.err
; then
814 # Append any errors to the config.log.
815 cat out
/conftest.err
1>&5
819 CFLAGS
="$save_CFLAGS"
825 $rm -r conftest
2>/dev
/null
827 if test x
"$compiler_c_o" = x
"yes"; then
828 # Check to see if we can write to a .lo
829 echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
831 echo "int some_variable = 0;" > conftest.c
832 save_CFLAGS
="$CFLAGS"
833 CFLAGS
="$CFLAGS -c -o conftest.lo"
834 echo "$progname:834: checking if $compiler supports -c -o file.lo" >&5
835 if { (eval echo $progname:835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err
; } && test -s conftest.lo
; then
837 # The compiler can only warn and ignore the option if not recognized
838 # So say no if there are warnings
839 if test -s conftest.err
; then
847 # Append any errors to the config.log.
848 cat conftest.err
1>&5
852 CFLAGS
="$save_CFLAGS"
858 # Check to see if we can do hard links to lock some files if needed
859 hard_links
="nottested"
860 if test "$compiler_c_o" = no
&& test "$need_locks" != no
; then
861 # do not overwrite the value of need_locks provided by the user
862 echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
865 ln conftest.a conftest.b
2>/dev
/null
&& hard_links
=no
867 ln conftest.a conftest.b
2>&5 || hard_links
=no
868 ln conftest.a conftest.b
2>/dev
/null
&& hard_links
=no
869 echo "$ac_t$hard_links" 1>&6
871 if test "$hard_links" = no
; then
872 echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
879 if test "$with_gcc" = yes; then
880 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
881 echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
883 echo "int some_variable = 0;" > conftest.c
884 save_CFLAGS
="$CFLAGS"
885 CFLAGS
="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
886 echo "$progname:886: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
887 if { (eval echo $progname:887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err
; } && test -s conftest.o
; then
889 # The compiler can only warn and ignore the option if not recognized
890 # So say no if there are warnings
891 if test -s conftest.err
; then
893 compiler_rtti_exceptions
=no
896 compiler_rtti_exceptions
=yes
899 # Append any errors to the config.log.
900 cat conftest.err
1>&5
901 compiler_rtti_exceptions
=no
904 CFLAGS
="$save_CFLAGS"
907 if test "$compiler_rtti_exceptions" = "yes"; then
908 no_builtin_flag
=' -fno-builtin -fno-rtti -fno-exceptions'
910 no_builtin_flag
=' -fno-builtin'
915 # See if the linker supports building shared libraries.
916 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
918 allow_undefined_flag
=
920 need_lib_prefix
=unknown
922 # when you set need_version to no, make sure it does not cause -set_version
923 # flags to be left without arguments
926 old_archive_from_new_cmds
=
927 old_archive_from_expsyms_cmds
=
930 export_dynamic_flag_spec
=
931 whole_archive_flag_spec
=
932 thread_safe_flag_spec
=
933 hardcode_into_libs
=no
934 hardcode_libdir_flag_spec
=
935 hardcode_libdir_separator
=
938 hardcode_shlibpath_var
=unsupported
940 link_all_deplibs
=unknown
941 always_export_symbols
=no
942 export_symbols_cmds
='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
943 # include_expsyms should be a list of space-separated symbols to be *always*
944 # included in the symbol list
946 # exclude_expsyms can be an egrep regular expression of symbols to exclude
947 # it will be wrapped by ` (' and `)$', so one must not match beginning or
948 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
949 # as well as any symbol that contains `d'.
950 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
951 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
952 # platforms (ab)use it in PIC code, but their linkers get confused if
953 # the symbol is explicitly referenced. Since portable code cannot
954 # rely on this symbol name, it's probably fine to never include it in
955 # preloaded symbol tables.
956 extract_expsyms_cmds
=
960 # FIXME: the MSVC++ port hasn't been tested in a loooong time
961 # When not using gcc, we currently assume that we are using
962 # Microsoft Visual C++.
963 if test "$with_gcc" != yes; then
971 if test "$with_gnu_ld" = yes; then
972 # If archive_cmds runs LD, not CC, wlarc should be empty
975 # See if GNU ld supports shared libraries.
978 # On AIX, the GNU linker is very broken
982 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
983 *** to be unable to reliably create shared libraries on AIX.
984 *** Therefore, libtool is disabling shared libraries support. If you
985 *** really care for shared libraries, you may want to modify your PATH
986 *** so that a non-GNU linker is found, and then restart.
992 archive_cmds
='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
993 hardcode_libdir_flag_spec
='-L$libdir'
996 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
997 # that the semantics of dynamic libraries on AmigaOS, at least up
998 # to version 4, is to share data among multiple programs linked
999 # with the same dynamic library. Since this doesn't match the
1000 # behavior of shared libraries on other platforms, we can use
1006 if $LD --help 2>&1 |
egrep ': supported targets:.* elf' > /dev
/null
; then
1007 allow_undefined_flag
=unsupported
1008 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1009 # support --undefined. This deserves some investigation. FIXME
1010 archive_cmds
='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
1017 # hardcode_libdir_flag_spec is actually meaningless, as there is
1018 # no search path for DLLs.
1019 hardcode_libdir_flag_spec
='-L$libdir'
1020 allow_undefined_flag
=unsupported
1021 always_export_symbols
=yes
1023 extract_expsyms_cmds
='test -f $output_objdir/impgen.c || \
1024 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
1025 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1026 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1027 else $CC -o impgen impgen.c ; fi)~
1028 $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
1030 old_archive_from_expsyms_cmds
='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1032 # cygwin and mingw dlls have different entry points and sets of symbols
1034 # FIXME: what about values for MSVC?
1035 dll_entry
=__cygwin_dll_entry@
12
1036 dll_exclude_symbols
=DllMain@
12,_cygwin_dll_entry@
12,_cygwin_noncygwin_dll_entry@
12~
1040 dll_entry
=_DllMainCRTStartup@
12
1041 dll_exclude_symbols
=DllMain@
12,DllMainCRTStartup@
12,DllEntryPoint@
12~
1045 # mingw and cygwin differ, and it's simplest to just exclude the union
1046 # of the two symbol sets.
1047 dll_exclude_symbols
=DllMain@
12,_cygwin_dll_entry@
12,_cygwin_noncygwin_dll_entry@
12,DllMainCRTStartup@
12,DllEntryPoint@
12
1049 # recent cygwin and mingw systems supply a stub DllMain which the user
1050 # can override, but on older systems we have to supply one (in ltdll.c)
1051 if test "x$lt_cv_need_dllmain" = "xyes"; then
1052 ltdll_obj
='$output_objdir/$soname-ltdll.'"$objext "
1053 ltdll_cmds
='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
1054 test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1060 # Extract the symbol export list from an `--export-all' def file,
1061 # then regenerate the def file from the symbol export list, so that
1062 # the compiled dll only exports the symbol export list.
1063 # Be careful not to strip the DATA tag left be newer dlltools.
1064 export_symbols_cmds
="$ltdll_cmds"'
1065 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1066 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1068 # If DATA tags from a recent dlltool are present, honour them!
1069 archive_expsym_cmds
='echo EXPORTS > $output_objdir/$soname-def~
1071 cat $export_symbols | while read symbol; do
1074 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1075 *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
1077 _lt_hint=`expr 1 + \$_lt_hint`;
1080 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1081 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
1082 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1083 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
1084 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1088 if echo __ELF__ |
$CC -E - |
grep __ELF__
>/dev
/null
; then
1089 archive_cmds
='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1092 archive_cmds
='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1093 archive_expsym_cmds
='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1098 if $LD -v 2>&1 |
egrep 'BFD 2\.8' > /dev
/null
; then
1102 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1103 *** create shared libraries on Solaris systems. Therefore, libtool
1104 *** is disabling shared libraries support. We urge you to upgrade GNU
1105 *** binutils to release 2.9.1 or newer. Another option is to modify
1106 *** your PATH or compiler configuration so that the native linker is
1107 *** used, and then restart.
1110 elif $LD --help 2>&1 |
egrep ': supported targets:.* elf' > /dev
/null
; then
1111 archive_cmds
='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
1112 archive_expsym_cmds
='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1119 archive_cmds
='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1122 hardcode_shlibpath_var
=no
1126 if $LD --help 2>&1 |
egrep ': supported targets:.* elf' > /dev
/null
; then
1127 archive_cmds
='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1128 archive_expsym_cmds
='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1135 if test "$ld_shlibs" = yes; then
1136 runpath_var
=LD_RUN_PATH
1137 hardcode_libdir_flag_spec
="$wlarc"'--rpath '"$wlarc"'$libdir'
1138 export_dynamic_flag_spec
="$wlarc"'--export-dynamic'
1141 # dlltool doesn't understand --whole-archive et. al.
1142 whole_archive_flag_spec
=
1145 # ancient GNU ld didn't support --whole-archive et. al.
1146 if $LD --help 2>&1 |
egrep 'no-whole-archive' > /dev
/null
; then
1147 whole_archive_flag_spec
="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1149 whole_archive_flag_spec
=
1155 # PORTME fill in a description of your system's linker (not GNU ld)
1158 allow_undefined_flag
=unsupported
1159 always_export_symbols
=yes
1160 archive_expsym_cmds
='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
1161 # Note: this linker hardcodes the directories in LIBPATH if there
1162 # are no directories specified by -L.
1163 hardcode_minus_L
=yes
1164 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
1165 # Neither direct hardcoding nor static linking is supported with a
1167 hardcode_direct
=unsupported
1172 hardcode_libdir_flag_spec
='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
1173 hardcode_libdir_separator
=':'
1174 if test "$with_gcc" = yes; then
1175 collect2name
=`${CC} -print-prog-name=collect2`
1176 if test -f "$collect2name" && \
1177 strings "$collect2name" |
grep resolve_lib_name
>/dev
/null
1179 # We have reworked collect2
1182 # We have old collect2
1183 hardcode_direct
=unsupported
1184 # It fails to find uninstalled libraries when the uninstalled
1185 # path is not listed in the libpath. Setting hardcode_minus_L
1186 # to unsupported forces relinking
1187 hardcode_minus_L
=yes
1188 hardcode_libdir_flag_spec
='-L$libdir'
1189 hardcode_libdir_separator
=
1191 shared_flag
='-shared'
1193 shared_flag
='${wl}-bM:SRE'
1196 allow_undefined_flag
=' ${wl}-berok'
1197 archive_cmds
="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
1198 archive_expsym_cmds
="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
1199 case "$host_os" in aix4.
[01]|aix4.
[01].
*)
1200 # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
1201 always_export_symbols
=yes ;;
1206 archive_cmds
='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1207 hardcode_libdir_flag_spec
='-L$libdir'
1208 hardcode_minus_L
=yes
1209 # see comment about different semantics on the GNU ld section
1214 # When not using gcc, we currently assume that we are using
1215 # Microsoft Visual C++.
1216 # hardcode_libdir_flag_spec is actually meaningless, as there is
1217 # no search path for DLLs.
1218 hardcode_libdir_flag_spec
=' '
1219 allow_undefined_flag
=unsupported
1220 # Tell ltmain to make .lib files, not .a files.
1222 # FIXME: Setting linknames here is a bad hack.
1223 archive_cmds
='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1224 # The linker will automatically build a .lib file if we build a DLL.
1225 old_archive_from_new_cmds
='true'
1226 # FIXME: Should let the user specify the lib program.
1227 old_archive_cmds
='lib /OUT:$oldlib$oldobjs$old_deplibs'
1228 fix_srcfile_path
='`cygpath -w $srcfile`'
1235 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1236 # support. Future versions do this automatically, but an explicit c++rt0.o
1237 # does not break anything, and helps significantly (at the cost of a little
1240 archive_cmds
='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1241 hardcode_libdir_flag_spec
='-R$libdir'
1243 hardcode_shlibpath_var
=no
1246 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1248 archive_cmds
='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1250 hardcode_minus_L
=yes
1251 hardcode_shlibpath_var
=no
1254 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1256 archive_cmds
='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1257 hardcode_libdir_flag_spec
='-R$libdir'
1259 hardcode_shlibpath_var
=no
1262 hpux9
* | hpux10
* | hpux11
*)
1264 hpux9
*) archive_cmds
='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
1265 *) archive_cmds
='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1267 hardcode_libdir_flag_spec
='${wl}+b ${wl}$libdir'
1268 hardcode_libdir_separator
=:
1270 hardcode_minus_L
=yes # Not in the search PATH, but as the default
1271 # location of the library.
1272 export_dynamic_flag_spec
='${wl}-E'
1276 if test "$with_gcc" = yes; then
1277 archive_cmds
='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1279 archive_cmds
='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1281 hardcode_libdir_flag_spec
='${wl}-rpath ${wl}$libdir'
1282 hardcode_libdir_separator
=:
1283 link_all_deplibs
=yes
1287 if echo __ELF__ |
$CC -E - |
grep __ELF__
>/dev
/null
; then
1288 archive_cmds
='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1290 archive_cmds
='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
1292 hardcode_libdir_flag_spec
='${wl}-R$libdir'
1294 hardcode_shlibpath_var
=no
1298 archive_cmds
='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1299 hardcode_libdir_flag_spec
='-R$libdir'
1301 hardcode_shlibpath_var
=no
1305 hardcode_libdir_flag_spec
='-L$libdir'
1306 hardcode_minus_L
=yes
1307 allow_undefined_flag
=unsupported
1308 archive_cmds
='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
1309 old_archive_from_new_cmds
='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1313 if test "$with_gcc" = yes; then
1314 allow_undefined_flag
=' ${wl}-expect_unresolved ${wl}\*'
1315 archive_cmds
='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1317 allow_undefined_flag
=' -expect_unresolved \*'
1318 archive_cmds
='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1320 hardcode_libdir_flag_spec
='${wl}-rpath ${wl}$libdir'
1321 hardcode_libdir_separator
=:
1324 osf4
* | osf5
*) # as osf3* with the addition of -msym flag
1325 if test "$with_gcc" = yes; then
1326 allow_undefined_flag
=' ${wl}-expect_unresolved ${wl}\*'
1327 archive_cmds
='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1329 allow_undefined_flag
=' -expect_unresolved \*'
1330 archive_cmds
='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1332 hardcode_libdir_flag_spec
='${wl}-rpath ${wl}$libdir'
1333 hardcode_libdir_separator
=:
1336 archive_cmds
='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts'
1337 hardcode_libdir_flags_spec
='-L$libdir'
1339 hardcode_shlibpath_var
=no
1343 archive_cmds
='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1344 hardcode_shlibpath_var
=no
1345 runpath_var
=LD_RUN_PATH
1346 hardcode_runpath_var
=yes
1350 no_undefined_flag
=' -z text'
1351 # $CC -shared without GNU ld will not create a library from C++
1352 # object files and a static libstdc++, better avoid it by now
1353 archive_cmds
='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1354 archive_expsym_cmds
='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1355 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1356 hardcode_libdir_flag_spec
='-R$libdir'
1357 hardcode_shlibpath_var
=no
1359 solaris2.
[0-5] | solaris2.
[0-5].
*) ;;
1360 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
1361 whole_archive_flag_spec
='-z allextract$convenience -z defaultextract' ;;
1363 link_all_deplibs
=yes
1367 if test "x$host_vendor" = xsequent
; then
1368 # Use $CC to link under sequent, because it throws in some extra .o
1369 # files that make .init and .fini sections work.
1370 archive_cmds
='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
1372 archive_cmds
='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1374 hardcode_libdir_flag_spec
='-L$libdir'
1376 hardcode_minus_L
=yes
1377 hardcode_shlibpath_var
=no
1381 archive_cmds
='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1382 runpath_var
='LD_RUN_PATH'
1383 hardcode_shlibpath_var
=no
1384 hardcode_direct
=no
#Motorola manual says yes, but my tests say they lie
1388 archive_cmds
='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1389 hardcode_shlibpath_var
=no
1390 export_dynamic_flag_spec
='-Bexport'
1394 no_undefined_flag
=' -z text'
1395 # $CC -shared without GNU ld will not create a library from C++
1396 # object files and a static libstdc++, better avoid it by now
1397 archive_cmds
='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1398 archive_expsym_cmds
='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1399 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1400 hardcode_libdir_flag_spec
=
1401 hardcode_shlibpath_var
=no
1402 runpath_var
='LD_RUN_PATH'
1406 archive_cmds
='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1407 hardcode_libdir_flag_spec
='-L$libdir'
1408 hardcode_shlibpath_var
=no
1412 archive_cmds
='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1413 hardcode_libdir_flag_spec
='-L$libdir'
1414 hardcode_shlibpath_var
=no
1418 if test -d /usr
/nec
; then
1419 archive_cmds
='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1420 hardcode_shlibpath_var
=no
1421 runpath_var
=LD_RUN_PATH
1422 hardcode_runpath_var
=yes
1428 archive_cmds
='$LD -G -o $lib $libobjs $deplibs $linker_flags'
1431 hardcode_shlibpath_var
=no
1432 hardcode_runpath_var
=yes
1433 runpath_var
=LD_RUN_PATH
1437 archive_cmds
='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1438 runpath_var
='LD_RUN_PATH'
1439 hardcode_shlibpath_var
=no
1447 echo "$ac_t$ld_shlibs" 1>&6
1448 test "$ld_shlibs" = no
&& can_build_shared
=no
1450 # Check hardcoding attributes.
1451 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1453 if test -n "$hardcode_libdir_flag_spec" || \
1454 test -n "$runpath_var"; then
1456 # We can hardcode non-existant directories.
1457 if test "$hardcode_direct" != no
&&
1458 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1459 # have to relink, otherwise we might link with an installed library
1460 # when we should be linking with a yet-to-be-installed one
1461 ## test "$hardcode_shlibpath_var" != no &&
1462 test "$hardcode_minus_L" != no
; then
1463 # Linking always hardcodes the temporary library directory.
1464 hardcode_action
=relink
1466 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1467 hardcode_action
=immediate
1470 # We cannot hardcode anything, or else we can only hardcode existing
1472 hardcode_action
=unsupported
1474 echo "$ac_t$hardcode_action" 1>&6
1476 echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6
1477 if test -n "$STRIP" && $STRIP -V 2>&1 |
grep "GNU strip" >/dev
/null
; then
1478 test -z "$old_striplib" && old_striplib
="$STRIP --strip-debug"
1479 test -z "$striplib" && striplib
="$STRIP --strip-unneeded"
1480 echo "${ac_t}yes" 1>&6
1482 echo "${ac_t}no" 1>&6
1485 reload_cmds
='$LD$reload_flag -o $output$reload_objs'
1486 test -z "$deplibs_check_method" && deplibs_check_method
=unknown
1488 # PORTME Fill in your ld.so characteristics
1490 libname_spec
='lib$name'
1497 shlibpath_overrides_runpath
=unknown
1499 dynamic_linker
="$host_os ld.so"
1500 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
1501 sys_lib_search_path_spec
="/lib /usr/lib /usr/local/lib"
1503 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1507 library_names_spec
='${libname}${release}.so$versuffix $libname.a'
1508 shlibpath_var
=LIBPATH
1510 # AIX has no versioning support, so we append a major version to the name.
1511 soname_spec
='${libname}${release}.so$major'
1516 # AIX has no versioning support, so currently we can not hardcode correct
1517 # soname into executable. Probably we can add versioning support to
1518 # collect2, so additional links can be useful in future.
1519 # We preserve .a as extension for shared libraries though AIX4.2
1520 # and later linker supports .so
1521 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
1522 shlibpath_var
=LIBPATH
1526 library_names_spec
='$libname.ixlibrary $libname.a'
1527 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1528 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'
1532 library_names_spec
='${libname}.so'
1533 dynamic_linker
="$host_os ld.so"
1534 shlibpath_var
=LIBRARY_PATH
1535 lt_cv_dlopen
="load_add_on"
1537 lt_cv_dlopen_self
=yes
1543 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1544 soname_spec
='${libname}${release}.so$major'
1545 finish_cmds
='PATH="\$PATH:/sbin" ldconfig $libdir'
1546 shlibpath_var
=LD_LIBRARY_PATH
1547 sys_lib_search_path_spec
="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1548 sys_lib_dlsearch_path_spec
="/shlib /usr/lib /usr/local/lib"
1549 export_dynamic_flag_spec
=-rdynamic
1550 # the default ld.so.conf also contains /usr/contrib/lib and
1551 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1552 # libtool to hard-code these into programs
1556 version_type
=windows
1559 if test "$with_gcc" = yes; then
1560 library_names_spec
='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1562 library_names_spec
='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1564 dynamic_linker
='Win32 ld.exe'
1565 # FIXME: first we should search . and the directory the executable is in
1567 lt_cv_dlopen
="LoadLibrary"
1576 objformat
=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1577 version_type
=freebsd-
$objformat
1578 case "$version_type" in
1580 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1585 library_names_spec
='${libname}${release}.so$versuffix $libname.so$versuffix'
1589 shlibpath_var
=LD_LIBRARY_PATH
1592 shlibpath_overrides_runpath
=yes
1594 freebsd3.
[01]* | freebsdelf3.
[01]*)
1595 shlibpath_overrides_runpath
=yes
1596 hardcode_into_libs
=yes
1599 shlibpath_overrides_runpath
=no
1600 hardcode_into_libs
=yes
1609 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1610 soname_spec
='${libname}${release}.so$major'
1611 shlibpath_var
=LD_LIBRARY_PATH
1612 hardcode_into_libs
=yes
1615 hpux9
* | hpux10
* | hpux11
*)
1616 # Give a soname corresponding to the major version so that dld.sl refuses to
1617 # link against other versions.
1618 dynamic_linker
="$host_os dld.sl"
1622 shlibpath_var
=SHLIB_PATH
1623 shlibpath_overrides_runpath
=no
# +s is required to enable SHLIB_PATH
1624 library_names_spec
='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1625 soname_spec
='${libname}${release}.sl$major'
1626 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1627 postinstall_cmds
='chmod 555 $lib'
1634 soname_spec
='${libname}${release}.so.$major'
1635 library_names_spec
='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
1641 case "$LD" in # libtool.m4 will add one of these switches to LD
1642 *-32|
*"-32 ") libsuff
= shlibsuff
= libmagic
=32-bit;;
1643 *-n32|
*"-n32 ") libsuff
=32 shlibsuff
=N32 libmagic
=N32
;;
1644 *-64|
*"-64 ") libsuff
=64 shlibsuff
=64 libmagic
=64-bit;;
1645 *) libsuff
= shlibsuff
= libmagic
=never-match
;;
1649 shlibpath_var
=LD_LIBRARY
${shlibsuff}_PATH
1650 shlibpath_overrides_runpath
=no
1651 sys_lib_search_path_spec
="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1652 sys_lib_dlsearch_path_spec
="/usr/lib${libsuff} /lib${libsuff}"
1655 # No shared lib support for Linux oldld, aout, or coff.
1656 linux-gnuoldld
* | linux-gnuaout
* | linux-gnucoff
*)
1660 # This must be Linux ELF.
1665 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1666 soname_spec
='${libname}${release}.so$major'
1667 finish_cmds
='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1668 shlibpath_var
=LD_LIBRARY_PATH
1669 shlibpath_overrides_runpath
=no
1670 # This implies no fast_install, which is unacceptable.
1671 # Some rework will be needed to allow for fast_install
1672 # before this can be enabled.
1673 hardcode_into_libs
=yes
1675 # We used to test for /lib/ld.so.1 and disable shared libraries on
1676 # powerpc, because MkLinux only supported shared libraries with the
1677 # GNU dynamic linker. Since this was broken with cross compilers,
1678 # most powerpc-linux boxes support dynamic linking these days and
1679 # people can always --disable-shared, the test was removed, and we
1680 # assume the GNU/Linux dynamic linker is in use.
1681 dynamic_linker
='GNU/Linux ld.so'
1686 if echo __ELF__ |
$CC -E - |
grep __ELF__
>/dev
/null
; then
1687 library_names_spec
='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1688 finish_cmds
='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1689 dynamic_linker
='NetBSD (a.out) ld.so'
1691 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1692 soname_spec
='${libname}${release}.so$major'
1693 dynamic_linker
='NetBSD ld.elf_so'
1695 shlibpath_var
=LD_LIBRARY_PATH
1700 if test "$with_gnu_ld" = yes; then
1704 library_names_spec
='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1705 finish_cmds
='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1706 shlibpath_var
=LD_LIBRARY_PATH
1710 libname_spec
='$name'
1712 library_names_spec
='$libname.dll $libname.a'
1713 dynamic_linker
='OS/2 ld.exe'
1714 shlibpath_var
=LIBPATH
1717 osf3
* | osf4
* | osf5
*)
1720 soname_spec
='${libname}${release}.so'
1721 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1722 shlibpath_var
=LD_LIBRARY_PATH
1723 sys_lib_search_path_spec
="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1724 sys_lib_dlsearch_path_spec
="$sys_lib_search_path_spec"
1729 library_names_spec
='${libname}.so'
1730 soname_spec
='${libname}.so'
1731 shlibpath_var
=DYLD_LIBRARY_PATH
1732 deplibs_check_method
=pass_all
1737 soname_spec
='${libname}${release}.so$major'
1738 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1739 shlibpath_var
=LD_LIBRARY_PATH
1746 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1747 soname_spec
='${libname}${release}.so$major'
1748 shlibpath_var
=LD_LIBRARY_PATH
1749 shlibpath_overrides_runpath
=yes
1750 hardcode_into_libs
=yes
1751 # ldd complains unless libraries are executable
1752 postinstall_cmds
='chmod +x $lib'
1757 library_names_spec
='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1758 finish_cmds
='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1759 shlibpath_var
=LD_LIBRARY_PATH
1760 shlibpath_overrides_runpath
=yes
1761 if test "$with_gnu_ld" = yes; then
1767 sysv4 | sysv4.2uw2
* | sysv4.3
* | sysv5
*)
1769 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1770 soname_spec
='${libname}${release}.so$major'
1771 shlibpath_var
=LD_LIBRARY_PATH
1772 case "$host_vendor" in
1774 file_magic_cmd
='/bin/file'
1775 deplibs_check_method
='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
1780 shlibpath_overrides_runpath
=no
1781 sys_lib_search_path_spec
='/lib /usr/lib /usr/ccs/lib'
1788 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1789 soname_spec
='${libname}${release}.so$major'
1790 shlibpath_var
=LD_LIBRARY_PATH
1797 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1798 soname_spec
='${libname}${release}.so$major'
1799 shlibpath_var
=LD_LIBRARY_PATH
1803 if test -d /usr
/nec
;then
1805 library_names_spec
='$libname.so.$versuffix $libname.so.$major $libname.so'
1806 soname_spec
='$libname.so.$major'
1807 shlibpath_var
=LD_LIBRARY_PATH
1815 echo "$ac_t$dynamic_linker" 1>&6
1816 test "$dynamic_linker" = no
&& can_build_shared
=no
1818 # Check for command to grab the raw symbol name followed by C symbol from nm.
1819 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1821 # These are sane defaults that work on at least a few old systems.
1822 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1824 # Character class describing NM global symbol codes.
1825 symcode
='[BCDEGRST]'
1827 # Regexp to match symbols that can be accessed directly from C.
1828 sympat
='\([_A-Za-z][_A-Za-z0-9]*\)'
1830 # Transform the above into a raw symbol and a C symbol.
1831 symxfrm
='\1 \2\3 \3'
1833 # Transform an extracted symbol line into a proper C declaration
1834 global_symbol_to_cdecl
="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1836 # Define system-specific variables.
1842 symcode
='[ABCDGISTW]'
1844 hpux
*) # Its linker distinguishes data from code symbols
1845 global_symbol_to_cdecl
="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1848 symcode
='[BCDEGRST]'
1858 # Handle CRLF in mingw too chain
1862 opt_cr
=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1866 # If we're using GNU nm, then use its standard symbol codes.
1867 if $NM -V 2>&1 |
egrep '(GNU|with BFD)' > /dev
/null
; then
1868 symcode
='[ABCDGISTW]'
1871 # Try without a prefix undercore, then with it.
1872 for ac_symprfx
in "" "_"; do
1874 # Write the raw and C identifiers.
1875 global_symbol_pipe
="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1877 # Check to see that the pipe works correctly.
1880 cat > conftest.c
<<EOF
1885 void nm_test_func(){}
1889 main(){nm_test_var='a';nm_test_func();return(0);}
1892 echo "$progname:1892: checking if global_symbol_pipe works" >&5
1893 if { (eval echo $progname:1893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.
$objext; then
1894 # Now try to grab the symbols.
1896 if { echo "$progname:1896: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1898 # Try sorting and uniquifying the output.
1899 if sort "$nlist" |
uniq > "$nlist"T
; then
1900 mv -f "$nlist"T
"$nlist"
1905 # Make sure that we snagged all the symbols we need.
1906 if egrep ' nm_test_var$' "$nlist" >/dev
/null
; then
1907 if egrep ' nm_test_func$' "$nlist" >/dev
/null
; then
1908 cat <<EOF > conftest.c
1914 # Now generate the symbol file.
1915 eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
1917 cat <<EOF >> conftest.c
1918 #if defined (__STDC__) && __STDC__
1919 # define lt_ptr_t void *
1921 # define lt_ptr_t char *
1925 /* The mapping between symbol names and symbols. */
1930 lt_preloaded_symbols[] =
1933 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
1934 cat <<\EOF
>> conftest.c
1942 # Now try linking the two files.
1943 mv conftest.
$objext conftstm.
$objext
1945 save_CFLAGS
="$CFLAGS"
1946 LIBS
="conftstm.$objext"
1947 CFLAGS
="$CFLAGS$no_builtin_flag"
1948 if { (eval echo $progname:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
; then
1951 echo "$progname: failed program was:" >&5
1956 echo "cannot find nm_test_func in $nlist" >&5
1959 echo "cannot find nm_test_var in $nlist" >&5
1962 echo "cannot run $global_symbol_pipe" >&5
1965 echo "$progname: failed program was:" >&5
1968 $rm conftest
* conftst
*
1970 # Do not use the global_symbol_pipe unless it works.
1971 if test "$pipe_works" = yes; then
1977 if test "$pipe_works" = yes; then
1978 echo "${ac_t}ok" 1>&6
1980 echo "${ac_t}failed" 1>&6
1983 if test -z "$global_symbol_pipe"; then
1984 global_symbol_to_cdecl
=
1987 # Report the final consequences.
1988 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1990 # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
1991 # configure.in, otherwise build static only libraries.
1993 cygwin
* | mingw
* | os2
*)
1994 if test x
$can_build_shared = xyes
; then
1995 test x
$enable_win32_dll = xno
&& can_build_shared
=no
1996 echo "checking if package supports dlls... $can_build_shared" 1>&6
2001 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
2002 test "$can_build_shared" = "no" && enable_shared
=no
2004 # On AIX, shared libraries and static libraries use the same namespace, and
2005 # are all built from PIC.
2008 test "$enable_shared" = yes && enable_static
=no
2009 if test -n "$RANLIB"; then
2010 archive_cmds
="$archive_cmds~\$RANLIB \$lib"
2011 postinstall_cmds
='$RANLIB $lib'
2016 test "$enable_shared" = yes && enable_static
=no
2020 echo "$ac_t$enable_shared" 1>&6
2022 # Make sure either enable_shared or enable_static is yes.
2023 test "$enable_shared" = yes || enable_static
=yes
2025 echo "checking whether to build static libraries... $enable_static" 1>&6
2027 if test "$hardcode_action" = relink ||
test "$hardcode_into_libs" = all
; then
2028 # Fast installation is not supported
2029 enable_fast_install
=no
2030 elif test "$shlibpath_overrides_runpath" = yes ||
2031 test "$enable_shared" = no
; then
2032 # Fast installation is not necessary
2033 enable_fast_install
=needless
2036 variables_saved_for_relink
="PATH $shlibpath_var $runpath_var"
2037 if test "$with_gcc" = yes; then
2038 variables_saved_for_relink
="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2041 # Check whether we must set pic_mode to default
2042 test -z "$pic_flag" && pic_mode
=default
2044 if test "x$enable_dlopen" != xyes
; then
2045 enable_dlopen
=unknown
2046 enable_dlopen_self
=unknown
2047 enable_dlopen_self_static
=unknown
2049 if test "X${lt_cv_dlopen+set}" != Xset
; then
2050 lt_cv_dlopen
=no lt_cv_dlopen_libs
=
2051 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2052 echo "$progname:2052: checking for dlopen in -ldl" >&5
2053 if test "X${ac_cv_lib_dl_dlopen+set}" = Xset
; then
2054 echo $ac_n "(cached) $ac_c" 1>&6
2056 ac_save_LIBS
="$LIBS"
2058 cat > conftest.
$ac_ext <<EOF
2059 #line 2059 "ltconfig"
2060 /* Override any gcc2 internal prototype to avoid an error. */
2061 /* We use char because int might match the return type of a gcc2
2062 builtin and then its argument prototype would still apply. */
2072 if { (eval echo $progname:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
${ac_exeext}; then
2074 ac_cv_lib_dl_dlopen
=yes
2076 echo "$progname: failed program was:" >&5
2077 cat conftest.
$ac_ext >&5
2079 ac_cv_lib_dl_dlopen
=no
2082 LIBS
="$ac_save_LIBS"
2085 if test "X$ac_cv_lib_dl_dlopen" = Xyes
; then
2086 echo "$ac_t""yes" 1>&6
2087 lt_cv_dlopen
="dlopen" lt_cv_dlopen_libs
="-ldl"
2089 echo "$ac_t""no" 1>&6
2090 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
2091 echo "$progname:2091: checking for dlopen" >&5
2092 if test "X${ac_cv_func_dlopen+set}" = Xset
; then
2093 echo $ac_n "(cached) $ac_c" 1>&6
2095 cat > conftest.
$ac_ext <<EOF
2096 #line 2096 "ltconfig"
2097 /* System header to define __stub macros and hopefully few prototypes,
2098 which can conflict with char dlopen(); below. */
2100 /* Override any gcc2 internal prototype to avoid an error. */
2101 /* We use char because int might match the return type of a gcc2
2102 builtin and then its argument prototype would still apply. */
2110 /* The GNU C library defines this for functions which it implements
2111 to always fail with ENOSYS. Some functions are actually named
2112 something starting with __ and the normal name is an alias. */
2113 #if defined (__stub_dlopen) || defined (__stub___dlopen)
2121 if { (eval echo $progname:2121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
${ac_exeext}; then
2123 ac_cv_func_dlopen
=yes
2125 echo "$progname: failed program was:" >&5
2126 cat conftest.
$ac_ext >&5
2128 ac_cv_func_dlopen
=no
2132 if test "X$ac_cv_func_dlopen" = Xyes
; then
2133 echo "$ac_t""yes" 1>&6
2134 lt_cv_dlopen
="dlopen"
2136 echo "$ac_t""no" 1>&6
2137 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2138 echo "$progname:2138: checking for dld_link in -ldld" >&5
2139 if test "X${ac_cv_lib_dld_dld_link+set}" = Xset
; then
2140 echo $ac_n "(cached) $ac_c" 1>&6
2142 ac_save_LIBS
="$LIBS"
2144 cat > conftest.
$ac_ext <<EOF
2145 #line 2145 "ltconfig"
2146 /* Override any gcc2 internal prototype to avoid an error. */
2147 /* We use char because int might match the return type of a gcc2
2148 builtin and then its argument prototype would still apply. */
2158 if { (eval echo $progname:2158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
${ac_exeext}; then
2160 ac_cv_lib_dld_dld_link
=yes
2162 echo "$progname: failed program was:" >&5
2163 cat conftest.
$ac_ext >&5
2165 ac_cv_lib_dld_dld_link
=no
2168 LIBS
="$ac_save_LIBS"
2171 if test "X$ac_cv_lib_dld_dld_link" = Xyes
; then
2172 echo "$ac_t""yes" 1>&6
2173 lt_cv_dlopen
="dld_link" lt_cv_dlopen_libs
="-ldld"
2175 echo "$ac_t""no" 1>&6
2176 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
2177 echo "$progname:2177: checking for shl_load" >&5
2178 if test "X${ac_cv_func_shl_load+set}" = Xset
; then
2179 echo $ac_n "(cached) $ac_c" 1>&6
2181 cat > conftest.
$ac_ext <<EOF
2182 #line 2182 "ltconfig"
2183 /* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char shl_load(); below. */
2186 /* Override any gcc2 internal prototype to avoid an error. */
2187 /* We use char because int might match the return type of a gcc2
2188 builtin and then its argument prototype would still apply. */
2196 /* The GNU C library defines this for functions which it implements
2197 to always fail with ENOSYS. Some functions are actually named
2198 something starting with __ and the normal name is an alias. */
2199 #if defined (__stub_shl_load) || defined (__stub___shl_load)
2207 if { (eval echo $progname:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
${ac_exeext}; then
2209 ac_cv_func_shl_load
=yes
2211 echo "$progname: failed program was:" >&5
2212 cat conftest.
$ac_ext >&5
2214 ac_cv_func_shl_load
=no
2219 if test "X$ac_cv_func_shl_load" = Xyes
; then
2220 echo "$ac_t""yes" 1>&6
2221 lt_cv_dlopen
="shl_load"
2223 echo "$ac_t""no" 1>&6
2224 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2225 echo "$progname:2225: checking for shl_load in -ldld" >&5
2226 if test "X${ac_cv_lib_dld_shl_load+set}" = Xset
; then
2227 echo $ac_n "(cached) $ac_c" 1>&6
2229 ac_save_LIBS
="$LIBS"
2231 cat > conftest.
$ac_ext <<EOF
2232 #line 2232 "ltconfig"
2233 #include "confdefs.h"
2234 /* Override any gcc2 internal prototype to avoid an error. */
2235 /* We use char because int might match the return type of a gcc2
2236 builtin and then its argument prototype would still apply. */
2246 if { (eval echo $progname:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
${ac_exeext}; then
2248 ac_cv_lib_dld_shl_load
=yes
2250 echo "$progname: failed program was:" >&5
2251 cat conftest.
$ac_ext >&5
2253 ac_cv_lib_dld_shl_load
=no
2256 LIBS
="$ac_save_LIBS"
2259 if test "X$ac_cv_lib_dld_shl_load" = Xyes
; then
2260 echo "$ac_t""yes" 1>&6
2261 lt_cv_dlopen
="shl_load" lt_cv_dlopen_libs
="-ldld"
2263 echo "$ac_t""no" 1>&6
2280 if test "x$lt_cv_dlopen" != xno
; then
2284 case "$lt_cv_dlopen" in
2286 for ac_hdr
in dlfcn.h
; do
2287 ac_safe
=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2288 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2289 echo "$progname:2289: checking for $ac_hdr" >&5
2290 if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
2291 echo $ac_n "(cached) $ac_c" 1>&6
2293 cat > conftest.
$ac_ext <<EOF
2294 #line 2294 "ltconfig"
2297 int main () { return (0); }
2299 ac_try
="$ac_compile >/dev/null 2>conftest.out"
2300 { (eval echo $progname:2300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2301 ac_err
=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2302 if test -z "$ac_err"; then
2304 eval "ac_cv_header_$ac_safe=yes"
2307 echo "$progname: failed program was:" >&5
2308 cat conftest.
$ac_ext >&5
2310 eval "ac_cv_header_$ac_safe=no"
2314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2315 echo "$ac_t""yes" 1>&6
2317 echo "$ac_t""no" 1>&6
2321 if test "x$ac_cv_header_dlfcn_h" = xyes
; then
2322 CPPFLAGS
="$CPPFLAGS -DHAVE_DLFCN_H"
2324 eval LDFLAGS
=\"\
$LDFLAGS $export_dynamic_flag_spec\"
2325 LIBS
="$lt_cv_dlopen_libs $LIBS"
2327 echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
2328 echo "$progname:2328: checking whether a program can dlopen itself" >&5
2329 if test "X${lt_cv_dlopen_self+set}" = Xset
; then
2330 echo $ac_n "(cached) $ac_c" 1>&6
2332 if test "$cross_compiling" = yes; then
2333 lt_cv_dlopen_self
=cross
2335 cat > conftest.c
<<EOF
2336 #line 2336 "ltconfig"
2345 # define LTDL_GLOBAL RTLD_GLOBAL
2348 # define LTDL_GLOBAL DL_GLOBAL
2350 # define LTDL_GLOBAL 0
2354 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2355 find out it does not work in some platform. */
2356 #ifndef LTDL_LAZY_OR_NOW
2358 # define LTDL_LAZY_OR_NOW RTLD_LAZY
2361 # define LTDL_LAZY_OR_NOW DL_LAZY
2364 # define LTDL_LAZY_OR_NOW RTLD_NOW
2367 # define LTDL_LAZY_OR_NOW DL_NOW
2369 # define LTDL_LAZY_OR_NOW 0
2376 fnord() { int i=42;}
2377 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2378 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2379 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2382 if { (eval echo $progname:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
&& (.
/conftest
; exit) 2>/dev
/null
2384 lt_cv_dlopen_self
=yes
2386 echo "$progname: failed program was:" >&5
2387 cat conftest.
$ac_ext >&5
2389 lt_cv_dlopen_self
=no
2396 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
2398 if test "$lt_cv_dlopen_self" = yes; then
2399 LDFLAGS
="$LDFLAGS $link_static_flag"
2400 echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
2401 echo "$progname:2401: checking whether a statically linked program can dlopen itself" >&5
2402 if test "X${lt_cv_dlopen_self_static+set}" = Xset
; then
2403 echo $ac_n "(cached) $ac_c" 1>&6
2405 if test "$cross_compiling" = yes; then
2406 lt_cv_dlopen_self_static
=cross
2408 cat > conftest.c
<<EOF
2409 #line 2409 "ltconfig"
2418 # define LTDL_GLOBAL RTLD_GLOBAL
2421 # define LTDL_GLOBAL DL_GLOBAL
2423 # define LTDL_GLOBAL 0
2427 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2428 find out it does not work in some platform. */
2429 #ifndef LTDL_LAZY_OR_NOW
2431 # define LTDL_LAZY_OR_NOW RTLD_LAZY
2434 # define LTDL_LAZY_OR_NOW DL_LAZY
2437 # define LTDL_LAZY_OR_NOW RTLD_NOW
2440 # define LTDL_LAZY_OR_NOW DL_NOW
2442 # define LTDL_LAZY_OR_NOW 0
2449 fnord() { int i=42;}
2450 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2451 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2452 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2455 if { (eval echo $progname:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
&& (.
/conftest
; exit) 2>/dev
/null
2457 lt_cv_dlopen_self_static
=yes
2459 echo "$progname: failed program was:" >&5
2460 cat conftest.
$ac_ext >&5
2462 lt_cv_dlopen_self_static
=no
2469 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
2474 case "$lt_cv_dlopen_self" in
2475 yes|no
) enable_dlopen_self
=$lt_cv_dlopen_self ;;
2476 *) enable_dlopen_self
=unknown
;;
2479 case "$lt_cv_dlopen_self_static" in
2480 yes|no
) enable_dlopen_self_static
=$lt_cv_dlopen_self_static ;;
2481 *) enable_dlopen_self_static
=unknown
;;
2485 # Copy echo and quote the copy, instead of the original, because it is
2488 if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
2489 ltecho
="$CONFIG_SHELL \$0 --fallback-echo"
2493 LTCONFIG_VERSION
="$VERSION"
2495 # Only quote variables if we're using ltmain.sh.
2498 # Now quote all the things that may contain metacharacters.
2499 for var
in ltecho old_AR old_ARFLAGS old_CC old_CFLAGS old_CPPFLAGS \
2500 old_MAGIC old_LD old_LDFLAGS old_LIBS \
2501 old_LN_S old_NM old_RANLIB old_STRIP \
2502 old_AS old_DLLTOOL old_OBJDUMP \
2503 old_OBJEXT old_EXEEXT old_reload_flag \
2504 old_deplibs_check_method old_file_magic_cmd \
2505 AR AR_FLAGS CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
2506 reload_flag reload_cmds wl \
2507 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2508 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2509 library_names_spec soname_spec \
2510 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2511 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2512 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2513 old_striplib striplib file_magic_cmd export_symbols_cmds \
2514 deplibs_check_method allow_undefined_flag no_undefined_flag \
2515 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2516 hardcode_libdir_flag_spec hardcode_libdir_separator \
2517 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2518 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms
; do
2521 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2522 old_postinstall_cmds | old_postuninstall_cmds | \
2523 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2524 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2525 postinstall_cmds | postuninstall_cmds | \
2526 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec
)
2527 # Double-quote double-evaled strings.
2528 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test
2531 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test
2537 *'\$0 --fallback-echo"')
2538 ltecho
=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
2542 trap "$rm \"$ofile\"; exit 1" 1 2 15
2543 echo "creating $ofile"
2545 cat <<EOF > "$ofile"
2548 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2549 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2550 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
2552 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2553 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2555 # This program is free software; you can redistribute it and/or modify
2556 # it under the terms of the GNU General Public License as published by
2557 # the Free Software Foundation; either version 2 of the License, or
2558 # (at your option) any later version.
2560 # This program is distributed in the hope that it will be useful, but
2561 # WITHOUT ANY WARRANTY; without even the implied warranty of
2562 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2563 # General Public License for more details.
2565 # You should have received a copy of the GNU General Public License
2566 # along with this program; if not, write to the Free Software
2567 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2569 # As a special exception to the GNU General Public License, if you
2570 # distribute this file as part of a program that contains a
2571 # configuration script generated by Autoconf, you may include it under
2572 # the same distribution terms that you use for the rest of that program.
2574 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2575 Xsed="sed -e s/^X//"
2577 # The HP-UX ksh and POSIX shell print the target directory to stdout
2579 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2581 ### BEGIN LIBTOOL CONFIG
2587 # Double-quote the variables that need it (for aesthetics).
2588 for var
in old_AR old_AR_FLAGS old_CC old_CFLAGS old_CPPFLAGS \
2589 old_MAGIC old_LD old_LDFLAGS old_LIBS \
2590 old_LN_S old_NM old_RANLIB old_STRIP \
2591 old_AS old_DLLTOOL old_OBJDUMP \
2592 old_OBJEXT old_EXEEXT old_reload_flag \
2593 old_deplibs_check_method old_file_magic_cmd
; do
2594 eval "$var=\\\"\$var\\\""
2597 # Just create a config file.
2598 cfgfile
="$ofile.cfg"
2599 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2600 echo "creating $cfgfile"
2602 cat <<EOF > "$cfgfile"
2603 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
2604 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2609 cat <<EOF >> "$cfgfile"
2610 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2612 # AR=$old_AR AR_FLAGS=$old_AR_FLAGS CC=$old_CC CFLAGS=$old_CFLAGS \\
2613 # CPPFLAGS=$old_CPPFLAGS MAGIC=$old_MAGIC LD=$old_LD LDFLAGS=$old_LDFLAGS \\
2614 # LIBS=$old_LIBS LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB \\
2615 # STRIP=$old_STRIP AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\
2616 # objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\
2617 # deplibs_check_method=$old_deplibs_check_method file_magic_cmd=$old_file_magic_cmd \\
2620 # Compiler and other test output produced by $progname, useful for
2621 # debugging $progname, is in ./config.log if it exists.
2622 # The version of $progname that generated this script.
2623 LTCONFIG_VERSION=$LTCONFIG_VERSION
2625 # Shell to use when invoking shell scripts.
2628 # Whether or not to build shared libraries.
2629 build_libtool_libs=$enable_shared
2631 # Whether or not to build static libraries.
2632 build_old_libs=$enable_static
2634 # Whether or not to optimize for fast installation.
2635 fast_install=$enable_fast_install
2638 host_alias=$host_alias
2641 # An echo program that does not interpret backslashes.
2648 # The default C compiler.
2651 # The linker used to build libraries.
2654 # Whether we need hard or soft links.
2657 # A BSD-compatible nm program.
2660 # A symbol stripping program
2663 # Used to examine libraries when file_magic_cmd begins "file"
2666 # Used on cygwin: DLL creation program.
2669 # Used on cygwin: object dumper.
2672 # Used on cygwin: assembler.
2675 # The name of the directory that contains temporary libtool files.
2678 # How to create reloadable object files.
2679 reload_flag=$reload_flag
2680 reload_cmds=$reload_cmds
2682 # How to pass a linker flag through the compiler.
2685 # Object file suffix (normally "o").
2688 # Old archive suffix (normally "a").
2691 # Executable file suffix (normally "").
2694 # Additional compiler flags for building library objects.
2698 # Does compiler simultaneously support -c and -o options?
2699 compiler_c_o=$compiler_c_o
2701 # Can we write directly to a .lo ?
2702 compiler_o_lo=$compiler_o_lo
2704 # Must we lock files when doing compilation ?
2705 need_locks=$need_locks
2707 # Do we need the lib prefix for modules?
2708 need_lib_prefix=$need_lib_prefix
2710 # Do we need a version for libraries?
2711 need_version=$need_version
2713 # Whether dlopen is supported.
2714 dlopen_support=$enable_dlopen
2716 # Whether dlopen of programs is supported.
2717 dlopen_self=$enable_dlopen_self
2719 # Whether dlopen of statically linked programs is supported.
2720 dlopen_self_static=$enable_dlopen_self_static
2722 # Compiler flag to prevent dynamic linking.
2723 link_static_flag=$link_static_flag
2725 # Compiler flag to turn off builtin functions.
2726 no_builtin_flag=$no_builtin_flag
2728 # Compiler flag to allow reflexive dlopens.
2729 export_dynamic_flag_spec=$export_dynamic_flag_spec
2731 # Compiler flag to generate shared objects directly from archives.
2732 whole_archive_flag_spec=$whole_archive_flag_spec
2734 # Compiler flag to generate thread-safe objects.
2735 thread_safe_flag_spec=$thread_safe_flag_spec
2737 # Library versioning type.
2738 version_type=$version_type
2740 # Format of library name prefix.
2741 libname_spec=$libname_spec
2743 # List of archive names. First name is the real one, the rest are links.
2744 # The last name is the one that the linker finds with -lNAME.
2745 library_names_spec=$library_names_spec
2747 # The coded name of the library, if different from the real name.
2748 soname_spec=$soname_spec
2750 # Commands used to build and install an old-style archive.
2752 old_archive_cmds=$old_archive_cmds
2753 old_postinstall_cmds=$old_postinstall_cmds
2754 old_postuninstall_cmds=$old_postuninstall_cmds
2756 # Create an old-style archive from a shared archive.
2757 old_archive_from_new_cmds=$old_archive_from_new_cmds
2759 # Create a temporary old-style archive to link instead of a shared archive.
2760 old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds
2762 # Commands used to build and install a shared archive.
2763 archive_cmds=$archive_cmds
2764 archive_expsym_cmds=$archive_expsym_cmds
2765 postinstall_cmds=$postinstall_cmds
2766 postuninstall_cmds=$postuninstall_cmds
2768 # Commands to strip libraries.
2769 old_striplib=$old_striplib
2772 # Method to check whether dependent libraries are shared objects.
2773 deplibs_check_method=$deplibs_check_method
2775 # Command to use when deplibs_check_method == file_magic.
2776 file_magic_cmd=$file_magic_cmd
2778 # Flag that allows shared libraries with undefined symbols to be built.
2779 allow_undefined_flag=$allow_undefined_flag
2781 # Flag that forces no undefined symbols.
2782 no_undefined_flag=$no_undefined_flag
2784 # Commands used to finish a libtool library installation in a directory.
2785 finish_cmds=$finish_cmds
2787 # Same as above, but a single script fragment to be evaled but not shown.
2788 finish_eval=$finish_eval
2790 # Take the output of nm and produce a listing of raw symbols and C names.
2791 global_symbol_pipe=$global_symbol_pipe
2793 # Transform the output of nm in a proper C declaration
2794 global_symbol_to_cdecl=$global_symbol_to_cdecl
2796 # This is the shared library runtime path variable.
2797 runpath_var=$runpath_var
2799 # This is the shared library path variable.
2800 shlibpath_var=$shlibpath_var
2802 # Is shlibpath searched before the hard-coded library search path?
2803 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2805 # How to hardcode a shared library path into an executable.
2806 hardcode_action=$hardcode_action
2808 # Whether we should hardcode library paths into libraries.
2809 hardcode_into_libs=$hardcode_into_libs
2811 # Flag to hardcode \$libdir into a binary during linking.
2812 # This must work even if \$libdir does not exist.
2813 hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
2815 # Whether we need a single -rpath flag with a separated argument.
2816 hardcode_libdir_separator=$hardcode_libdir_separator
2818 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2820 hardcode_direct=$hardcode_direct
2822 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2824 hardcode_minus_L=$hardcode_minus_L
2826 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2827 # the resulting binary.
2828 hardcode_shlibpath_var=$hardcode_shlibpath_var
2830 # Variables whose values should be saved in libtool wrapper scripts and
2831 # restored at relink time.
2832 variables_saved_for_relink="$variables_saved_for_relink"
2834 # Whether libtool must link a program against all its dependency libraries.
2835 link_all_deplibs=$link_all_deplibs
2837 # Compile-time system search path for libraries
2838 sys_lib_search_path_spec=$sys_lib_search_path_spec
2840 # Run-time system search path for libraries
2841 sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
2843 # Fix the shell variable \$srcfile for the compiler.
2844 fix_srcfile_path="$fix_srcfile_path"
2846 # Set to yes if exported symbols are required.
2847 always_export_symbols=$always_export_symbols
2849 # The commands to list exported symbols.
2850 export_symbols_cmds=$export_symbols_cmds
2852 # The commands to extract the exported symbol list from a shared archive.
2853 extract_expsyms_cmds=$extract_expsyms_cmds
2855 # Symbols that should not be listed in the preloaded symbols.
2856 exclude_expsyms=$exclude_expsyms
2858 # Symbols that must always be exported.
2859 include_expsyms=$include_expsyms
2865 echo '### END LIBTOOL CONFIG' >> "$ofile"
2869 cat <<\EOF
>> "$ofile"
2871 # AIX sometimes has problems with the GCC collect2 program. For some
2872 # reason, if we set the COLLECT_NAMES environment variable, the problems
2873 # vanish in a puff of smoke.
2874 if test "X${COLLECT_NAMES+set}" != Xset
; then
2876 export COLLECT_NAMES
2882 *-*-cygwin* |
*-*-mingw* |
*-*-os2*)
2883 cat <<'EOF' >> "$ofile"
2884 # This is a source program that is used to create dlls on Windows
2885 # Don't remove nor modify the starting and closing comments
2886 # /* ltdll.c starts here */
2887 # #define WIN32_LEAN_AND_MEAN
2888 # #include <windows.h>
2889 # #undef WIN32_LEAN_AND_MEAN
2890 # #include <stdio.h>
2892 # #ifndef __CYGWIN__
2893 # # ifdef __CYGWIN32__
2894 # # define __CYGWIN__ __CYGWIN32__
2898 # #ifdef __cplusplus
2901 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
2902 # #ifdef __cplusplus
2907 # #include <cygwin/cygwin_dll.h>
2908 # DECLARE_CYGWIN_DLL( DllMain );
2910 # HINSTANCE __hDllInstance_base;
2913 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
2915 # __hDllInstance_base = hInst;
2918 # /* ltdll.c ends here */
2919 # This is a source program that is used to create import libraries
2920 # on Windows for dlls which lack them. Don't remove nor modify the
2921 # starting and closing comments
2922 # /* impgen.c starts here */
2923 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
2925 # This file is part of GNU libtool.
2927 # This program is free software; you can redistribute it and/or modify
2928 # it under the terms of the GNU General Public License as published by
2929 # the Free Software Foundation; either version 2 of the License, or
2930 # (at your option) any later version.
2932 # This program is distributed in the hope that it will be useful,
2933 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2934 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2935 # GNU General Public License for more details.
2937 # You should have received a copy of the GNU General Public License
2938 # along with this program; if not, write to the Free Software
2939 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2942 # #include <stdio.h> /* for printf() */
2943 # #include <unistd.h> /* for open(), lseek(), read() */
2944 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
2945 # #include <string.h> /* for strdup() */
2947 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
2949 # #define O_BINARY 0
2952 # static unsigned int
2953 # pe_get16 (fd, offset)
2957 # unsigned char b[2];
2958 # lseek (fd, offset, SEEK_SET);
2960 # return b[0] + (b[1]<<8);
2963 # static unsigned int
2964 # pe_get32 (fd, offset)
2968 # unsigned char b[4];
2969 # lseek (fd, offset, SEEK_SET);
2971 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2974 # static unsigned int
2978 # unsigned char *b = ptr;
2979 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2988 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
2989 # unsigned long export_rva, export_size, nsections, secptr, expptr;
2990 # unsigned long name_rvas, nexp;
2991 # unsigned char *expdata, *erva;
2992 # char *filename, *dll_name;
2994 # filename = argv[1];
2996 # dll = open(filename, O_RDONLY|O_BINARY);
3000 # dll_name = filename;
3002 # for (i=0; filename[i]; i++)
3003 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3004 # dll_name = filename + i +1;
3006 # pe_header_offset = pe_get32 (dll, 0x3c);
3007 # opthdr_ofs = pe_header_offset + 4 + 20;
3008 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3010 # if (num_entries < 1) /* no exports */
3013 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3014 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3015 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3016 # secptr = (pe_header_offset + 4 + 20 +
3017 # pe_get16 (dll, pe_header_offset + 4 + 16));
3020 # for (i = 0; i < nsections; i++)
3023 # unsigned long secptr1 = secptr + 40 * i;
3024 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3025 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3026 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3027 # lseek(dll, secptr1, SEEK_SET);
3028 # read(dll, sname, 8);
3029 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3031 # expptr = fptr + (export_rva - vaddr);
3032 # if (export_rva + export_size > vaddr + vsize)
3033 # export_size = vsize - (export_rva - vaddr);
3038 # expdata = (unsigned char*)malloc(export_size);
3039 # lseek (dll, expptr, SEEK_SET);
3040 # read (dll, expdata, export_size);
3041 # erva = expdata - export_rva;
3043 # nexp = pe_as32 (expdata+24);
3044 # name_rvas = pe_as32 (expdata+32);
3046 # printf ("EXPORTS\n");
3047 # for (i = 0; i<nexp; i++)
3049 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3050 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3055 # /* impgen.c ends here */
3062 # Append the ltmain.sh script.
3063 sed '$q' "$ltmain" >> "$ofile" ||
(rm -f "$ofile"; exit 1)
3064 # We use sed instead of cat because bash on DJGPP gets confused if
3065 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3066 # text mode, it properly converts lines to CR/LF. This bash problem
3067 # is reportedly fixed, but why not run on old versions too?
3073 # Compile the libtool program.
3074 echo "FIXME: would compile $ltmain"
3078 test -n "$cache_file" ||
exit 0
3082 cat > confcache
<<\EOF
3083 # This file is a shell script that caches the results of configure
3084 # tests run on this system so they can be shared between configure
3085 # scripts and configure runs. It is not useful on other systems.
3086 # If it contains results you don't want to keep, you may remove or edit it.
3088 # By default, configure uses ./config.cache as the cache file,
3089 # creating it if it does not exist already. You can give configure
3090 # the --cache-file=FILE option to use a different cache file; that is
3091 # what configure does when it calls configure scripts in
3092 # subdirectories, so they share the cache.
3093 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3094 # config.status only pays attention to the cache file if you give it the
3095 # --recheck option to rerun configure.
3098 # The following way of writing the cache mishandles newlines in values,
3099 # but we know of no workaround that is simple, portable, and efficient.
3100 # So, don't put newlines in cache variables' values.
3101 # Ultrix sh set writes to stderr and can't be redirected directly,
3102 # and sets the high bit in the cache file unless we assign to the vars.
3104 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3106 # `set' does not quote correctly, so add quotes (double-quote substitution
3107 # turns \\\\ into \\, and sed turns \\ into \).
3109 -e "s/'/'\\\\''/g" \
3110 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3113 # `set' quotes correctly as required by POSIX, so do not add quotes.
3114 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3117 if cmp -s $cache_file confcache
; then
3120 if test -w $cache_file; then
3121 echo "updating cache $cache_file"
3122 cat confcache
> $cache_file
3124 echo "not updating unwritable cache $cache_file"