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}" "$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.695 2000/02/24 02:15:35)"
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"
221
old_CPPFLAGS="$CPPFLAGS"
222
old_LDFLAGS="$LDFLAGS"
231
old_DLLTOOL="$DLLTOOL"
232
old_OBJDUMP="$OBJDUMP"
235
old_reload_Flag="$reload_flag"
236
old_deplibs_check_method="$deplibs_check_method"
237
old_file_magic_cmd="$file_magic_cmd"
239
# Parse the command line options.
245
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
249
# If the previous option needs an argument, assign it.
250
if test -n "$prev"; then
251
eval "$prev=\$option"
258
Usage: $progname [OPTION]... LTMAIN [HOST]
260
Generate a system-specific libtool script.
262
--build configure for building on BUILD [BUILD=HOST]
263
--debug enable verbose shell tracing
264
--disable-shared do not build shared libraries
265
--disable-static do not build static libraries
266
--disable-fast-install do not optimize for fast installation
267
--enable-dlopen enable dlopen support
268
--enable-win32-dll enable building dlls on win32 hosts
269
--help display this help and exit
270
--no-verify do not verify that HOST is a valid host type
271
-o, --output=FILE specify the output file [default=$default_ofile]
272
--quiet same as \`--silent'
273
--silent do not print informational messages
274
--srcdir=DIR find \`config.guess' in DIR
275
--version output version information and exit
276
--with-gcc assume that the GNU C compiler will be used
277
--with-gnu-ld assume that the C compiler uses the GNU linker
278
--prefer-pic try to use only PIC objects
279
--prefer-non-pic try to use only non-PIC objects
280
--disable-lock disable file locking
281
--cache-file=FILE configure cache file
283
LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
284
that provides basic libtool functionality.
286
HOST is the canonical host system name [default=guessed].
291
--build) prev=build ;;
292
--build=*) build="$optarg" ;;
295
echo "$progname: enabling shell trace mode"
299
--disable-shared) enable_shared=no ;;
301
--disable-static) enable_static=no ;;
303
--disable-fast-install) enable_fast_install=no ;;
305
--enable-dlopen) enable_dlopen=yes ;;
307
--enable-win32-dll) enable_win32_dll=yes ;;
309
--quiet | --silent) silent=yes ;;
311
--srcdir) prev=srcdir ;;
312
--srcdir=*) srcdir="$optarg" ;;
314
--no-verify) verify_host=no ;;
316
--output | -o) prev=ofile ;;
317
--output=*) ofile="$optarg" ;;
319
--version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
321
--with-gcc) with_gcc=yes ;;
322
--with-gnu-ld) with_gnu_ld=yes ;;
324
--prefer-pic) pic_mode=yes ;;
325
--prefer-non-pic) pic_mode=no ;;
327
--disable-lock) need_locks=no ;;
329
--cache-file=*) cache_file="$optarg" ;;
332
echo "$progname: unrecognized option \`$option'" 1>&2
338
if test -z "$ltmain"; then
340
elif test -z "$host"; then
341
# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
342
# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
343
# echo "$progname: warning \`$option' is not a valid host type" 1>&2
347
echo "$progname: too many arguments" 1>&2
354
if test -z "$ltmain"; then
355
echo "$progname: you must specify a LTMAIN file" 1>&2
360
if test ! -f "$ltmain"; then
361
echo "$progname: \`$ltmain' does not exist" 1>&2
366
# Quote any args containing shell metacharacters.
371
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
372
ltconfig_args="$ltconfig_args '$arg'" ;;
373
*) ltconfig_args="$ltconfig_args $arg" ;;
377
# A relevant subset of AC_INIT.
379
# File descriptor usage:
382
# 2 errors and warnings
383
# 3 some systems may open it to /dev/tty
384
# 4 used on the Kubota Titan
385
# 5 compiler messages saved in config.log
386
# 6 checking for... messages and results
387
if test "$silent" = yes; then
395
# Only set LANG and LC_ALL to C if already set.
396
# These must not be set unconditionally because not all systems understand
397
# e.g. LANG=C (notably SCO).
398
if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
399
if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
401
if test -n "$cache_file" && test -r "$cache_file"; then
402
echo "loading cache $cache_file within ltconfig"
406
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
407
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
408
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
415
ac_n= ac_c='\c' ac_t=
418
if test -z "$srcdir"; then
419
# Assume the source directory is the same one as the path to LTMAIN.
420
srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
421
test "$srcdir" = "$ltmain" && srcdir=.
424
trap "$rm conftest*; exit 1" 1 2 15
425
if test "$verify_host" = yes; then
426
# Check for config.guess and config.sub.
428
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
429
if test -f $ac_dir/config.guess; then
434
if test -z "$ac_aux_dir"; then
435
echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
439
ac_config_guess=$ac_aux_dir/config.guess
440
ac_config_sub=$ac_aux_dir/config.sub
442
# Make sure we can run config.sub.
443
if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
445
echo "$progname: cannot run $ac_config_sub" 1>&2
450
echo $ac_n "checking host system type""... $ac_c" 1>&6
453
case "$host_alias" in
455
if host_alias=`$SHELL $ac_config_guess`; then :
457
echo "$progname: cannot guess host type; you must specify one" 1>&2
462
host=`$SHELL $ac_config_sub $host_alias`
463
echo "$ac_t$host" 1>&6
465
# Make sure the host verified.
466
test -z "$host" && exit 1
468
# Check for the build system type
469
echo $ac_n "checking build system type... $ac_c" 1>&6
472
case "$build_alias" in
475
NONE) build_alias=$host_alias ;;
476
*) build_alias=$nonopt ;;
480
build=`$SHELL $ac_config_sub $build_alias`
481
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
482
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
483
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
484
echo "$ac_t""$build" 1>&6
486
elif test -z "$host"; then
487
echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
492
build_alias=$host_alias
496
if test x"$host" != x"$build"; then
497
ac_tool_prefix=${host_alias}-
502
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
503
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
504
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
506
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
509
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
514
# AIX sometimes has problems with the GCC collect2 program. For some
515
# reason, if we set the COLLECT_NAMES environment variable, the problems
516
# vanish in a puff of smoke.
517
if test "X${COLLECT_NAMES+set}" != Xset; then
524
# Determine commands to create old-style static archives.
525
old_archive_cmds='$AR cru $oldlib$oldobjs$old_deplibs'
526
old_postinstall_cmds='chmod 644 $oldlib'
527
old_postuninstall_cmds=
529
# Set sane defaults for various variables
530
test -z "$AR" && AR=ar
531
test -z "$AS" && AS=as
532
test -z "$CC" && CC=cc
533
test -z "$DLLTOOL" && DLLTOOL=dlltool
534
test -z "$MAGIC" && MAGIC=file
535
test -z "$LD" && LD=ld
536
test -z "$LN_S" && LN_S="ln -s"
537
test -z "$NM" && NM=nm
538
test -z "$OBJDUMP" && OBJDUMP=objdump
539
test -z "$RANLIB" && RANLIB=:
540
test -z "$STRIP" && STRIP=:
541
test -z "$objext" && objext=o
543
echo $ac_n "checking for objdir... $ac_c" 1>&6
544
rm -f .libs 2>/dev/null
545
mkdir .libs 2>/dev/null
546
if test -d .libs; then
549
# MS-DOS does not allow filenames that begin with a dot.
552
rmdir .libs 2>/dev/null
553
echo "$ac_t$objdir" 1>&6
555
# Allow CC to be a program name with arguments.
559
# We assume here that the value for ac_cv_prog_cc_pic will not be cached
560
# in isolation, and that seeing it set (from the cache) indicates that
561
# the associated values are set (in the cache) correctly too.
562
echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
563
echo "$progname:563:checking for $compiler option to produce PIC" 1>&5
564
if test "X${ac_cv_prog_cc_pic+set}" = Xset; then
565
echo $ac_n "(cached) $ac_c" 1>&6
570
ac_cv_prog_cc_static=
571
ac_cv_prog_cc_no_builtin=
572
ac_cv_prog_cc_can_build_shared=$can_build_shared
574
if test "$with_gcc" = yes; then
575
ac_cv_prog_cc_wl='-Wl,'
576
ac_cv_prog_cc_static='-static'
579
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
580
# PIC is the default for these OSes.
583
# Below there is a dirty hack to force normal static linking with -ldl
584
# The problem is because libdl dynamically linked with both libc and
585
# libC (AIX C++ library), which obviously doesn't included in libraries
586
# list by gcc. This cause undefined symbols with -static flags.
587
# This hack allows C programs to be linked with "-static -ldl", but
588
# we not sure about C++ programs.
589
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
591
cygwin* | mingw* | os2*)
592
# This hack is so that the source file can tell whether it is being
593
# built for inclusion in a dll (and should export symbols for example).
594
ac_cv_prog_cc_pic='-DDLL_EXPORT'
597
# FIXME: we need at least 68020 code to build shared libraries, but
598
# adding the `-m68020' flag to GCC prevents building anything better,
600
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
603
if test -d /usr/nec; then
604
ac_cv_prog_cc_pic=-Kconform_pic
608
ac_cv_prog_cc_pic='-fPIC'
612
# PORTME Check for PIC flags for the system compiler.
615
# All AIX code is PIC.
616
ac_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
619
hpux9* | hpux10* | hpux11*)
620
# Is there a better ac_cv_prog_cc_static that works with the bundled CC?
621
ac_cv_prog_cc_wl='-Wl,'
622
ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
623
ac_cv_prog_cc_pic='+Z'
627
ac_cv_prog_cc_wl='-Wl,'
628
ac_cv_prog_cc_static='-non_shared'
629
# PIC (with -KPIC) is the default.
632
cygwin* | mingw* | os2*)
633
# This hack is so that the source file can tell whether it is being
634
# built for inclusion in a dll (and should export symbols for example).
635
ac_cv_prog_cc_pic='-DDLL_EXPORT'
638
osf3* | osf4* | osf5*)
639
# All OSF/1 code is PIC.
640
ac_cv_prog_cc_wl='-Wl,'
641
ac_cv_prog_cc_static='-non_shared'
645
ac_cv_prog_cc_pic='-Kpic'
646
ac_cv_prog_cc_static='-dn'
647
ac_cv_prog_cc_shlib='-belf'
651
ac_cv_prog_cc_pic='-KPIC'
652
ac_cv_prog_cc_static='-Bstatic'
653
ac_cv_prog_cc_wl='-Wl,'
657
ac_cv_prog_cc_pic='-PIC'
658
ac_cv_prog_cc_static='-Bstatic'
659
ac_cv_prog_cc_wl='-Qoption ld '
662
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
663
ac_cv_prog_cc_pic='-KPIC'
664
ac_cv_prog_cc_static='-Bstatic'
665
ac_cv_prog_cc_wl='-Wl,'
669
ac_cv_prog_cc_pic='-pic'
670
ac_cv_prog_cc_static='-Bstatic'
674
if test -d /usr/nec ;then
675
ac_cv_prog_cc_pic='-Kconform_pic'
676
ac_cv_prog_cc_static='-Bstatic'
681
ac_cv_prog_cc_can_build_shared=no
686
if test -z "$ac_cv_prog_cc_pic"; then
687
echo "$ac_t"none 1>&6
689
echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6
691
# Check to make sure the pic_flag actually works.
692
echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
693
echo "$progname:693:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
694
if test "X${ac_cv_prog_cc_pic_works+set}" = Xset; then
695
echo $ac_n "(cached) $ac_c" 1>&6
697
ac_cv_prog_cc_pic_works=yes
699
echo "int some_variable = 0;" > conftest.c
700
save_CFLAGS="$CFLAGS"
701
CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
702
if { (eval echo $progname:702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
703
# Append any warnings to the config.log.
704
cat conftest.err 1>&5
707
hpux9* | hpux10* | hpux11*)
708
# On HP-UX, both CC and GCC only warn that PIC is supported... then
709
# they create non-PIC objects. So, if there were any warnings, we
710
# assume that PIC is not supported.
711
if test -s conftest.err; then
712
ac_cv_prog_cc_pic_works=no
713
ac_cv_prog_cc_can_build_shared=no
716
ac_cv_prog_cc_pic_works=yes
717
ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
721
ac_cv_prog_cc_pic_works=yes
722
ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
726
# Append any errors to the config.log.
727
cat conftest.err 1>&5
728
ac_cv_prog_cc_pic_works=no
729
ac_cv_prog_cc_can_build_shared=no
732
CFLAGS="$save_CFLAGS"
735
# Belt *and* braces to stop my trousers falling down:
736
if test "X$ac_cv_prog_cc_pic_works" = Xno; then
738
ac_cv_prog_cc_can_build_shared=no
740
echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6
743
# Check for any special shared library compilation flags.
744
if test -n "$ac_cv_prog_cc_shlib"; then
745
echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2
746
if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then :
748
echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
749
ac_cv_prog_cc_can_build_shared=no
753
echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
754
echo "$progname:754: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
755
if test "X${ac_cv_prog_cc_static_works+set}" = Xset; then
756
echo $ac_n "(cached) $ac_c" 1>&6
759
echo 'main(){return(0);}' > conftest.c
760
save_LDFLAGS="$LDFLAGS"
761
LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
762
if { (eval echo $progname:762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
763
ac_cv_prog_cc_static_works=yes
765
ac_cv_prog_cc_static_works=no
766
ac_cv_prog_cc_static=
768
LDFLAGS="$save_LDFLAGS"
771
# Belt *and* braces to stop my trousers falling down:
772
if test "X$ac_cv_prog_cc_static_works" = Xno; then
773
ac_cv_prog_cc_static=
775
echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6
776
pic_flag="$ac_cv_prog_cc_pic"
777
special_shlib_compile_flags="$ac_cv_prog_cc_shlib"
778
wl="$ac_cv_prog_cc_wl"
779
link_static_flag="$ac_cv_prog_cc_static"
780
no_builtin_flag="$ac_cv_prog_cc_no_builtin"
781
can_build_shared="$ac_cv_prog_cc_can_build_shared"
783
# Check to see if options -o and -c are simultaneously supported by compiler
784
echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
785
$rm -r conftest 2>/dev/null
789
echo "int some_variable = 0;" > conftest.c
791
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
792
# that will create temporary files in the current directory regardless of
793
# the output directory. Thus, making CWD read-only will cause this test
794
# to fail, enabling locking or at least warning the user not to do parallel
797
save_CFLAGS="$CFLAGS"
798
CFLAGS="$CFLAGS -o out/conftest2.o"
799
echo "$progname:799: checking if $compiler supports -c -o file.o" >&5
800
if { (eval echo $progname:800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
802
# The compiler can only warn and ignore the option if not recognized
803
# So say no if there are warnings
804
if test -s out/conftest.err; then
812
# Append any errors to the config.log.
813
cat out/conftest.err 1>&5
817
CFLAGS="$save_CFLAGS"
823
$rm -r conftest 2>/dev/null
825
if test x"$compiler_c_o" = x"yes"; then
826
# Check to see if we can write to a .lo
827
echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
829
echo "int some_variable = 0;" > conftest.c
830
save_CFLAGS="$CFLAGS"
831
CFLAGS="$CFLAGS -c -o conftest.lo"
832
echo "$progname:832: checking if $compiler supports -c -o file.lo" >&5
833
if { (eval echo $progname:833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
835
# The compiler can only warn and ignore the option if not recognized
836
# So say no if there are warnings
837
if test -s conftest.err; then
845
# Append any errors to the config.log.
846
cat conftest.err 1>&5
850
CFLAGS="$save_CFLAGS"
856
# Check to see if we can do hard links to lock some files if needed
857
hard_links="nottested"
858
if test "$compiler_c_o" = no && test "$need_locks" != no; then
859
# do not overwrite the value of need_locks provided by the user
860
echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
863
ln conftest.a conftest.b 2>/dev/null && hard_links=no
865
ln conftest.a conftest.b 2>&5 || hard_links=no
866
ln conftest.a conftest.b 2>/dev/null && hard_links=no
867
echo "$ac_t$hard_links" 1>&6
869
if test "$hard_links" = no; then
870
echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
877
if test "$with_gcc" = yes; then
878
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
879
echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
881
echo "int some_variable = 0;" > conftest.c
882
save_CFLAGS="$CFLAGS"
883
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
884
echo "$progname:884: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
885
if { (eval echo $progname:885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
887
# The compiler can only warn and ignore the option if not recognized
888
# So say no if there are warnings
889
if test -s conftest.err; then
891
compiler_rtti_exceptions=no
894
compiler_rtti_exceptions=yes
897
# Append any errors to the config.log.
898
cat conftest.err 1>&5
899
compiler_rtti_exceptions=no
902
CFLAGS="$save_CFLAGS"
905
if test "$compiler_rtti_exceptions" = "yes"; then
906
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
908
no_builtin_flag=' -fno-builtin'
913
# See if the linker supports building shared libraries.
914
echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
916
allow_undefined_flag=
918
need_lib_prefix=unknown
920
# when you set need_version to no, make sure it does not cause -set_version
921
# flags to be left without arguments
924
old_archive_from_new_cmds=
925
old_archive_from_expsyms_cmds=
928
export_dynamic_flag_spec=
929
whole_archive_flag_spec=
930
thread_safe_flag_spec=
931
hardcode_into_libs=no
932
hardcode_libdir_flag_spec=
933
hardcode_libdir_separator=
936
hardcode_shlibpath_var=unsupported
938
link_all_deplibs=unknown
939
always_export_symbols=no
940
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
941
# include_expsyms should be a list of space-separated symbols to be *always*
942
# included in the symbol list
944
# exclude_expsyms can be an egrep regular expression of symbols to exclude
945
# it will be wrapped by ` (' and `)$', so one must not match beginning or
946
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
947
# as well as any symbol that contains `d'.
948
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
949
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
950
# platforms (ab)use it in PIC code, but their linkers get confused if
951
# the symbol is explicitly referenced. Since portable code cannot
952
# rely on this symbol name, it's probably fine to never include it in
953
# preloaded symbol tables.
954
extract_expsyms_cmds=
958
# FIXME: the MSVC++ port hasn't been tested in a loooong time
959
# When not using gcc, we currently assume that we are using
960
# Microsoft Visual C++.
961
if test "$with_gcc" != yes; then
969
if test "$with_gnu_ld" = yes; then
970
# If archive_cmds runs LD, not CC, wlarc should be empty
973
# See if GNU ld supports shared libraries.
976
# On AIX, the GNU linker is very broken
980
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
981
*** to be unable to reliably create shared libraries on AIX.
982
*** Therefore, libtool is disabling shared libraries support. If you
983
*** really care for shared libraries, you may want to modify your PATH
984
*** so that a non-GNU linker is found, and then restart.
990
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 cru $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
991
hardcode_libdir_flag_spec='-L$libdir'
994
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
995
# that the semantics of dynamic libraries on AmigaOS, at least up
996
# to version 4, is to share data among multiple programs linked
997
# with the same dynamic library. Since this doesn't match the
998
# behavior of shared libraries on other platforms, we can use
1004
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1005
allow_undefined_flag=unsupported
1006
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1007
# support --undefined. This deserves some investigation. FIXME
1008
archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
1015
# hardcode_libdir_flag_spec is actually meaningless, as there is
1016
# no search path for DLLs.
1017
hardcode_libdir_flag_spec='-L$libdir'
1018
allow_undefined_flag=unsupported
1019
always_export_symbols=yes
1021
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1022
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
1023
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1024
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1025
else $CC -o impgen impgen.c ; fi)~
1026
$output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
1028
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1030
# cygwin and mingw dlls have different entry points and sets of symbols
1032
# FIXME: what about values for MSVC?
1033
dll_entry=__cygwin_dll_entry@12
1034
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1038
dll_entry=_DllMainCRTStartup@12
1039
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1043
# mingw and cygwin differ, and it's simplest to just exclude the union
1044
# of the two symbol sets.
1045
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1047
# recent cygwin and mingw systems supply a stub DllMain which the user
1048
# can override, but on older systems we have to supply one (in ltdll.c)
1049
if test "x$lt_cv_need_dllmain" = "xyes"; then
1050
ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
1051
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~
1052
test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1058
# Extract the symbol export list from an `--export-all' def file,
1059
# then regenerate the def file from the symbol export list, so that
1060
# the compiled dll only exports the symbol export list.
1061
# Be careful not to strip the DATA tag left be newer dlltools.
1062
export_symbols_cmds="$ltdll_cmds"'
1063
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1064
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1066
# If DATA tags from a recent dlltool are present, honour them!
1067
archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
1069
cat $export_symbols | while read symbol; do
1072
2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1073
*) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
1075
_lt_hint=`expr 1 + \$_lt_hint`;
1078
$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~
1079
$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~
1080
$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~
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 $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1086
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1087
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1088
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1090
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1095
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1099
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
1100
*** create shared libraries on Solaris systems. Therefore, libtool
1101
*** is disabling shared libraries support. We urge you to upgrade GNU
1102
*** binutils to release 2.9.1 or newer. Another option is to modify
1103
*** your PATH or compiler configuration so that the native linker is
1104
*** used, and then restart.
1107
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1108
archive_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
1109
archive_expsym_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1116
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1119
hardcode_shlibpath_var=no
1123
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1124
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1125
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1132
if test "$ld_shlibs" = yes; then
1133
runpath_var=LD_RUN_PATH
1134
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1135
export_dynamic_flag_spec='${wl}--export-dynamic'
1138
# dlltool doesn't understand --whole-archive et. al.
1139
whole_archive_flag_spec=
1142
# ancient GNU ld didn't support --whole-archive et. al.
1143
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1144
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1146
whole_archive_flag_spec=
1152
# PORTME fill in a description of your system's linker (not GNU ld)
1155
allow_undefined_flag=unsupported
1156
always_export_symbols=yes
1157
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $output_objdir/$soname'
1158
# Note: this linker hardcodes the directories in LIBPATH if there
1159
# are no directories specified by -L.
1160
hardcode_minus_L=yes
1161
if test "$with_gcc" = yes && test -z "$link_static_flag"; then
1162
# Neither direct hardcoding nor static linking is supported with a
1164
hardcode_direct=unsupported
1169
hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
1170
hardcode_libdir_separator=':'
1171
if test "$with_gcc" = yes; then
1172
collect2name=`${CC} -print-prog-name=collect2`
1173
if test -f "$collect2name" && \
1174
strings "$collect2name" | grep resolve_lib_name >/dev/null
1176
# We have reworked collect2
1179
# We have old collect2
1180
hardcode_direct=unsupported
1181
# It fails to find uninstalled libraries when the uninstalled
1182
# path is not listed in the libpath. Setting hardcode_minus_L
1183
# to unsupported forces relinking
1184
hardcode_minus_L=yes
1185
hardcode_libdir_flag_spec='-L$libdir'
1186
hardcode_libdir_separator=
1188
shared_flag='-shared'
1190
shared_flag='${wl}-bM:SRE'
1193
allow_undefined_flag=' ${wl}-berok'
1194
archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
1195
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
1196
case "$host_os" in aix4.[01]|aix4.[01].*)
1197
# According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
1198
always_export_symbols=yes ;;
1203
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 cru $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1204
hardcode_libdir_flag_spec='-L$libdir'
1205
hardcode_minus_L=yes
1206
# see comment about different semantics on the GNU ld section
1211
# When not using gcc, we currently assume that we are using
1212
# Microsoft Visual C++.
1213
# hardcode_libdir_flag_spec is actually meaningless, as there is
1214
# no search path for DLLs.
1215
hardcode_libdir_flag_spec=' '
1216
allow_undefined_flag=unsupported
1217
# Tell ltmain to make .lib files, not .a files.
1219
# FIXME: Setting linknames here is a bad hack.
1220
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1221
# The linker will automatically build a .lib file if we build a DLL.
1222
old_archive_from_new_cmds='true'
1223
# FIXME: Should let the user specify the lib program.
1224
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1225
fix_srcfile_path='`cygpath -w $srcfile`'
1232
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1233
# support. Future versions do this automatically, but an explicit c++rt0.o
1234
# does not break anything, and helps significantly (at the cost of a little
1237
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1238
hardcode_libdir_flag_spec='-R$libdir'
1240
hardcode_shlibpath_var=no
1243
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
1245
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1247
hardcode_minus_L=yes
1248
hardcode_shlibpath_var=no
1251
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1253
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1254
hardcode_libdir_flag_spec='-R$libdir'
1256
hardcode_shlibpath_var=no
1259
hpux9* | hpux10* | hpux11*)
1261
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' ;;
1262
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1264
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1265
hardcode_libdir_separator=:
1267
hardcode_minus_L=yes # Not in the search PATH, but as the default
1268
# location of the library.
1269
export_dynamic_flag_spec='${wl}-E'
1273
if test "$with_gcc" = yes; then
1274
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'
1276
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'
1278
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1279
hardcode_libdir_separator=:
1280
link_all_deplibs=yes
1284
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1285
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1287
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
1289
hardcode_libdir_flag_spec='${wl}-R$libdir'
1291
hardcode_shlibpath_var=no
1295
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1296
hardcode_libdir_flag_spec='-R$libdir'
1298
hardcode_shlibpath_var=no
1302
hardcode_libdir_flag_spec='-L$libdir'
1303
hardcode_minus_L=yes
1304
allow_undefined_flag=unsupported
1305
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'
1306
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1310
if test "$with_gcc" = yes; then
1311
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1312
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'
1314
allow_undefined_flag=' -expect_unresolved \*'
1315
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'
1317
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1318
hardcode_libdir_separator=:
1321
osf4* | osf5*) # as osf3* with the addition of -msym flag
1322
if test "$with_gcc" = yes; then
1323
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1324
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'
1326
allow_undefined_flag=' -expect_unresolved \*'
1327
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'
1329
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1330
hardcode_libdir_separator=:
1334
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1335
hardcode_shlibpath_var=no
1336
runpath_var=LD_RUN_PATH
1337
hardcode_runpath_var=yes
1341
no_undefined_flag=' -z text'
1342
# $CC -shared without GNU ld will not create a library from C++
1343
# object files and a static libstdc++, better avoid it by now
1344
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1345
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1346
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1347
hardcode_libdir_flag_spec='-R$libdir'
1348
hardcode_shlibpath_var=no
1350
solaris2.[0-5] | solaris2.[0-5].*) ;;
1351
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
1352
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1354
link_all_deplibs=yes
1358
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1359
hardcode_libdir_flag_spec='-L$libdir'
1361
hardcode_minus_L=yes
1362
hardcode_shlibpath_var=no
1366
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1367
runpath_var='LD_RUN_PATH'
1368
hardcode_shlibpath_var=no
1369
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1373
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1374
hardcode_shlibpath_var=no
1375
export_dynamic_flag_spec='-Bexport'
1379
no_undefined_flag=' -z text'
1380
# $CC -shared without GNU ld will not create a library from C++
1381
# object files and a static libstdc++, better avoid it by now
1382
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1383
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1384
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1385
hardcode_libdir_flag_spec=
1386
hardcode_shlibpath_var=no
1387
runpath_var='LD_RUN_PATH'
1391
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1392
hardcode_libdir_flag_spec='-L$libdir'
1393
hardcode_shlibpath_var=no
1397
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1398
hardcode_libdir_flag_spec='-L$libdir'
1399
hardcode_shlibpath_var=no
1403
if test -d /usr/nec; then
1404
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1405
hardcode_shlibpath_var=no
1406
runpath_var=LD_RUN_PATH
1407
hardcode_runpath_var=yes
1413
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
1416
hardcode_shlibpath_var=no
1417
hardcode_runpath_var=yes
1418
runpath_var=LD_RUN_PATH
1422
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1423
runpath_var='LD_RUN_PATH'
1424
hardcode_shlibpath_var=no
1432
echo "$ac_t$ld_shlibs" 1>&6
1433
test "$ld_shlibs" = no && can_build_shared=no
1435
# Check hardcoding attributes.
1436
echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1438
if test -n "$hardcode_libdir_flag_spec" || \
1439
test -n "$runpath_var"; then
1441
# We can hardcode non-existant directories.
1442
if test "$hardcode_direct" != no &&
1443
# If the only mechanism to avoid hardcoding is shlibpath_var, we
1444
# have to relink, otherwise we might link with an installed library
1445
# when we should be linking with a yet-to-be-installed one
1446
## test "$hardcode_shlibpath_var" != no &&
1447
test "$hardcode_minus_L" != no; then
1448
# Linking always hardcodes the temporary library directory.
1449
hardcode_action=relink
1451
# We can link without hardcoding, and we can hardcode nonexisting dirs.
1452
hardcode_action=immediate
1455
# We cannot hardcode anything, or else we can only hardcode existing
1457
hardcode_action=unsupported
1459
echo "$ac_t$hardcode_action" 1>&6
1461
echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6
1462
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1463
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1464
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1465
echo "${ac_t}yes" 1>&6
1467
echo "${ac_t}no" 1>&6
1470
reload_cmds='$LD$reload_flag -o $output$reload_objs'
1471
test -z "$deplibs_check_method" && deplibs_check_method=unknown
1473
# PORTME Fill in your ld.so characteristics
1475
libname_spec='lib$name'
1482
shlibpath_overrides_runpath=unknown
1484
dynamic_linker="$host_os ld.so"
1485
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1486
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1488
echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1492
library_names_spec='${libname}${release}.so$versuffix $libname.a'
1493
shlibpath_var=LIBPATH
1495
# AIX has no versioning support, so we append a major version to the name.
1496
soname_spec='${libname}${release}.so$major'
1501
# AIX has no versioning support, so currently we can not hardcode correct
1502
# soname into executable. Probably we can add versioning support to
1503
# collect2, so additional links can be useful in future.
1504
# We preserve .a as extension for shared libraries though AIX4.2
1505
# and later linker supports .so
1506
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
1507
shlibpath_var=LIBPATH
1511
library_names_spec='$libname.ixlibrary $libname.a'
1512
# Create ${libname}_ixlibrary.a entries in /sys/libs.
1513
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'
1517
library_names_spec='${libname}.so'
1518
dynamic_linker="$host_os ld.so"
1519
shlibpath_var=LIBRARY_PATH
1520
lt_cv_dlopen="load_add_on"
1522
lt_cv_dlopen_self=yes
1528
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1529
soname_spec='${libname}${release}.so$major'
1530
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1531
shlibpath_var=LD_LIBRARY_PATH
1532
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1533
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1534
export_dynamic_flag_spec=-rdynamic
1535
# the default ld.so.conf also contains /usr/contrib/lib and
1536
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1537
# libtool to hard-code these into programs
1541
version_type=windows
1544
if test "$with_gcc" = yes; then
1545
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1547
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1549
dynamic_linker='Win32 ld.exe'
1550
# FIXME: first we should search . and the directory the executable is in
1552
lt_cv_dlopen="LoadLibrary"
1561
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1562
version_type=freebsd-$objformat
1563
case "$version_type" in
1565
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1570
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1574
shlibpath_var=LD_LIBRARY_PATH
1577
shlibpath_overrides_runpath=yes
1579
freebsd3.[01]* | freebsdelf3.[01]*)
1580
shlibpath_overrides_runpath=yes
1581
hardcode_into_libs=yes
1584
shlibpath_overrides_runpath=no
1585
hardcode_into_libs=yes
1594
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1595
soname_spec='${libname}${release}.so$major'
1596
shlibpath_var=LD_LIBRARY_PATH
1597
hardcode_into_libs=yes
1600
hpux9* | hpux10* | hpux11*)
1601
# Give a soname corresponding to the major version so that dld.sl refuses to
1602
# link against other versions.
1603
dynamic_linker="$host_os dld.sl"
1607
shlibpath_var=SHLIB_PATH
1608
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1609
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1610
soname_spec='${libname}${release}.sl$major'
1611
# HP-UX runs *really* slowly unless shared libraries are mode 555.
1612
postinstall_cmds='chmod 555 $lib'
1619
soname_spec='${libname}${release}.so.$major'
1620
library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
1626
case "$LD" in # libtool.m4 will add one of these switches to LD
1627
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1628
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1629
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1630
*) libsuff= shlibsuff= libmagic=never-match;;
1634
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1635
shlibpath_overrides_runpath=no
1636
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1637
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1640
# No shared lib support for Linux oldld, aout, or coff.
1641
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1645
# This must be Linux ELF.
1650
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1651
soname_spec='${libname}${release}.so$major'
1652
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1653
shlibpath_var=LD_LIBRARY_PATH
1654
shlibpath_overrides_runpath=no
1655
# This implies no fast_install, which is unacceptable.
1656
# Some rework will be needed to allow for fast_install
1657
# before this can be enabled.
1658
hardcode_into_libs=yes
1660
if test -f /lib/ld.so.1; then
1661
dynamic_linker='GNU ld.so'
1663
# Only the GNU ld.so supports shared libraries on MkLinux.
1665
powerpc*) dynamic_linker=no ;;
1666
*) dynamic_linker='Linux ld.so' ;;
1673
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1674
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1675
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1676
dynamic_linker='NetBSD (a.out) ld.so'
1678
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1679
soname_spec='${libname}${release}.so$major'
1680
dynamic_linker='NetBSD ld.elf_so'
1682
shlibpath_var=LD_LIBRARY_PATH
1687
if test "$with_gnu_ld" = yes; then
1691
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1692
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1693
shlibpath_var=LD_LIBRARY_PATH
1697
libname_spec='$name'
1699
library_names_spec='$libname.dll $libname.a'
1700
dynamic_linker='OS/2 ld.exe'
1701
shlibpath_var=LIBPATH
1704
osf3* | osf4* | osf5*)
1707
soname_spec='${libname}${release}.so'
1708
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1709
shlibpath_var=LD_LIBRARY_PATH
1710
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1711
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1716
soname_spec='${libname}${release}.so$major'
1717
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1718
shlibpath_var=LD_LIBRARY_PATH
1725
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1726
soname_spec='${libname}${release}.so$major'
1727
shlibpath_var=LD_LIBRARY_PATH
1728
shlibpath_overrides_runpath=yes
1729
hardcode_into_libs=yes
1730
# ldd complains unless libraries are executable
1731
postinstall_cmds='chmod +x $lib'
1736
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1737
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1738
shlibpath_var=LD_LIBRARY_PATH
1739
shlibpath_overrides_runpath=yes
1740
if test "$with_gnu_ld" = yes; then
1746
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1748
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1749
soname_spec='${libname}${release}.so$major'
1750
shlibpath_var=LD_LIBRARY_PATH
1751
case "$host_vendor" in
1755
shlibpath_overrides_runpath=no
1756
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1763
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1764
soname_spec='${libname}${release}.so$major'
1765
shlibpath_var=LD_LIBRARY_PATH
1772
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1773
soname_spec='${libname}${release}.so$major'
1774
shlibpath_var=LD_LIBRARY_PATH
1778
if test -d /usr/nec ;then
1780
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1781
soname_spec='$libname.so.$major'
1782
shlibpath_var=LD_LIBRARY_PATH
1790
echo "$ac_t$dynamic_linker" 1>&6
1791
test "$dynamic_linker" = no && can_build_shared=no
1793
# Check for command to grab the raw symbol name followed by C symbol from nm.
1794
echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1796
# These are sane defaults that work on at least a few old systems.
1797
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
1799
# Character class describing NM global symbol codes.
1800
symcode='[BCDEGRST]'
1802
# Regexp to match symbols that can be accessed directly from C.
1803
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1805
# Transform the above into a raw symbol and a C symbol.
1806
symxfrm='\1 \2\3 \3'
1808
# Transform an extracted symbol line into a proper C declaration
1809
global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1811
# Define system-specific variables.
1817
symcode='[ABCDGISTW]'
1819
hpux*) # Its linker distinguishes data from code symbols
1820
global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1823
symcode='[BCDEGRST]'
1833
# Handle CRLF in mingw too chain
1837
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1841
# If we're using GNU nm, then use its standard symbol codes.
1842
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1843
symcode='[ABCDGISTW]'
1846
# Try without a prefix undercore, then with it.
1847
for ac_symprfx in "" "_"; do
1849
# Write the raw and C identifiers.
1850
global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1852
# Check to see that the pipe works correctly.
1855
cat > conftest.c <<EOF
1860
void nm_test_func(){}
1864
main(){nm_test_var='a';nm_test_func();return(0);}
1867
echo "$progname:1867: checking if global_symbol_pipe works" >&5
1868
if { (eval echo $progname:1868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
1869
# Now try to grab the symbols.
1871
if { echo "$progname:1871: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1873
# Try sorting and uniquifying the output.
1874
if sort "$nlist" | uniq > "$nlist"T; then
1875
mv -f "$nlist"T "$nlist"
1880
# Make sure that we snagged all the symbols we need.
1881
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1882
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1883
cat <<EOF > conftest.c
1889
# Now generate the symbol file.
1890
eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
1892
cat <<EOF >> conftest.c
1893
#if defined (__STDC__) && __STDC__
1894
# define lt_ptr_t void *
1896
# define lt_ptr_t char *
1900
/* The mapping between symbol names and symbols. */
1905
lt_preloaded_symbols[] =
1908
sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
1909
cat <<\EOF >> conftest.c
1917
# Now try linking the two files.
1918
mv conftest.$objext conftstm.$objext
1920
save_CFLAGS="$CFLAGS"
1921
LIBS="conftstm.$objext"
1922
CFLAGS="$CFLAGS$no_builtin_flag"
1923
if { (eval echo $progname:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1926
echo "$progname: failed program was:" >&5
1931
echo "cannot find nm_test_func in $nlist" >&5
1934
echo "cannot find nm_test_var in $nlist" >&5
1937
echo "cannot run $global_symbol_pipe" >&5
1940
echo "$progname: failed program was:" >&5
1943
$rm conftest* conftst*
1945
# Do not use the global_symbol_pipe unless it works.
1946
if test "$pipe_works" = yes; then
1952
if test "$pipe_works" = yes; then
1953
echo "${ac_t}ok" 1>&6
1955
echo "${ac_t}failed" 1>&6
1958
if test -z "$global_symbol_pipe"; then
1959
global_symbol_to_cdecl=
1962
# Report the final consequences.
1963
echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1965
# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
1966
# configure.in, otherwise build static only libraries.
1968
cygwin* | mingw* | os2*)
1969
if test x$can_build_shared = xyes; then
1970
test x$enable_win32_dll = xno && can_build_shared=no
1971
echo "checking if package supports dlls... $can_build_shared" 1>&6
1976
echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
1977
test "$can_build_shared" = "no" && enable_shared=no
1979
# On AIX, shared libraries and static libraries use the same namespace, and
1980
# are all built from PIC.
1983
test "$enable_shared" = yes && enable_static=no
1984
if test -n "$RANLIB"; then
1985
archive_cmds="$archive_cmds~\$RANLIB \$lib"
1986
postinstall_cmds='$RANLIB $lib'
1991
test "$enable_shared" = yes && enable_static=no
1995
echo "$ac_t$enable_shared" 1>&6
1997
# Make sure either enable_shared or enable_static is yes.
1998
test "$enable_shared" = yes || enable_static=yes
2000
echo "checking whether to build static libraries... $enable_static" 1>&6
2002
if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then
2003
# Fast installation is not supported
2004
enable_fast_install=no
2005
elif test "$shlibpath_overrides_runpath" = yes ||
2006
test "$enable_shared" = no; then
2007
# Fast installation is not necessary
2008
enable_fast_install=needless
2011
# Check whether we must set pic_mode to default
2012
test -z "$pic_flag" && pic_mode=default
2013
# On Cygwin there's no "real" PIC flag so we must build both object types
2015
cygwin* | mingw* | os2*)
2019
if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
2020
# non-PIC code in shared libraries is not supported
2024
if test "x$enable_dlopen" != xyes; then
2025
enable_dlopen=unknown
2026
enable_dlopen_self=unknown
2027
enable_dlopen_self_static=unknown
2029
if test "X${lt_cv_dlopen+set}" != Xset; then
2030
lt_cv_dlopen=no lt_cv_dlopen_libs=
2031
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2032
echo "$progname:2032: checking for dlopen in -ldl" >&5
2033
if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then
2034
echo $ac_n "(cached) $ac_c" 1>&6
2036
ac_save_LIBS="$LIBS"
2038
cat > conftest.$ac_ext <<EOF
2039
#line 2039 "ltconfig"
2040
/* Override any gcc2 internal prototype to avoid an error. */
2041
/* We use char because int might match the return type of a gcc2
2042
builtin and then its argument prototype would still apply. */
2052
if { (eval echo $progname:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2054
ac_cv_lib_dl_dlopen=yes
2056
echo "$progname: failed program was:" >&5
2057
cat conftest.$ac_ext >&5
2059
ac_cv_lib_dl_dlopen=no
2062
LIBS="$ac_save_LIBS"
2065
if test "X$ac_cv_lib_dl_dlopen" = Xyes; then
2066
echo "$ac_t""yes" 1>&6
2067
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
2069
echo "$ac_t""no" 1>&6
2070
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
2071
echo "$progname:2071: checking for dlopen" >&5
2072
if test "X${ac_cv_func_dlopen+set}" = Xset; then
2073
echo $ac_n "(cached) $ac_c" 1>&6
2075
cat > conftest.$ac_ext <<EOF
2076
#line 2076 "ltconfig"
2077
/* System header to define __stub macros and hopefully few prototypes,
2078
which can conflict with char dlopen(); below. */
2080
/* Override any gcc2 internal prototype to avoid an error. */
2081
/* We use char because int might match the return type of a gcc2
2082
builtin and then its argument prototype would still apply. */
2090
/* The GNU C library defines this for functions which it implements
2091
to always fail with ENOSYS. Some functions are actually named
2092
something starting with __ and the normal name is an alias. */
2093
#if defined (__stub_dlopen) || defined (__stub___dlopen)
2101
if { (eval echo $progname:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2103
ac_cv_func_dlopen=yes
2105
echo "$progname: failed program was:" >&5
2106
cat conftest.$ac_ext >&5
2108
ac_cv_func_dlopen=no
2112
if test "X$ac_cv_func_dlopen" = Xyes; then
2113
echo "$ac_t""yes" 1>&6
2114
lt_cv_dlopen="dlopen"
2116
echo "$ac_t""no" 1>&6
2117
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2118
echo "$progname:2118: checking for dld_link in -ldld" >&5
2119
if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
2120
echo $ac_n "(cached) $ac_c" 1>&6
2122
ac_save_LIBS="$LIBS"
2124
cat > conftest.$ac_ext <<EOF
2125
#line 2125 "ltconfig"
2126
/* Override any gcc2 internal prototype to avoid an error. */
2127
/* We use char because int might match the return type of a gcc2
2128
builtin and then its argument prototype would still apply. */
2138
if { (eval echo $progname:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2140
ac_cv_lib_dld_dld_link=yes
2142
echo "$progname: failed program was:" >&5
2143
cat conftest.$ac_ext >&5
2145
ac_cv_lib_dld_dld_link=no
2148
LIBS="$ac_save_LIBS"
2151
if test "X$ac_cv_lib_dld_dld_link" = Xyes; then
2152
echo "$ac_t""yes" 1>&6
2153
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
2155
echo "$ac_t""no" 1>&6
2156
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
2157
echo "$progname:2157: checking for shl_load" >&5
2158
if test "X${ac_cv_func_shl_load+set}" = Xset; then
2159
echo $ac_n "(cached) $ac_c" 1>&6
2161
cat > conftest.$ac_ext <<EOF
2162
#line 2162 "ltconfig"
2163
/* System header to define __stub macros and hopefully few prototypes,
2164
which can conflict with char shl_load(); below. */
2166
/* Override any gcc2 internal prototype to avoid an error. */
2167
/* We use char because int might match the return type of a gcc2
2168
builtin and then its argument prototype would still apply. */
2176
/* The GNU C library defines this for functions which it implements
2177
to always fail with ENOSYS. Some functions are actually named
2178
something starting with __ and the normal name is an alias. */
2179
#if defined (__stub_shl_load) || defined (__stub___shl_load)
2187
if { (eval echo $progname:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2189
ac_cv_func_shl_load=yes
2191
echo "$progname: failed program was:" >&5
2192
cat conftest.$ac_ext >&5
2194
ac_cv_func_shl_load=no
2199
if test "X$ac_cv_func_shl_load" = Xyes; then
2200
echo "$ac_t""yes" 1>&6
2201
lt_cv_dlopen="shl_load"
2203
echo "$ac_t""no" 1>&6
2204
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2205
echo "$progname:2205: checking for shl_load in -ldld" >&5
2206
if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then
2207
echo $ac_n "(cached) $ac_c" 1>&6
2209
ac_save_LIBS="$LIBS"
2211
cat > conftest.$ac_ext <<EOF
2212
#line 2212 "ltconfig"
2213
#include "confdefs.h"
2214
/* Override any gcc2 internal prototype to avoid an error. */
2215
/* We use char because int might match the return type of a gcc2
2216
builtin and then its argument prototype would still apply. */
2226
if { (eval echo $progname:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2228
ac_cv_lib_dld_shl_load=yes
2230
echo "$progname: failed program was:" >&5
2231
cat conftest.$ac_ext >&5
2233
ac_cv_lib_dld_shl_load=no
2236
LIBS="$ac_save_LIBS"
2239
if test "X$ac_cv_lib_dld_shl_load" = Xyes; then
2240
echo "$ac_t""yes" 1>&6
2241
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
2243
echo "$ac_t""no" 1>&6
2260
if test "x$lt_cv_dlopen" != xno; then
2264
case "$lt_cv_dlopen" in
2266
for ac_hdr in dlfcn.h; do
2267
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2268
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2269
echo "$progname:2269: checking for $ac_hdr" >&5
2270
if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
2271
echo $ac_n "(cached) $ac_c" 1>&6
2273
cat > conftest.$ac_ext <<EOF
2274
#line 2274 "ltconfig"
2278
ac_try="$ac_compile >/dev/null 2>conftest.out"
2279
{ (eval echo $progname:2279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2280
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2281
if test -z "$ac_err"; then
2283
eval "ac_cv_header_$ac_safe=yes"
2286
echo "$progname: failed program was:" >&5
2287
cat conftest.$ac_ext >&5
2289
eval "ac_cv_header_$ac_safe=no"
2293
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2294
echo "$ac_t""yes" 1>&6
2296
echo "$ac_t""no" 1>&6
2300
if test "x$ac_cv_header_dlfcn_h" = xyes; then
2301
CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2303
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2304
LIBS="$lt_cv_dlopen_libs $LIBS"
2306
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
2307
echo "$progname:2307: checking whether a program can dlopen itself" >&5
2308
if test "X${lt_cv_dlopen_self+set}" = Xset; then
2309
echo $ac_n "(cached) $ac_c" 1>&6
2311
if test "$cross_compiling" = yes; then
2312
lt_cv_dlopen_self=cross
2314
cat > conftest.c <<EOF
2315
#line 2315 "ltconfig"
2324
# define LTDL_GLOBAL RTLD_GLOBAL
2327
# define LTDL_GLOBAL DL_GLOBAL
2329
# define LTDL_GLOBAL 0
2333
/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2334
find out it does not work in some platform. */
2335
#ifndef LTDL_LAZY_OR_NOW
2337
# define LTDL_LAZY_OR_NOW RTLD_LAZY
2340
# define LTDL_LAZY_OR_NOW DL_LAZY
2343
# define LTDL_LAZY_OR_NOW RTLD_NOW
2346
# define LTDL_LAZY_OR_NOW DL_NOW
2348
# define LTDL_LAZY_OR_NOW 0
2355
fnord() { int i=42;}
2356
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2357
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2358
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2361
if { (eval echo $progname:2361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2363
lt_cv_dlopen_self=yes
2365
echo "$progname: failed program was:" >&5
2366
cat conftest.$ac_ext >&5
2368
lt_cv_dlopen_self=no
2375
echo "$ac_t""$lt_cv_dlopen_self" 1>&6
2377
if test "$lt_cv_dlopen_self" = yes; then
2378
LDFLAGS="$LDFLAGS $link_static_flag"
2379
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
2380
echo "$progname:2380: checking whether a statically linked program can dlopen itself" >&5
2381
if test "X${lt_cv_dlopen_self_static+set}" = Xset; then
2382
echo $ac_n "(cached) $ac_c" 1>&6
2384
if test "$cross_compiling" = yes; then
2385
lt_cv_dlopen_self_static=cross
2387
cat > conftest.c <<EOF
2388
#line 2388 "ltconfig"
2397
# define LTDL_GLOBAL RTLD_GLOBAL
2400
# define LTDL_GLOBAL DL_GLOBAL
2402
# define LTDL_GLOBAL 0
2406
/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2407
find out it does not work in some platform. */
2408
#ifndef LTDL_LAZY_OR_NOW
2410
# define LTDL_LAZY_OR_NOW RTLD_LAZY
2413
# define LTDL_LAZY_OR_NOW DL_LAZY
2416
# define LTDL_LAZY_OR_NOW RTLD_NOW
2419
# define LTDL_LAZY_OR_NOW DL_NOW
2421
# define LTDL_LAZY_OR_NOW 0
2428
fnord() { int i=42;}
2429
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2430
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2431
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2434
if { (eval echo $progname:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2436
lt_cv_dlopen_self_static=yes
2438
echo "$progname: failed program was:" >&5
2439
cat conftest.$ac_ext >&5
2441
lt_cv_dlopen_self_static=no
2448
echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
2453
case "$lt_cv_dlopen_self" in
2454
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2455
*) enable_dlopen_self=unknown ;;
2458
case "$lt_cv_dlopen_self_static" in
2459
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2460
*) enable_dlopen_self_static=unknown ;;
2464
# Copy echo and quote the copy, instead of the original, because it is
2467
if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
2468
ltecho="$CONFIG_SHELL \$0 --fallback-echo"
2472
LTCONFIG_VERSION="$VERSION"
2474
# Only quote variables if we're using ltmain.sh.
2477
# Now quote all the things that may contain metacharacters.
2478
for var in ltecho old_AR old_CC old_CFLAGS old_CPPFLAGS \
2479
old_MAGIC old_LD old_LDFLAGS old_LIBS \
2480
old_LN_S old_NM old_RANLIB old_STRIP \
2481
old_AS old_DLLTOOL old_OBJDUMP \
2482
old_OBJEXT old_EXEEXT old_reload_flag \
2483
old_deplibs_check_method old_file_magic_cmd \
2484
AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
2485
reload_flag reload_cmds wl \
2486
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2487
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2488
library_names_spec soname_spec \
2489
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2490
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2491
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2492
old_striplib striplib file_magic_cmd export_symbols_cmds \
2493
deplibs_check_method allow_undefined_flag no_undefined_flag \
2494
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2495
hardcode_libdir_flag_spec hardcode_libdir_separator \
2496
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2497
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2500
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2501
old_postinstall_cmds | old_postuninstall_cmds | \
2502
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2503
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2504
postinstall_cmds | postuninstall_cmds | \
2505
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2506
# Double-quote double-evaled strings.
2507
eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test
2510
eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test
2516
*'\$0 --fallback-echo"')
2517
ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
2521
trap "$rm \"$ofile\"; exit 1" 1 2 15
2522
echo "creating $ofile"
2524
cat <<EOF > "$ofile"
2527
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2528
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2529
# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
2531
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
2532
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2534
# This program is free software; you can redistribute it and/or modify
2535
# it under the terms of the GNU General Public License as published by
2536
# the Free Software Foundation; either version 2 of the License, or
2537
# (at your option) any later version.
2539
# This program is distributed in the hope that it will be useful, but
2540
# WITHOUT ANY WARRANTY; without even the implied warranty of
2541
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2542
# General Public License for more details.
2544
# You should have received a copy of the GNU General Public License
2545
# along with this program; if not, write to the Free Software
2546
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2548
# As a special exception to the GNU General Public License, if you
2549
# distribute this file as part of a program that contains a
2550
# configuration script generated by Autoconf, you may include it under
2551
# the same distribution terms that you use for the rest of that program.
2553
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
2554
Xsed="sed -e s/^X//"
2556
# The HP-UX ksh and POSIX shell print the target directory to stdout
2558
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2560
### BEGIN LIBTOOL CONFIG
2566
# Double-quote the variables that need it (for aesthetics).
2567
for var in old_AR old_CC old_CFLAGS old_CPPFLAGS \
2568
old_MAGIC old_LD old_LDFLAGS old_LIBS \
2569
old_LN_S old_NM old_RANLIB old_STRIP \
2570
old_AS old_DLLTOOL old_OBJDUMP \
2571
old_OBJEXT old_EXEEXT old_reload_flag \
2572
old_deplibs_check_method old_file_magic_cmd; do
2573
eval "$var=\\\"\$var\\\""
2576
# Just create a config file.
2577
cfgfile="$ofile.cfg"
2578
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2579
echo "creating $cfgfile"
2581
cat <<EOF > "$cfgfile"
2582
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
2583
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2588
cat <<EOF >> "$cfgfile"
2589
# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2591
# AR=$old_AR CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
2592
# MAGIC=$old_MAGIC LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
2593
# LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\
2594
# AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\
2595
# objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\
2596
# deplibs_check_method=$old_deplibs_check_method file_magic_cmd=$old_file_magic_cmd \\
2599
# Compiler and other test output produced by $progname, useful for
2600
# debugging $progname, is in ./config.log if it exists.
2601
# The version of $progname that generated this script.
2602
LTCONFIG_VERSION=$LTCONFIG_VERSION
2604
# Shell to use when invoking shell scripts.
2607
# Whether or not to build shared libraries.
2608
build_libtool_libs=$enable_shared
2610
# Whether or not to build static libraries.
2611
build_old_libs=$enable_static
2613
# Whether or not to optimize for fast installation.
2614
fast_install=$enable_fast_install
2617
host_alias=$host_alias
2620
# An echo program that does not interpret backslashes.
2626
# The default C compiler.
2629
# The linker used to build libraries.
2632
# Whether we need hard or soft links.
2635
# A BSD-compatible nm program.
2638
# A symbol stripping program
2641
# Used to examine libraries when file_magic_cmd begins "file"
2644
# Used on cygwin: DLL creation program.
2647
# Used on cygwin: object dumper.
2650
# Used on cygwin: assembler.
2653
# The name of the directory that contains temporary libtool files.
2656
# How to create reloadable object files.
2657
reload_flag=$reload_flag
2658
reload_cmds=$reload_cmds
2660
# How to pass a linker flag through the compiler.
2663
# Object file suffix (normally "o").
2666
# Old archive suffix (normally "a").
2669
# Executable file suffix (normally "").
2672
# Additional compiler flags for building library objects.
2676
# Does compiler simultaneously support -c and -o options?
2677
compiler_c_o=$compiler_c_o
2679
# Can we write directly to a .lo ?
2680
compiler_o_lo=$compiler_o_lo
2682
# Must we lock files when doing compilation ?
2683
need_locks=$need_locks
2685
# Do we need the lib prefix for modules?
2686
need_lib_prefix=$need_lib_prefix
2688
# Do we need a version for libraries?
2689
need_version=$need_version
2691
# Whether dlopen is supported.
2692
dlopen_support=$enable_dlopen
2694
# Whether dlopen of programs is supported.
2695
dlopen_self=$enable_dlopen_self
2697
# Whether dlopen of statically linked programs is supported.
2698
dlopen_self_static=$enable_dlopen_self_static
2700
# Compiler flag to prevent dynamic linking.
2701
link_static_flag=$link_static_flag
2703
# Compiler flag to turn off builtin functions.
2704
no_builtin_flag=$no_builtin_flag
2706
# Compiler flag to allow reflexive dlopens.
2707
export_dynamic_flag_spec=$export_dynamic_flag_spec
2709
# Compiler flag to generate shared objects directly from archives.
2710
whole_archive_flag_spec=$whole_archive_flag_spec
2712
# Compiler flag to generate thread-safe objects.
2713
thread_safe_flag_spec=$thread_safe_flag_spec
2715
# Library versioning type.
2716
version_type=$version_type
2718
# Format of library name prefix.
2719
libname_spec=$libname_spec
2721
# List of archive names. First name is the real one, the rest are links.
2722
# The last name is the one that the linker finds with -lNAME.
2723
library_names_spec=$library_names_spec
2725
# The coded name of the library, if different from the real name.
2726
soname_spec=$soname_spec
2728
# Commands used to build and install an old-style archive.
2730
old_archive_cmds=$old_archive_cmds
2731
old_postinstall_cmds=$old_postinstall_cmds
2732
old_postuninstall_cmds=$old_postuninstall_cmds
2734
# Create an old-style archive from a shared archive.
2735
old_archive_from_new_cmds=$old_archive_from_new_cmds
2737
# Create a temporary old-style archive to link instead of a shared archive.
2738
old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds
2740
# Commands used to build and install a shared archive.
2741
archive_cmds=$archive_cmds
2742
archive_expsym_cmds=$archive_expsym_cmds
2743
postinstall_cmds=$postinstall_cmds
2744
postuninstall_cmds=$postuninstall_cmds
2746
# Commands to strip libraries.
2747
old_striplib=$old_striplib
2750
# Method to check whether dependent libraries are shared objects.
2751
deplibs_check_method=$deplibs_check_method
2753
# Command to use when deplibs_check_method == file_magic.
2754
file_magic_cmd=$file_magic_cmd
2756
# Flag that allows shared libraries with undefined symbols to be built.
2757
allow_undefined_flag=$allow_undefined_flag
2759
# Flag that forces no undefined symbols.
2760
no_undefined_flag=$no_undefined_flag
2762
# Commands used to finish a libtool library installation in a directory.
2763
finish_cmds=$finish_cmds
2765
# Same as above, but a single script fragment to be evaled but not shown.
2766
finish_eval=$finish_eval
2768
# Take the output of nm and produce a listing of raw symbols and C names.
2769
global_symbol_pipe=$global_symbol_pipe
2771
# Transform the output of nm in a proper C declaration
2772
global_symbol_to_cdecl=$global_symbol_to_cdecl
2774
# This is the shared library runtime path variable.
2775
runpath_var=$runpath_var
2777
# This is the shared library path variable.
2778
shlibpath_var=$shlibpath_var
2780
# Is shlibpath searched before the hard-coded library search path?
2781
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2783
# How to hardcode a shared library path into an executable.
2784
hardcode_action=$hardcode_action
2786
# Whether we should hardcode library paths into libraries.
2787
hardcode_into_libs=$hardcode_into_libs
2789
# Flag to hardcode \$libdir into a binary during linking.
2790
# This must work even if \$libdir does not exist.
2791
hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
2793
# Whether we need a single -rpath flag with a separated argument.
2794
hardcode_libdir_separator=$hardcode_libdir_separator
2796
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2798
hardcode_direct=$hardcode_direct
2800
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2802
hardcode_minus_L=$hardcode_minus_L
2804
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2805
# the resulting binary.
2806
hardcode_shlibpath_var=$hardcode_shlibpath_var
2808
# Whether libtool must link a program against all its dependency libraries.
2809
link_all_deplibs=$link_all_deplibs
2811
# Compile-time system search path for libraries
2812
sys_lib_search_path_spec=$sys_lib_search_path_spec
2814
# Run-time system search path for libraries
2815
sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
2817
# Fix the shell variable \$srcfile for the compiler.
2818
fix_srcfile_path="$fix_srcfile_path"
2820
# Set to yes if exported symbols are required.
2821
always_export_symbols=$always_export_symbols
2823
# The commands to list exported symbols.
2824
export_symbols_cmds=$export_symbols_cmds
2826
# The commands to extract the exported symbol list from a shared archive.
2827
extract_expsyms_cmds=$extract_expsyms_cmds
2829
# Symbols that should not be listed in the preloaded symbols.
2830
exclude_expsyms=$exclude_expsyms
2832
# Symbols that must always be exported.
2833
include_expsyms=$include_expsyms
2839
echo '### END LIBTOOL CONFIG' >> "$ofile"
2843
cat <<\EOF >> "$ofile"
2845
# AIX sometimes has problems with the GCC collect2 program. For some
2846
# reason, if we set the COLLECT_NAMES environment variable, the problems
2847
# vanish in a puff of smoke.
2848
if test "X${COLLECT_NAMES+set}" != Xset; then
2850
export COLLECT_NAMES
2856
*-*-cygwin* | *-*-mingw* | *-*-os2*)
2857
cat <<'EOF' >> "$ofile"
2858
# This is a source program that is used to create dlls on Windows
2859
# Don't remove nor modify the starting and closing comments
2860
# /* ltdll.c starts here */
2861
# #define WIN32_LEAN_AND_MEAN
2862
# #include <windows.h>
2863
# #undef WIN32_LEAN_AND_MEAN
2864
# #include <stdio.h>
2866
# #ifndef __CYGWIN__
2867
# # ifdef __CYGWIN32__
2868
# # define __CYGWIN__ __CYGWIN32__
2872
# #ifdef __cplusplus
2875
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
2876
# #ifdef __cplusplus
2881
# #include <cygwin/cygwin_dll.h>
2882
# DECLARE_CYGWIN_DLL( DllMain );
2884
# HINSTANCE __hDllInstance_base;
2887
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
2889
# __hDllInstance_base = hInst;
2892
# /* ltdll.c ends here */
2893
# This is a source program that is used to create import libraries
2894
# on Windows for dlls which lack them. Don't remove nor modify the
2895
# starting and closing comments
2896
# /* impgen.c starts here */
2897
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
2899
# This file is part of GNU libtool.
2901
# This program is free software; you can redistribute it and/or modify
2902
# it under the terms of the GNU General Public License as published by
2903
# the Free Software Foundation; either version 2 of the License, or
2904
# (at your option) any later version.
2906
# This program is distributed in the hope that it will be useful,
2907
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2908
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2909
# GNU General Public License for more details.
2911
# You should have received a copy of the GNU General Public License
2912
# along with this program; if not, write to the Free Software
2913
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2916
# #include <stdio.h> /* for printf() */
2917
# #include <unistd.h> /* for open(), lseek(), read() */
2918
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
2919
# #include <string.h> /* for strdup() */
2921
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
2923
# #define O_BINARY 0
2926
# static unsigned int
2927
# pe_get16 (fd, offset)
2931
# unsigned char b[2];
2932
# lseek (fd, offset, SEEK_SET);
2934
# return b[0] + (b[1]<<8);
2937
# static unsigned int
2938
# pe_get32 (fd, offset)
2942
# unsigned char b[4];
2943
# lseek (fd, offset, SEEK_SET);
2945
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2948
# static unsigned int
2952
# unsigned char *b = ptr;
2953
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2962
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
2963
# unsigned long export_rva, export_size, nsections, secptr, expptr;
2964
# unsigned long name_rvas, nexp;
2965
# unsigned char *expdata, *erva;
2966
# char *filename, *dll_name;
2968
# filename = argv[1];
2970
# dll = open(filename, O_RDONLY|O_BINARY);
2974
# dll_name = filename;
2976
# for (i=0; filename[i]; i++)
2977
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
2978
# dll_name = filename + i +1;
2980
# pe_header_offset = pe_get32 (dll, 0x3c);
2981
# opthdr_ofs = pe_header_offset + 4 + 20;
2982
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
2984
# if (num_entries < 1) /* no exports */
2987
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
2988
# export_size = pe_get32 (dll, opthdr_ofs + 100);
2989
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
2990
# secptr = (pe_header_offset + 4 + 20 +
2991
# pe_get16 (dll, pe_header_offset + 4 + 16));
2994
# for (i = 0; i < nsections; i++)
2997
# unsigned long secptr1 = secptr + 40 * i;
2998
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
2999
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3000
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3001
# lseek(dll, secptr1, SEEK_SET);
3002
# read(dll, sname, 8);
3003
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3005
# expptr = fptr + (export_rva - vaddr);
3006
# if (export_rva + export_size > vaddr + vsize)
3007
# export_size = vsize - (export_rva - vaddr);
3012
# expdata = (unsigned char*)malloc(export_size);
3013
# lseek (dll, expptr, SEEK_SET);
3014
# read (dll, expdata, export_size);
3015
# erva = expdata - export_rva;
3017
# nexp = pe_as32 (expdata+24);
3018
# name_rvas = pe_as32 (expdata+32);
3020
# printf ("EXPORTS\n");
3021
# for (i = 0; i<nexp; i++)
3023
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3024
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3029
# /* impgen.c ends here */
3036
# Append the ltmain.sh script.
3037
sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
3038
# We use sed instead of cat because bash on DJGPP gets confused if
3039
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3040
# text mode, it properly converts lines to CR/LF. This bash problem
3041
# is reportedly fixed, but why not run on old versions too?
3047
# Compile the libtool program.
3048
echo "FIXME: would compile $ltmain"
3052
test -n "$cache_file" || exit 0
3056
cat > confcache <<\EOF
3057
# This file is a shell script that caches the results of configure
3058
# tests run on this system so they can be shared between configure
3059
# scripts and configure runs. It is not useful on other systems.
3060
# If it contains results you don't want to keep, you may remove or edit it.
3062
# By default, configure uses ./config.cache as the cache file,
3063
# creating it if it does not exist already. You can give configure
3064
# the --cache-file=FILE option to use a different cache file; that is
3065
# what configure does when it calls configure scripts in
3066
# subdirectories, so they share the cache.
3067
# Giving --cache-file=/dev/null disables caching, for debugging configure.
3068
# config.status only pays attention to the cache file if you give it the
3069
# --recheck option to rerun configure.
3072
# The following way of writing the cache mishandles newlines in values,
3073
# but we know of no workaround that is simple, portable, and efficient.
3074
# So, don't put newlines in cache variables' values.
3075
# Ultrix sh set writes to stderr and can't be redirected directly,
3076
# and sets the high bit in the cache file unless we assign to the vars.
3078
case `(ac_space=' '; set | grep ac_space) 2>&1` in
3080
# `set' does not quote correctly, so add quotes (double-quote substitution
3081
# turns \\\\ into \\, and sed turns \\ into \).
3083
-e "s/'/'\\\\''/g" \
3084
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3087
# `set' quotes correctly as required by POSIX, so do not add quotes.
3088
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3091
if cmp -s $cache_file confcache; then
3094
if test -w $cache_file; then
3095
echo "updating cache $cache_file"
3096
cat confcache > $cache_file
3098
echo "not updating unwritable cache $cache_file"