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`
154
export echo_test_string
155
exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"}
157
# Oops. We lost completely, so just stick with echo.
165
# Sed substitution that helps us do robust quoting. It backslashifies
166
# metacharacters that are still active within double-quoted strings.
168
sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
170
# Same as above, but do not quote variable references.
171
double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
173
# Sed substitution to delay expansion of an escaped shell variable in a
174
# double_quote_subst'ed string.
175
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
177
# The name of this program.
178
progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
184
TIMESTAMP=" (1.641.2.179mm 2001/01/08 01:59:19)"
185
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
186
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
189
help="Try \`$progname --help' for more information."
192
default_ofile=libtool
195
# All known linkers require a `.a' archive for static linking (except M$VC,
196
# which needs '.lib').
198
enable_fast_install=yes
199
enable_dlopen=unknown
210
ofile="$default_ofile"
220
## Dependencies to place before and after the object being linked:
225
compiler_lib_search_path=
227
## Link characteristics:
228
allow_undefined_flag=
230
need_lib_prefix=unknown
232
# when you set need_version to no, make sure it does not cause -set_version
233
# flags to be left without arguments
236
old_archive_from_new_cmds=
237
old_archive_from_expsyms_cmds=
240
export_dynamic_flag_spec=
241
whole_archive_flag_spec=
242
thread_safe_flag_spec=
243
hardcode_into_libs=no
244
hardcode_libdir_flag_spec=
245
hardcode_libdir_separator=
248
hardcode_shlibpath_var=unsupported
250
link_all_deplibs=unknown
251
always_export_symbols=no
252
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
253
# include_expsyms should be a list of space-separated symbols to be *always*
254
# included in the symbol list
256
# exclude_expsyms can be an egrep regular expression of symbols to exclude
257
# it will be wrapped by ` (' and `)$', so one must not match beginning or
258
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
259
# as well as any symbol that contains `d'.
260
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
261
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
262
# platforms (ab)use it in PIC code, but their linkers get confused if
263
# the symbol is explicitly referenced. Since portable code cannot
264
# rely on this symbol name, it's probably fine to never include it in
265
# preloaded symbol tables.
266
extract_expsyms_cmds=
270
old_AR_FLAGS="$AR_FLAGS"
273
old_CPPFLAGS="$CPPFLAGS"
274
old_LDFLAGS="$LDFLAGS"
276
old_MAGIC_CMD="$MAGIC_CMD"
284
old_DLLTOOL="$DLLTOOL"
285
old_OBJDUMP="$OBJDUMP"
288
old_reload_flag="$reload_flag"
289
old_deplibs_check_method="$deplibs_check_method"
290
old_file_magic_cmd="$file_magic_cmd"
292
# Parse the command line options.
298
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
302
# If the previous option needs an argument, assign it.
303
if test -n "$prev"; then
304
eval "$prev=\$option"
311
Usage: $progname [OPTION]... LTMAIN [HOST]
313
Generate a system-specific libtool script.
315
--build configure for building on BUILD [BUILD=HOST]
316
--debug enable verbose shell tracing
317
--disable-shared do not build shared libraries
318
--disable-static do not build static libraries
319
--disable-fast-install do not optimize for fast installation
320
--enable-dlopen enable dlopen support
321
--enable-win32-dll enable building dlls on win32 hosts
322
--help display this help and exit
323
--no-verify do not verify that HOST is a valid host type
324
-o, --output=FILE specify the output file [default=$default_ofile]
325
--quiet same as \`--silent'
326
--silent do not print informational messages
327
--srcdir=DIR find \`config.guess' in DIR
328
--version output version information and exit
329
--add-tag=TAG append an alternate configuration
330
--with-gcc assume that the GNU C compiler will be used
331
--with-gnu-ld assume that the C compiler uses the GNU linker
332
--prefer-pic try to use only PIC objects
333
--prefer-non-pic try to use only non-PIC objects
334
--disable-lock disable file locking
335
--cache-file=FILE configure cache file
337
LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
338
that provides basic libtool functionality.
340
HOST is the canonical host system name [default=guessed].
345
--build) prev=build ;;
346
--build=*) build="$optarg" ;;
349
echo "$progname: enabling shell trace mode"
353
--disable-shared) enable_shared=no ;;
355
--disable-static) enable_static=no ;;
357
--disable-fast-install) enable_fast_install=no ;;
359
--enable-dlopen) enable_dlopen=yes ;;
361
--enable-win32-dll) enable_win32_dll=yes ;;
363
--quiet | --silent) silent=yes ;;
365
--srcdir) prev=srcdir ;;
366
--srcdir=*) srcdir="$optarg" ;;
368
--no-verify) verify_host=no ;;
370
--output | -o) prev=ofile ;;
371
--output=*) ofile="$optarg" ;;
373
--version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
375
--add-tag) prev=tagname ;;
376
--add-tag=*) tagname="$optarg" ;;
378
--with-gcc) with_gcc=yes ;;
379
--with-gnu-ld) with_gnu_ld=yes ;;
381
--prefer-pic) pic_mode=yes ;;
382
--prefer-non-pic) pic_mode=no ;;
384
--disable-lock) need_locks=no ;;
386
--cache-file=*) cache_file="$optarg" ;;
389
echo "$progname: unrecognized option \`$option'" 1>&2
395
if test -z "$ltmain"; then
397
elif test -z "$host"; then
398
# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
399
# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
400
# echo "$progname: warning \`$option' is not a valid host type" 1>&2
404
echo "$progname: too many arguments" 1>&2
411
if test -z "$ltmain"; then
412
echo "$progname: you must specify a LTMAIN file" 1>&2
417
if test ! -f "$ltmain"; then
418
echo "$progname: \`$ltmain' does not exist" 1>&2
423
if test -n "$tagname"; then
424
# Check whether tagname contains only valid characters
425
case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in
428
echo "$progname: invalid tag name: $tagname" 1>&2
433
if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then
434
echo "$progname: tag name $tagname already exists" 1>&2
438
if test ! -f "$ofile"; then
439
echo "$progname: warning: output file \`$ofile' does not exist" 1>&2
442
if test -z "$LTCC"; then
443
eval "`$SHELL $ofile --config | grep '^LTCC='`"
444
if test -z "$LTCC"; then
445
echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2
447
echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2
452
# Quote any args containing shell metacharacters.
457
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
458
ltconfig_args="$ltconfig_args '$arg'" ;;
459
*) ltconfig_args="$ltconfig_args $arg" ;;
463
# A relevant subset of AC_INIT.
465
# File descriptor usage:
468
# 2 errors and warnings
469
# 3 some systems may open it to /dev/tty
470
# 4 used on the Kubota Titan
471
# 5 compiler messages saved in config.log
472
# 6 checking for... messages and results
473
if test "$silent" = yes; then
481
# Only set LANG and LC_ALL to C if already set.
482
# These must not be set unconditionally because not all systems understand
483
# e.g. LANG=C (notably SCO).
484
if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
485
if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
487
if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then
488
echo "loading cache $cache_file within ltconfig"
492
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
493
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
494
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
501
ac_n= ac_c='\c' ac_t=
504
if test -z "$srcdir"; then
505
# Assume the source directory is the same one as the path to LTMAIN.
506
srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
507
test "$srcdir" = "$ltmain" && srcdir=.
510
trap "$rm conftest*; exit 1" 1 2 15
511
if test "$verify_host" = yes; then
512
# Check for config.guess and config.sub.
514
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
515
if test -f $ac_dir/config.guess; then
520
if test -z "$ac_aux_dir"; then
521
echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
525
ac_config_guess=$ac_aux_dir/config.guess
526
ac_config_sub=$ac_aux_dir/config.sub
528
# Make sure we can run config.sub.
529
if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
531
echo "$progname: cannot run $ac_config_sub" 1>&2
536
echo $ac_n "checking host system type""... $ac_c" 1>&6
539
case "$host_alias" in
541
# Force config.guess to use the C compiler.
542
# CC_FOR_BUILD overrides the CC variable in config.guess but I had
543
# problems with it so do it this way for now.
546
if host_alias=`$SHELL $ac_config_guess`; then :
548
echo "$progname: cannot guess host type; you must specify one" 1>&2
553
# Restore the C compiler.
557
host=`$SHELL $ac_config_sub $host_alias`
558
echo "$ac_t$host" 1>&6
560
# Make sure the host verified.
561
test -z "$host" && exit 1
563
# Check for the build system type
564
echo $ac_n "checking build system type... $ac_c" 1>&6
567
case "$build_alias" in
570
NONE) build_alias=$host_alias ;;
571
*) build_alias=$nonopt ;;
575
build=`$SHELL $ac_config_sub $build_alias`
576
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
577
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
578
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
579
echo "$ac_t""$build" 1>&6
581
elif test -z "$host"; then
582
echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
587
build_alias=$host_alias
591
if test x"$host" != x"$build"; then
592
ac_tool_prefix=${host_alias}-
597
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
598
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
599
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
601
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
604
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
609
# AIX sometimes has problems with the GCC collect2 program. For some
610
# reason, if we set the COLLECT_NAMES environment variable, the problems
611
# vanish in a puff of smoke.
612
if test "X${COLLECT_NAMES+set}" != Xset; then
619
# Determine commands to create old-style static archives.
620
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
621
old_postinstall_cmds='chmod 644 $oldlib'
622
old_postuninstall_cmds=
624
if test -n "$RANLIB"; then
625
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
626
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
629
# Source the script associated with the $tagname tag configuration.
630
if test -n "$tagname"; then
633
# FIXME: We should use a variable here
634
# Configure for a C compiler
638
# Set sane defaults for various variables
639
test -z "$AR" && AR=ar
640
test -z "$AR_FLAGS" && AR_FLAGS=cru
641
test -z "$AS" && AS=as
642
test -z "$CC" && CC=cc
643
test -z "$DLLTOOL" && DLLTOOL=dlltool
644
test -z "$MAGIC_CMD" && MAGIC_CMD=file
645
test -z "$LD" && LD=ld
646
test -z "$LN_S" && LN_S="ln -s"
647
test -z "$NM" && NM=nm
648
test -z "$OBJDUMP" && OBJDUMP=objdump
649
test -z "$RANLIB" && RANLIB=:
650
test -z "$STRIP" && STRIP=:
651
test -z "$objext" && objext=o
653
echo $ac_n "checking for objdir... $ac_c" 1>&6
654
rm -f .libs 2>/dev/null
655
mkdir .libs 2>/dev/null
656
if test -d .libs; then
659
# MS-DOS does not allow filenames that begin with a dot.
662
rmdir .libs 2>/dev/null
663
echo "$ac_t$objdir" 1>&6
665
# If no C compiler was specified, use CC.
668
# Allow CC to be a program name with arguments.
672
# We assume here that the value for ac_cv_prog_cc_pic will not be cached
673
# in isolation, and that seeing it set (from the cache) indicates that
674
# the associated values are set (in the cache) correctly too.
675
echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
676
echo "$progname:676:checking for $compiler option to produce PIC" 1>&5
678
if test -z "$ac_cv_prog_cc_pic"; then
679
echo "$ac_t"none 1>&6
681
echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6
683
# Check to make sure the pic_flag actually works.
684
echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
685
echo "$progname:685:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
686
if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \
687
test "X${ac_cv_prog_cc_pic_works}" != X; then
688
echo $ac_n "(cached) $ac_c" 1>&6
690
ac_cv_prog_cc_pic_works=yes
692
echo $lt_simple_compile_test_code > conftest.$ac_ext
693
save_CFLAGS="$CFLAGS"
694
CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
695
if { (eval echo $progname:695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
696
# Append any warnings to the config.log.
697
cat conftest.err 1>&5
700
hpux9* | hpux10* | hpux11*)
701
# On HP-UX, both CC and GCC only warn that PIC is supported... then
702
# they create non-PIC objects. So, if there were any warnings, we
703
# assume that PIC is not supported.
704
if test -s conftest.err; then
705
ac_cv_prog_cc_pic_works=no
706
ac_cv_prog_cc_can_build_shared=no
709
ac_cv_prog_cc_pic_works=yes
710
ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
714
ac_cv_prog_cc_pic_works=yes
715
ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
719
# Append any errors to the config.log.
720
cat conftest.err 1>&5
721
ac_cv_prog_cc_pic_works=no
722
ac_cv_prog_cc_can_build_shared=no
725
CFLAGS="$save_CFLAGS"
728
# Belt *and* braces to stop my trousers falling down:
729
if test "X$ac_cv_prog_cc_pic_works" = Xno; then
731
ac_cv_prog_cc_can_build_shared=no
733
echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6
736
# Check for any special shared library compilation flags.
737
if test -n "$ac_cv_prog_cc_shlib"; then
738
echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2
739
if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then :
741
echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
742
ac_cv_prog_cc_can_build_shared=no
746
echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
747
echo "$progname:747: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
748
if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \
749
test "X${ac_cv_prog_cc_static_works}" != X; then
750
echo $ac_n "(cached) $ac_c" 1>&6
753
echo $lt_simple_link_test_code > conftest.$ac_ext
754
save_LDFLAGS="$LDFLAGS"
755
LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
756
if { (eval echo $progname:756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
757
ac_cv_prog_cc_static_works=yes
759
ac_cv_prog_cc_static_works=no
760
ac_cv_prog_cc_static=
762
LDFLAGS="$save_LDFLAGS"
765
# Belt *and* braces to stop my trousers falling down:
766
if test "X$ac_cv_prog_cc_static_works" = Xno; then
767
ac_cv_prog_cc_static=
769
echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6
770
pic_flag="$ac_cv_prog_cc_pic"
771
special_shlib_compile_flags="$ac_cv_prog_cc_shlib"
772
wl="$ac_cv_prog_cc_wl"
773
link_static_flag="$ac_cv_prog_cc_static"
774
no_builtin_flag="$ac_cv_prog_cc_no_builtin"
775
can_build_shared="$ac_cv_prog_cc_can_build_shared"
777
# Check to see if options -o and -c are simultaneously supported by compiler
778
echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6
779
$rm -r conftest 2>/dev/null
783
echo $lt_simple_compile_test_code > conftest.$ac_ext
785
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
786
# that will create temporary files in the current directory regardless of
787
# the output directory. Thus, making CWD read-only will cause this test
788
# to fail, enabling locking or at least warning the user not to do parallel
791
save_CFLAGS="$CFLAGS"
792
CFLAGS="$CFLAGS -o out/conftest2.$objext"
793
echo "$progname:793: checking if $compiler supports -c -o file.$objext" >&5
794
if { (eval echo $progname:794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
796
# The compiler can only warn and ignore the option if not recognized
797
# So say no if there are warnings
798
if test -s out/conftest.err; then
806
# Append any errors to the config.log.
807
cat out/conftest.err 1>&5
811
CFLAGS="$save_CFLAGS"
817
$rm -r conftest 2>/dev/null
819
# Check to see if we can do hard links to lock some files if needed
820
hard_links="nottested"
821
if test "$compiler_c_o" = no && test "$need_locks" != no; then
822
# do not overwrite the value of need_locks provided by the user
823
echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
826
ln conftest.a conftest.b 2>/dev/null && hard_links=no
828
ln conftest.a conftest.b 2>&5 || hard_links=no
829
ln conftest.a conftest.b 2>/dev/null && hard_links=no
830
echo "$ac_t$hard_links" 1>&6
832
if test "$hard_links" = no; then
833
echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
840
if test "$with_gcc" = yes; then
841
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
842
echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
844
echo $lt_simple_compile_test_code > conftest.$ac_ext
845
save_CFLAGS="$CFLAGS"
846
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
847
echo "$progname:847: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
848
if { (eval echo $progname:848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
850
# The compiler can only warn and ignore the option if not recognized
851
# So say no if there are warnings
852
if test -s conftest.err; then
854
compiler_rtti_exceptions=no
857
compiler_rtti_exceptions=yes
860
# Append any errors to the config.log.
861
cat conftest.err 1>&5
862
compiler_rtti_exceptions=no
865
CFLAGS="$save_CFLAGS"
868
if test "$compiler_rtti_exceptions" = "yes"; then
869
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
871
no_builtin_flag=' -fno-builtin'
876
# See if the linker supports building shared libraries.
877
echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
879
echo "$ac_t$ld_shlibs" 1>&6
880
test "$ld_shlibs" = no && can_build_shared=no
882
# Check hardcoding attributes.
883
echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
885
if test -n "$hardcode_libdir_flag_spec" || \
886
test -n "$runpath_var"; then
888
# We can hardcode non-existant directories.
889
if test "$hardcode_direct" != no &&
890
# If the only mechanism to avoid hardcoding is shlibpath_var, we
891
# have to relink, otherwise we might link with an installed library
892
# when we should be linking with a yet-to-be-installed one
893
## test "$hardcode_shlibpath_var" != no &&
894
test "$hardcode_minus_L" != no; then
895
# Linking always hardcodes the temporary library directory.
896
hardcode_action=relink
898
# We can link without hardcoding, and we can hardcode nonexisting dirs.
899
hardcode_action=immediate
902
# We cannot hardcode anything, or else we can only hardcode existing
904
hardcode_action=unsupported
906
echo "$ac_t$hardcode_action" 1>&6
908
echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6
909
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
910
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
911
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
912
echo "${ac_t}yes" 1>&6
914
echo "${ac_t}no" 1>&6
917
reload_cmds='$LD$reload_flag -o $output$reload_objs'
918
test -z "$deplibs_check_method" && deplibs_check_method=unknown
920
# PORTME Fill in your ld.so characteristics
922
libname_spec='lib$name'
929
shlibpath_overrides_runpath=unknown
931
dynamic_linker="$host_os ld.so"
932
sys_lib_dlsearch_path_spec="/lib /usr/lib"
933
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
935
echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
939
library_names_spec='${libname}${release}.so$versuffix $libname.a'
940
shlibpath_var=LIBPATH
942
# AIX has no versioning support, so we append a major version to the name.
943
soname_spec='${libname}${release}.so$major'
948
# AIX has no versioning support, so currently we can not hardcode correct
949
# soname into executable. Probably we can add versioning support to
950
# collect2, so additional links can be useful in future.
951
# We preserve .a as extension for shared libraries though AIX4.2
952
# and later linker supports .so
953
# (MM) we changed it to .so, as we now use runtime linking (-brtl) and this
954
# prevents people from linking it as normal .a archive
955
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
956
shlibpath_var=LIBPATH
957
# the following is may be not correct. I need to check with the source of
958
# this patch (its arbab@austin.ibm.com) (MM)
959
hardcode_into_libs=all
963
library_names_spec='$libname.ixlibrary $libname.a'
964
# Create ${libname}_ixlibrary.a entries in /sys/libs.
965
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'
969
library_names_spec='${libname}.so'
970
dynamic_linker="$host_os ld.so"
971
shlibpath_var=LIBRARY_PATH
972
lt_cv_dlopen="load_add_on"
974
lt_cv_dlopen_self=yes
980
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
981
soname_spec='${libname}${release}.so$major'
982
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
983
shlibpath_var=LD_LIBRARY_PATH
984
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
985
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
986
export_dynamic_flag_spec=-rdynamic
987
# the default ld.so.conf also contains /usr/contrib/lib and
988
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
989
# libtool to hard-code these into programs
992
cygwin* | mingw* | pw32*)
996
if test "$with_gcc" = yes; then
997
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
999
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1001
dynamic_linker='Win32 ld.exe'
1002
# FIXME: first we should search . and the directory the executable is in
1004
lt_cv_dlopen="LoadLibrary"
1008
darwin* | rhapsody*)
1009
library_names_spec='${libname}.`if test "$module" = "yes"; then echo so; else echo dylib; fi`'
1012
postinstall_cmds='chmod +x $lib'
1013
shlibpath_overrides_runpath=yes
1014
shlibpath_var=DYLD_LIBRARY_PATH
1022
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1023
version_type=freebsd-$objformat
1024
case "$version_type" in
1026
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1031
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1035
shlibpath_var=LD_LIBRARY_PATH
1038
shlibpath_overrides_runpath=yes
1040
freebsd3.[01]* | freebsdelf3.[01]*)
1041
shlibpath_overrides_runpath=yes
1042
hardcode_into_libs=yes
1045
shlibpath_overrides_runpath=no
1046
hardcode_into_libs=yes
1055
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1056
soname_spec='${libname}${release}.so$major'
1057
shlibpath_var=LD_LIBRARY_PATH
1058
hardcode_into_libs=yes
1061
hpux9* | hpux10* | hpux11*)
1062
# Give a soname corresponding to the major version so that dld.sl refuses to
1063
# link against other versions.
1064
dynamic_linker="$host_os dld.sl"
1068
shlibpath_var=SHLIB_PATH
1069
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1070
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1071
soname_spec='${libname}${release}.sl$major'
1072
# HP-UX runs *really* slowly unless shared libraries are mode 555.
1073
postinstall_cmds='chmod 555 $lib'
1080
soname_spec='${libname}${release}.so$major'
1081
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
1087
case "$LD" in # libtool.m4 will add one of these switches to LD
1088
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1089
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1090
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1091
*) libsuff= shlibsuff= libmagic=never-match;;
1095
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1096
shlibpath_overrides_runpath=no
1097
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1098
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1101
# No shared lib support for Linux oldld, aout, or coff.
1102
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1106
# This must be Linux ELF.
1111
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1112
soname_spec='${libname}${release}.so$major'
1113
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1114
shlibpath_var=LD_LIBRARY_PATH
1115
shlibpath_overrides_runpath=no
1116
# This implies no fast_install, which is unacceptable.
1117
# Some rework will be needed to allow for fast_install
1118
# before this can be enabled.
1119
hardcode_into_libs=yes
1121
# We used to test for /lib/ld.so.1 and disable shared libraries on
1122
# powerpc, because MkLinux only supported shared libraries with the
1123
# GNU dynamic linker. Since this was broken with cross compilers,
1124
# most powerpc-linux boxes support dynamic linking these days and
1125
# people can always --disable-shared, the test was removed, and we
1126
# assume the GNU/Linux dynamic linker is in use.
1127
dynamic_linker='GNU/Linux ld.so'
1132
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1133
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1134
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1135
dynamic_linker='NetBSD (a.out) ld.so'
1138
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1139
soname_spec='${libname}${release}.so$major'
1140
dynamic_linker='NetBSD ld.elf_so'
1142
shlibpath_var=LD_LIBRARY_PATH
1143
shlibpath_overrides_runpath=yes
1144
hardcode_into_libs=yes
1149
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1150
shlibpath_var=LD_LIBRARY_PATH
1151
shlibpath_overrides_runpath=yes
1156
if test "$with_gnu_ld" = yes; then
1160
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1161
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1162
shlibpath_var=LD_LIBRARY_PATH
1163
# OpenBSD 2.7 the overriding is needed for fast-install
1164
shlibpath_overrides_runpath=yes
1168
libname_spec='$name'
1170
library_names_spec='$libname.dll $libname.a'
1171
dynamic_linker='OS/2 ld.exe'
1172
shlibpath_var=LIBPATH
1175
osf3* | osf4* | osf5*)
1178
soname_spec='${libname}${release}.so'
1179
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1180
shlibpath_var=LD_LIBRARY_PATH
1181
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1182
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1187
soname_spec='${libname}${release}.so$major'
1188
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1189
shlibpath_var=LD_LIBRARY_PATH
1196
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1197
soname_spec='${libname}${release}.so$major'
1198
shlibpath_var=LD_LIBRARY_PATH
1199
shlibpath_overrides_runpath=yes
1200
hardcode_into_libs=yes
1201
# ldd complains unless libraries are executable
1202
postinstall_cmds='chmod +x $lib'
1207
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1208
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1209
shlibpath_var=LD_LIBRARY_PATH
1210
shlibpath_overrides_runpath=yes
1211
if test "$with_gnu_ld" = yes; then
1217
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1219
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1220
soname_spec='${libname}${release}.so$major'
1221
shlibpath_var=LD_LIBRARY_PATH
1222
case "$host_vendor" in
1226
shlibpath_overrides_runpath=no
1227
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1234
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1235
soname_spec='${libname}${release}.so$major'
1236
shlibpath_var=LD_LIBRARY_PATH
1243
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1244
soname_spec='${libname}${release}.so$major'
1245
shlibpath_var=LD_LIBRARY_PATH
1249
if test -d /usr/nec ;then
1251
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1252
soname_spec='$libname.so.$major'
1253
shlibpath_var=LD_LIBRARY_PATH
1261
echo "$ac_t$dynamic_linker" 1>&6
1262
test "$dynamic_linker" = no && can_build_shared=no
1264
# Check for command to grab the raw symbol name followed by C symbol from nm.
1265
echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1267
# These are sane defaults that work on at least a few old systems.
1268
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
1270
# Character class describing NM global symbol codes.
1271
symcode='[BCDEGRST]'
1273
# Regexp to match symbols that can be accessed directly from C.
1274
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1276
# Transform the above into a raw symbol and a C symbol.
1277
symxfrm='\1 \2\3 \3'
1279
# Transform an extracted symbol line into a proper C declaration
1280
global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1282
# Define system-specific variables.
1287
cygwin* | mingw* | pw32*)
1288
symcode='[ABCDGISTW]'
1290
hpux*) # Its linker distinguishes data from code symbols
1291
global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1294
symcode='[BCDEGRST]'
1304
# Handle CRLF in mingw too chain
1308
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1312
# If we're using GNU nm, then use its standard symbol codes.
1313
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1314
symcode='[ABCDGISTW]'
1317
# Try without a prefix undercore, then with it.
1318
for ac_symprfx in "" "_"; do
1320
# Write the raw and C identifiers.
1321
global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1323
# Check to see that the pipe works correctly.
1326
cat > conftest.$ac_ext <<EOF
1331
void nm_test_func(){}
1335
int main(){nm_test_var='a';nm_test_func();return(0);}
1338
echo "$progname:1326: checking if global_symbol_pipe works" >&5
1339
if { (eval echo $progname:1327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
1340
# Now try to grab the symbols.
1342
if { echo "$progname:1330: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1344
# Try sorting and uniquifying the output.
1345
if sort "$nlist" | uniq > "$nlist"T; then
1346
mv -f "$nlist"T "$nlist"
1351
# Make sure that we snagged all the symbols we need.
1352
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1353
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1354
cat <<EOF > conftest.$ac_ext
1360
# Now generate the symbol file.
1361
eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1363
cat <<EOF >> conftest.$ac_ext
1364
#if defined (__STDC__) && __STDC__
1365
# define lt_ptr_t void *
1367
# define lt_ptr_t char *
1371
/* The mapping between symbol names and symbols. */
1376
lt_preloaded_symbols[] =
1379
sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.$ac_ext
1380
cat <<\EOF >> conftest.$ac_ext
1388
# Now try linking the two files.
1389
mv conftest.$objext conftstm.$objext
1391
save_CFLAGS="$CFLAGS"
1392
LIBS="conftstm.$objext"
1393
CFLAGS="$CFLAGS$no_builtin_flag"
1394
if { (eval echo $progname:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1397
echo "$progname: failed program was:" >&5
1398
cat conftest.$ac_ext >&5
1402
echo "cannot find nm_test_func in $nlist" >&5
1405
echo "cannot find nm_test_var in $nlist" >&5
1408
echo "cannot run $global_symbol_pipe" >&5
1411
echo "$progname: failed program was:" >&5
1412
cat conftest.$ac_ext >&5
1414
$rm conftest* conftst*
1416
# Do not use the global_symbol_pipe unless it works.
1417
if test "$pipe_works" = yes; then
1423
if test "$pipe_works" = yes; then
1424
echo "${ac_t}ok" 1>&6
1426
echo "${ac_t}failed" 1>&6
1429
if test -z "$global_symbol_pipe"; then
1430
global_symbol_to_cdecl=
1433
# Report the final consequences.
1434
echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1436
# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
1437
# configure.in, otherwise build static only libraries.
1439
cygwin* | mingw* | pw32* | os2*)
1440
if test x$can_build_shared = xyes; then
1441
test x$enable_win32_dll = xno && can_build_shared=no
1442
echo "checking if package supports dlls... $can_build_shared" 1>&6
1447
echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
1448
test "$can_build_shared" = "no" && enable_shared=no
1450
# On AIX, shared libraries and static libraries use the same namespace, and
1451
# are all built from PIC.
1454
test "$enable_shared" = yes && enable_static=no
1455
if test -n "$RANLIB"; then
1456
archive_cmds="$archive_cmds~\$RANLIB \$lib"
1457
postinstall_cmds='$RANLIB $lib'
1462
test "$enable_shared" = yes && enable_static=no
1466
echo "$ac_t$enable_shared" 1>&6
1468
# Make sure either enable_shared or enable_static is yes.
1469
test "$enable_shared" = yes || enable_static=yes
1471
echo "checking whether to build static libraries... $enable_static" 1>&6
1473
if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then
1474
# Fast installation is not supported
1475
enable_fast_install=no
1476
elif test "$shlibpath_overrides_runpath" = yes ||
1477
test "$enable_shared" = no; then
1478
# Fast installation is not necessary
1479
enable_fast_install=needless
1482
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1483
if test "$with_gcc" = yes; then
1484
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1487
# Check whether we must set pic_mode to default
1488
test -z "$pic_flag" && pic_mode=default
1490
if test "x$enable_dlopen" != xyes; then
1491
enable_dlopen=unknown
1492
enable_dlopen_self=unknown
1493
enable_dlopen_self_static=unknown
1495
if test "X${lt_cv_dlopen+set}" != Xset; then
1496
lt_cv_dlopen=no lt_cv_dlopen_libs=
1497
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1498
echo "$progname:1508: checking for dlopen in -ldl" >&5
1499
if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then
1500
echo $ac_n "(cached) $ac_c" 1>&6
1502
ac_save_LIBS="$LIBS"
1504
cat > conftest.$ac_ext <<EOF
1505
/*#line 1515 "ltconfig"*/
1506
/* Override any gcc2 internal prototype to avoid an error. */
1507
/* We use char because int might match the return type of a gcc2
1508
builtin and then its argument prototype would still apply. */
1518
if { (eval echo $progname:1528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1520
ac_cv_lib_dl_dlopen=yes
1522
echo "$progname: failed program was:" >&5
1523
cat conftest.$ac_ext >&5
1525
ac_cv_lib_dl_dlopen=no
1528
LIBS="$ac_save_LIBS"
1531
if test "X$ac_cv_lib_dl_dlopen" = Xyes; then
1532
echo "$ac_t""yes" 1>&6
1533
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
1535
echo "$ac_t""no" 1>&6
1536
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
1537
echo "$progname:1547: checking for dlopen" >&5
1538
if test "X${ac_cv_func_dlopen+set}" = Xset; then
1539
echo $ac_n "(cached) $ac_c" 1>&6
1541
cat > conftest.$ac_ext <<EOF
1542
/*#line 1552 "ltconfig"*/
1543
/* System header to define __stub macros and hopefully few prototypes,
1544
which can conflict with char dlopen(); below. */
1546
/* Override any gcc2 internal prototype to avoid an error. */
1547
/* We use char because int might match the return type of a gcc2
1548
builtin and then its argument prototype would still apply. */
1556
/* The GNU C library defines this for functions which it implements
1557
to always fail with ENOSYS. Some functions are actually named
1558
something starting with __ and the normal name is an alias. */
1559
#if defined (__stub_dlopen) || defined (__stub___dlopen)
1567
if { (eval echo $progname:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1569
ac_cv_func_dlopen=yes
1571
echo "$progname: failed program was:" >&5
1572
cat conftest.$ac_ext >&5
1574
ac_cv_func_dlopen=no
1578
if test "X$ac_cv_func_dlopen" = Xyes; then
1579
echo "$ac_t""yes" 1>&6
1580
lt_cv_dlopen="dlopen"
1582
echo "$ac_t""no" 1>&6
1583
echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
1584
echo "$progname:1594: checking for dlopen in -lsvld" >&5
1585
if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
1586
echo $ac_n "(cached) $ac_c" 1>&6
1588
ac_save_LIBS="$LIBS"
1590
cat > conftest.$ac_ext <<EOF
1591
/* #line 1601 "ltconfig" */
1592
/* Override any gcc2 internal prototype to avoid an error. */
1593
/* We use char because int might match the return type of a gcc2
1594
builtin and then its argument prototype would still apply. */
1604
if { (eval echo $progname:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1606
ac_cv_lib_svld_dlopen=yes
1608
echo "$progname: failed program was:" >&5
1609
cat conftest.$ac_ext >&5
1611
ac_cv_lib_svld_dlopen=no
1614
LIBS="$ac_save_LIBS"
1617
if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
1618
echo "$ac_t""yes" 1>&6
1619
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
1621
echo "$ac_t""no" 1>&6
1622
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
1623
echo "$progname:1633: checking for dld_link in -ldld" >&5
1624
if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
1625
echo $ac_n "(cached) $ac_c" 1>&6
1627
ac_save_LIBS="$LIBS"
1629
cat > conftest.$ac_ext <<EOF
1630
/* #line 1640 "ltconfig" */
1631
/* Override any gcc2 internal prototype to avoid an error. */
1632
/* We use char because int might match the return type of a gcc2
1633
builtin and then its argument prototype would still apply. */
1643
if { (eval echo $progname:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1645
ac_cv_lib_dld_dld_link=yes
1647
echo "$progname: failed program was:" >&5
1648
cat conftest.$ac_ext >&5
1650
ac_cv_lib_dld_dld_link=no
1653
LIBS="$ac_save_LIBS"
1656
if test "X$ac_cv_lib_dld_dld_link" = Xyes; then
1657
echo "$ac_t""yes" 1>&6
1658
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
1660
echo "$ac_t""no" 1>&6
1661
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
1662
echo "$progname:1672: checking for shl_load" >&5
1663
if test "X${ac_cv_func_shl_load+set}" = Xset; then
1664
echo $ac_n "(cached) $ac_c" 1>&6
1666
cat > conftest.$ac_ext <<EOF
1667
/*#line 1677 "ltconfig"*/
1668
/* System header to define __stub macros and hopefully few prototypes,
1669
which can conflict with char shl_load(); below. */
1671
/* Override any gcc2 internal prototype to avoid an error. */
1672
/* We use char because int might match the return type of a gcc2
1673
builtin and then its argument prototype would still apply. */
1681
/* The GNU C library defines this for functions which it implements
1682
to always fail with ENOSYS. Some functions are actually named
1683
something starting with __ and the normal name is an alias. */
1684
#if defined (__stub_shl_load) || defined (__stub___shl_load)
1692
if { (eval echo $progname:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1694
ac_cv_func_shl_load=yes
1696
echo "$progname: failed program was:" >&5
1697
cat conftest.$ac_ext >&5
1699
ac_cv_func_shl_load=no
1704
if test "X$ac_cv_func_shl_load" = Xyes; then
1705
echo "$ac_t""yes" 1>&6
1706
lt_cv_dlopen="shl_load"
1708
echo "$ac_t""no" 1>&6
1709
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
1710
echo "$progname:1720: checking for shl_load in -ldld" >&5
1711
if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then
1712
echo $ac_n "(cached) $ac_c" 1>&6
1714
ac_save_LIBS="$LIBS"
1716
cat > conftest.$ac_ext <<EOF
1717
/*#line 1727 "ltconfig"*/
1718
#include "confdefs.h"
1719
/* Override any gcc2 internal prototype to avoid an error. */
1720
/* We use char because int might match the return type of a gcc2
1721
builtin and then its argument prototype would still apply. */
1731
if { (eval echo $progname:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1733
ac_cv_lib_dld_shl_load=yes
1735
echo "$progname: failed program was:" >&5
1736
cat conftest.$ac_ext >&5
1738
ac_cv_lib_dld_shl_load=no
1741
LIBS="$ac_save_LIBS"
1744
if test "X$ac_cv_lib_dld_shl_load" = Xyes; then
1745
echo "$ac_t""yes" 1>&6
1746
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
1748
echo "$ac_t""no" 1>&6
1767
if test "x$lt_cv_dlopen" != xno; then
1773
case "$lt_cv_dlopen" in
1775
for ac_hdr in dlfcn.h; do
1776
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1777
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1778
echo "$progname:1788: checking for $ac_hdr" >&5
1779
if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
1780
echo $ac_n "(cached) $ac_c" 1>&6
1782
cat > conftest.$ac_ext <<EOF
1783
/*#line 1793 "ltconfig"*/
1786
int main () { return(0); }
1788
ac_try="$ac_compile >/dev/null 2>conftest.out"
1789
{ (eval echo $progname:1799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1790
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1791
if test -z "$ac_err"; then
1793
eval "ac_cv_header_$ac_safe=yes"
1796
echo "$progname: failed program was:" >&5
1797
cat conftest.$ac_ext >&5
1799
eval "ac_cv_header_$ac_safe=no"
1803
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1804
echo "$ac_t""yes" 1>&6
1806
echo "$ac_t""no" 1>&6
1810
if test "x$ac_cv_header_dlfcn_h" = xyes; then
1811
CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1813
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1814
LIBS="$lt_cv_dlopen_libs $LIBS"
1816
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
1817
echo "$progname:1827: checking whether a program can dlopen itself" >&5
1818
if test "X${lt_cv_dlopen_self+set}" = Xset; then
1819
echo $ac_n "(cached) $ac_c" 1>&6
1821
if test "$cross_compiling" = yes; then
1822
lt_cv_dlopen_self=cross
1824
cat > conftest.$ac_ext <<EOF
1825
/*#line 1835 "ltconfig"*/
1834
# define LTDL_GLOBAL RTLD_GLOBAL
1837
# define LTDL_GLOBAL DL_GLOBAL
1839
# define LTDL_GLOBAL 0
1843
/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
1844
find out it does not work in some platform. */
1845
#ifndef LTDL_LAZY_OR_NOW
1847
# define LTDL_LAZY_OR_NOW RTLD_LAZY
1850
# define LTDL_LAZY_OR_NOW DL_LAZY
1853
# define LTDL_LAZY_OR_NOW RTLD_NOW
1856
# define LTDL_LAZY_OR_NOW DL_NOW
1858
# define LTDL_LAZY_OR_NOW 0
1865
void fnord() { int i=42;}
1866
int main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
1867
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
1868
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1; }
1871
if { (eval echo $progname:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1873
lt_cv_dlopen_self=yes
1875
echo "$progname: failed program was:" >&5
1876
cat conftest.$ac_ext >&5
1878
lt_cv_dlopen_self=no
1885
echo "$ac_t""$lt_cv_dlopen_self" 1>&6
1887
if test "$lt_cv_dlopen_self" = yes; then
1888
LDFLAGS="$LDFLAGS $link_static_flag"
1889
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
1890
echo "$progname:1900: checking whether a statically linked program can dlopen itself" >&5
1891
if test "X${lt_cv_dlopen_self_static+set}" = Xset; then
1892
echo $ac_n "(cached) $ac_c" 1>&6
1894
if test "$cross_compiling" = yes; then
1895
lt_cv_dlopen_self_static=cross
1897
cat > conftest.$ac_ext <<EOF
1898
/* #line 1908 "ltconfig" */
1907
# define LTDL_GLOBAL RTLD_GLOBAL
1910
# define LTDL_GLOBAL DL_GLOBAL
1912
# define LTDL_GLOBAL 0
1916
/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
1917
find out it does not work in some platform. */
1918
#ifndef LTDL_LAZY_OR_NOW
1920
# define LTDL_LAZY_OR_NOW RTLD_LAZY
1923
# define LTDL_LAZY_OR_NOW DL_LAZY
1926
# define LTDL_LAZY_OR_NOW RTLD_NOW
1929
# define LTDL_LAZY_OR_NOW DL_NOW
1931
# define LTDL_LAZY_OR_NOW 0
1938
void fnord() { int i=42;}
1939
int main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
1940
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
1941
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1; }
1944
if { (eval echo $progname:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1946
lt_cv_dlopen_self_static=yes
1948
echo "$progname: failed program was:" >&5
1949
cat conftest.$ac_ext >&5
1951
lt_cv_dlopen_self_static=no
1958
echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
1963
case "$lt_cv_dlopen_self" in
1964
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1965
*) enable_dlopen_self=unknown ;;
1968
case "$lt_cv_dlopen_self_static" in
1969
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1970
*) enable_dlopen_self_static=unknown ;;
1974
# Copy echo and quote the copy, instead of the original, because it is
1977
if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
1978
ltecho="$CONFIG_SHELL \$0 --fallback-echo"
1982
LTCONFIG_VERSION="$VERSION"
1984
# Only quote variables if we're using ltmain.sh.
1987
# Now quote all the things that may contain metacharacters.
1988
for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
1989
old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
1990
old_LN_S old_NM old_RANLIB old_STRIP \
1991
old_AS old_DLLTOOL old_OBJDUMP \
1992
old_OBJEXT old_EXEEXT old_reload_flag \
1993
old_deplibs_check_method old_file_magic_cmd \
1994
AR AR_FLAGS CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \
1995
reload_flag reload_cmds wl \
1996
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
1997
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
1998
library_names_spec soname_spec \
1999
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2000
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2001
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2002
predep_objects postdep_objects predeps postdeps compiler_lib_search_path \
2003
old_striplib striplib file_magic_cmd export_symbols_cmds \
2004
deplibs_check_method allow_undefined_flag no_undefined_flag \
2005
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2006
hardcode_libdir_flag_spec hardcode_libdir_separator \
2007
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2008
compiler_c_o need_locks exclude_expsyms include_expsyms; do
2011
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2012
old_postinstall_cmds | old_postuninstall_cmds | \
2013
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2014
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2015
postinstall_cmds | postuninstall_cmds | \
2016
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2017
# Double-quote double-evaled strings.
2018
eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test
2021
eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test
2027
*'\$0 --fallback-echo"')
2028
ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
2032
if test -z "$tagname"; then
2033
trap "$rm \"$ofile\"; exit 1" 1 2 15
2034
echo "creating $ofile"
2036
cat <<EOF > "$ofile"
2039
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2040
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2041
# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
2043
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
2044
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2046
# This program is free software; you can redistribute it and/or modify
2047
# it under the terms of the GNU General Public License as published by
2048
# the Free Software Foundation; either version 2 of the License, or
2049
# (at your option) any later version.
2051
# This program is distributed in the hope that it will be useful, but
2052
# WITHOUT ANY WARRANTY; without even the implied warranty of
2053
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2054
# General Public License for more details.
2056
# You should have received a copy of the GNU General Public License
2057
# along with this program; if not, write to the Free Software
2058
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2060
# As a special exception to the GNU General Public License, if you
2061
# distribute this file as part of a program that contains a
2062
# configuration script generated by Autoconf, you may include it under
2063
# the same distribution terms that you use for the rest of that program.
2065
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
2066
Xsed="sed -e s/^X//"
2068
# The HP-UX ksh and POSIX shell print the target directory to stdout
2070
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2072
# The names of the tagged configurations supported by this script.
2075
### BEGIN LIBTOOL CONFIG
2078
echo "appending configuration tag \"$tagname\" to $ofile"
2079
echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
2085
# Double-quote the variables that need it (for aesthetics).
2086
for var in old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
2087
old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
2088
old_LN_S old_NM old_RANLIB old_STRIP \
2089
old_AS old_DLLTOOL old_OBJDUMP \
2090
old_OBJEXT old_EXEEXT old_reload_flag \
2091
old_deplibs_check_method old_file_magic_cmd; do
2092
eval "$var=\\\"\$var\\\""
2095
# Just create a config file.
2096
cfgfile="$ofile.cfg"
2097
if test -z "$tagname"; then
2098
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2099
echo "creating $cfgfile"
2101
cat <<EOF > "$cfgfile"
2102
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
2103
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2105
### BEGIN LIBTOOL CONFIG
2108
echo "appending to $cfgfile"
2109
echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
2114
cat <<EOF >> "$cfgfile"
2115
# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2117
# AR=$old_AR AR_FLAGS=$old_AR_FLAGS LTCC=$old_LTCC CC=$old_CC \\
2118
# CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
2119
# MAGIC_CMD=$old_MAGIC_CMD LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
2120
# LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\
2121
# AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\
2122
# objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\
2123
# deplibs_check_method=$old_deplibs_check_method \\
2124
# file_magic_cmd=$old_file_magic_cmd \\
2127
# Compiler and other test output produced by $progname, useful for
2128
# debugging $progname, is in ./config.log if it exists.
2130
# The version of $progname that generated this script.
2131
LTCONFIG_VERSION=$LTCONFIG_VERSION
2133
# Shell to use when invoking shell scripts.
2136
# Whether or not to build shared libraries.
2137
build_libtool_libs=$enable_shared
2139
# Whether or not to add -lc for building shared libraries.
2140
build_libtool_need_lc=$need_lc
2142
# Whether or not to build static libraries.
2143
build_old_libs=$enable_static
2145
# Whether or not to optimize for fast installation.
2146
fast_install=$enable_fast_install
2149
host_alias=$host_alias
2152
# An echo program that does not interpret backslashes.
2162
# A language-specific compiler.
2165
# Is the compiler the GNU C compiler?
2168
# The linker used to build libraries.
2171
# Whether we need hard or soft links.
2174
# A BSD-compatible nm program.
2177
# A symbol stripping program
2180
# Used to examine libraries when file_magic_cmd begins "file"
2181
MAGIC_CMD=$MAGIC_CMD
2183
# Used on cygwin: DLL creation program.
2186
# Used on cygwin: object dumper.
2189
# Used on cygwin: assembler.
2192
# The name of the directory that contains temporary libtool files.
2195
# How to create reloadable object files.
2196
reload_flag=$reload_flag
2197
reload_cmds=$reload_cmds
2199
# How to pass a linker flag through the compiler.
2202
# Object file suffix (normally "o").
2205
# Old archive suffix (normally "a").
2208
# Executable file suffix (normally "").
2211
# Additional compiler flags for building library objects.
2215
# Does compiler simultaneously support -c and -o options?
2216
compiler_c_o=$compiler_c_o
2218
# Must we lock files when doing compilation ?
2219
need_locks=$need_locks
2221
# Do we need the lib prefix for modules?
2222
need_lib_prefix=$need_lib_prefix
2224
# Do we need a version for libraries?
2225
need_version=$need_version
2227
# Whether dlopen is supported.
2228
dlopen_support=$enable_dlopen
2230
# Whether dlopen of programs is supported.
2231
dlopen_self=$enable_dlopen_self
2233
# Whether dlopen of statically linked programs is supported.
2234
dlopen_self_static=$enable_dlopen_self_static
2236
# Compiler flag to prevent dynamic linking.
2237
link_static_flag=$link_static_flag
2239
# Compiler flag to turn off builtin functions.
2240
no_builtin_flag=$no_builtin_flag
2242
# Compiler flag to allow reflexive dlopens.
2243
export_dynamic_flag_spec=$export_dynamic_flag_spec
2245
# Compiler flag to generate shared objects directly from archives.
2246
whole_archive_flag_spec=$whole_archive_flag_spec
2248
# Compiler flag to generate thread-safe objects.
2249
thread_safe_flag_spec=$thread_safe_flag_spec
2251
# Library versioning type.
2252
version_type=$version_type
2254
# Format of library name prefix.
2255
libname_spec=$libname_spec
2257
# List of archive names. First name is the real one, the rest are links.
2258
# The last name is the one that the linker finds with -lNAME.
2259
library_names_spec=$library_names_spec
2261
# The coded name of the library, if different from the real name.
2262
soname_spec=$soname_spec
2264
# Commands used to build and install an old-style archive.
2266
old_archive_cmds=$old_archive_cmds
2267
old_postinstall_cmds=$old_postinstall_cmds
2268
old_postuninstall_cmds=$old_postuninstall_cmds
2270
# Create an old-style archive from a shared archive.
2271
old_archive_from_new_cmds=$old_archive_from_new_cmds
2273
# Create a temporary old-style archive to link instead of a shared archive.
2274
old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds
2276
# Commands used to build and install a shared archive.
2277
archive_cmds=$archive_cmds
2278
archive_expsym_cmds=$archive_expsym_cmds
2279
postinstall_cmds=$postinstall_cmds
2280
postuninstall_cmds=$postuninstall_cmds
2282
# Commands to strip libraries.
2283
old_striplib=$old_striplib
2286
# Dependencies to place before the objects being linked to create a
2288
predep_objects=$predep_objects
2290
# Dependencies to place after the objects being linked to create a
2292
postdep_objects=$postdep_objects
2294
# Dependencies to place before the objects being linked to create a
2298
# Dependencies to place after the objects being linked to create a
2302
# The library search path used internally by the compiler when linking
2304
compiler_lib_search_path=$compiler_lib_search_path
2306
# Method to check whether dependent libraries are shared objects.
2307
deplibs_check_method=$deplibs_check_method
2309
# Command to use when deplibs_check_method == file_magic.
2310
file_magic_cmd=$file_magic_cmd
2312
# Flag that allows shared libraries with undefined symbols to be built.
2313
allow_undefined_flag=$allow_undefined_flag
2315
# Flag that forces no undefined symbols.
2316
no_undefined_flag=$no_undefined_flag
2318
# Commands used to finish a libtool library installation in a directory.
2319
finish_cmds=$finish_cmds
2321
# Same as above, but a single script fragment to be evaled but not shown.
2322
finish_eval=$finish_eval
2324
# Take the output of nm and produce a listing of raw symbols and C names.
2325
global_symbol_pipe=$global_symbol_pipe
2327
# Transform the output of nm in a proper C declaration
2328
global_symbol_to_cdecl=$global_symbol_to_cdecl
2330
# This is the shared library runtime path variable.
2331
runpath_var=$runpath_var
2333
# This is the shared library path variable.
2334
shlibpath_var=$shlibpath_var
2336
# Is shlibpath searched before the hard-coded library search path?
2337
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2339
# How to hardcode a shared library path into an executable.
2340
hardcode_action=$hardcode_action
2342
# Whether we should hardcode library paths into libraries.
2343
hardcode_into_libs=$hardcode_into_libs
2345
# Flag to hardcode \$libdir into a binary during linking.
2346
# This must work even if \$libdir does not exist.
2347
hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
2349
# Whether we need a single -rpath flag with a separated argument.
2350
hardcode_libdir_separator=$hardcode_libdir_separator
2352
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2354
hardcode_direct=$hardcode_direct
2356
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2358
hardcode_minus_L=$hardcode_minus_L
2360
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2361
# the resulting binary.
2362
hardcode_shlibpath_var=$hardcode_shlibpath_var
2364
# Variables whose values should be saved in libtool wrapper scripts and
2365
# restored at relink time.
2366
variables_saved_for_relink="$variables_saved_for_relink"
2368
# Whether libtool must link a program against all its dependency libraries.
2369
link_all_deplibs=$link_all_deplibs
2371
# Compile-time system search path for libraries
2372
sys_lib_search_path_spec=$sys_lib_search_path_spec
2374
# Run-time system search path for libraries
2375
sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
2377
# Fix the shell variable \$srcfile for the compiler.
2378
fix_srcfile_path="$fix_srcfile_path"
2380
# Set to yes if exported symbols are required.
2381
always_export_symbols=$always_export_symbols
2383
# The commands to list exported symbols.
2384
export_symbols_cmds=$export_symbols_cmds
2386
# The commands to extract the exported symbol list from a shared archive.
2387
extract_expsyms_cmds=$extract_expsyms_cmds
2389
# Symbols that should not be listed in the preloaded symbols.
2390
exclude_expsyms=$exclude_expsyms
2392
# Symbols that must always be exported.
2393
include_expsyms=$include_expsyms
2397
if test -z "$tagname"; then
2398
echo '### END LIBTOOL CONFIG' >> "$ofile"
2400
echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
2406
if test -z "$tagname"; then
2409
cat <<\EOF >> "$ofile"
2411
# AIX sometimes has problems with the GCC collect2 program. For some
2412
# reason, if we set the COLLECT_NAMES environment variable, the problems
2413
# vanish in a puff of smoke.
2414
if test "X${COLLECT_NAMES+set}" != Xset; then
2416
export COLLECT_NAMES
2422
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
2423
cat <<'EOF' >> "$ofile"
2424
# This is a source program that is used to create dlls on Windows
2425
# Don't remove nor modify the starting and closing comments
2426
# /* ltdll.c starts here */
2427
# #define WIN32_LEAN_AND_MEAN
2428
# #include <windows.h>
2429
# #undef WIN32_LEAN_AND_MEAN
2430
# #include <stdio.h>
2432
# #ifndef __CYGWIN__
2433
# # ifdef __CYGWIN32__
2434
# # define __CYGWIN__ __CYGWIN32__
2438
# #ifdef __cplusplus
2441
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
2442
# #ifdef __cplusplus
2447
# #include <cygwin/cygwin_dll.h>
2448
# DECLARE_CYGWIN_DLL( DllMain );
2450
# HINSTANCE __hDllInstance_base;
2453
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
2455
# __hDllInstance_base = hInst;
2458
# /* ltdll.c ends here */
2459
# This is a source program that is used to create import libraries
2460
# on Windows for dlls which lack them. Don't remove nor modify the
2461
# starting and closing comments
2462
# /* impgen.c starts here */
2463
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
2465
# This file is part of GNU libtool.
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,
2473
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2474
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2475
# GNU 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.
2482
# #include <stdio.h> /* for printf() */
2483
# #include <unistd.h> /* for open(), lseek(), read() */
2484
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
2485
# #include <string.h> /* for strdup() */
2487
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
2489
# #define O_BINARY 0
2492
# static unsigned int
2493
# pe_get16 (fd, offset)
2497
# unsigned char b[2];
2498
# lseek (fd, offset, SEEK_SET);
2500
# return b[0] + (b[1]<<8);
2503
# static unsigned int
2504
# pe_get32 (fd, offset)
2508
# unsigned char b[4];
2509
# lseek (fd, offset, SEEK_SET);
2511
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2514
# static unsigned int
2518
# unsigned char *b = ptr;
2519
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2528
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
2529
# unsigned long export_rva, export_size, nsections, secptr, expptr;
2530
# unsigned long name_rvas, nexp;
2531
# unsigned char *expdata, *erva;
2532
# char *filename, *dll_name;
2534
# filename = argv[1];
2536
# dll = open(filename, O_RDONLY|O_BINARY);
2540
# dll_name = filename;
2542
# for (i=0; filename[i]; i++)
2543
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
2544
# dll_name = filename + i +1;
2546
# pe_header_offset = pe_get32 (dll, 0x3c);
2547
# opthdr_ofs = pe_header_offset + 4 + 20;
2548
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
2550
# if (num_entries < 1) /* no exports */
2553
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
2554
# export_size = pe_get32 (dll, opthdr_ofs + 100);
2555
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
2556
# secptr = (pe_header_offset + 4 + 20 +
2557
# pe_get16 (dll, pe_header_offset + 4 + 16));
2560
# for (i = 0; i < nsections; i++)
2563
# unsigned long secptr1 = secptr + 40 * i;
2564
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
2565
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
2566
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
2567
# lseek(dll, secptr1, SEEK_SET);
2568
# read(dll, sname, 8);
2569
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
2571
# expptr = fptr + (export_rva - vaddr);
2572
# if (export_rva + export_size > vaddr + vsize)
2573
# export_size = vsize - (export_rva - vaddr);
2578
# expdata = (unsigned char*)malloc(export_size);
2579
# lseek (dll, expptr, SEEK_SET);
2580
# read (dll, expdata, export_size);
2581
# erva = expdata - export_rva;
2583
# nexp = pe_as32 (expdata+24);
2584
# name_rvas = pe_as32 (expdata+32);
2586
# printf ("EXPORTS\n");
2587
# for (i = 0; i<nexp; i++)
2589
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
2590
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
2595
# /* impgen.c ends here */
2602
# Append the ltmain.sh script.
2603
sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
2604
# We use sed instead of cat because bash on DJGPP gets confused if
2605
# if finds mixed CR/LF and LF-only lines. Since sed operates in
2606
# text mode, it properly converts lines to CR/LF. This bash problem
2607
# is reportedly fixed, but why not run on old versions too?
2614
# Compile the libtool program.
2615
echo "FIXME: would compile $ltmain"
2619
# Update the list of available tags.
2620
if test -n "$tagname"; then
2622
# Extract list of available tagged configurations in $ofile.
2623
# Note that this assumes the entire list is on one line.
2624
available_tags=`grep "^available_tags=" $ofile | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2626
# Append the new tag name to the list of available tags.
2627
available_tags="$available_tags $tagname"
2629
# Now substitute the updated of available tags.
2630
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' ${ofile} > ${ofile}.new"; then
2631
mv ${ofile}.new ${ofile}
2635
echo "$progname: unable to update list of available tagged configurations."
2640
# Don't cache tagged configuration!
2641
test -n "$cache_file" && test -z "$tagname" || exit 0
2645
cat > confcache <<\EOF
2646
# This file is a shell script that caches the results of configure
2647
# tests run on this system so they can be shared between configure
2648
# scripts and configure runs. It is not useful on other systems.
2649
# If it contains results you don't want to keep, you may remove or edit it.
2651
# By default, configure uses ./config.cache as the cache file,
2652
# creating it if it does not exist already. You can give configure
2653
# the --cache-file=FILE option to use a different cache file; that is
2654
# what configure does when it calls configure scripts in
2655
# subdirectories, so they share the cache.
2656
# Giving --cache-file=/dev/null disables caching, for debugging configure.
2657
# config.status only pays attention to the cache file if you give it the
2658
# --recheck option to rerun configure.
2661
# The following way of writing the cache mishandles newlines in values,
2662
# but we know of no workaround that is simple, portable, and efficient.
2663
# So, don't put newlines in cache variables' values.
2664
# Ultrix sh set writes to stderr and can't be redirected directly,
2665
# and sets the high bit in the cache file unless we assign to the vars.
2667
case `(ac_space=' '; set | grep ac_space) 2>&1` in
2669
# `set' does not quote correctly, so add quotes (double-quote substitution
2670
# turns \\\\ into \\, and sed turns \\ into \).
2672
-e "s/'/'\\\\''/g" \
2673
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2676
# `set' quotes correctly as required by POSIX, so do not add quotes.
2677
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2680
if cmp -s $cache_file confcache; then
2683
if test -w $cache_file; then
2684
echo "updating cache $cache_file"
2685
cat confcache > $cache_file
2687
echo "not updating unwritable cache $cache_file"