3 # ltconfig - Create a system-specific libtool.
4 # Generated automatically from ltconfig.in by configure.
5 # Copyright (C) 1996, 1997, Free Software Foundation, Inc.
6 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
27 # A lot of this script is taken from autoconf-2.10.
29 # The name of this program.
30 progname
=`echo "$0" | sed 's%^.*/%%'`
36 ac_compile
='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
37 ac_link
='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
40 help="Try \`$progname --help' for more information."
42 # Sed substitution that helps us do robust quoting. It backslashifies
43 # metacharacters that are still active within double-quoted strings.
44 sed_quote_subst
='s/\([\\"$]\)/\\\1/g'
49 # All known linkers require a `.a' archive for static linking.
65 old_CPPFLAGS
="$CPPFLAGS"
71 # Parse the command line options.
77 -*=*) optarg
=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81 # If the previous option needs an argument, assign it.
82 if test -n "$prev"; then
90 Usage: $progname [OPTION]... LTMAIN [HOST]
92 Generate a system-specific libtool script.
94 --disable-shared do not build shared libraries
95 --disable-static do not build static libraries
96 --help display this help and exit
97 --no-verify do not verify that HOST is a valid host type
98 --quiet same as \`--silent'
99 --silent don't print informational messages
100 --srcdir=DIR find \`config.guess' in DIR
101 --version output version information and exit
102 --with-gcc assume that the GNU C compiler will be used
103 --with-gnu-ld assume that the C compiler uses the GNU linker
105 LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
108 HOST is the canonical host system name [default=guessed].
113 --disable-shared) enable_shared
=no
;;
115 --disable-static) enable_static
=no
;;
117 --quiet |
--silent) silent
=yes ;;
119 --srcdir) prev
=srcdir
;;
120 --srcdir=*) srcdir
="$optarg" ;;
122 --no-verify) verify_host
=no
;;
124 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
126 --with-gcc) with_gcc
=yes ;;
127 --with-gnu-ld) with_gnu_ld
=yes ;;
130 echo "$progname: unrecognized option \`$option'" 1>&2
136 if test -z "$ltmain"; then
138 elif test -z "$host"; then
139 # FIXME This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
140 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
141 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
145 echo "$progname: too many arguments" 1>&2
152 if test -z "$ltmain"; then
153 echo "$progname: you must specify a LTMAIN file" 1>&2
158 if test -f "$ltmain"; then :
160 echo "$progname: warning: \`$ltmain' does not exist" 1>&2
163 # Quote any args containing shell metacharacters.
168 *" "*|
*" "*|
*[\
[\
]\~\
#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
169 ltconfig_args
="$ltconfig_args '$arg'" ;;
170 *) ltconfig_args
="$ltconfig_args $arg" ;;
174 # A relevant subset of AC_INIT.
176 # File descriptor usage:
179 # 2 errors and warnings
180 # 3 some systems may open it to /dev/tty
181 # 4 used on the Kubota Titan
182 # 5 compiler messages saved in config.log
183 # 6 checking for... messages and results
184 if test "$silent" = yes; then
192 # Only set LANG and LC_ALL to C if already set.
193 # These must not be set unconditionally because not all systems understand
194 # e.g. LANG=C (notably SCO).
195 if test "${LC_ALL+set}" = set; then LC_ALL
=C
; export LC_ALL
; fi
196 if test "${LANG+set}" = set; then LANG
=C
; export LANG
; fi
198 if (echo "testing\c"; echo 1,2,3) |
grep c
>/dev
/null
; then
199 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
200 if (echo -n testing
; echo 1,2,3) |
sed s
/-n/xn
/ |
grep xn
>/dev
/null
; then
207 ac_n
= ac_c
='\c' ac_t
=
210 if test -z "$srcdir"; then
211 # Assume the source directory is the same one as the path to ltmain.sh.
212 srcdir
=`echo "$ltmain" | sed 's%/[^/]*$%%'`
213 test "$srcdir" = "$ltmain" && srcdir
=.
216 trap "$rm conftest*; exit 1" 1 2 15
217 if test "$verify_host" = yes; then
218 # Check for config.guess and config.sub.
220 for ac_dir
in $srcdir $srcdir/..
$srcdir/..
/..
; do
221 if test -f $ac_dir/config.guess
; then
226 if test -z "$ac_aux_dir"; then
227 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
231 ac_config_guess
=$ac_aux_dir/config.guess
232 ac_config_sub
=$ac_aux_dir/config.sub
234 # Make sure we can run config.sub.
235 if $ac_config_sub sun4
>/dev
/null
2>&1; then :
237 echo "$progname: cannot run $ac_config_sub" 1>&2
242 echo $ac_n "checking host system type""... $ac_c" 1>&6
245 case "$host_alias" in
247 if host_alias
=`$ac_config_guess`; then :
249 echo "$progname: cannot guess host type; you must specify one" 1>&2
254 host=`$ac_config_sub $host_alias`
255 echo "$ac_t""$host" 1>&6
257 elif test -z "$host"; then
258 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
265 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
268 *-*-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
271 host_cpu
=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
272 host_vendor
=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
273 host_os
=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
275 # Determine commands to create old-style static archives.
276 old_archive_cmds
='$AR cru $oldlib$oldobjs'
277 old_postinstall_cmds
='chmod 644 $oldlib'
279 # Set a sane default for `AR'.
280 test -z "$AR" && AR
=ar
282 # If RANLIB is not set, then run the test.
283 if test "${RANLIB+set}" != "set"; then
286 echo $ac_n "checking for ranlib... $ac_c" 1>&6
287 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
="${IFS}:"
289 test -z "$dir" && dir
=.
290 if test -f $dir/ranlib
; then
298 echo $ac_t "$result" 1>&6
301 if test -n "$RANLIB"; then
302 old_archive_cmds
="$old_archive_cmds;\$RANLIB \$oldlib"
303 old_postinstall_cmds
="$old_postinstall_cmds;\$RANLIB \$oldlib"
306 # Check to see if we are using GCC.
307 if test "$with_gcc" != yes ||
test -z "$CC"; then
308 # If CC is not set, then try to find GCC or a usable CC.
309 if test -z "$CC"; then
310 echo $ac_n "checking for gcc... $ac_c" 1>&6
311 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
="${IFS}:"
314 test -z "$dir" && dir
=.
315 if test -f $dir/gcc
; then
322 if test -n "$CC"; then
323 echo "$ac_t""$CC" 1>&6
325 echo "$ac_t""no" 1>&6
329 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
330 if test -z "$CC"; then
331 echo $ac_n "checking for cc... $ac_c" 1>&6
332 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
="${IFS}:"
335 test -z "$dir" && dir
=.
336 if test -f $dir/cc
; then
337 if test "$dir/cc" = "/usr/ucb/cc"; then
346 if test $cc_rejected = yes; then
347 # We found a bogon in the path, so make sure we never use it.
350 if test $# -gt 0; then
351 # We chose a different compiler from the bogus one.
352 # However, it has the same name, so the bogon will be chosen
353 # first if we set CC to just the name; use the full file name.
355 set dummy
"$dir/cc" "$@"
361 if test -n "$CC"; then
362 echo "$ac_t""$CC" 1>&6
364 echo "$ac_t""no" 1>&6
367 if test -z "$CC"; then
368 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
373 # Now see if the compiler is really GCC.
375 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
376 echo "$progname:376: checking whether we are using GNU C" >&5
379 cat > conftest.c
<<EOF
384 if { ac_try
='${CC-cc} -E conftest.c'; { (eval echo $progname:384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
egrep yes >/dev
/null
2>&1; then
388 echo $ac_t "$with_gcc" 1>&6
391 # Allow CC to be a program name with arguments.
395 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
397 profile_flag_pattern
=
398 special_shlib_compile_flags
=
403 if test "$with_gcc" = yes; then
404 profile_flag_pattern
='-pg?'
406 link_static_flag
='-static'
407 no_builtin_flag
=' -fno-builtin'
411 # PIC is the default for these OSes.
419 # PORTME Check for PIC flags for the system compiler.
422 # FIXME All rs/6000 code is PIC, but is there any non-rs/6000 AIX platform?
423 link_static_flag
='-bnso -bI:/lib/syscalls.exp'
427 # FIXME is there a better link_static_flag that works with the bundled CC?
429 link_static_flag
='${wl}-a ${wl}archive'
434 link_static_flag
='-non_shared'
435 # PIC (with -KPIC) is the default.
440 # FIXME - pic_flag is probably required for hppa*-osf* and i860-osf*
442 link_static_flag
='-non_shared'
447 link_static_flag
='-dn'
448 special_shlib_compile_flags
='-belf'
453 link_static_flag
='-Bstatic'
459 link_static_flag
='-Bstatic'
470 alpha | rs6000 | powerpc | powerpcle
)
471 # Yippee! All RS/6000 and PowerPC code is position-independent.
472 # Apparently, so is DEC alpha!
477 if test -n "$pic_flag"; then
478 echo $ac_t "$pic_flag" 1>&6
480 # Check to make sure the pic_flag actually works.
481 echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
484 save_CFLAGS
="$CFLAGS"
485 CFLAGS
="$CFLAGS $pic_flag -DPIC"
486 echo "$progname:486: checking if $compiler PIC flag $pic_flag works" >&5
487 if { (eval echo $progname:487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err
; } && test -s conftest.o
; then
488 # Append any errors to the config.log.
489 cat conftest.err
1>&5
491 # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
492 # reports no error. So, we need to grep stderr for (Bundled).
493 if grep '(Bundled)' conftest.err
>/dev
/null
; then
499 pic_flag
=" $pic_flag"
502 # Append any errors to the config.log.
503 cat conftest.err
1>&5
508 CFLAGS
="$save_CFLAGS"
514 # Check for any special shared library compilation flags.
515 if test -n "$special_shlib_compile_flags"; then
516 echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
517 if echo "$old_CC $old_CFLAGS " |
egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev
/null
; then :
519 echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
524 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
526 echo 'main(){return(0);}' > conftest.c
527 save_LDFLAGS
="$LDFLAGS"
528 LDFLAGS
="$LDFLAGS $link_static_flag"
529 echo "$progname:529: checking if $compiler static flag $link_static_flag works" >&5
530 if { (eval echo $progname:530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
; then
531 echo $ac_t "$link_static_flag" 1>&6
536 LDFLAGS
="$save_LDFLAGS"
539 if test -z "$LN_S"; then
540 # Check to see if we can use ln -s, or we need hard links.
541 echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
543 if ln -s X conftestdata
2>/dev
/null
; then
549 if test "$LN_S" = "ln -s"; then
556 # Make sure LD is an absolute path.
561 if test "$with_gcc" = yes; then
562 # Check if gcc -print-prog-name=ld gives a path.
563 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
564 echo "$progname:564: checking for ld used by GCC" >&5
565 ac_prog
=`($CC -print-prog-name=ld) 2>&5`
567 # Accept absolute paths.
570 # If it fails, then pretend we aren't using GCC.
574 # If it is relative, then search for the first ld in PATH.
578 elif test "$with_gnu_ld" = yes; then
579 echo $ac_n "checking for GNU ld... $ac_c" 1>&6
580 echo "$progname:580: checking for GNU ld" >&5
582 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
583 echo "$progname:583: checking for non-GNU ld" >&5
588 ac_cv_path_LD
="$LD" # Let the user override the test with a path.
591 IFS
="${IFS= }"; ac_save_ifs
="$IFS"; IFS
="${IFS}:"
592 for ac_dir
in $PATH; do
593 test -z "$ac_dir" && ac_dir
=.
594 if test -f "$ac_dir/$ac_prog"; then
595 LD
="$ac_dir/$ac_prog"
596 # Check to see if the program is GNU ld. I'd rather use --version,
597 # but apparently some GNU ld's only accept -v.
598 # Break only if it was the GNU/non-GNU ld that we prefer.
599 if "$LD" -v 2>&1 < /dev
/null |
egrep '(GNU|with BFD)' > /dev
/null
; then
600 test "$with_gnu_ld" != no
&& break
602 test "$with_gnu_ld" != yes && break
609 echo $ac_t "$with_gnu_ld" 1>&6
613 # Check to see if it really is or isn't GNU ld.
614 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
615 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
616 if $LD -v 2>&1 </dev
/null |
egrep '(GNU|with BFD)' 1>&5; then
621 echo $ac_t "$with_gnu_ld" 1>&6
623 # See if the linker supports building shared libraries.
624 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
626 allow_undefined_flag
=
628 export_dynamic_flag_spec
=
629 hardcode_libdir_flag_spec
=
630 hardcode_libdir_separator
=
633 hardcode_runpath_var
=no
634 hardcode_shlibpath_var
=unsupported
638 if test "$with_gnu_ld" = yes; then
639 # See if GNU ld supports shared libraries.
645 hardcode_shlibpath_var
=no
649 if $LD --help 2>&1 |
egrep ': supported targets:.* elf' > /dev
/null
; then
650 runpath_var
=LD_RUN_PATH
651 hardcode_runpath_var
=yes
659 if test "$ld_shlibs" = yes; then
660 archive_cmds
='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs'
661 hardcode_libdir_flag_spec
='${wl}-rpath $wl$libdir'
662 export_dynamic_flag_spec
='${wl}-export-dynamic'
665 # PORTME fill in a description of your system's linker (not GNU ld)
668 allow_undefined_flag
=unsupported
669 archive_cmds
='$NM$libobjs | $global_symbol_pipe | sed '"'s/.* //'"' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE -lc$deplibs;$AR cru $lib $objdir/$soname'
670 # Note: this linker hardcodes the directories in LIBPATH if there
671 # are no directories specified by -L.
673 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
674 # Neither direct hardcoding nor static linking is supported with a
676 hardcode_direct
=unsupported
681 allow_undefined_flag
=unsupported
682 archive_cmds
='$NM$libobjs | $global_symbol_pipe | sed '"'s/.* //'"' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry$deplibs;$AR cru $lib $objdir/$soname'
687 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
688 # support. Future versions do this automatically, but an explicit c++rt0.o
689 # doesn't break anything, and helps significantly (at the cost of a little
692 archive_cmds
='$LD -Bshareable -o $lib$libobjs$deplibs /usr/lib/c++rt0.o'
695 hardcode_shlibpath_var
=no
698 # Unfortunately, older versions of FreeBSD 2 don't have this feature.
700 archive_cmds
='$LD -Bshareable -o $lib$libobjs$deplibs'
703 hardcode_shlibpath_var
=no
706 # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
708 archive_cmds
='$CC -shared -o $lib$libobjs$deplibs'
709 hardcode_libdir_flag_spec
='-R$libdir'
712 hardcode_shlibpath_var
=no
716 archive_cmds
='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs$deplibs;mv $objdir/$soname $lib'
717 hardcode_libdir_flag_spec
='${wl}+b ${wl}$libdir'
723 archive_cmds
='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs$deplibs'
724 hardcode_libdir_flag_spec
='${wl}+b ${wl}$libdir'
730 archive_cmds
='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
731 hardcode_libdir_flag_spec
='${wl}-rpath ${wl}$libdir'
735 # Tested with NetBSD 1.2 ld
736 archive_cmds
='$LD -Bshareable -o $lib$libobjs$deplibs'
737 hardcode_libdir_flag_spec
='-R$libdir'
739 hardcode_shlibpath_var
=no
743 allow_undefined_flag
=' -expect_unresolved'
744 archive_cmds
='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
745 hardcode_libdir_flag_spec
='${wl}-rpath ${wl}$libdir'
746 hardcode_libdir_separator
=:
750 archive_cmds
='$LD -G -o $lib$libobjs$deplibs'
755 archive_cmds
='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
756 hardcode_libdir_flag_spec
='-R$libdir'
757 hardcode_shlibpath_var
=no
761 archive_cmds
='$LD -assert pure-text -Bstatic -o $lib$libobjs'
762 hardcode_libdir_flag_spec
='-L$libdir'
765 hardcode_shlibpath_var
=no
774 echo $ac_t "$ld_shlibs" 1>&6
776 if test -z "$NM"; then
777 echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
779 /*) ;; # Let the user override the test with a path.
781 IFS
="${IFS= }"; ac_save_ifs
="$IFS"; IFS
="${IFS}:"
782 for ac_dir
in /usr
/ucb
:$PATH:/bin
; do
783 test -z "$ac_dir" && dir
=.
784 if test -f $ac_dir/nm
; then
785 # Check to see if the nm accepts a BSD-compat flag.
786 if ($ac_dir/nm
-B /dev
/null
2>&1; exit 0) |
grep /dev
/null
>/dev
/null
; then
788 elif ($ac_dir/nm
-p /dev
/null
2>&1; exit 0) |
grep /dev
/null
>/dev
/null
; then
797 test -z "$NM" && NM
=nm
803 # Check for command to grab the raw symbol name followed by C symbol from nm.
804 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
806 # These are sane defaults that work on at least a few old systems.
807 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
809 # Character class describing NM global symbol codes.
810 symcode
='[BCDEGRSTU]'
812 # Regexp to match symbols that can be accessed directly from C.
813 sympat
='\([_A-Za-z][_A-Za-z0-9]*\)'
815 # Transform the above into a raw symbol and a C symbol.
818 # Define system-specific variables.
828 # If we're using GNU nm, then use its standard symbol codes.
829 if $NM -V 2>&1 |
egrep '(GNU|with BFD)' > /dev
/null
; then
830 symcode
='[ABCDGISTU]'
833 # Delete symbols that are not valid C identifiers.
834 global_symbol_pipe
="sed -e '/^.* $symcode $sympat$/!d'"
836 # Write the raw and C identifiers.
837 global_symbol_pipe
="$global_symbol_pipe -e 's/^.* $symcode $sympat$/$symxfrm/'"
839 # Check to see that the pipe works correctly.
842 cat > conftest.c
<<EOF
844 void nm_test_func(){}
845 main(){nm_test_var='a';nm_test_func();return(0);}
848 echo "$progname:848: checking if global_symbol_pipe works" >&5
849 if { (eval echo $progname:849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o
; then
850 # Now try to grab the symbols.
852 if { echo "$progname:852: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
854 # Try sorting and uniquifying the output.
855 if sort "$nlist" |
uniq > "$nlist"T
; then
856 mv -f "$nlist"T
"$nlist"
857 wcout
=`wc "$nlist" 2>/dev/null`
858 count
=`echo "$wcout" | sed 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
859 test "$wcout" = "$count" && count
=-1
865 # Make sure that we snagged all the symbols we need.
866 if egrep ' nm_test_var$' "$nlist" >/dev
/null
; then
867 if egrep ' nm_test_func$' "$nlist" >/dev
/null
; then
868 # Now generate the symbol file.
869 sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" > conftest.c
871 cat <<EOF >> conftest.c
872 #if defined (__STDC__) && __STDC__
873 # define __ptr_t void *
875 # define __ptr_t char *
878 /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
879 int dld_preloaded_symbol_count = $count;
881 /* The mapping between symbol names and symbols. */
886 dld_preloaded_symbols[] =
889 sed 's/^\(.*\) \(.*\)$/ {"\1", \&\2},/' < "$nlist" >> conftest.c
890 cat <<\EOF
>> conftest.c
894 # Now try linking the two files.
895 mv conftest.o conftestm.o
897 save_CFLAGS
="$CFLAGS"
899 CFLAGS
="$CFLAGS$no_builtin_flag"
900 if { (eval echo $progname:900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
; then
903 echo "$progname: failed program was:" >&5
909 echo "cannot find nm_test_func in $nlist" >&5
912 echo "cannot find nm_test_var in $nlist" >&5
915 echo "$progname: failed program was:" >&5
920 # Don't use the global_symbol_pipe unless it works.
921 echo "$ac_t$pipe_works" 1>&6
922 test "$pipe_works" = yes || global_symbol_pipe
=
924 # Check hardcoding attributes.
925 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
927 if test -n "$hardcode_libdir_flag_spec" || \
928 test "$hardcode_runpath_var" = yes; then
930 # We can hardcode non-existant directories.
931 if test "$hardcode_direct" != no
&& \
932 test "$hardcode_minus_L" != no
&& \
933 test "$hardcode_shlibpath_var" != no
; then
935 # Linking always hardcodes the temporary library directory.
936 hardcode_action
=relink
938 # We can link without hardcoding, and we can hardcode nonexisting dirs.
939 hardcode_action
=immediate
941 elif test "$hardcode_direct" != yes && \
942 test "$hardcode_minus_L" != yes && \
943 test "$hardcode_shlibpath_var" != yes; then
944 # We can't hardcode anything.
945 hardcode_action
=unsupported
947 # We can only hardcode existing directories.
948 hardcode_action
=relink
950 echo $ac_t "$hardcode_action" 1>&6
951 test "$hardcode_action" = unsupported
&& can_build_shared
=no
955 reload_cmds
='$LD$reload_flag -o $output$reload_objs'
956 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
957 # PORTME Some linker may need a different reload flag.
959 echo $ac_t "$reload_flag"
960 test -n "$reload_flag" && reload_flag
=" $reload_flag"
962 # PORTME Fill in your ld.so characteristics
969 dynamic_linker
="$host_os ld.so"
971 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
975 library_names_spec
='$libname.so.$versuffix $libname.a'
976 shlibpath_var
=LIBPATH
978 # AIX has no versioning support, so we append a major version to the name.
979 soname_spec
='$libname.so.$major'
982 freebsd2
* | freebsd3
*)
984 library_names_spec
='$libname.so.$versuffix $libname.so'
985 finish_cmds
='PATH="\$PATH:/sbin" ldconfig -m $libdir'
986 shlibpath_var
=LD_LIBRARY_PATH
991 library_names_spec
='$libname.so.$versuffix'
992 shlibpath_var
=LD_LIBRARY_PATH
996 # Give a soname corresponding to the major version so that dld.sl refuses to
997 # link against other versions.
998 dynamic_linker
="$host_os dld.sl"
1000 shlibpath_var
=SHLIB_PATH
1001 library_names_spec
='$libname.sl.$versuffix $libname.sl.$major $libname.sl'
1002 soname_spec
='$libname.sl.$major'
1003 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1004 postinstall_cmds
='chmod 555 $lib'
1009 soname_spec
='$libname.so'
1010 library_names_spec
='$libname.so.$versuffix $libname.so'
1011 shlibpath_var
=LD_LIBRARY_PATH
1014 # No shared lib support for Linux oldld, aout, or coff.
1015 linux-gnuoldld
* | linux-gnuaout
* | linux-gnucoff
*)
1019 # This must be Linux ELF.
1022 library_names_spec
='$libname.so.$versuffix $libname.so.$major $libname.so'
1023 soname_spec
='$libname.so.$major'
1024 finish_cmds
='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1025 shlibpath_var
=LD_LIBRARY_PATH
1027 if test -f /lib
/ld.so
.1; then
1028 dynamic_linker
='GNU ld.so'
1030 # Only the GNU ld.so supports shared libraries on MkLinux.
1032 powerpc
*) dynamic_linker
=no
;;
1033 *) dynamic_linker
='Linux ld.so' ;;
1040 library_names_spec
='$libname.so.$versuffix'
1041 finish_cmds
='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1042 shlibpath_var
=LD_LIBRARY_PATH
1047 soname_spec
='$libname.so'
1048 library_names_spec
='$libname.so.$versuffix $libname.so'
1049 shlibpath_var
=LD_LIBRARY_PATH
1054 soname_spec
='$libname.so.$major'
1055 library_names_spec
='$libname.so.$versuffix $libname.so.$major $libname.so'
1056 shlibpath_var
=LD_LIBRARY_PATH
1061 library_names_spec
='$libname.so.$versuffix $libname.so.$major $libname.so'
1062 soname_spec
='$libname.so.$major'
1063 shlibpath_var
=LD_LIBRARY_PATH
1068 library_names_spec
='$libname.so.$versuffix'
1069 finish_cmds
='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1070 shlibpath_var
=LD_LIBRARY_PATH
1077 echo "$ac_t""$dynamic_linker"
1078 test "$dynamic_linker" = no
&& can_build_shared
=no
1080 # FIXME need to add library stripping features
1081 # strip -x works for most platforms, though not for static libraries on NetBSD
1082 # HP-UX requires "-r" for library stripping
1086 #echo $ac_n "checking for static library strip program... $ac_c" 1>&6
1087 #if test -n "$old_striplib"; then
1088 # echo $ac_t "$old_striplib" 1>&6
1090 # echo $ac_t none 1>&6
1093 #if test "$can_build_shared" = yes; then
1094 # echo $ac_n "checking for shared library strip program... $ac_c" 1>&6
1096 # if test -n "$striplib"; then
1097 # echo $ac_t "$striplib" 1>&6
1099 # echo $ac_t none 1>&6
1103 # Report the consequences.
1104 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1106 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
1107 test "$can_build_shared" = "no" && enable_shared
=no
1109 # On AIX, shared libraries and static libraries use the same namespace.
1112 test "$enable_shared" = yes && enable_static
=no
1113 if test -n "$RANLIB"; then
1114 archive_cmds
="$archive_cmds;\$RANLIB \$lib"
1115 postinstall_cmds
='$RANLIB $lib'
1120 echo "$ac_t""$enable_shared" 1>&6
1122 # Make sure either enable_shared or enable_static is yes.
1123 test "$enable_shared" = yes || enable_static
=yes
1125 echo "checking whether to build static libraries... $enable_static" 1>&6
1127 # Now quote all the things that may contain metacharacters.
1128 for var
in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
1129 old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
1130 link_static_flag no_builtin_flag export_dynamic_flag_spec \
1131 profile_flag_pattern library_names_spec soname_spec RANLIB \
1132 old_archive_cmds old_postinstall_cmds archive_cmds postinstall_cmds \
1133 allow_undefined_flag finish_cmds global_symbol_pipe striplib old_striplib \
1134 hardcode_libdir_flag_spec hardcode_libdir_separator
; do
1136 eval "$var=\`echo \"\$$var\" | sed \"\$sed_quote_subst\"\`"
1140 trap "$rm $ofile; exit 1" 1 2 15
1141 echo creating
$ofile
1146 # libtool - Provide generalized library-building support services.
1148 # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
1149 # This program was configured as follows,
1150 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1152 # CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
1153 # LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
1156 # Compiler and other test output produced by $progname, useful for
1157 # debugging $progname, is in ./config.log if it exists.
1159 # The version of $progname that generated this script.
1160 LTCONFIG_VERSION="$VERSION"
1162 # Whether or not to build libtool libraries.
1163 build_libtool_libs=$enable_shared
1165 # Whether or not to build old-style libraries.
1166 build_old_libs=$enable_static
1169 host_alias="$host_alias"
1175 # The default C compiler.
1178 # The linker used to build libraries.
1181 # Whether we need hard or soft links.
1184 # A BSD-compatible nm program.
1187 # How to create reloadable object files.
1188 reload_flag="$reload_flag"
1189 reload_cmds="$reload_cmds"
1191 # How to pass a linker flag through the compiler.
1194 # Additional compiler flags for building library objects.
1195 pic_flag="$pic_flag"
1197 # Compiler flag to prevent dynamic linking.
1198 link_static_flag="$link_static_flag"
1200 # Compiler flag to turn off builtin functions.
1201 no_builtin_flag="$no_builtin_flag"
1203 # Compiler flag to allow reflexive dlopens.
1204 export_dynamic_flag_spec="$export_dynamic_flag_spec"
1206 # Pattern to match compiler flags for creating libNAME_p libraries:
1207 profile_flag_pattern="$profile_flag_pattern"
1209 # Library versioning type.
1210 version_type=$version_type
1212 # List of archive names. First name is the real one, the rest are links.
1213 # The last name is the one that the linker finds with -lNAME.
1214 library_names_spec="$library_names_spec"
1216 # The coded name of the library, if different from the real name.
1217 soname_spec="$soname_spec"
1219 # Commands used to build and install an old-style archive.
1221 old_archive_cmds="$old_archive_cmds"
1222 old_postinstall_cmds="$old_postinstall_cmds"
1224 # Commands used to build and install a shared archive.
1225 archive_cmds="$archive_cmds"
1226 postinstall_cmds="$postinstall_cmds"
1228 # Flag that allows shared libraries with undefined symbols to be built.
1229 allow_undefined_flag="$allow_undefined_flag"
1231 # Commands used to finish a libtool library installation in a directory.
1232 finish_cmds="$finish_cmds"
1234 # Take the output of nm and produce a listing of raw symbols and C names
1235 global_symbol_pipe="$global_symbol_pipe"
1237 # How to strip a library file.
1238 striplib="$striplib"
1239 old_striplib="$old_striplib"
1241 # This is the shared library runtime path variable.
1242 runpath_var=$runpath_var
1244 # This is the shared library path variable.
1245 shlibpath_var=$shlibpath_var
1247 # How to hardcode a shared library path into an executable.
1248 hardcode_action=$hardcode_action
1250 # Flag to hardcode \$libdir into a binary during linking.
1251 # This must work even if \$libdir does not exist.
1252 hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
1254 # Whether we need a single -rpath flag with a separated argument.
1255 hardcode_libdir_separator="$hardcode_libdir_separator"
1257 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
1259 hardcode_direct=$hardcode_direct
1261 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
1263 hardcode_minus_L=$hardcode_minus_L
1265 # Set to yes if using RUNPATH_VAR=DIR during linking hardcodes DIR into the
1267 hardcode_runpath_var=$hardcode_runpath_var
1269 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
1270 # the resulting binary.
1271 hardcode_shlibpath_var=$hardcode_shlibpath_var
1275 # Detect if we are using a relative or absolute path to ltmain.sh.
1277 /*) cat <<EOF2 >> $ofile
1278 # Execute the libtool backend.
1282 *) cat <<EOF3 >> $ofile
1283 # Find the path to this script.
1284 thisdir=\`echo "\$0" | sed -e 's%/[^/]*\$%%'\`
1285 test "X\$0" = "X\$thisdir" && thisdir=.
1287 # Execute the libtool backend.
1293 echo 'exit 1' >> $ofile