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}
31 if test "X$1" = X--no-reexec; then
32 # Discard the --no-reexec flag, and continue.
34 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
35 # Yippee, $echo works!
38 # Restart under the correct shell.
39 exec "$SHELL" "$0" --no-reexec ${1+"$@"}
42 # The HP-UX ksh and POSIX shell print the target directory to stdout
44 if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
46 if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then
47 # The Solaris, AIX, and Digital Unix default echo programs unquote
48 # backslashes. This makes it impossible to quote backslashes using
49 # echo "$something" | sed 's/\\/\\\\/g'
51 # So, first we look for a working echo in the user's PATH.
52 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
53 for dir in $PATH /usr/ucb; do
54 if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then
61 if test "X$echo" = Xecho; then
62 # We didn't find a better echo, so look for alternatives.
63 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then
64 # This shell has a builtin print -r that does the trick.
66 elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
67 # If we have ksh, try running ltconfig again with it.
70 exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
74 if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then
75 # Oops. We lost completely, so just stick with echo.
82 # Sed substitution that helps us do robust quoting. It backslashifies
83 # metacharacters that are still active within double-quoted strings.
85 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
87 # Same as above, but do not quote variable references.
88 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
90 # The name of this program.
91 progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
97 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
98 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
101 help="Try \`$progname --help' for more information."
104 default_ofile=libtool
107 # All known linkers require a `.a' archive for static linking.
116 ofile="$default_ofile"
126 old_CPPFLAGS="$CPPFLAGS"
131 old_DLLTOOL="$DLLTOOL"
134 # Parse the command line options.
140 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
144 # If the previous option needs an argument, assign it.
145 if test -n "$prev"; then
146 eval "$prev=\$option"
153 Usage: $progname [OPTION]... LTMAIN [HOST]
155 Generate a system-specific libtool script.
157 --debug enable verbose shell tracing
158 --disable-shared do not build shared libraries
159 --disable-static do not build static libraries
160 --help display this help and exit
161 --no-verify do not verify that HOST is a valid host type
162 -o, --output=FILE specify the output file [default=$default_ofile]
163 --quiet same as \`--silent'
164 --silent do not print informational messages
165 --srcdir=DIR find \`config.guess' in DIR
166 --version output version information and exit
167 --with-gcc assume that the GNU C compiler will be used
168 --with-gnu-ld assume that the C compiler uses the GNU linker
170 LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
173 HOST is the canonical host system name [default=guessed].
179 echo "$progname: enabling shell trace mode"
183 --disable-shared) enable_shared=no ;;
185 --disable-static) enable_static=no ;;
187 --quiet | --silent) silent=yes ;;
189 --srcdir) prev=srcdir ;;
190 --srcdir=*) srcdir="$optarg" ;;
192 --no-verify) verify_host=no ;;
194 --output | -o) prev=ofile ;;
195 --output=*) ofile="$optarg" ;;
197 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
199 --with-gcc) with_gcc=yes ;;
200 --with-gnu-ld) with_gnu_ld=yes ;;
203 echo "$progname: unrecognized option \`$option'" 1>&2
209 if test -z "$ltmain"; then
211 elif test -z "$host"; then
212 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
213 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
214 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
218 echo "$progname: too many arguments" 1>&2
225 if test -z "$ltmain"; then
226 echo "$progname: you must specify a LTMAIN file" 1>&2
231 if test ! -f "$ltmain"; then
232 echo "$progname: \`$ltmain' does not exist" 1>&2
237 # Quote any args containing shell metacharacters.
242 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
243 ltconfig_args="$ltconfig_args '$arg'" ;;
244 *) ltconfig_args="$ltconfig_args $arg" ;;
248 # A relevant subset of AC_INIT.
250 # File descriptor usage:
253 # 2 errors and warnings
254 # 3 some systems may open it to /dev/tty
255 # 4 used on the Kubota Titan
256 # 5 compiler messages saved in config.log
257 # 6 checking for... messages and results
258 if test "$silent" = yes; then
266 # Only set LANG and LC_ALL to C if already set.
267 # These must not be set unconditionally because not all systems understand
268 # e.g. LANG=C (notably SCO).
269 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
270 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
272 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
273 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
274 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
281 ac_n= ac_c='\c' ac_t=
284 if test -z "$srcdir"; then
285 # Assume the source directory is the same one as the path to ltmain.sh.
286 srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
287 test "$srcdir" = "$ltmain" && srcdir=.
290 trap "$rm conftest*; exit 1" 1 2 15
291 if test "$verify_host" = yes; then
292 # Check for config.guess and config.sub.
294 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
295 if test -f $ac_dir/config.guess; then
300 if test -z "$ac_aux_dir"; then
301 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
305 ac_config_guess=$ac_aux_dir/config.guess
306 ac_config_sub=$ac_aux_dir/config.sub
308 # Make sure we can run config.sub.
309 if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
311 echo "$progname: cannot run $ac_config_sub" 1>&2
316 echo $ac_n "checking host system type""... $ac_c" 1>&6
319 case "$host_alias" in
321 if host_alias=`$SHELL $ac_config_guess`; then :
323 echo "$progname: cannot guess host type; you must specify one" 1>&2
328 host=`$SHELL $ac_config_sub $host_alias`
329 echo "$ac_t$host" 1>&6
331 # Make sure the host verified.
332 test -z "$host" && exit 1
334 elif test -z "$host"; then
335 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
342 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
345 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
348 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
349 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
350 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
354 # AIX sometimes has problems with the GCC collect2 program. For some
355 # reason, if we set the COLLECT_NAMES environment variable, the problems
356 # vanish in a puff of smoke.
357 if test "${COLLECT_NAMES+set}" != set; then
364 # Determine commands to create old-style static archives.
365 old_archive_cmds='$AR cru $oldlib$oldobjs'
366 old_postinstall_cmds='chmod 644 $oldlib'
367 old_postuninstall_cmds=
369 # Set a sane default for `AR'.
370 test -z "$AR" && AR=ar
372 # If RANLIB is not set, then run the test.
373 if test "${RANLIB+set}" != "set"; then
376 echo $ac_n "checking for ranlib... $ac_c" 1>&6
377 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
379 test -z "$dir" && dir=.
380 if test -f $dir/ranlib; then
388 echo "$ac_t$result" 1>&6
391 if test -n "$RANLIB"; then
392 old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib"
393 old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds"
396 # Set sane defaults for `DLLTOOL' and `AS', used on cygwin32.
397 test -z "$DLLTOOL" && DLLTOOL=dlltool
398 test -z "$AS" && AS=as
400 # Check to see if we are using GCC.
401 if test "$with_gcc" != yes || test -z "$CC"; then
402 # If CC is not set, then try to find GCC or a usable CC.
403 if test -z "$CC"; then
404 echo $ac_n "checking for gcc... $ac_c" 1>&6
405 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
408 test -z "$dir" && dir=.
409 if test -f $dir/gcc; then
416 if test -n "$CC"; then
423 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
424 if test -z "$CC"; then
425 echo $ac_n "checking for cc... $ac_c" 1>&6
426 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
429 test -z "$dir" && dir=.
430 if test -f $dir/cc; then
431 if test "$dir/cc" = "/usr/ucb/cc"; then
440 if test $cc_rejected = yes; then
441 # We found a bogon in the path, so make sure we never use it.
444 if test $# -gt 0; then
445 # We chose a different compiler from the bogus one.
446 # However, it has the same name, so the bogon will be chosen
447 # first if we set CC to just the name; use the full file name.
449 set dummy "$dir/cc" "$@"
455 if test -n "$CC"; then
461 if test -z "$CC"; then
462 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
467 # Now see if the compiler is really GCC.
469 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
470 echo "$progname:470: checking whether we are using GNU C" >&5
473 cat > conftest.c <<EOF
478 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
482 echo "$ac_t$with_gcc" 1>&6
485 # Allow CC to be a program name with arguments.
489 echo $ac_n "checking for object suffix... $ac_c" 1>&6
491 echo 'int i = 1;' > conftest.c
492 echo "$progname:492: checking for object suffix" >& 5
493 if { (eval echo $progname:493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
494 # Append any warnings to the config.log.
495 cat conftest.err 1>&5
497 for ac_file in conftest.*; do
500 *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
504 cat conftest.err 1>&5
505 echo "$progname: failed program was:" >&5
509 echo "$ac_t$objext" 1>&6
511 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
513 special_shlib_compile_flags=
518 if test "$with_gcc" = yes; then
520 link_static_flag='-static'
521 no_builtin_flag=' -fno-builtin'
524 aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
525 # PIC is the default for these OSes.
527 cygwin32* | mingw32* | os2*)
528 # We can build DLLs from non-PIC.
531 # FIXME: we need at least 68020 code to build shared libraries, but
532 # adding the `-m68020' flag to GCC prevents building anything better,
534 pic_flag='-m68020 -resident32 -malways-restore-a4'
541 # PORTME Check for PIC flags for the system compiler.
544 # All AIX code is PIC.
545 link_static_flag='-bnso -bI:/lib/syscalls.exp'
548 hpux9* | hpux10* | hpux11*)
549 # Is there a better link_static_flag that works with the bundled CC?
551 link_static_flag="${wl}-a ${wl}archive"
557 link_static_flag='-non_shared'
558 # PIC (with -KPIC) is the default.
561 cygwin32* | mingw32* | os2*)
562 # We can build DLLs from non-PIC.
566 # All OSF/1 code is PIC.
568 link_static_flag='-non_shared'
573 link_static_flag='-dn'
574 special_shlib_compile_flags='-belf'
579 link_static_flag='-Bstatic'
585 link_static_flag='-Bstatic'
591 link_static_flag='-Bstatic'
597 link_static_flag='-Bstatic'
606 if test -n "$pic_flag"; then
607 echo "$ac_t$pic_flag" 1>&6
609 # Check to make sure the pic_flag actually works.
610 echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
612 echo "int some_variable = 0;" > conftest.c
613 save_CFLAGS="$CFLAGS"
614 CFLAGS="$CFLAGS $pic_flag -DPIC"
615 echo "$progname:615: checking if $compiler PIC flag $pic_flag works" >&5
616 if { (eval echo $progname:616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
617 # Append any warnings to the config.log.
618 cat conftest.err 1>&5
620 # On HP-UX, both CC and GCC only warn that PIC is supported... then they
621 # create non-PIC objects. So, if there were any warnings, we assume that
622 # PIC is not supported.
623 if test -s conftest.err; then
629 pic_flag=" $pic_flag"
632 # Append any errors to the config.log.
633 cat conftest.err 1>&5
638 CFLAGS="$save_CFLAGS"
641 echo "$ac_t"none 1>&6
644 # Check for any special shared library compilation flags.
645 if test -n "$special_shlib_compile_flags"; then
646 echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
647 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
649 echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
654 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
656 echo 'main(){return(0);}' > conftest.c
657 save_LDFLAGS="$LDFLAGS"
658 LDFLAGS="$LDFLAGS $link_static_flag"
659 echo "$progname:659: checking if $compiler static flag $link_static_flag works" >&5
660 if { (eval echo $progname:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
661 echo "$ac_t$link_static_flag" 1>&6
663 echo "$ac_t"none 1>&6
666 LDFLAGS="$save_LDFLAGS"
669 if test -z "$LN_S"; then
670 # Check to see if we can use ln -s, or we need hard links.
671 echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
673 if ln -s X conftestdata 2>/dev/null; then
679 if test "$LN_S" = "ln -s"; then
686 # Make sure LD is an absolute path.
687 if test -z "$LD"; then
689 if test "$with_gcc" = yes; then
690 # Check if gcc -print-prog-name=ld gives a path.
691 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
692 echo "$progname:692: checking for ld used by GCC" >&5
693 ac_prog=`($CC -print-prog-name=ld) 2>&5`
695 # Accept absolute paths.
696 /* | [A-Za-z]:[/\\]*)
697 test -z "$LD" && LD="$ac_prog"
700 # If it fails, then pretend we are not using GCC.
704 # If it is relative, then search for the first ld in PATH.
708 elif test "$with_gnu_ld" = yes; then
709 echo $ac_n "checking for GNU ld... $ac_c" 1>&6
710 echo "$progname:710: checking for GNU ld" >&5
712 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
713 echo "$progname:713: checking for non-GNU ld" >&5
716 if test -z "$LD"; then
717 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
718 for ac_dir in $PATH; do
719 test -z "$ac_dir" && ac_dir=.
720 if test -f "$ac_dir/$ac_prog"; then
721 LD="$ac_dir/$ac_prog"
722 # Check to see if the program is GNU ld. I'd rather use --version,
723 # but apparently some GNU ld's only accept -v.
724 # Break only if it was the GNU/non-GNU ld that we prefer.
725 if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
726 test "$with_gnu_ld" != no && break
728 test "$with_gnu_ld" != yes && break
735 if test -n "$LD"; then
741 if test -z "$LD"; then
742 echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
747 # Check to see if it really is or is not GNU ld.
748 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
749 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
750 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
755 echo "$ac_t$with_gnu_ld" 1>&6
757 # See if the linker supports building shared libraries.
758 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
760 allow_undefined_flag=
763 old_archive_from_new_cmds=
764 export_dynamic_flag_spec=
765 whole_archive_flag_spec=
766 hardcode_libdir_flag_spec=
767 hardcode_libdir_separator=
770 hardcode_shlibpath_var=unsupported
776 # On AIX, the GNU linker works like the native linker.
782 if test "$with_gnu_ld" = yes; then
784 # See if GNU ld supports shared libraries.
787 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)'
788 hardcode_libdir_flag_spec='-L$libdir'
793 archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
796 hardcode_shlibpath_var=no
799 cygwin32* | mingw32*)
800 if test "$with_gcc" = yes; then
801 # hardcode_libdir_flag_spec is actually meaningless, as there is
802 # no search path for DLLs.
803 hardcode_libdir_flag_spec='-L$libdir'
804 allow_undefined_flag=unsupported
809 struct _reent *_impure_ptr;
810 extern struct _reent *__imp_reent_data;
812 __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
814 _impure_ptr = __imp_reent_data;
817 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.$objext$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.$objext$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.$objext$libobjs$deplibs;$rm libtool.$objext $soname-base $soname-exp'
818 old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $soname-def --output-lib $objdir/$libname.a;$rm $soname-def'
820 # When not using gcc, we currently assume that we are using
821 # Microsoft Visual C++.
823 # hardcode_libdir_flag_spec is actually meaningless, as there is
824 # no search path for DLLs.
825 hardcode_libdir_flag_spec=' '
826 allow_undefined_flag=unsupported
827 # Tell ltmain to make .lib files, not .a files.
829 # FIXME: Setting linknames here is a bad hack.
830 archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll;linknames='
831 # The linker will automatically build a .lib file if we build a DLL.
832 old_archive_from_new_cmds='true'
833 # FIXME: Should let the user specify the lib program.
834 old_archive_cmds='lib /OUT:$oldlib$oldobjs'
835 fix_srcfile_path='`cygpath -w $srcfile`'
840 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
841 archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
848 if test "$ld_shlibs" = yes && test "$with_gnu_ld" = yes; then
849 runpath_var=LD_RUN_PATH
850 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
851 export_dynamic_flag_spec='${wl}--export-dynamic'
852 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
855 # PORTME fill in a description of your system's linker (not GNU ld)
858 allow_undefined_flag=unsupported
859 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'
860 # Note: this linker hardcodes the directories in LIBPATH if there
861 # are no directories specified by -L.
863 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
864 # Neither direct hardcoding nor static linking is supported with a
866 hardcode_direct=unsupported
871 allow_undefined_flag=unsupported
872 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'
878 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)'
879 hardcode_libdir_flag_spec='-L$libdir'
883 cygwin32* | mingw32*)
884 if test "$with_gcc" = yes; then
885 # hardcode_libdir_flag_spec is actually meaningless, as there is
886 # no search path for DLLs.
887 hardcode_libdir_flag_spec='-L$libdir'
888 allow_undefined_flag=unsupported
893 struct _reent *_impure_ptr;
894 extern struct _reent *__imp_reent_data;
896 __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
898 _impure_ptr = __imp_reent_data;
901 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.$objext$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.$objext$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.$objext$libobjs$deplibs;$rm libtool.$objext $soname-base $soname-exp'
902 old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $soname-def --output-lib $objdir/$libname.a;$rm $soname-def'
904 # When not using gcc, we currently assume that we are using
905 # Microsoft Visual C++.
906 # hardcode_libdir_flag_spec is actually meaningless, as there is
907 # no search path for DLLs.
908 hardcode_libdir_flag_spec=' '
909 allow_undefined_flag=unsupported
910 # Tell ltmain to make .lib files, not .a files.
912 # FIXME: Setting linknames here is a bad hack.
913 archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll;linknames='
914 # The linker will automatically build a .lib file if we build a DLL.
915 old_archive_from_new_cmds='true'
916 # FIXME: Should let the user specify the lib program.
917 old_archive_cmds='lib /OUT:$oldlib$oldobjs'
918 fix_srcfile_path='`cygpath -w $srcfile`'
922 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
923 # support. Future versions do this automatically, but an explicit c++rt0.o
924 # does not break anything, and helps significantly (at the cost of a little
927 archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o'
928 hardcode_libdir_flag_spec='-R$libdir'
931 hardcode_shlibpath_var=no
934 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
936 archive_cmds='$LD -Bshareable -o $lib$libobjs'
939 hardcode_shlibpath_var=no
942 # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
944 archive_cmds='$CC -shared -o $lib$libobjs'
945 hardcode_libdir_flag_spec='-R$libdir'
948 hardcode_shlibpath_var=no
952 archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib'
953 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
956 export_dynamic_flag_spec='${wl}-E'
960 archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs'
961 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
964 export_dynamic_flag_spec='${wl}-E'
968 if test "$with_gcc" = yes; then
969 archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs'
971 archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
973 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
977 # Tested with NetBSD 1.2 ld
978 archive_cmds='$LD -Bshareable -o $lib$libobjs'
979 hardcode_libdir_flag_spec='-R$libdir'
981 hardcode_shlibpath_var=no
985 archive_cmds='$LD -Bshareable -o $lib$libobjs'
986 hardcode_libdir_flag_spec='-R$libdir'
988 hardcode_shlibpath_var=no
992 hardcode_libdir_flag_spec='-L$libdir'
994 allow_undefined_flag=unsupported
995 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'
996 old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
1000 allow_undefined_flag=' -expect_unresolved \*'
1001 archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
1002 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1003 hardcode_libdir_separator=:
1007 archive_cmds='$LD -G -o $lib$libobjs'
1012 no_undefined_flag=' -z text'
1013 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs'
1014 hardcode_libdir_flag_spec='-R$libdir'
1015 hardcode_shlibpath_var=no
1017 # Solaris 2 before 2.5 hardcodes -L paths.
1020 hardcode_minus_L=yes
1026 archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
1027 hardcode_libdir_flag_spec='-L$libdir'
1029 hardcode_minus_L=yes
1030 hardcode_shlibpath_var=no
1034 archive_cmds='$LD -G -h $soname -o $lib$libobjs'
1035 hardcode_libdir_flag_spec='-L$libdir'
1038 hardcode_shlibpath_var=no
1047 echo "$ac_t$ld_shlibs" 1>&6
1049 if test -z "$NM"; then
1050 echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
1052 /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
1054 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1055 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
1056 test -z "$ac_dir" && ac_dir=.
1057 if test -f $ac_dir/nm; then
1058 # Check to see if the nm accepts a BSD-compat flag.
1059 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1060 # nm: unknown option "B" ignored
1061 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1063 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1072 test -z "$NM" && NM=nm
1075 echo "$ac_t$NM" 1>&6
1078 # Check for command to grab the raw symbol name followed by C symbol from nm.
1079 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1081 # These are sane defaults that work on at least a few old systems.
1082 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1084 # Character class describing NM global symbol codes.
1085 symcode='[BCDEGRSTU]'
1087 # Regexp to match symbols that can be accessed directly from C.
1088 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1090 # Transform the above into a raw symbol and a C symbol.
1093 # Define system-specific variables.
1098 cygwin32* | mingw32*)
1099 sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
1103 # Cannot use undefined symbols on IRIX because inlined functions mess us up.
1104 symcode='[BCDEGRST]'
1111 # If we're using GNU nm, then use its standard symbol codes.
1112 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1113 symcode='[ABCDGISTUW]'
1117 cygwin32* | mingw32*)
1118 # We do not want undefined symbols on cygwin32. The user must
1119 # arrange to define them via -l arguments.
1120 symcode='[ABCDGISTW]'
1124 # Write the raw and C identifiers.
1125 global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
1127 # Check to see that the pipe works correctly.
1130 cat > conftest.c <<EOF
1135 void nm_test_func(){}
1139 main(){nm_test_var='a';nm_test_func();return(0);}
1142 echo "$progname:1142: checking if global_symbol_pipe works" >&5
1143 if { (eval echo $progname:1143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
1144 # Now try to grab the symbols.
1146 if { echo "$progname:1146: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1148 # Try sorting and uniquifying the output.
1149 if sort "$nlist" | uniq > "$nlist"T; then
1150 mv -f "$nlist"T "$nlist"
1151 wcout=`wc "$nlist" 2>/dev/null`
1152 count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
1153 (test "$count" -ge 0) 2>/dev/null || count=-1
1159 # Make sure that we snagged all the symbols we need.
1160 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1161 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1162 cat <<EOF > conftest.c
1168 # Now generate the symbol file.
1169 sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
1171 cat <<EOF >> conftest.c
1172 #if defined (__STDC__) && __STDC__
1173 # define __ptr_t void *
1175 # define __ptr_t char *
1178 /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
1179 int dld_preloaded_symbol_count = $count;
1181 /* The mapping between symbol names and symbols. */
1186 dld_preloaded_symbols[] =
1189 sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c
1190 cat <<\EOF >> conftest.c
1198 # Now try linking the two files.
1199 mv conftest.$objext conftestm.$objext
1201 save_CFLAGS="$CFLAGS"
1202 LIBS="conftestm.$objext"
1203 CFLAGS="$CFLAGS$no_builtin_flag"
1204 if { (eval echo $progname:1204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1207 echo "$progname: failed program was:" >&5
1212 echo "cannot find nm_test_func in $nlist" >&5
1215 echo "cannot find nm_test_var in $nlist" >&5
1218 echo "cannot run $global_symbol_pipe" >&5
1221 echo "$progname: failed program was:" >&5
1226 # Do not use the global_symbol_pipe unless it works.
1227 echo "$ac_t$pipe_works" 1>&6
1228 test "$pipe_works" = yes || global_symbol_pipe=
1230 # Check hardcoding attributes.
1231 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1233 if test -n "$hardcode_libdir_flag_spec" || \
1234 test -n "$runpath_var"; then
1236 # We can hardcode non-existant directories.
1237 if test "$hardcode_direct" != no && \
1238 test "$hardcode_minus_L" != no && \
1239 test "$hardcode_shlibpath_var" != no; then
1241 # Linking always hardcodes the temporary library directory.
1242 hardcode_action=relink
1244 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1245 hardcode_action=immediate
1248 # We cannot hardcode anything, or else we can only hardcode existing
1250 hardcode_action=unsupported
1252 echo "$ac_t$hardcode_action" 1>&6
1256 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1257 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1258 # PORTME Some linkers may need a different reload flag.
1260 echo "$ac_t$reload_flag" 1>&6
1261 test -n "$reload_flag" && reload_flag=" $reload_flag"
1263 # PORTME Fill in your ld.so characteristics
1265 libname_spec='lib$name'
1273 dynamic_linker="$host_os ld.so"
1275 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1279 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1280 shlibpath_var=LIBPATH
1282 # AIX has no versioning support, so we append a major version to the name.
1283 soname_spec='${libname}${release}.so$major'
1287 library_names_spec='$libname.ixlibrary $libname.a'
1288 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1289 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'
1292 cygwin32* | mingw32*)
1293 version_type=windows
1294 if test "$with_gcc" = yes; then
1295 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
1297 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1299 dynamic_linker='Win32 ld.exe'
1303 freebsd2* | freebsd3*)
1305 library_names_spec='${libname}${release}.so$versuffix $libname.so'
1306 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1307 shlibpath_var=LD_LIBRARY_PATH
1312 library_names_spec='${libname}${release}.so$versuffix ${libname}.so'
1313 shlibpath_var=LD_LIBRARY_PATH
1316 hpux9* | hpux10* | hpux11*)
1317 # Give a soname corresponding to the major version so that dld.sl refuses to
1318 # link against other versions.
1319 dynamic_linker="$host_os dld.sl"
1321 shlibpath_var=SHLIB_PATH
1322 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1323 soname_spec='${libname}${release}.sl$major'
1324 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1325 postinstall_cmds='chmod 555 $lib'
1330 soname_spec='${libname}${release}.so'
1331 library_names_spec='${libname}${release}.so$versuffix $libname.so'
1332 shlibpath_var=LD_LIBRARY_PATH
1335 # No shared lib support for Linux oldld, aout, or coff.
1336 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1340 # This must be Linux ELF.
1343 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1344 soname_spec='${libname}${release}.so$major'
1345 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1346 shlibpath_var=LD_LIBRARY_PATH
1348 if test -f /lib/ld.so.1; then
1349 dynamic_linker='GNU ld.so'
1351 # Only the GNU ld.so supports shared libraries on MkLinux.
1353 powerpc*) dynamic_linker=no ;;
1354 *) dynamic_linker='Linux ld.so' ;;
1361 library_names_spec='${libname}${release}.so$versuffix'
1362 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1363 shlibpath_var=LD_LIBRARY_PATH
1367 libname_spec='$name'
1368 library_names_spec='$libname.dll $libname.a'
1369 dynamic_linker='OS/2 ld.exe'
1370 shlibpath_var=LIBPATH
1375 soname_spec='${libname}${release}.so'
1376 library_names_spec='${libname}${release}.so$versuffix $libname.so'
1377 shlibpath_var=LD_LIBRARY_PATH
1382 soname_spec='${libname}${release}.so$major'
1383 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1384 shlibpath_var=LD_LIBRARY_PATH
1389 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1390 soname_spec='${libname}${release}.so$major'
1391 shlibpath_var=LD_LIBRARY_PATH
1392 # ldd complains unless libraries are executable
1393 postinstall_cmds='chmod +x $lib'
1398 library_names_spec='${libname}${release}.so$versuffix'
1399 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1400 shlibpath_var=LD_LIBRARY_PATH
1405 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1406 soname_spec='${libname}${release}.so$major'
1407 shlibpath_var=LD_LIBRARY_PATH
1412 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1413 soname_spec='${libname}${release}.so$major'
1414 shlibpath_var=LD_LIBRARY_PATH
1421 echo "$ac_t$dynamic_linker"
1422 test "$dynamic_linker" = no && can_build_shared=no
1424 # Report the final consequences.
1425 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1427 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
1428 test "$can_build_shared" = "no" && enable_shared=no
1430 # On AIX, shared libraries and static libraries use the same namespace, and
1431 # are all built from PIC.
1434 test "$enable_shared" = yes && enable_static=no
1435 if test -n "$RANLIB"; then
1436 archive_cmds="$archive_cmds;\$RANLIB \$lib"
1437 postinstall_cmds='$RANLIB $lib'
1442 echo "$ac_t$enable_shared" 1>&6
1444 # Make sure either enable_shared or enable_static is yes.
1445 test "$enable_shared" = yes || enable_static=yes
1447 echo "checking whether to build static libraries... $enable_static" 1>&6
1449 echo $ac_n "checking for objdir... $ac_c" 1>&6
1450 rm -f .libs 2>/dev/null
1451 mkdir .libs 2>/dev/null
1452 if test -d .libs; then
1455 # MS-DOS does not allow filenames that begin with a dot.
1458 rmdir .libs 2>/dev/null
1459 echo "$ac_t$objdir" 1>&6
1461 # Copy echo and quote the copy, instead of the original, because it is
1465 # Now quote all the things that may contain metacharacters.
1466 for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
1467 old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM DLLTOOL AS reload_flag \
1468 reload_cmds wl pic_flag link_static_flag no_builtin_flag \
1469 export_dynamic_flag_spec whole_archive_flag_spec libname_spec \
1470 library_names_spec soname_spec RANLIB \
1471 old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
1472 old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
1473 allow_undefined_flag no_undefined_flag objext libext \
1474 finish_cmds finish_eval global_symbol_pipe fix_srcfile_path \
1475 hardcode_libdir_flag_spec hardcode_libdir_separator; do
1478 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
1479 old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
1480 postinstall_cmds | postuninstall_cmds | finish_cmds)
1481 # Double-quote double-evaled strings.
1482 eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
1485 eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`"
1490 trap "$rm \"$ofile\"; exit 1" 1 2 15
1491 echo "creating $ofile"
1493 cat <<EOF > "$ofile"
1496 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1497 # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
1498 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
1500 # Copyright (C) 1996-1998 Free Software Foundation, Inc.
1501 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1503 # This program is free software; you can redistribute it and/or modify
1504 # it under the terms of the GNU General Public License as published by
1505 # the Free Software Foundation; either version 2 of the License, or
1506 # (at your option) any later version.
1508 # This program is distributed in the hope that it will be useful, but
1509 # WITHOUT ANY WARRANTY; without even the implied warranty of
1510 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1511 # General Public License for more details.
1513 # You should have received a copy of the GNU General Public License
1514 # along with this program; if not, write to the Free Software
1515 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1517 # As a special exception to the GNU General Public License, if you
1518 # distribute this file as part of a program that contains a
1519 # configuration script generated by Autoconf, you may include it under
1520 # the same distribution terms that you use for the rest of that program.
1522 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
1523 Xsed="sed -e s/^X//"
1525 # The HP-UX ksh and POSIX shell print the target directory to stdout
1527 if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
1529 ### BEGIN LIBTOOL CONFIG
1530 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1532 # CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
1533 # LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
1534 # DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
1537 # Compiler and other test output produced by $progname, useful for
1538 # debugging $progname, is in ./config.log if it exists.
1540 # The version of $progname that generated this script.
1541 LTCONFIG_VERSION="$VERSION"
1543 # Shell to use when invoking shell scripts.
1546 # Whether or not to build shared libraries.
1547 build_libtool_libs=$enable_shared
1549 # Whether or not to build static libraries.
1550 build_old_libs=$enable_static
1553 host_alias="$host_alias"
1556 # An echo program that does not interpret backslashes.
1562 # The default C compiler.
1565 # The linker used to build libraries.
1568 # Whether we need hard or soft links.
1571 # A BSD-compatible nm program.
1574 # Used on cygwin32: DLL creation program.
1577 # Used on cygwin32: assembler.
1580 # The name of the directory that contains temporary libtool files.
1583 # How to create reloadable object files.
1584 reload_flag="$reload_flag"
1585 reload_cmds="$reload_cmds"
1587 # How to pass a linker flag through the compiler.
1590 # Object file suffix (normally "o").
1593 # Old archive suffix (normally "a").
1596 # Additional compiler flags for building library objects.
1597 pic_flag="$pic_flag"
1599 # Compiler flag to prevent dynamic linking.
1600 link_static_flag="$link_static_flag"
1602 # Compiler flag to turn off builtin functions.
1603 no_builtin_flag="$no_builtin_flag"
1605 # Compiler flag to allow reflexive dlopens.
1606 export_dynamic_flag_spec="$export_dynamic_flag_spec"
1608 # Compiler flag to generate shared objects directly from archives.
1609 whole_archive_flag_spec="$whole_archive_flag_spec"
1611 # Library versioning type.
1612 version_type=$version_type
1614 # Format of library name prefix.
1615 libname_spec="$libname_spec"
1617 # List of archive names. First name is the real one, the rest are links.
1618 # The last name is the one that the linker finds with -lNAME.
1619 library_names_spec="$library_names_spec"
1621 # The coded name of the library, if different from the real name.
1622 soname_spec="$soname_spec"
1624 # Commands used to build and install an old-style archive.
1626 old_archive_cmds="$old_archive_cmds"
1627 old_postinstall_cmds="$old_postinstall_cmds"
1628 old_postuninstall_cmds="$old_postuninstall_cmds"
1630 # Create an old-style archive from a shared archive.
1631 old_archive_from_new_cmds="$old_archive_from_new_cmds"
1633 # Commands used to build and install a shared archive.
1634 archive_cmds="$archive_cmds"
1635 postinstall_cmds="$postinstall_cmds"
1636 postuninstall_cmds="$postuninstall_cmds"
1638 # Flag that allows shared libraries with undefined symbols to be built.
1639 allow_undefined_flag="$allow_undefined_flag"
1641 # Flag that forces no undefined symbols.
1642 no_undefined_flag="$no_undefined_flag"
1644 # Commands used to finish a libtool library installation in a directory.
1645 finish_cmds="$finish_cmds"
1647 # Same as above, but a single script fragment to be evaled but not shown.
1648 finish_eval="$finish_eval"
1650 # Take the output of nm and produce a listing of raw symbols and C names.
1651 global_symbol_pipe="$global_symbol_pipe"
1653 # This is the shared library runtime path variable.
1654 runpath_var=$runpath_var
1656 # This is the shared library path variable.
1657 shlibpath_var=$shlibpath_var
1659 # How to hardcode a shared library path into an executable.
1660 hardcode_action=$hardcode_action
1662 # Flag to hardcode \$libdir into a binary during linking.
1663 # This must work even if \$libdir does not exist.
1664 hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
1666 # Whether we need a single -rpath flag with a separated argument.
1667 hardcode_libdir_separator="$hardcode_libdir_separator"
1669 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
1671 hardcode_direct=$hardcode_direct
1673 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
1675 hardcode_minus_L=$hardcode_minus_L
1677 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
1678 # the resulting binary.
1679 hardcode_shlibpath_var=$hardcode_shlibpath_var
1681 # Fix the shell variable \$srcfile for the compiler.
1682 fix_srcfile_path="$fix_srcfile_path"
1687 cat <<\EOF >> "$ofile"
1689 # AIX sometimes has problems with the GCC collect2 program. For some
1690 # reason, if we set the COLLECT_NAMES environment variable, the problems
1691 # vanish in a puff of smoke.
1692 if test "${COLLECT_NAMES+set}" != set; then
1694 export COLLECT_NAMES
1700 echo '### END LIBTOOL CONFIG' >> "$ofile"
1703 # Append the ltmain.sh script.
1704 cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)