3 # ltconfig - Create a system-specific libtool.
4 # Copyright (C) 1996-1998 Free Software Foundation, Inc.
5 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
26 # A lot of this script is taken from autoconf-2.10.
28 # Check that we are running under the correct shell.
29 SHELL
=${CONFIG_SHELL-/bin/sh}
30 if test "X$1" = "X--no-reexec"; then
31 # Discard the --no-reexec flag, and continue.
33 elif test "X$SHELL" != X
/bin
/sh
; then
34 # Restart under the correct shell.
35 exec "$SHELL" "$0" --no-reexec ${1+"$@"}
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
40 if test "${CDPATH+set}" = set; then CDPATH
=; export CDPATH
; fi
43 if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
45 # The Solaris, AIX, and Digital Unix default echo programs unquote
46 # backslashes. This makes it impossible to quote backslashes using
47 # echo "$something" | sed 's/\\/\\\\/g'
49 # So, first we look for a working echo in the user's PATH.
50 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
="${IFS}:"
51 for dir
in $PATH /usr
/ucb
; do
52 if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then
59 if test "X$echo" = Xecho
; then
60 # We didn't find a better echo, so look for alternatives.
61 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then
62 # This shell has a builtin print -r that does the trick.
64 # elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
65 # # If we have ksh, try running ltconfig again with it.
66 # CONFIG_SHELL=/bin/ksh
68 # exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
72 if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
74 # Oops. We lost completely, so just stick with echo.
81 # Sed substitution that helps us do robust quoting. It backslashifies
82 # metacharacters that are still active within double-quoted strings.
84 sed_quote_subst
='s/\([\\"\\`$\\\\]\)/\\\1/g'
86 # Same as above, but do not quote variable references.
87 double_quote_subst
='s/\([\\"\\`\\\\]\)/\\\1/g'
89 # The name of this program.
90 progname
=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
96 ac_compile
='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
97 ac_link
='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
100 help="Try \`$progname --help' for more information."
103 default_ofile
=libtool
106 # All known linkers require a `.a' archive for static linking.
115 ofile
="$default_ofile"
123 old_CPPFLAGS
="$CPPFLAGS"
128 old_DLLTOOL
="$DLLTOOL"
131 # Parse the command line options.
137 -*=*) optarg
=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
141 # If the previous option needs an argument, assign it.
142 if test -n "$prev"; then
143 eval "$prev=\$option"
150 Usage: $progname [OPTION]... LTMAIN [HOST]
152 Generate a system-specific libtool script.
154 --debug enable verbose shell tracing
155 --disable-shared do not build shared libraries
156 --disable-static do not build static libraries
157 --help display this help and exit
158 --no-verify do not verify that HOST is a valid host type
159 -o, --output=FILE specify the output file [default=$default_ofile]
160 --quiet same as \`--silent'
161 --silent do not print informational messages
162 --srcdir=DIR find \`config.guess' in DIR
163 --version output version information and exit
164 --with-gcc assume that the GNU C compiler will be used
165 --with-gnu-ld assume that the C compiler uses the GNU linker
167 LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
170 HOST is the canonical host system name [default=guessed].
176 echo "$progname: enabling shell trace mode"
180 --disable-shared) enable_shared
=no
;;
182 --disable-static) enable_static
=no
;;
184 --quiet |
--silent) silent
=yes ;;
186 --srcdir) prev
=srcdir
;;
187 --srcdir=*) srcdir
="$optarg" ;;
189 --no-verify) verify_host
=no
;;
191 --output |
-o) prev
=ofile
;;
192 --output=*) ofile
="$optarg" ;;
194 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
196 --with-gcc) with_gcc
=yes ;;
197 --with-gnu-ld) with_gnu_ld
=yes ;;
200 echo "$progname: unrecognized option \`$option'" 1>&2
206 if test -z "$ltmain"; then
208 elif test -z "$host"; then
209 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
210 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
211 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
215 echo "$progname: too many arguments" 1>&2
222 if test -z "$ltmain"; then
223 echo "$progname: you must specify a LTMAIN file" 1>&2
228 if test -f "$ltmain"; then :
230 echo "$progname: \`$ltmain' does not exist" 1>&2
235 # Quote any args containing shell metacharacters.
240 *" "*|
*" "*|
*[\
[\
]\~\
#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
241 ltconfig_args
="$ltconfig_args '$arg'" ;;
242 *) ltconfig_args
="$ltconfig_args $arg" ;;
246 # A relevant subset of AC_INIT.
248 # File descriptor usage:
251 # 2 errors and warnings
252 # 3 some systems may open it to /dev/tty
253 # 4 used on the Kubota Titan
254 # 5 compiler messages saved in config.log
255 # 6 checking for... messages and results
256 if test "$silent" = yes; then
264 # Only set LANG and LC_ALL to C if already set.
265 # These must not be set unconditionally because not all systems understand
266 # e.g. LANG=C (notably SCO).
267 if test "${LC_ALL+set}" = set; then LC_ALL
=C
; export LC_ALL
; fi
268 if test "${LANG+set}" = set; then LANG
=C
; export LANG
; fi
270 if (echo "testing\c"; echo 1,2,3) |
grep c
>/dev
/null
; then
271 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
272 if (echo -n testing
; echo 1,2,3) |
sed s
/-n/xn
/ |
grep xn
>/dev
/null
; then
279 ac_n
= ac_c
='\c' ac_t
=
282 if test -z "$srcdir"; then
283 # Assume the source directory is the same one as the path to ltmain.sh.
284 srcdir
=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
285 test "$srcdir" = "$ltmain" && srcdir
=.
288 trap "$rm conftest*; exit 1" 1 2 15
289 if test "$verify_host" = yes; then
290 # Check for config.guess and config.sub.
292 for ac_dir
in $srcdir $srcdir/..
$srcdir/..
/..
; do
293 if test -f $ac_dir/config.guess
; then
298 if test -z "$ac_aux_dir"; then
299 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
303 ac_config_guess
=$ac_aux_dir/config.guess
304 ac_config_sub
=$ac_aux_dir/config.sub
306 # Make sure we can run config.sub.
307 if $ac_config_sub sun4
>/dev
/null
2>&1; then :
309 echo "$progname: cannot run $ac_config_sub" 1>&2
314 echo $ac_n "checking host system type""... $ac_c" 1>&6
317 case "$host_alias" in
319 if host_alias
=`$ac_config_guess`; then :
321 echo "$progname: cannot guess host type; you must specify one" 1>&2
326 host=`$ac_config_sub $host_alias`
327 echo "$ac_t$host" 1>&6
329 # Make sure the host verified.
330 test -z "$host" && exit 1
332 elif test -z "$host"; then
333 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
340 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
343 linux
*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
346 host_cpu
=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
347 host_vendor
=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
348 host_os
=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
352 # AIX sometimes has problems with the GCC collect2 program. For some
353 # reason, if we set the COLLECT_NAMES environment variable, the problems
354 # vanish in a puff of smoke.
355 if test "${COLLECT_NAMES+set}" != set; then
362 # Determine commands to create old-style static archives.
363 old_archive_cmds
='$AR cru $oldlib$oldobjs'
364 old_postinstall_cmds
='chmod 644 $oldlib'
365 old_postuninstall_cmds
=
367 # Set a sane default for `AR'.
368 test -z "$AR" && AR
=ar
370 # If RANLIB is not set, then run the test.
371 if test "${RANLIB+set}" != "set"; then
374 echo $ac_n "checking for ranlib... $ac_c" 1>&6
375 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
="${IFS}:"
377 test -z "$dir" && dir
=.
378 if test -f $dir/ranlib
; then
386 echo "$ac_t$result" 1>&6
389 if test -n "$RANLIB"; then
390 old_archive_cmds
="$old_archive_cmds;\$RANLIB \$oldlib"
391 old_postinstall_cmds
="\$RANLIB \$oldlib;$old_postinstall_cmds"
394 # Set sane defaults for `DLLTOOL' and `AS', used on cygwin32.
395 test -z "$DLLTOOL" && DLLTOOL
=dlltool
396 test -z "$AS" && AS
=as
398 # Check to see if we are using GCC.
399 if test "$with_gcc" != yes ||
test -z "$CC"; then
400 # If CC is not set, then try to find GCC or a usable CC.
401 if test -z "$CC"; then
402 echo $ac_n "checking for gcc... $ac_c" 1>&6
403 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
="${IFS}:"
406 test -z "$dir" && dir
=.
407 if test -f $dir/gcc
; then
414 if test -n "$CC"; then
421 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
422 if test -z "$CC"; then
423 echo $ac_n "checking for cc... $ac_c" 1>&6
424 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
="${IFS}:"
427 test -z "$dir" && dir
=.
428 if test -f $dir/cc
; then
429 if test "$dir/cc" = "/usr/ucb/cc"; then
438 if test $cc_rejected = yes; then
439 # We found a bogon in the path, so make sure we never use it.
442 if test $# -gt 0; then
443 # We chose a different compiler from the bogus one.
444 # However, it has the same name, so the bogon will be chosen
445 # first if we set CC to just the name; use the full file name.
447 set dummy
"$dir/cc" "$@"
453 if test -n "$CC"; then
459 if test -z "$CC"; then
460 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
465 # Now see if the compiler is really GCC.
467 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
468 echo "$progname:468: checking whether we are using GNU C" >&5
471 cat > conftest.c
<<EOF
476 if { ac_try
='${CC-cc} -E conftest.c'; { (eval echo $progname:476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } |
egrep yes >/dev
/null
2>&1; then
480 echo "$ac_t$with_gcc" 1>&6
483 # Allow CC to be a program name with arguments.
487 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
489 special_shlib_compile_flags
=
494 if test "$with_gcc" = yes; then
496 link_static_flag
='-static'
497 no_builtin_flag
=' -fno-builtin'
500 aix3
* | aix4
* | irix5
* | irix6
* | osf3
* | osf4
*)
501 # PIC is the default for these OSes.
504 # We can build DLLs from non-PIC.
507 # FIXME: we need at least 68020 code to build shared libraries, but
508 # adding the `-m68020' flag to GCC prevents building anything better,
510 pic_flag
='-m68020 -resident32 -malways-restore-a4'
517 # PORTME Check for PIC flags for the system compiler.
520 # All AIX code is PIC.
521 link_static_flag
='-bnso -bI:/lib/syscalls.exp'
524 hpux9
* | hpux10
* | hpux11
*)
525 # Is there a better link_static_flag that works with the bundled CC?
527 link_static_flag
="${wl}-a ${wl}archive"
533 link_static_flag
='-non_shared'
534 # PIC (with -KPIC) is the default.
538 # We can build DLLs from non-PIC.
542 # All OSF/1 code is PIC.
544 link_static_flag
='-non_shared'
549 link_static_flag
='-dn'
550 special_shlib_compile_flags
='-belf'
555 link_static_flag
='-Bstatic'
561 link_static_flag
='-Bstatic'
567 link_static_flag
='-Bstatic'
573 link_static_flag
='-Bstatic'
582 if test -n "$pic_flag"; then
583 echo "$ac_t$pic_flag" 1>&6
585 # Check to make sure the pic_flag actually works.
586 echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
588 echo "int some_variable = 0;" > conftest.c
589 save_CFLAGS
="$CFLAGS"
590 CFLAGS
="$CFLAGS $pic_flag -DPIC"
591 echo "$progname:591: checking if $compiler PIC flag $pic_flag works" >&5
592 if { (eval echo $progname:592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err
; } && test -s conftest.o
; then
593 # Append any warnings to the config.log.
594 cat conftest.err
1>&5
596 # On HP-UX, both CC and GCC only warn that PIC is supported... then they
597 # create non-PIC objects. So, if there were any warnings, we assume that
598 # PIC is not supported.
599 if test -s conftest.err
; then
605 pic_flag
=" $pic_flag"
608 # Append any errors to the config.log.
609 cat conftest.err
1>&5
614 CFLAGS
="$save_CFLAGS"
617 echo "$ac_t"none
1>&6
620 # Check for any special shared library compilation flags.
621 if test -n "$special_shlib_compile_flags"; then
622 echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
623 if echo "$old_CC $old_CFLAGS " |
egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev
/null
; then :
625 echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
630 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
632 echo 'main(){return(0);}' > conftest.c
633 save_LDFLAGS
="$LDFLAGS"
634 LDFLAGS
="$LDFLAGS $link_static_flag"
635 echo "$progname:635: checking if $compiler static flag $link_static_flag works" >&5
636 if { (eval echo $progname:636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
; then
637 echo "$ac_t$link_static_flag" 1>&6
639 echo "$ac_t"none
1>&6
642 LDFLAGS
="$save_LDFLAGS"
645 if test -z "$LN_S"; then
646 # Check to see if we can use ln -s, or we need hard links.
647 echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
649 if ln -s X conftestdata
2>/dev
/null
; then
655 if test "$LN_S" = "ln -s"; then
662 # Make sure LD is an absolute path.
663 if test -z "$LD"; then
665 if test "$with_gcc" = yes; then
666 # Check if gcc -print-prog-name=ld gives a path.
667 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
668 echo "$progname:668: checking for ld used by GCC" >&5
669 ac_prog
=`($CC -print-prog-name=ld) 2>&5`
671 # Accept absolute paths.
673 test -z "$LD" && LD
="$ac_prog"
676 # If it fails, then pretend we are not using GCC.
680 # If it is relative, then search for the first ld in PATH.
684 elif test "$with_gnu_ld" = yes; then
685 echo $ac_n "checking for GNU ld... $ac_c" 1>&6
686 echo "$progname:686: checking for GNU ld" >&5
688 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
689 echo "$progname:689: checking for non-GNU ld" >&5
692 if test -z "$LD"; then
693 IFS
="${IFS= }"; ac_save_ifs
="$IFS"; IFS
="${IFS}:"
694 for ac_dir
in $PATH; do
695 test -z "$ac_dir" && ac_dir
=.
696 if test -f "$ac_dir/$ac_prog"; then
697 LD
="$ac_dir/$ac_prog"
698 # Check to see if the program is GNU ld. I'd rather use --version,
699 # but apparently some GNU ld's only accept -v.
700 # Break only if it was the GNU/non-GNU ld that we prefer.
701 if "$LD" -v 2>&1 < /dev
/null |
egrep '(GNU|with BFD)' > /dev
/null
; then
702 test "$with_gnu_ld" != no
&& break
704 test "$with_gnu_ld" != yes && break
711 if test -n "$LD"; then
717 if test -z "$LD"; then
718 echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
723 # Check to see if it really is or is not GNU ld.
724 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
725 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
726 if $LD -v 2>&1 </dev
/null |
egrep '(GNU|with BFD)' 1>&5; then
731 echo "$ac_t$with_gnu_ld" 1>&6
733 # See if the linker supports building shared libraries.
734 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
736 allow_undefined_flag
=
739 old_archive_from_new_cmds
=
740 export_dynamic_flag_spec
=
741 hardcode_libdir_flag_spec
=
742 hardcode_libdir_separator
=
745 hardcode_shlibpath_var
=unsupported
749 if test "$with_gnu_ld" = yes; then
751 # See if GNU ld supports shared libraries.
754 archive_cmds
='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
755 hardcode_libdir_flag_spec
='-L$libdir'
760 archive_cmds
='$LD -assert pure-text -Bstatic -o $lib$libobjs'
764 # hardcode_libdir_flag_spec is actually meaningless, as there is
765 # no search path for DLLs.
766 hardcode_libdir_flag_spec
='-L$libdir'
767 allow_undefined_flag
=unsupported
772 struct _reent *_impure_ptr;
773 extern struct _reent *__imp_reent_data;
775 __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
777 _impure_ptr = __imp_reent_data;
780 archive_cmds
='$CC -c '"`pwd`"'/libtool.c;echo EXPORTS > $soname-def;$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' >> $soname-def;$LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.o$libobjs$deplibs;$DLLTOOL --as=$AS --dllname $soname --def $soname-def --base-file $soname-base --output-exp $soname-exp;$LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.o$libobjs$deplibs;$DLLTOOL --as=$AS --dllname $soname --def $soname-def --base-file $soname-base --output-exp $soname-exp;$LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.o$libobjs$deplibs;$rm libtool.o $soname-base $soname-exp'
781 old_archive_from_new_cmds
='$DLLTOOL --as=$AS --dllname $soname --def $soname-def --output-lib $objdir/$libname.a;$rm $soname-def'
785 if $LD --help 2>&1 |
egrep ': supported targets:.* elf' > /dev
/null
; then
786 archive_cmds
='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
793 if test "$ld_shlibs" = yes; then
794 runpath_var
=LD_RUN_PATH
795 hardcode_libdir_flag_spec
='${wl}--rpath ${wl}$libdir'
796 export_dynamic_flag_spec
='${wl}--export-dynamic'
799 # PORTME fill in a description of your system's linker (not GNU ld)
802 allow_undefined_flag
=unsupported
803 archive_cmds
='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname'
804 # Note: this linker hardcodes the directories in LIBPATH if there
805 # are no directories specified by -L.
807 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
808 # Neither direct hardcoding nor static linking is supported with a
810 hardcode_direct
=unsupported
815 allow_undefined_flag
=unsupported
816 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;$AR cru $lib $objdir/$soname'
822 archive_cmds
='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
823 hardcode_libdir_flag_spec
='-L$libdir'
828 # hardcode_libdir_flag_spec is actually meaningless, as there is
829 # no search path for DLLs.
830 hardcode_libdir_flag_spec
='-L$libdir'
831 allow_undefined_flag
=unsupported
836 struct _reent *_impure_ptr;
837 extern struct _reent *__imp_reent_data;
839 __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
841 _impure_ptr = __imp_reent_data;
844 archive_cmds
='$CC -c '"`pwd`"'/libtool.c;echo EXPORTS > $soname-def;$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' >> $soname-def;$LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.o$libobjs$deplibs;$DLLTOOL --as=$AS --dllname $soname --def $soname-def --base-file $soname-base --output-exp $soname-exp;$LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.o$libobjs$deplibs;$DLLTOOL --as=$AS --dllname $soname --def $soname-def --base-file $soname-base --output-exp $soname-exp;$LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.o$libobjs$deplibs;$rm libtool.o $soname-base $soname-exp'
845 old_archive_from_new_cmds
='$DLLTOOL --as=$AS --dllname $soname --def $soname-def --output-lib $objdir/$libname.a;$rm $soname-def'
848 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
849 # support. Future versions do this automatically, but an explicit c++rt0.o
850 # does not break anything, and helps significantly (at the cost of a little
853 archive_cmds
='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o'
854 hardcode_libdir_flag_spec
='-R$libdir'
857 hardcode_shlibpath_var
=no
860 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
862 archive_cmds
='$LD -Bshareable -o $lib$libobjs'
865 hardcode_shlibpath_var
=no
868 # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
870 archive_cmds
='$CC -shared -o $lib$libobjs'
871 hardcode_libdir_flag_spec
='-R$libdir'
874 hardcode_shlibpath_var
=no
878 archive_cmds
='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib'
879 hardcode_libdir_flag_spec
='${wl}+b ${wl}$libdir'
882 export_dynamic_flag_spec
='${wl}-E'
886 archive_cmds
='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs'
887 hardcode_libdir_flag_spec
='${wl}+b ${wl}$libdir'
890 export_dynamic_flag_spec
='${wl}-E'
894 if test "$with_gcc" = yes; then
895 archive_cmds
='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs'
897 archive_cmds
='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
899 hardcode_libdir_flag_spec
='${wl}-rpath ${wl}$libdir'
903 # Tested with NetBSD 1.2 ld
904 archive_cmds
='$LD -Bshareable -o $lib$libobjs'
905 hardcode_libdir_flag_spec
='-R$libdir'
907 hardcode_shlibpath_var
=no
911 archive_cmds
='$LD -Bshareable -o $lib$libobjs'
912 hardcode_libdir_flag_spec
='-R$libdir'
914 hardcode_shlibpath_var
=no
918 hardcode_libdir_flag_spec
='-L$libdir'
920 allow_undefined_flag
=unsupported
921 archive_cmds
='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
922 old_archive_from_new_cmds
='emximp -o $objdir/$libname.a $objdir/$libname.def'
926 allow_undefined_flag
=' -expect_unresolved \*'
927 archive_cmds
='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
928 hardcode_libdir_flag_spec
='${wl}-rpath ${wl}$libdir'
929 hardcode_libdir_separator
=:
933 archive_cmds
='$LD -G -o $lib$libobjs'
938 no_undefined_flag
=' -z text'
939 archive_cmds
='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs'
940 hardcode_libdir_flag_spec
='-R$libdir'
941 hardcode_shlibpath_var
=no
943 # Solaris 2 before 2.5 hardcodes -L paths.
952 archive_cmds
='$LD -assert pure-text -Bstatic -o $lib$libobjs'
953 hardcode_libdir_flag_spec
='-L$libdir'
956 hardcode_shlibpath_var
=no
960 archive_cmds
='$LD -G -h $soname -o $lib$libobjs'
961 hardcode_libdir_flag_spec
='-L$libdir'
964 hardcode_shlibpath_var
=no
973 echo "$ac_t$ld_shlibs" 1>&6
975 if test -z "$NM"; then
976 echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
978 /* |
[A-Za-z
]:\\*) ;; # Let the user override the test with a path.
980 IFS
="${IFS= }"; ac_save_ifs
="$IFS"; IFS
="${IFS}:"
981 for ac_dir
in /usr
/ucb
/usr
/ccs
/bin
$PATH /bin
; do
982 test -z "$ac_dir" && ac_dir
=.
983 if test -f $ac_dir/nm
; then
984 # Check to see if the nm accepts a BSD-compat flag.
985 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
986 # nm: unknown option "B" ignored
987 if ($ac_dir/nm
-B /dev
/null
2>&1 |
sed '1q'; exit 0) |
egrep /dev
/null
>/dev
/null
; then
989 elif ($ac_dir/nm
-p /dev
/null
2>&1 |
sed '1q'; exit 0) |
egrep /dev
/null
>/dev
/null
; then
998 test -z "$NM" && NM
=nm
1001 echo "$ac_t$NM" 1>&6
1004 # Check for command to grab the raw symbol name followed by C symbol from nm.
1005 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1007 # These are sane defaults that work on at least a few old systems.
1008 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1010 # Character class describing NM global symbol codes.
1011 symcode
='[BCDEGRSTU]'
1013 # Regexp to match symbols that can be accessed directly from C.
1014 sympat
='\([_A-Za-z][_A-Za-z0-9]*\)'
1016 # Transform the above into a raw symbol and a C symbol.
1019 # Define system-specific variables.
1025 sympat
='_\([_A-Za-z][_A-Za-z0-9]*\)'
1029 # Cannot use undefined symbols on IRIX because inlined functions mess us up.
1030 symcode
='[BCDEGRST]'
1037 # If we're using GNU nm, then use its standard symbol codes.
1038 if $NM -V 2>&1 |
egrep '(GNU|with BFD)' > /dev
/null
; then
1039 symcode
='[ABCDGISTUW]'
1044 # We do not want undefined symbols on cygwin32. The user must
1045 # arrange to define them via -l arguments.
1046 symcode
='[ABCDGISTW]'
1050 # Write the raw and C identifiers.
1051 global_symbol_pipe
="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
1053 # Check to see that the pipe works correctly.
1056 cat > conftest.c
<<EOF
1061 void nm_test_func(){}
1065 main(){nm_test_var='a';nm_test_func();return(0);}
1068 echo "$progname:1068: checking if global_symbol_pipe works" >&5
1069 if { (eval echo $progname:1069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o
; then
1070 # Now try to grab the symbols.
1072 if { echo "$progname:1072: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1074 # Try sorting and uniquifying the output.
1075 if sort "$nlist" |
uniq > "$nlist"T
; then
1076 mv -f "$nlist"T
"$nlist"
1077 wcout
=`wc "$nlist" 2>/dev/null`
1078 count
=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
1079 (test "$count" -ge 0) 2>/dev
/null || count
=-1
1085 # Make sure that we snagged all the symbols we need.
1086 if egrep ' nm_test_var$' "$nlist" >/dev
/null
; then
1087 if egrep ' nm_test_func$' "$nlist" >/dev
/null
; then
1088 cat <<EOF > conftest.c
1094 # Now generate the symbol file.
1095 sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
1097 cat <<EOF >> conftest.c
1098 #if defined (__STDC__) && __STDC__
1099 # define __ptr_t void *
1101 # define __ptr_t char *
1104 /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
1105 int dld_preloaded_symbol_count = $count;
1107 /* The mapping between symbol names and symbols. */
1112 dld_preloaded_symbols[] =
1115 sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c
1116 cat <<\EOF
>> conftest.c
1124 # Now try linking the two files.
1125 mv conftest.o conftestm.o
1127 save_CFLAGS
="$CFLAGS"
1129 CFLAGS
="$CFLAGS$no_builtin_flag"
1130 if { (eval echo $progname:1130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest
; then
1133 echo "$progname: failed program was:" >&5
1138 echo "cannot find nm_test_func in $nlist" >&5
1141 echo "cannot find nm_test_var in $nlist" >&5
1144 echo "cannot run $global_symbol_pipe" >&5
1147 echo "$progname: failed program was:" >&5
1152 # Do not use the global_symbol_pipe unless it works.
1153 echo "$ac_t$pipe_works" 1>&6
1154 test "$pipe_works" = yes || global_symbol_pipe
=
1156 # Check hardcoding attributes.
1157 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1159 if test -n "$hardcode_libdir_flag_spec" || \
1160 test -n "$runpath_var"; then
1162 # We can hardcode non-existant directories.
1163 if test "$hardcode_direct" != no
&& \
1164 test "$hardcode_minus_L" != no
&& \
1165 test "$hardcode_shlibpath_var" != no
; then
1167 # Linking always hardcodes the temporary library directory.
1168 hardcode_action
=relink
1170 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1171 hardcode_action
=immediate
1174 # We cannot hardcode anything, or else we can only hardcode existing
1176 hardcode_action
=unsupported
1178 echo "$ac_t$hardcode_action" 1>&6
1182 reload_cmds
='$LD$reload_flag -o $output$reload_objs'
1183 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1184 # PORTME Some linkers may need a different reload flag.
1186 echo "$ac_t$reload_flag" 1>&6
1187 test -n "$reload_flag" && reload_flag
=" $reload_flag"
1189 # PORTME Fill in your ld.so characteristics
1191 libname_spec
='lib$name'
1199 dynamic_linker
="$host_os ld.so"
1201 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1205 library_names_spec
='${libname}${release}.so$versuffix $libname.a'
1206 shlibpath_var
=LIBPATH
1208 # AIX has no versioning support, so we append a major version to the name.
1209 soname_spec
='${libname}${release}.so$major'
1213 library_names_spec
='$libname.ixlibrary $libname.a'
1214 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1215 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'
1219 version_type
=windows
1220 library_names_spec
='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
1221 dynamic_linker
='Win32 ld.exe'
1225 freebsd2
* | freebsd3
*)
1227 library_names_spec
='${libname}${release}.so$versuffix $libname.so'
1228 finish_cmds
='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1229 shlibpath_var
=LD_LIBRARY_PATH
1234 library_names_spec
='${libname}${release}.so$versuffix'
1235 shlibpath_var
=LD_LIBRARY_PATH
1238 hpux9
* | hpux10
* | hpux11
*)
1239 # Give a soname corresponding to the major version so that dld.sl refuses to
1240 # link against other versions.
1241 dynamic_linker
="$host_os dld.sl"
1243 shlibpath_var
=SHLIB_PATH
1244 library_names_spec
='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1245 soname_spec
='${libname}${release}.sl$major'
1246 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1247 postinstall_cmds
='chmod 555 $lib'
1252 soname_spec
='${libname}${release}.so'
1253 library_names_spec
='${libname}${release}.so$versuffix $libname.so'
1254 shlibpath_var
=LD_LIBRARY_PATH
1257 # No shared lib support for Linux oldld, aout, or coff.
1258 linux-gnuoldld
* | linux-gnuaout
* | linux-gnucoff
*)
1262 # This must be Linux ELF.
1265 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1266 soname_spec
='${libname}${release}.so$major'
1267 finish_cmds
='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1268 shlibpath_var
=LD_LIBRARY_PATH
1270 if test -f /lib
/ld.so
.1; then
1271 dynamic_linker
='GNU ld.so'
1273 # Only the GNU ld.so supports shared libraries on MkLinux.
1275 powerpc
*) dynamic_linker
=no
;;
1276 *) dynamic_linker
='Linux ld.so' ;;
1283 library_names_spec
='${libname}${release}.so$versuffix'
1284 finish_cmds
='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1285 shlibpath_var
=LD_LIBRARY_PATH
1289 libname_spec
='$name'
1290 library_names_spec
='$libname.dll $libname.a'
1291 dynamic_linker
='OS/2 ld.exe'
1292 shlibpath_var
=LIBPATH
1297 soname_spec
='${libname}${release}.so'
1298 library_names_spec
='${libname}${release}.so$versuffix $libname.so'
1299 shlibpath_var
=LD_LIBRARY_PATH
1304 soname_spec
='${libname}${release}.so$major'
1305 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1306 shlibpath_var
=LD_LIBRARY_PATH
1311 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1312 soname_spec
='${libname}${release}.so$major'
1313 shlibpath_var
=LD_LIBRARY_PATH
1318 library_names_spec
='${libname}${release}.so$versuffix'
1319 finish_cmds
='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1320 shlibpath_var
=LD_LIBRARY_PATH
1325 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1326 soname_spec
='${libname}${release}.so$major'
1327 shlibpath_var
=LD_LIBRARY_PATH
1332 library_names_spec
='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1333 soname_spec
='${libname}${release}.so$major'
1334 shlibpath_var
=LD_LIBRARY_PATH
1341 echo "$ac_t$dynamic_linker"
1342 test "$dynamic_linker" = no
&& can_build_shared
=no
1344 # Report the final consequences.
1345 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1347 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
1348 test "$can_build_shared" = "no" && enable_shared
=no
1350 # On AIX, shared libraries and static libraries use the same namespace, and
1351 # are all built from PIC.
1354 test "$enable_shared" = yes && enable_static
=no
1355 if test -n "$RANLIB"; then
1356 archive_cmds
="$archive_cmds;\$RANLIB \$lib"
1357 postinstall_cmds
='$RANLIB $lib'
1362 echo "$ac_t$enable_shared" 1>&6
1364 # Make sure either enable_shared or enable_static is yes.
1365 test "$enable_shared" = yes || enable_static
=yes
1367 echo "checking whether to build static libraries... $enable_static" 1>&6
1369 echo $ac_n "checking for objdir... $ac_c" 1>&6
1370 rm -f .libs
2>/dev
/null
1371 mkdir .libs
2>/dev
/null
1372 if test -d .libs
; then
1375 # MS-DOS does not allow filenames that begin with a dot.
1378 rmdir .libs
2>/dev
/null
1379 echo "$ac_t$objdir" 1>&6
1381 # Copy echo and quote the copy, instead of the original, because it is
1385 # Now quote all the things that may contain metacharacters.
1386 for var
in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
1387 old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM DLLTOOL AS reload_flag \
1388 reload_cmds wl pic_flag link_static_flag no_builtin_flag \
1389 export_dynamic_flag_spec libname_spec library_names_spec soname_spec RANLIB \
1390 old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
1391 old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
1392 allow_undefined_flag no_undefined_flag \
1393 finish_cmds finish_eval global_symbol_pipe \
1394 hardcode_libdir_flag_spec hardcode_libdir_separator
; do
1397 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
1398 old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
1399 postinstall_cmds | postuninstall_cmds | finish_cmds
)
1400 # Double-quote double-evaled strings.
1401 eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
1404 eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`"
1409 trap "$rm \"$ofile\"; exit 1" 1 2 15
1410 echo "creating $ofile"
1412 cat <<EOF > "$ofile"
1415 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1416 # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
1417 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
1419 # Copyright (C) 1996-1998 Free Software Foundation, Inc.
1420 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1422 # This program is free software; you can redistribute it and/or modify
1423 # it under the terms of the GNU General Public License as published by
1424 # the Free Software Foundation; either version 2 of the License, or
1425 # (at your option) any later version.
1427 # This program is distributed in the hope that it will be useful, but
1428 # WITHOUT ANY WARRANTY; without even the implied warranty of
1429 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1430 # General Public License for more details.
1432 # You should have received a copy of the GNU General Public License
1433 # along with this program; if not, write to the Free Software
1434 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1436 # As a special exception to the GNU General Public License, if you
1437 # distribute this file as part of a program that contains a
1438 # configuration script generated by Autoconf, you may include it under
1439 # the same distribution terms that you use for the rest of that program.
1441 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
1442 Xsed="sed -e s/^X//"
1444 # The HP-UX ksh and POSIX shell print the target directory to stdout
1446 if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
1448 ### BEGIN LIBTOOL CONFIG
1449 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1451 # CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
1452 # LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
1453 # DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
1456 # Compiler and other test output produced by $progname, useful for
1457 # debugging $progname, is in ./config.log if it exists.
1459 # The version of $progname that generated this script.
1460 LTCONFIG_VERSION="$VERSION"
1462 # Shell to use when invoking shell scripts.
1465 # Whether or not to build shared libraries.
1466 build_libtool_libs=$enable_shared
1468 # Whether or not to build static libraries.
1469 build_old_libs=$enable_static
1472 host_alias="$host_alias"
1475 # An echo program that does not interpret backslashes.
1481 # The default C compiler.
1484 # The linker used to build libraries.
1487 # Whether we need hard or soft links.
1490 # A BSD-compatible nm program.
1493 # Used on cygwin32: DLL creation program.
1496 # Used on cygwin32: assembler.
1499 # The name of the directory that contains temporary libtool files.
1502 # How to create reloadable object files.
1503 reload_flag="$reload_flag"
1504 reload_cmds="$reload_cmds"
1506 # How to pass a linker flag through the compiler.
1509 # Additional compiler flags for building library objects.
1510 pic_flag="$pic_flag"
1512 # Compiler flag to prevent dynamic linking.
1513 link_static_flag="$link_static_flag"
1515 # Compiler flag to turn off builtin functions.
1516 no_builtin_flag="$no_builtin_flag"
1518 # Compiler flag to allow reflexive dlopens.
1519 export_dynamic_flag_spec="$export_dynamic_flag_spec"
1521 # Library versioning type.
1522 version_type=$version_type
1524 # Format of library name prefix.
1525 libname_spec="$libname_spec"
1527 # List of archive names. First name is the real one, the rest are links.
1528 # The last name is the one that the linker finds with -lNAME.
1529 library_names_spec="$library_names_spec"
1531 # The coded name of the library, if different from the real name.
1532 soname_spec="$soname_spec"
1534 # Commands used to build and install an old-style archive.
1536 old_archive_cmds="$old_archive_cmds"
1537 old_postinstall_cmds="$old_postinstall_cmds"
1538 old_postuninstall_cmds="$old_postuninstall_cmds"
1540 # Create an old-style archive from a shared archive.
1541 old_archive_from_new_cmds="$old_archive_from_new_cmds"
1543 # Commands used to build and install a shared archive.
1544 archive_cmds="$archive_cmds"
1545 postinstall_cmds="$postinstall_cmds"
1546 postuninstall_cmds="$postuninstall_cmds"
1548 # Flag that allows shared libraries with undefined symbols to be built.
1549 allow_undefined_flag="$allow_undefined_flag"
1551 # Flag that forces no undefined symbols.
1552 no_undefined_flag="$no_undefined_flag"
1554 # Commands used to finish a libtool library installation in a directory.
1555 finish_cmds="$finish_cmds"
1557 # Same as above, but a single script fragment to be evaled but not shown.
1558 finish_eval="$finish_eval"
1560 # Take the output of nm and produce a listing of raw symbols and C names.
1561 global_symbol_pipe="$global_symbol_pipe"
1563 # This is the shared library runtime path variable.
1564 runpath_var=$runpath_var
1566 # This is the shared library path variable.
1567 shlibpath_var=$shlibpath_var
1569 # How to hardcode a shared library path into an executable.
1570 hardcode_action=$hardcode_action
1572 # Flag to hardcode \$libdir into a binary during linking.
1573 # This must work even if \$libdir does not exist.
1574 hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
1576 # Whether we need a single -rpath flag with a separated argument.
1577 hardcode_libdir_separator="$hardcode_libdir_separator"
1579 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
1581 hardcode_direct=$hardcode_direct
1583 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
1585 hardcode_minus_L=$hardcode_minus_L
1587 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
1588 # the resulting binary.
1589 hardcode_shlibpath_var=$hardcode_shlibpath_var
1594 cat <<\EOF
>> "$ofile"
1596 # AIX sometimes has problems with the GCC collect2 program. For some
1597 # reason, if we set the COLLECT_NAMES environment variable, the problems
1598 # vanish in a puff of smoke.
1599 if test "${COLLECT_NAMES+set}" != set; then
1601 export COLLECT_NAMES
1607 echo '### END LIBTOOL CONFIG' >> "$ofile"
1610 # Append the ltmain.sh script.
1611 cat "$ltmain" >> "$ofile" ||
(rm -f "$ofile"; exit 1)