lilypond-0.1.50
[lilypond.git] / ltconfig
blob3c1b8d42ff28a581a0611f4bb29ac38d7743f9e6
1 #! /bin/sh
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 # The HP-UX ksh and POSIX shell print the target directory to stdout
29 # if CDPATH is set.
30 if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
32 echo=echo
33 if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
34 else
35 # The Solaris and AIX default echo program unquotes backslashes.
36 # This makes it impossible to quote backslashes using
37 # echo "$something" | sed 's/\\/\\\\/g'
38 # So, we emulate echo with printf '%s\n'
39 echo="printf %s\\n"
40 if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
41 else
42 # Oops. We have no working printf. Try to find a not-so-buggy echo.
43 echo=echo
44 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
45 for dir in $PATH /usr/ucb; do
46 if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then
47 echo="$dir/echo"
48 break
50 done
51 IFS="$save_ifs"
55 # Sed substitution that helps us do robust quoting. It backslashifies
56 # metacharacters that are still active within double-quoted strings.
57 Xsed='sed -e s/^X//'
58 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
60 # Same as above, but do not quote variable references.
61 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
63 # The name of this program.
64 progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
66 # Constants:
67 PROGRAM=ltconfig
68 PACKAGE=libtool
69 VERSION=1.1.1
70 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
71 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
72 rm="rm -f"
74 help="Try \`$progname --help' for more information."
76 # Global variables:
77 can_build_shared=yes
78 enable_shared=yes
79 # All known linkers require a `.a' archive for static linking.
80 enable_static=yes
81 ltmain=
82 silent=
83 srcdir=
84 ac_config_guess=
85 ac_config_sub=
86 host=
87 nonopt=
88 verify_host=yes
89 with_gcc=no
90 with_gnu_ld=no
92 old_AR="$AR"
93 old_CC="$CC"
94 old_CFLAGS="$CFLAGS"
95 old_CPPFLAGS="$CPPFLAGS"
96 old_LD="$LD"
97 old_LN_S="$LN_S"
98 old_NM="$NM"
99 old_RANLIB="$RANLIB"
101 # Parse the command line options.
102 args=
103 prev=
104 for option
106 case "$option" in
107 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
108 *) optarg= ;;
109 esac
111 # If the previous option needs an argument, assign it.
112 if test -n "$prev"; then
113 eval "$prev=\$option"
114 prev=
115 continue
118 case "$option" in
119 --help) cat <<EOM
120 Usage: $progname [OPTION]... LTMAIN [HOST]
122 Generate a system-specific libtool script.
124 --disable-shared do not build shared libraries
125 --disable-static do not build static libraries
126 --help display this help and exit
127 --no-verify do not verify that HOST is a valid host type
128 --quiet same as \`--silent'
129 --silent do not print informational messages
130 --srcdir=DIR find \`config.guess' in DIR
131 --version output version information and exit
132 --with-gcc assume that the GNU C compiler will be used
133 --with-gnu-ld assume that the C compiler uses the GNU linker
135 LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
136 functionality.
138 HOST is the canonical host system name [default=guessed].
140 exit 0
143 --disable-shared) enable_shared=no ;;
145 --disable-static) enable_static=no ;;
147 --quiet | --silent) silent=yes ;;
149 --srcdir) prev=srcdir ;;
150 --srcdir=*) srcdir="$optarg" ;;
152 --no-verify) verify_host=no ;;
154 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
156 --with-gcc) with_gcc=yes ;;
157 --with-gnu-ld) with_gnu_ld=yes ;;
160 echo "$progname: unrecognized option \`$option'" 1>&2
161 echo "$help" 1>&2
162 exit 1
166 if test -z "$ltmain"; then
167 ltmain="$option"
168 elif test -z "$host"; then
169 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
170 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
171 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
172 # fi
173 host="$option"
174 else
175 echo "$progname: too many arguments" 1>&2
176 echo "$help" 1>&2
177 exit 1
178 fi ;;
179 esac
180 done
182 if test -z "$ltmain"; then
183 echo "$progname: you must specify a LTMAIN file" 1>&2
184 echo "$help" 1>&2
185 exit 1
188 if test -f "$ltmain"; then :
189 else
190 echo "$progname: \`$ltmain' does not exist" 1>&2
191 echo "$help" 1>&2
192 exit 1
195 # Quote any args containing shell metacharacters.
196 ltconfig_args=
197 for arg
199 case "$arg" in
200 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
201 ltconfig_args="$ltconfig_args '$arg'" ;;
202 *) ltconfig_args="$ltconfig_args $arg" ;;
203 esac
204 done
206 # A relevant subset of AC_INIT.
208 # File descriptor usage:
209 # 0 standard input
210 # 1 file creation
211 # 2 errors and warnings
212 # 3 some systems may open it to /dev/tty
213 # 4 used on the Kubota Titan
214 # 5 compiler messages saved in config.log
215 # 6 checking for... messages and results
216 if test "$silent" = yes; then
217 exec 6>/dev/null
218 else
219 exec 6>&1
221 exec 5>>./config.log
223 # NLS nuisances.
224 # Only set LANG and LC_ALL to C if already set.
225 # These must not be set unconditionally because not all systems understand
226 # e.g. LANG=C (notably SCO).
227 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
228 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
230 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
231 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
232 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
233 ac_n= ac_c='
234 ' ac_t=' '
235 else
236 ac_n=-n ac_c= ac_t=
238 else
239 ac_n= ac_c='\c' ac_t=
242 if test -z "$srcdir"; then
243 # Assume the source directory is the same one as the path to ltmain.sh.
244 srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
245 test "$srcdir" = "$ltmain" && srcdir=.
248 trap "$rm conftest*; exit 1" 1 2 15
249 if test "$verify_host" = yes; then
250 # Check for config.guess and config.sub.
251 ac_aux_dir=
252 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
253 if test -f $ac_dir/config.guess; then
254 ac_aux_dir=$ac_dir
255 break
257 done
258 if test -z "$ac_aux_dir"; then
259 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
260 echo "$help" 1>&2
261 exit 1
263 ac_config_guess=$ac_aux_dir/config.guess
264 ac_config_sub=$ac_aux_dir/config.sub
266 # Make sure we can run config.sub.
267 if $ac_config_sub sun4 >/dev/null 2>&1; then :
268 else
269 echo "$progname: cannot run $ac_config_sub" 1>&2
270 echo "$help" 1>&2
271 exit 1
274 echo $ac_n "checking host system type""... $ac_c" 1>&6
276 host_alias=$host
277 case "$host_alias" in
279 if host_alias=`$ac_config_guess`; then :
280 else
281 echo "$progname: cannot guess host type; you must specify one" 1>&2
282 echo "$help" 1>&2
283 exit 1
284 fi ;;
285 esac
286 host=`$ac_config_sub $host_alias`
287 echo "$ac_t$host" 1>&6
289 # Make sure the host verified.
290 test -z "$host" && exit 1
292 elif test -z "$host"; then
293 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
294 echo "$help" 1>&2
295 exit 1
296 else
297 host_alias=$host
300 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
301 case "$host_os" in
302 linux-gnu*) ;;
303 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
304 esac
306 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
307 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
308 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
310 case "$host_os" in
311 aix3*)
312 # AIX sometimes has problems with the GCC collect2 program. For some
313 # reason, if we set the COLLECT_NAMES environment variable, the problems
314 # vanish in a puff of smoke.
315 if test "${COLLECT_NAMES+set}" != set; then
316 COLLECT_NAMES=
317 export COLLECT_NAMES
320 esac
322 # Determine commands to create old-style static archives.
323 old_archive_cmds='$AR cru $oldlib$oldobjs'
324 old_postinstall_cmds='chmod 644 $oldlib'
325 old_postuninstall_cmds=
327 # Set a sane default for `AR'.
328 test -z "$AR" && AR=ar
330 # If RANLIB is not set, then run the test.
331 if test "${RANLIB+set}" != "set"; then
332 result=no
334 echo $ac_n "checking for ranlib... $ac_c" 1>&6
335 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
336 for dir in $PATH; do
337 test -z "$dir" && dir=.
338 if test -f $dir/ranlib; then
339 RANLIB="ranlib"
340 result="ranlib"
341 break
343 done
344 IFS="$save_ifs"
346 echo "$ac_t$result" 1>&6
349 if test -n "$RANLIB"; then
350 old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib"
351 old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds"
354 # Check to see if we are using GCC.
355 if test "$with_gcc" != yes || test -z "$CC"; then
356 # If CC is not set, then try to find GCC or a usable CC.
357 if test -z "$CC"; then
358 echo $ac_n "checking for gcc... $ac_c" 1>&6
359 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
360 for dir in $PATH; do
361 IFS="$save_ifs"
362 test -z "$dir" && dir=.
363 if test -f $dir/gcc; then
364 CC="gcc"
365 break
367 done
368 IFS="$save_ifs"
370 if test -n "$CC"; then
371 echo "$ac_t$CC" 1>&6
372 else
373 echo "$ac_t"no 1>&6
377 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
378 if test -z "$CC"; then
379 echo $ac_n "checking for cc... $ac_c" 1>&6
380 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
381 cc_rejected=no
382 for dir in $PATH; do
383 test -z "$dir" && dir=.
384 if test -f $dir/cc; then
385 if test "$dir/cc" = "/usr/ucb/cc"; then
386 cc_rejected=yes
387 continue
389 CC="cc"
390 break
392 done
393 IFS="$save_ifs"
394 if test $cc_rejected = yes; then
395 # We found a bogon in the path, so make sure we never use it.
396 set dummy $CC
397 shift
398 if test $# -gt 0; then
399 # We chose a different compiler from the bogus one.
400 # However, it has the same name, so the bogon will be chosen
401 # first if we set CC to just the name; use the full file name.
402 shift
403 set dummy "$dir/cc" "$@"
404 shift
405 CC="$@"
409 if test -n "$CC"; then
410 echo "$ac_t$CC" 1>&6
411 else
412 echo "$ac_t"no 1>&6
415 if test -z "$CC"; then
416 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
417 exit 1
421 # Now see if the compiler is really GCC.
422 with_gcc=no
423 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
424 echo "$progname:424: checking whether we are using GNU C" >&5
426 $rm conftest.c
427 cat > conftest.c <<EOF
428 #ifdef __GNUC__
429 yes;
430 #endif
432 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
433 with_gcc=yes
435 $rm conftest.c
436 echo "$ac_t$with_gcc" 1>&6
439 # Allow CC to be a program name with arguments.
440 set dummy $CC
441 compiler="$2"
443 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
444 pic_flag=
445 special_shlib_compile_flags=
447 link_static_flag=
448 no_builtin_flag=
450 if test "$with_gcc" = yes; then
451 wl='-Wl,'
452 link_static_flag='-static'
453 no_builtin_flag=' -fno-builtin'
455 case "$host_os" in
456 aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
457 # PIC is the default for these OSes.
459 os2*)
460 # We can build DLLs from non-PIC.
462 amigaos*)
463 # FIXME: we need at least 68020 code to build shared libraries, but
464 # adding the `-m68020' flag to GCC prevents building anything better,
465 # like `-m68040'.
466 pic_flag='-m68020 -resident32 -malways-restore-a4'
469 case $host_cpu in
470 m68*)
471 # This generates more efficient code.
472 pic_flag=-fpic
475 pic_flag='-fPIC'
477 esac
479 esac
480 else
481 # PORTME Check for PIC flags for the system compiler.
482 case "$host_os" in
483 aix3* | aix4*)
484 # All AIX code is PIC.
485 link_static_flag='-bnso -bI:/lib/syscalls.exp'
488 hpux9* | hpux10*)
489 # Is there a better link_static_flag that works with the bundled CC?
490 wl='-Wl,'
491 link_static_flag="${wl}-a ${wl}archive"
492 pic_flag='+Z'
495 irix5* | irix6*)
496 wl='-Wl,'
497 link_static_flag='-non_shared'
498 # PIC (with -KPIC) is the default.
501 os2*)
502 # We can build DLLs from non-PIC.
505 osf3* | osf4*)
506 # All OSF/1 code is PIC.
507 wl='-Wl,'
508 link_static_flag='-non_shared'
511 sco3.2v5*)
512 pic_flag='-Kpic'
513 link_static_flag='-dn'
514 special_shlib_compile_flags='-belf'
517 solaris2*)
518 pic_flag='-KPIC'
519 link_static_flag='-Bstatic'
520 wl='-Wl,'
523 sunos4*)
524 pic_flag='-PIC'
525 link_static_flag='-Bstatic'
526 wl='-Qoption ld '
529 sysv4.2uw2*)
530 pic_flag='-KPIC'
531 link_static_flag='-Bstatic'
532 wl='-Wl,'
535 uts4*)
536 pic_flag='-pic'
537 link_static_flag='-Bstatic'
541 can_build_shared=no
543 esac
546 if test -n "$pic_flag"; then
547 echo "$ac_t$pic_flag" 1>&6
549 # Check to make sure the pic_flag actually works.
550 echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
551 $rm conftest*
552 echo > conftest.c
553 save_CFLAGS="$CFLAGS"
554 CFLAGS="$CFLAGS $pic_flag -DPIC"
555 echo "$progname:555: checking if $compiler PIC flag $pic_flag works" >&5
556 if { (eval echo $progname:556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
557 # Append any warnings to the config.log.
558 cat conftest.err 1>&5
560 # On HP-UX, both CC and GCC only warn that PIC is supported... then they
561 # create non-PIC objects. So, if there were any warnings, we assume that
562 # PIC is not supported.
563 if test -s conftest.err; then
564 echo "$ac_t"no 1>&6
565 can_build_shared=no
566 pic_flag=
567 else
568 echo "$ac_t"yes 1>&6
569 pic_flag=" $pic_flag"
571 else
572 # Append any errors to the config.log.
573 cat conftest.err 1>&5
574 can_build_shared=no
575 pic_flag=
576 echo "$ac_t"no 1>&6
578 CFLAGS="$save_CFLAGS"
579 $rm conftest*
580 else
581 echo "$ac_t"none 1>&6
584 # Check for any special shared library compilation flags.
585 if test -n "$special_shlib_compile_flags"; then
586 echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
587 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
588 else
589 echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
590 can_build_shared=no
594 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
595 $rm conftest*
596 echo 'main(){return(0);}' > conftest.c
597 save_LDFLAGS="$LDFLAGS"
598 LDFLAGS="$LDFLAGS $link_static_flag"
599 echo "$progname:599: checking if $compiler static flag $link_static_flag works" >&5
600 if { (eval echo $progname:600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
601 echo "$ac_t$link_static_flag" 1>&6
602 else
603 echo "$ac_t"none 1>&6
604 link_static_flag=
606 LDFLAGS="$save_LDFLAGS"
607 $rm conftest*
609 if test -z "$LN_S"; then
610 # Check to see if we can use ln -s, or we need hard links.
611 echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
612 $rm conftestdata
613 if ln -s X conftestdata 2>/dev/null; then
614 $rm conftestdata
615 LN_S="ln -s"
616 else
617 LN_S=ln
619 if test "$LN_S" = "ln -s"; then
620 echo "$ac_t"yes 1>&6
621 else
622 echo "$ac_t"no 1>&6
626 # Make sure LD is an absolute path.
627 if test -z "$LD"; then
628 ac_prog=ld
629 if test "$with_gcc" = yes; then
630 # Check if gcc -print-prog-name=ld gives a path.
631 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
632 echo "$progname:632: checking for ld used by GCC" >&5
633 ac_prog=`($CC -print-prog-name=ld) 2>&5`
634 case "$ac_prog" in
635 # Accept absolute paths.
636 /* | [A-Za-z]:\\*)
637 test -z "$LD" && LD="$ac_prog"
640 # If it fails, then pretend we are not using GCC.
641 ac_prog=ld
644 # If it is relative, then search for the first ld in PATH.
645 with_gnu_ld=unknown
647 esac
648 elif test "$with_gnu_ld" = yes; then
649 echo $ac_n "checking for GNU ld... $ac_c" 1>&6
650 echo "$progname:650: checking for GNU ld" >&5
651 else
652 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
653 echo "$progname:653: checking for non-GNU ld" >&5
656 if test -z "$LD"; then
657 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
658 for ac_dir in $PATH; do
659 test -z "$ac_dir" && ac_dir=.
660 if test -f "$ac_dir/$ac_prog"; then
661 LD="$ac_dir/$ac_prog"
662 # Check to see if the program is GNU ld. I'd rather use --version,
663 # but apparently some GNU ld's only accept -v.
664 # Break only if it was the GNU/non-GNU ld that we prefer.
665 if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
666 test "$with_gnu_ld" != no && break
667 else
668 test "$with_gnu_ld" != yes && break
671 done
672 IFS="$ac_save_ifs"
675 if test -n "$LD"; then
676 echo "$ac_t$LD" 1>&6
677 else
678 echo "$ac_t"no 1>&6
681 if test -z "$LD"; then
682 echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
683 exit 1
687 # Check to see if it really is or is not GNU ld.
688 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
689 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
690 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
691 with_gnu_ld=yes
692 else
693 with_gnu_ld=no
695 echo "$ac_t$with_gnu_ld" 1>&6
697 # See if the linker supports building shared libraries.
698 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
700 allow_undefined_flag=
701 no_undefined_flag=
702 archive_cmds=
703 old_archive_from_new_cmds=
704 export_dynamic_flag_spec=
705 hardcode_libdir_flag_spec=
706 hardcode_libdir_separator=
707 hardcode_direct=no
708 hardcode_minus_L=no
709 hardcode_shlibpath_var=unsupported
710 runpath_var=
712 case "$host_os" in
713 amigaos* | sunos4*)
714 # On these operating systems, we should treat GNU ld like the system ld.
715 gnu_ld_acts_native=yes
718 gnu_ld_acts_native=no
720 esac
722 ld_shlibs=yes
723 if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
725 # See if GNU ld supports shared libraries.
726 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
727 archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
728 runpath_var=LD_RUN_PATH
729 ld_shlibs=yes
730 else
731 ld_shlibs=no
734 if test "$ld_shlibs" = yes; then
735 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
736 export_dynamic_flag_spec='${wl}--export-dynamic'
738 else
739 # PORTME fill in a description of your system's linker (not GNU ld)
740 case "$host_os" in
741 aix3*)
742 allow_undefined_flag=unsupported
743 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'
744 # Note: this linker hardcodes the directories in LIBPATH if there
745 # are no directories specified by -L.
746 hardcode_minus_L=yes
747 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
748 # Neither direct hardcoding nor static linking is supported with a
749 # broken collect2.
750 hardcode_direct=unsupported
754 aix4*)
755 allow_undefined_flag=unsupported
756 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'
757 hardcode_direct=yes
758 hardcode_minus_L=yes
761 amigaos*)
762 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)'
763 hardcode_libdir_flag_spec='-L$libdir'
764 hardcode_minus_L=yes
767 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
768 # support. Future versions do this automatically, but an explicit c++rt0.o
769 # does not break anything, and helps significantly (at the cost of a little
770 # extra space).
771 freebsd2.2*)
772 archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o'
773 hardcode_libdir_flag_spec='-R$libdir'
774 hardcode_direct=yes
775 hardcode_minus_L=yes
776 hardcode_shlibpath_var=no
779 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
780 freebsd2*)
781 archive_cmds='$LD -Bshareable -o $lib$libobjs'
782 hardcode_direct=yes
783 hardcode_minus_L=yes
784 hardcode_shlibpath_var=no
787 # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
788 freebsd3*)
789 archive_cmds='$CC -shared -o $lib$libobjs'
790 hardcode_libdir_flag_spec='-R$libdir'
791 hardcode_direct=yes
792 hardcode_minus_L=yes
793 hardcode_shlibpath_var=no
796 hpux9*)
797 archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib'
798 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
799 hardcode_direct=yes
800 hardcode_minus_L=yes
801 export_dynamic_flag_spec='${wl}-E'
804 hpux10*)
805 archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs'
806 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
807 hardcode_direct=yes
808 hardcode_minus_L=yes
809 export_dynamic_flag_spec='${wl}-E'
812 irix5* | irix6*)
813 archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
814 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
817 netbsd*)
818 # Tested with NetBSD 1.2 ld
819 archive_cmds='$LD -Bshareable -o $lib$libobjs'
820 hardcode_libdir_flag_spec='-R$libdir'
821 hardcode_direct=yes
822 hardcode_shlibpath_var=no
825 openbsd*)
826 archive_cmds='$LD -Bshareable -o $lib$libobjs'
827 hardcode_libdir_flag_spec='-R$libdir'
828 hardcode_direct=yes
829 hardcode_shlibpath_var=no
832 os2*)
833 hardcode_libdir_flag_spec='-L$libdir'
834 hardcode_minus_L=yes
835 allow_undefined_flag=unsupported
836 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'
837 old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
840 osf3* | osf4*)
841 allow_undefined_flag=' -expect_unresolved \*'
842 archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
843 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
844 hardcode_libdir_separator=:
847 sco3.2v5*)
848 archive_cmds='$LD -G -o $lib$libobjs'
849 hardcode_direct=yes
852 solaris2*)
853 no_undefined_flag=' -z text'
854 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs'
855 hardcode_libdir_flag_spec='-R$libdir'
856 hardcode_shlibpath_var=no
858 # Solaris 2 before 2.5 hardcodes -L paths.
859 case "$host_os" in
860 solaris2.[0-4]*)
861 hardcode_minus_L=yes
863 esac
866 sunos4*)
867 if test "$with_gcc" = yes; then
868 archive_cmds='$CC -shared -o $lib$libobjs'
869 else
870 archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
873 if test "$with_gnu_ld" = yes; then
874 export_dynamic_flag_spec='${wl}-export-dynamic'
876 hardcode_libdir_flag_spec='-L$libdir'
877 hardcode_direct=yes
878 hardcode_minus_L=yes
879 hardcode_shlibpath_var=no
882 uts4*)
883 archive_cmds='$LD -G -h $soname -o $lib$libobjs'
884 hardcode_libdir_flag_spec='-L$libdir'
885 hardcode_direct=no
886 hardcode_minus_L=no
887 hardcode_shlibpath_var=no
891 ld_shlibs=no
892 can_build_shared=no
894 esac
896 echo "$ac_t$ld_shlibs" 1>&6
898 if test -z "$NM"; then
899 echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
900 case "$NM" in
901 /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path.
903 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
904 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
905 test -z "$ac_dir" && ac_dir=.
906 if test -f $ac_dir/nm; then
907 # Check to see if the nm accepts a BSD-compat flag.
908 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
909 # nm: unknown option "B" ignored
910 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
911 NM="$ac_dir/nm -B"
912 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
913 NM="$ac_dir/nm -p"
914 else
915 NM="$ac_dir/nm"
917 break
919 done
920 IFS="$ac_save_ifs"
921 test -z "$NM" && NM=nm
923 esac
924 echo "$ac_t$NM" 1>&6
927 # Check for command to grab the raw symbol name followed by C symbol from nm.
928 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
930 # These are sane defaults that work on at least a few old systems.
931 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
933 # Character class describing NM global symbol codes.
934 symcode='[BCDEGRSTU]'
936 # Regexp to match symbols that can be accessed directly from C.
937 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
939 # Transform the above into a raw symbol and a C symbol.
940 symxfrm='\1 \1'
942 # Define system-specific variables.
943 case "$host_os" in
944 aix*)
945 symcode='[BCDTU]'
947 irix*)
948 # Cannot use undefined symbols on IRIX because inlined functions mess us up.
949 symcode='[BCDEGRST]'
951 solaris2*)
952 symcode='[BDTU]'
954 esac
956 # If we're using GNU nm, then use its standard symbol codes.
957 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
958 symcode='[ABCDGISTUW]'
961 # Write the raw and C identifiers.
962 global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
964 # Check to see that the pipe works correctly.
965 pipe_works=no
966 $rm conftest*
967 cat > conftest.c <<EOF
968 #ifdef __cplusplus
969 extern "C" {
970 #endif
971 char nm_test_var;
972 void nm_test_func(){}
973 #ifdef __cplusplus
975 #endif
976 main(){nm_test_var='a';nm_test_func();return(0);}
979 echo "$progname:979: checking if global_symbol_pipe works" >&5
980 if { (eval echo $progname:980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
981 # Now try to grab the symbols.
982 nlist=conftest.nm
983 if { echo "$progname:983: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
985 # Try sorting and uniquifying the output.
986 if sort "$nlist" | uniq > "$nlist"T; then
987 mv -f "$nlist"T "$nlist"
988 wcout=`wc "$nlist" 2>/dev/null`
989 count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
990 (test "$count" -ge 0) 2>/dev/null || count=-1
991 else
992 rm -f "$nlist"T
993 count=-1
996 # Make sure that we snagged all the symbols we need.
997 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
998 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
999 cat <<EOF > conftest.c
1000 #ifdef __cplusplus
1001 extern "C" {
1002 #endif
1005 # Now generate the symbol file.
1006 sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
1008 cat <<EOF >> conftest.c
1009 #if defined (__STDC__) && __STDC__
1010 # define __ptr_t void *
1011 #else
1012 # define __ptr_t char *
1013 #endif
1015 /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
1016 int dld_preloaded_symbol_count = $count;
1018 /* The mapping between symbol names and symbols. */
1019 struct {
1020 char *name;
1021 __ptr_t address;
1023 dld_preloaded_symbols[] =
1026 sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c
1027 cat <<\EOF >> conftest.c
1028 {0, (__ptr_t) 0}
1031 #ifdef __cplusplus
1033 #endif
1035 # Now try linking the two files.
1036 mv conftest.o conftestm.o
1037 save_LIBS="$LIBS"
1038 save_CFLAGS="$CFLAGS"
1039 LIBS='conftestm.o'
1040 CFLAGS="$CFLAGS$no_builtin_flag"
1041 if { (eval echo $progname:1041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1042 pipe_works=yes
1043 else
1044 echo "$progname: failed program was:" >&5
1045 cat conftest.c >&5
1047 LIBS="$save_LIBS"
1048 else
1049 echo "cannot find nm_test_func in $nlist" >&5
1051 else
1052 echo "cannot find nm_test_var in $nlist" >&5
1054 else
1055 echo "cannot run $global_symbol_pipe" >&5
1057 else
1058 echo "$progname: failed program was:" >&5
1059 cat conftest.c >&5
1061 $rm conftest*
1063 # Do not use the global_symbol_pipe unless it works.
1064 echo "$ac_t$pipe_works" 1>&6
1065 test "$pipe_works" = yes || global_symbol_pipe=
1067 # Check hardcoding attributes.
1068 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1069 hardcode_action=
1070 if test -n "$hardcode_libdir_flag_spec" || \
1071 test -n "$runpath_var"; then
1073 # We can hardcode non-existant directories.
1074 if test "$hardcode_direct" != no && \
1075 test "$hardcode_minus_L" != no && \
1076 test "$hardcode_shlibpath_var" != no; then
1078 # Linking always hardcodes the temporary library directory.
1079 hardcode_action=relink
1080 else
1081 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1082 hardcode_action=immediate
1084 elif test "$hardcode_direct" != yes && \
1085 test "$hardcode_minus_L" != yes && \
1086 test "$hardcode_shlibpath_var" != yes; then
1087 # We cannot hardcode anything.
1088 hardcode_action=unsupported
1089 else
1090 # We can only hardcode existing directories.
1091 hardcode_action=relink
1093 echo "$ac_t$hardcode_action" 1>&6
1094 test "$hardcode_action" = unsupported && can_build_shared=no
1097 reload_flag=
1098 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1099 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1100 # PORTME Some linker may need a different reload flag.
1101 reload_flag='-r'
1102 echo "$ac_t$reload_flag"
1103 test -n "$reload_flag" && reload_flag=" $reload_flag"
1105 # PORTME Fill in your ld.so characteristics
1106 library_names_spec=
1107 libname_spec='lib$name'
1108 soname_spec=
1109 postinstall_cmds=
1110 postuninstall_cmds=
1111 finish_cmds=
1112 finish_eval=
1113 shlibpath_var=
1114 version_type=none
1115 dynamic_linker="$host_os ld.so"
1117 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1118 case "$host_os" in
1119 aix3* | aix4*)
1120 version_type=linux
1121 library_names_spec='${libname}${release}.so.$versuffix $libname.a'
1122 shlibpath_var=LIBPATH
1124 # AIX has no versioning support, so we append a major version to the name.
1125 soname_spec='${libname}${release}.so.$major'
1128 amigaos*)
1129 library_names_spec='$libname.ixlibrary $libname.a'
1130 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1131 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'
1134 freebsd2* | freebsd3*)
1135 version_type=sunos
1136 library_names_spec='${libname}${release}.so.$versuffix $libname.so'
1137 finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
1138 shlibpath_var=LD_LIBRARY_PATH
1141 gnu*)
1142 version_type=sunos
1143 library_names_spec='${libname}${release}.so.$versuffix'
1144 shlibpath_var=LD_LIBRARY_PATH
1147 hpux9* | hpux10*)
1148 # Give a soname corresponding to the major version so that dld.sl refuses to
1149 # link against other versions.
1150 dynamic_linker="$host_os dld.sl"
1151 version_type=sunos
1152 shlibpath_var=SHLIB_PATH
1153 library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl'
1154 soname_spec='${libname}${release}.sl.$major'
1155 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1156 postinstall_cmds='chmod 555 $lib'
1159 irix5* | irix6*)
1160 version_type=osf
1161 soname_spec='${libname}${release}.so'
1162 library_names_spec='${libname}${release}.so.$versuffix $libname.so'
1163 shlibpath_var=LD_LIBRARY_PATH
1166 # No shared lib support for Linux oldld, aout, or coff.
1167 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1168 dynamic_linker=no
1171 # This must be Linux ELF.
1172 linux-gnu*)
1173 version_type=linux
1174 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
1175 soname_spec='${libname}${release}.so.$major'
1176 finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
1177 shlibpath_var=LD_LIBRARY_PATH
1179 if test -f /lib/ld.so.1; then
1180 dynamic_linker='GNU ld.so'
1181 else
1182 # Only the GNU ld.so supports shared libraries on MkLinux.
1183 case "$host_cpu" in
1184 powerpc*) dynamic_linker=no ;;
1185 *) dynamic_linker='Linux ld.so' ;;
1186 esac
1190 netbsd* | openbsd*)
1191 version_type=sunos
1192 library_names_spec='${libname}${release}.so.$versuffix'
1193 finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
1194 shlibpath_var=LD_LIBRARY_PATH
1197 os2*)
1198 libname_spec='$name'
1199 library_names_spec='$libname.dll $libname.a'
1200 dynamic_linker='OS/2 ld.exe'
1201 shlibpath_var=LIBPATH
1204 osf3* | osf4*)
1205 version_type=osf
1206 soname_spec='${libname}${release}.so'
1207 library_names_spec='${libname}${release}.so.$versuffix $libname.so'
1208 shlibpath_var=LD_LIBRARY_PATH
1211 sco3.2v5*)
1212 version_type=osf
1213 soname_spec='${libname}${release}.so.$major'
1214 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
1215 shlibpath_var=LD_LIBRARY_PATH
1218 solaris2*)
1219 version_type=linux
1220 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
1221 soname_spec='${libname}${release}.so.$major'
1222 shlibpath_var=LD_LIBRARY_PATH
1225 sunos4*)
1226 version_type=sunos
1227 library_names_spec='${libname}${release}.so.$versuffix'
1228 finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir'
1229 shlibpath_var=LD_LIBRARY_PATH
1232 sysv4.2uw2*)
1233 version_type=linux
1234 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
1235 soname_spec='${libname}${release}.so.$major'
1236 shlibpath_var=LD_LIBRARY_PATH
1239 uts4*)
1240 version_type=linux
1241 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
1242 soname_spec='${libname}${release}.so.$major'
1243 shlibpath_var=LD_LIBRARY_PATH
1247 dynamic_linker=no
1249 esac
1250 echo "$ac_t$dynamic_linker"
1251 test "$dynamic_linker" = no && can_build_shared=no
1253 # Report the final consequences.
1254 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1256 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
1257 test "$can_build_shared" = "no" && enable_shared=no
1259 # On AIX, shared libraries and static libraries use the same namespace, and
1260 # are all built from PIC.
1261 case "$host_os" in
1262 aix*)
1263 test "$enable_shared" = yes && enable_static=no
1264 if test -n "$RANLIB"; then
1265 archive_cmds="$archive_cmds;\$RANLIB \$lib"
1266 postinstall_cmds='$RANLIB $lib'
1269 esac
1271 echo "$ac_t$enable_shared" 1>&6
1273 # Make sure either enable_shared or enable_static is yes.
1274 test "$enable_shared" = yes || enable_static=yes
1276 echo "checking whether to build static libraries... $enable_static" 1>&6
1278 echo $ac_n "checking for objdir... $ac_c" 1>&6
1279 rm -f .libs 2>/dev/null
1280 mkdir .libs 2>/dev/null
1281 if test -d .libs; then
1282 objdir=.libs
1283 else
1284 # MS-DOS does not allow filenames that begin with a dot.
1285 objdir=_libs
1287 rmdir .libs 2>/dev/null
1288 echo "$ac_t$objdir" 1>&6
1290 # Copy echo and quote the copy, instead of the original, because it is
1291 # used later.
1292 ltecho="$echo"
1294 # Now quote all the things that may contain metacharacters.
1295 for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
1296 old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
1297 link_static_flag no_builtin_flag export_dynamic_flag_spec \
1298 libname_spec library_names_spec soname_spec RANLIB \
1299 old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
1300 old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
1301 allow_undefined_flag no_undefined_flag \
1302 finish_cmds finish_eval global_symbol_pipe \
1303 hardcode_libdir_flag_spec hardcode_libdir_separator; do
1305 case "$var" in
1306 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
1307 old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
1308 postinstall_cmds | postuninstall_cmds | finish_cmds)
1309 # Double-quote double-evaled strings.
1310 eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
1313 eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`"
1315 esac
1316 done
1318 ofile=libtool
1319 trap "$rm $ofile; exit 1" 1 2 15
1320 echo creating $ofile
1321 $rm $ofile
1322 cat <<EOF > $ofile
1323 #! /bin/sh
1325 # libtool - Provide generalized library-building support services.
1326 # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
1327 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
1329 # Copyright (C) 1996-1998 Free Software Foundation, Inc.
1330 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1332 # This program is free software; you can redistribute it and/or modify
1333 # it under the terms of the GNU General Public License as published by
1334 # the Free Software Foundation; either version 2 of the License, or
1335 # (at your option) any later version.
1337 # This program is distributed in the hope that it will be useful, but
1338 # WITHOUT ANY WARRANTY; without even the implied warranty of
1339 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1340 # General Public License for more details.
1342 # You should have received a copy of the GNU General Public License
1343 # along with this program; if not, write to the Free Software
1344 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1346 # As a special exception to the GNU General Public License, if you
1347 # distribute this file as part of a program that contains a
1348 # configuration script generated by Autoconf, you may include it under
1349 # the same distribution terms that you use for the rest of that program.
1351 # This program was configured as follows,
1352 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1354 # CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
1355 # LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
1356 # $0$ltconfig_args
1358 # Compiler and other test output produced by $progname, useful for
1359 # debugging $progname, is in ./config.log if it exists.
1361 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
1362 Xsed="sed -e s/^X//"
1364 # The HP-UX ksh and POSIX shell print the target directory to stdout
1365 # if CDPATH is set.
1366 if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
1368 # An echo program that does not interpret backslashes.
1369 echo="$ltecho"
1371 # The version of $progname that generated this script.
1372 LTCONFIG_VERSION="$VERSION"
1374 # Shell to use when invoking shell scripts.
1375 SHELL=${CONFIG_SHELL-/bin/sh}
1377 # Whether or not to build libtool libraries.
1378 build_libtool_libs=$enable_shared
1380 # Whether or not to build old-style libraries.
1381 build_old_libs=$enable_static
1383 # The host system.
1384 host_alias="$host_alias"
1385 host="$host"
1387 # The archiver.
1388 AR="$AR"
1390 # The default C compiler.
1391 CC="$CC"
1393 # The linker used to build libraries.
1394 LD="$LD"
1396 # Whether we need hard or soft links.
1397 LN_S="$LN_S"
1399 # A BSD-compatible nm program.
1400 NM="$NM"
1402 # The name of the directory that contains temporary libtool files.
1403 objdir="$objdir"
1405 # How to create reloadable object files.
1406 reload_flag="$reload_flag"
1407 reload_cmds="$reload_cmds"
1409 # How to pass a linker flag through the compiler.
1410 wl="$wl"
1412 # Additional compiler flags for building library objects.
1413 pic_flag="$pic_flag"
1415 # Compiler flag to prevent dynamic linking.
1416 link_static_flag="$link_static_flag"
1418 # Compiler flag to turn off builtin functions.
1419 no_builtin_flag="$no_builtin_flag"
1421 # Compiler flag to allow reflexive dlopens.
1422 export_dynamic_flag_spec="$export_dynamic_flag_spec"
1424 # Library versioning type.
1425 version_type=$version_type
1427 # Format of library name prefix.
1428 libname_spec="$libname_spec"
1430 # List of archive names. First name is the real one, the rest are links.
1431 # The last name is the one that the linker finds with -lNAME.
1432 library_names_spec="$library_names_spec"
1434 # The coded name of the library, if different from the real name.
1435 soname_spec="$soname_spec"
1437 # Commands used to build and install an old-style archive.
1438 RANLIB="$RANLIB"
1439 old_archive_cmds="$old_archive_cmds"
1440 old_postinstall_cmds="$old_postinstall_cmds"
1441 old_postuninstall_cmds="$old_postuninstall_cmds"
1443 # Create an old-style archive from a shared archive.
1444 old_archive_from_new_cmds="$old_archive_from_new_cmds"
1446 # Commands used to build and install a shared archive.
1447 archive_cmds="$archive_cmds"
1448 postinstall_cmds="$postinstall_cmds"
1449 postuninstall_cmds="$postuninstall_cmds"
1451 # Flag that allows shared libraries with undefined symbols to be built.
1452 allow_undefined_flag="$allow_undefined_flag"
1454 # Flag that forces no undefined symbols.
1455 no_undefined_flag="$no_undefined_flag"
1457 # Commands used to finish a libtool library installation in a directory.
1458 finish_cmds="$finish_cmds"
1460 # Same as above, but a single script fragment to be evaled but not shown.
1461 finish_eval="$finish_eval"
1463 # Take the output of nm and produce a listing of raw symbols and C names.
1464 global_symbol_pipe="$global_symbol_pipe"
1466 # This is the shared library runtime path variable.
1467 runpath_var=$runpath_var
1469 # This is the shared library path variable.
1470 shlibpath_var=$shlibpath_var
1472 # How to hardcode a shared library path into an executable.
1473 hardcode_action=$hardcode_action
1475 # Flag to hardcode \$libdir into a binary during linking.
1476 # This must work even if \$libdir does not exist.
1477 hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
1479 # Whether we need a single -rpath flag with a separated argument.
1480 hardcode_libdir_separator="$hardcode_libdir_separator"
1482 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
1483 # resulting binary.
1484 hardcode_direct=$hardcode_direct
1486 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
1487 # resulting binary.
1488 hardcode_minus_L=$hardcode_minus_L
1490 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
1491 # the resulting binary.
1492 hardcode_shlibpath_var=$hardcode_shlibpath_var
1496 case "$host_os" in
1497 aix3*)
1498 cat <<\EOF >> $ofile
1499 # AIX sometimes has problems with the GCC collect2 program. For some
1500 # reason, if we set the COLLECT_NAMES environment variable, the problems
1501 # vanish in a puff of smoke.
1502 if test "${COLLECT_NAMES+set}" != set; then
1503 COLLECT_NAMES=
1504 export COLLECT_NAMES
1509 esac
1511 # Append the ltmain.sh script.
1512 cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1)
1514 chmod +x $ofile
1515 exit 0
1517 # Local Variables:
1518 # mode:shell-script
1519 # sh-indentation:2
1520 # End: