add missing .El
[heimdal.git] / ltconfig
blob62ac4790feecf09965d8e038238738b2845acd28
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 # Check that we are running under the correct shell.
29 SHELL=${CONFIG_SHELL-/bin/sh}
30 echo=echo
31 if test "X$1" = X--no-reexec; then
32 # Discard the --no-reexec flag, and continue.
33 shift
34 elif test "X$1" = X--fallback-echo; then
35 # used as fallback echo
36 shift
37 cat <<EOF
39 EOF
40 exit 0
41 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
42 # Yippee, $echo works!
44 else
45 # Restart under the correct shell.
46 exec "$SHELL" "$0" --no-reexec ${1+"$@"}
49 # The HP-UX ksh and POSIX shell print the target directory to stdout
50 # if CDPATH is set.
51 if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
53 if test "X${echo_test_string+set}" != "Xset"; then
54 # find a string as large as possible, as long as the shell can cope with it
55 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
56 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
57 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
58 echo_test_string="`eval $cmd`" &&
59 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
60 break
62 done
65 if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
66 test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
67 # The Solaris, AIX, and Digital Unix default echo programs unquote
68 # backslashes. This makes it impossible to quote backslashes using
69 # echo "$something" | sed 's/\\/\\\\/g'
71 # So, first we look for a working echo in the user's PATH.
73 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
74 for dir in $PATH /usr/ucb; do
75 if test -f $dir/echo &&
76 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
77 test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
78 echo="$dir/echo"
79 break
81 done
82 IFS="$save_ifs"
84 if test "X$echo" = Xecho; then
85 # We didn't find a better echo, so look for alternatives.
86 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
87 test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
88 # This shell has a builtin print -r that does the trick.
89 echo='print -r'
90 elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
91 # If we have ksh, try running ltconfig again with it.
92 ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
93 export ORIGINAL_CONFIG_SHELL
94 CONFIG_SHELL=/bin/ksh
95 export CONFIG_SHELL
96 exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
97 else
98 # Try using printf.
99 echo='printf %s\n'
100 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
101 test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
102 # Cool, printf works
104 elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
105 test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
106 CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
107 export CONFIG_SHELL
108 SHELL="$CONFIG_SHELL"
109 export SHELL
110 echo="$CONFIG_SHELL $0 --fallback-echo"
111 elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
112 test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
113 echo="$CONFIG_SHELL $0 --fallback-echo"
114 else
115 # maybe with a smaller string...
116 prev=:
118 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
119 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
120 break
122 prev="$cmd"
123 done
125 if test "$prev" != 'sed 50q "$0"'; then
126 echo_test_string=`eval $prev`
127 export echo_test_string
128 exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
129 else
130 # Oops. We lost completely, so just stick with echo.
131 echo=echo
138 # Sed substitution that helps us do robust quoting. It backslashifies
139 # metacharacters that are still active within double-quoted strings.
140 Xsed='sed -e s/^X//'
141 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
143 # Same as above, but do not quote variable references.
144 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
146 # The name of this program.
147 progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
149 # Constants:
150 PROGRAM=ltconfig
151 PACKAGE=libtool
152 VERSION=1.2d
153 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
154 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
155 rm="rm -f"
157 help="Try \`$progname --help' for more information."
159 # Global variables:
160 default_ofile=libtool
161 can_build_shared=yes
162 enable_shared=yes
163 # All known linkers require a `.a' archive for static linking.
164 enable_static=yes
165 ltmain=
166 silent=
167 srcdir=
168 ac_config_guess=
169 ac_config_sub=
170 host=
171 nonopt=
172 ofile="$default_ofile"
173 verify_host=yes
174 with_gcc=no
175 with_gnu_ld=no
176 need_locks=yes
177 objext=o
178 libext=a
180 old_AR="$AR"
181 old_CC="$CC"
182 old_CFLAGS="$CFLAGS"
183 old_CPPFLAGS="$CPPFLAGS"
184 old_LD="$LD"
185 old_LN_S="$LN_S"
186 old_NM="$NM"
187 old_RANLIB="$RANLIB"
188 old_DLLTOOL="$DLLTOOL"
189 old_AS="$AS"
191 # Parse the command line options.
192 args=
193 prev=
194 for option
196 case "$option" in
197 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
198 *) optarg= ;;
199 esac
201 # If the previous option needs an argument, assign it.
202 if test -n "$prev"; then
203 eval "$prev=\$option"
204 prev=
205 continue
208 case "$option" in
209 --help) cat <<EOM
210 Usage: $progname [OPTION]... [HOST [LTMAIN]]
212 Generate a system-specific libtool script.
214 --debug enable verbose shell tracing
215 --disable-shared do not build shared libraries
216 --disable-static do not build static libraries
217 --help display this help and exit
218 --no-verify do not verify that HOST is a valid host type
219 -o, --output=FILE specify the output file [default=$default_ofile]
220 --quiet same as \`--silent'
221 --silent do not print informational messages
222 --srcdir=DIR find \`config.guess' in DIR
223 --version output version information and exit
224 --with-gcc assume that the GNU C compiler will be used
225 --with-gnu-ld assume that the C compiler uses the GNU linker
226 --disable-lock disable file locking
228 LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
229 that provides basic libtool functionality.
231 HOST is the canonical host system name [default=guessed].
233 exit 0
236 --debug)
237 echo "$progname: enabling shell trace mode"
238 set -x
241 --disable-shared) enable_shared=no ;;
243 --disable-static) enable_static=no ;;
245 --quiet | --silent) silent=yes ;;
247 --srcdir) prev=srcdir ;;
248 --srcdir=*) srcdir="$optarg" ;;
250 --no-verify) verify_host=no ;;
252 --output | -o) prev=ofile ;;
253 --output=*) ofile="$optarg" ;;
255 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
257 --with-gcc) with_gcc=yes ;;
258 --with-gnu-ld) with_gnu_ld=yes ;;
260 --disable-lock) need_locks=no ;;
263 echo "$progname: unrecognized option \`$option'" 1>&2
264 echo "$help" 1>&2
265 exit 1
269 if test -z "$ltmain"; then
270 ltmain="$option"
271 elif test -z "$host"; then
272 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
273 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
274 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
275 # fi
276 host="$option"
277 else
278 echo "$progname: too many arguments" 1>&2
279 echo "$help" 1>&2
280 exit 1
281 fi ;;
282 esac
283 done
285 if test -z "$ltmain"; then
286 echo "$progname: you must specify a LTMAIN file" 1>&2
287 echo "$help" 1>&2
288 exit 1
291 if test ! -f "$ltmain"; then
292 echo "$progname: \`$ltmain' does not exist" 1>&2
293 echo "$help" 1>&2
294 exit 1
297 # Quote any args containing shell metacharacters.
298 ltconfig_args=
299 for arg
301 case "$arg" in
302 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
303 ltconfig_args="$ltconfig_args '$arg'" ;;
304 *) ltconfig_args="$ltconfig_args $arg" ;;
305 esac
306 done
308 # A relevant subset of AC_INIT.
310 # File descriptor usage:
311 # 0 standard input
312 # 1 file creation
313 # 2 errors and warnings
314 # 3 some systems may open it to /dev/tty
315 # 4 used on the Kubota Titan
316 # 5 compiler messages saved in config.log
317 # 6 checking for... messages and results
318 if test "$silent" = yes; then
319 exec 6>/dev/null
320 else
321 exec 6>&1
323 exec 5>>./config.log
325 # NLS nuisances.
326 # Only set LANG and LC_ALL to C if already set.
327 # These must not be set unconditionally because not all systems understand
328 # e.g. LANG=C (notably SCO).
329 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
330 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
332 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
333 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
334 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
335 ac_n= ac_c='
336 ' ac_t=' '
337 else
338 ac_n=-n ac_c= ac_t=
340 else
341 ac_n= ac_c='\c' ac_t=
344 if test -z "$srcdir"; then
345 # Assume the source directory is the same one as the path to LTMAIN.
346 srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
347 test "$srcdir" = "$ltmain" && srcdir=.
350 trap "$rm conftest*; exit 1" 1 2 15
351 if test "$verify_host" = yes; then
352 # Check for config.guess and config.sub.
353 ac_aux_dir=
354 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
355 if test -f $ac_dir/config.guess; then
356 ac_aux_dir=$ac_dir
357 break
359 done
360 if test -z "$ac_aux_dir"; then
361 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
362 echo "$help" 1>&2
363 exit 1
365 ac_config_guess=$ac_aux_dir/config.guess
366 ac_config_sub=$ac_aux_dir/config.sub
368 # Make sure we can run config.sub.
369 if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
370 else
371 echo "$progname: cannot run $ac_config_sub" 1>&2
372 echo "$help" 1>&2
373 exit 1
376 echo $ac_n "checking host system type""... $ac_c" 1>&6
378 host_alias=$host
379 case "$host_alias" in
381 if host_alias=`$SHELL $ac_config_guess`; then :
382 else
383 echo "$progname: cannot guess host type; you must specify one" 1>&2
384 echo "$help" 1>&2
385 exit 1
386 fi ;;
387 esac
388 host=`$SHELL $ac_config_sub $host_alias`
389 echo "$ac_t$host" 1>&6
391 # Make sure the host verified.
392 test -z "$host" && exit 1
394 elif test -z "$host"; then
395 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
396 echo "$help" 1>&2
397 exit 1
398 else
399 host_alias=$host
402 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
403 case "$host_os" in
404 linux-gnu*) ;;
405 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
406 esac
408 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
409 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
410 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
412 case "$host_os" in
413 aix3*)
414 # AIX sometimes has problems with the GCC collect2 program. For some
415 # reason, if we set the COLLECT_NAMES environment variable, the problems
416 # vanish in a puff of smoke.
417 if test "${COLLECT_NAMES+set}" != set; then
418 COLLECT_NAMES=
419 export COLLECT_NAMES
422 esac
424 # Determine commands to create old-style static archives.
425 old_archive_cmds='$AR cru $oldlib$oldobjs'
426 old_postinstall_cmds='chmod 644 $oldlib'
427 old_postuninstall_cmds=
429 # Set a sane default for `AR'.
430 test -z "$AR" && AR=ar
432 # If RANLIB is not set, then run the test.
433 if test "${RANLIB+set}" != "set"; then
434 result=no
436 echo $ac_n "checking for ranlib... $ac_c" 1>&6
437 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
438 for dir in $PATH; do
439 test -z "$dir" && dir=.
440 if test -f $dir/ranlib; then
441 RANLIB="ranlib"
442 result="ranlib"
443 break
445 done
446 IFS="$save_ifs"
448 echo "$ac_t$result" 1>&6
451 if test -n "$RANLIB"; then
452 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
453 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
456 # Set sane defaults for `DLLTOOL' and `AS', used on cygwin32.
457 test -z "$DLLTOOL" && DLLTOOL=dlltool
458 test -z "$AS" && AS=as
460 # Check to see if we are using GCC.
461 if test "$with_gcc" != yes || test -z "$CC"; then
462 # If CC is not set, then try to find GCC or a usable CC.
463 if test -z "$CC"; then
464 echo $ac_n "checking for gcc... $ac_c" 1>&6
465 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
466 for dir in $PATH; do
467 IFS="$save_ifs"
468 test -z "$dir" && dir=.
469 if test -f $dir/gcc; then
470 CC="gcc"
471 break
473 done
474 IFS="$save_ifs"
476 if test -n "$CC"; then
477 echo "$ac_t$CC" 1>&6
478 else
479 echo "$ac_t"no 1>&6
483 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
484 if test -z "$CC"; then
485 echo $ac_n "checking for cc... $ac_c" 1>&6
486 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
487 cc_rejected=no
488 for dir in $PATH; do
489 test -z "$dir" && dir=.
490 if test -f $dir/cc; then
491 if test "$dir/cc" = "/usr/ucb/cc"; then
492 cc_rejected=yes
493 continue
495 CC="cc"
496 break
498 done
499 IFS="$save_ifs"
500 if test $cc_rejected = yes; then
501 # We found a bogon in the path, so make sure we never use it.
502 set dummy $CC
503 shift
504 if test $# -gt 0; then
505 # We chose a different compiler from the bogus one.
506 # However, it has the same name, so the bogon will be chosen
507 # first if we set CC to just the name; use the full file name.
508 shift
509 set dummy "$dir/cc" "$@"
510 shift
511 CC="$@"
515 if test -n "$CC"; then
516 echo "$ac_t$CC" 1>&6
517 else
518 echo "$ac_t"no 1>&6
521 if test -z "$CC"; then
522 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
523 exit 1
527 # Now see if the compiler is really GCC.
528 with_gcc=no
529 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
530 echo "$progname:530: checking whether we are using GNU C" >&5
532 $rm conftest.c
533 cat > conftest.c <<EOF
534 #ifdef __GNUC__
535 yes;
536 #endif
538 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
539 with_gcc=yes
541 $rm conftest.c
542 echo "$ac_t$with_gcc" 1>&6
545 # Allow CC to be a program name with arguments.
546 set dummy $CC
547 compiler="$2"
549 echo $ac_n "checking for object suffix... $ac_c" 1>&6
550 $rm conftest*
551 echo 'int i = 1;' > conftest.c
552 echo "$progname:552: checking for object suffix" >& 5
553 if { (eval echo $progname:553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
554 # Append any warnings to the config.log.
555 cat conftest.err 1>&5
557 for ac_file in conftest.*; do
558 case $ac_file in
559 *.c) ;;
560 *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
561 esac
562 done
563 else
564 cat conftest.err 1>&5
565 echo "$progname: failed program was:" >&5
566 cat conftest.c >&5
568 $rm conftest*
569 echo "$ac_t$objext" 1>&6
571 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
572 pic_flag=
573 special_shlib_compile_flags=
575 link_static_flag=
576 no_builtin_flag=
578 if test "$with_gcc" = yes; then
579 wl='-Wl,'
580 link_static_flag='-static'
582 case "$host_os" in
583 aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
584 # PIC is the default for these OSes.
586 cygwin32* | mingw32* | os2*)
587 # We can build DLLs from non-PIC.
589 amigaos*)
590 # FIXME: we need at least 68020 code to build shared libraries, but
591 # adding the `-m68020' flag to GCC prevents building anything better,
592 # like `-m68040'.
593 pic_flag='-m68020 -resident32 -malways-restore-a4'
596 pic_flag='-fPIC'
598 esac
599 else
600 # PORTME Check for PIC flags for the system compiler.
601 case "$host_os" in
602 aix3* | aix4*)
603 # All AIX code is PIC.
604 link_static_flag='-bnso -bI:/lib/syscalls.exp'
607 hpux9* | hpux10* | hpux11*)
608 # Is there a better link_static_flag that works with the bundled CC?
609 wl='-Wl,'
610 link_static_flag="${wl}-a ${wl}archive"
611 pic_flag='+Z'
614 irix5* | irix6*)
615 wl='-Wl,'
616 link_static_flag='-non_shared'
617 # PIC (with -KPIC) is the default.
620 cygwin32* | mingw32* | os2*)
621 # We can build DLLs from non-PIC.
624 osf3* | osf4*)
625 # All OSF/1 code is PIC.
626 wl='-Wl,'
627 link_static_flag='-non_shared'
630 sco3.2v5*)
631 pic_flag='-Kpic'
632 link_static_flag='-dn'
633 special_shlib_compile_flags='-belf'
636 solaris*)
637 pic_flag='-KPIC'
638 link_static_flag='-Bstatic'
639 wl='-Wl,'
642 sunos4*)
643 pic_flag='-PIC'
644 link_static_flag='-Bstatic'
645 wl='-Qoption ld '
648 sysv4.2uw2* | sysv5*)
649 pic_flag='-KPIC'
650 link_static_flag='-Bstatic'
651 wl='-Wl,'
654 uts4*)
655 pic_flag='-pic'
656 link_static_flag='-Bstatic'
660 can_build_shared=no
662 esac
665 if test -n "$pic_flag"; then
666 echo "$ac_t$pic_flag" 1>&6
668 # Check to make sure the pic_flag actually works.
669 echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
670 $rm conftest*
671 echo "int some_variable = 0;" > conftest.c
672 save_CFLAGS="$CFLAGS"
673 CFLAGS="$CFLAGS $pic_flag -DPIC"
674 echo "$progname:674: checking if $compiler PIC flag $pic_flag works" >&5
675 if { (eval echo $progname:675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
676 # Append any warnings to the config.log.
677 cat conftest.err 1>&5
679 # On HP-UX, both CC and GCC only warn that PIC is supported... then they
680 # create non-PIC objects. So, if there were any warnings, we assume that
681 # PIC is not supported.
682 if test -s conftest.err; then
683 echo "$ac_t"no 1>&6
684 can_build_shared=no
685 pic_flag=
686 else
687 echo "$ac_t"yes 1>&6
688 pic_flag=" $pic_flag"
690 else
691 # Append any errors to the config.log.
692 cat conftest.err 1>&5
693 can_build_shared=no
694 pic_flag=
695 echo "$ac_t"no 1>&6
697 CFLAGS="$save_CFLAGS"
698 $rm conftest*
699 else
700 echo "$ac_t"none 1>&6
703 # Check to see if options -o and -c are simultaneously supported by compiler
704 echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
705 $rm conftest*
706 echo "int some_variable = 0;" > conftest.c
707 save_CFLAGS="$CFLAGS"
708 CFLAGS="$CFLAGS -c -o conftest2.o"
709 echo "$progname:709: checking if $compiler supports -c -o file.o" >&5
710 if { (eval echo $progname:710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then
712 # The compiler can only warn and ignore the option if not recognized
713 # So say no if there are warnings
714 if test -s conftest.err; then
715 echo "$ac_t"no 1>&6
716 compiler_c_o=no
717 else
718 echo "$ac_t"yes 1>&6
719 compiler_c_o=yes
721 else
722 # Append any errors to the config.log.
723 cat conftest.err 1>&5
724 compiler_c_o=no
725 echo "$ac_t"no 1>&6
727 CFLAGS="$save_CFLAGS"
728 $rm conftest*
730 if test x"$compiler_c_o" = x"yes"; then
731 # Check to see if we can write to a .lo
732 echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
733 $rm conftest*
734 echo "int some_variable = 0;" > conftest.c
735 save_CFLAGS="$CFLAGS"
736 CFLAGS="$CFLAGS -c -o conftest.lo"
737 echo "$progname:737: checking if $compiler supports -c -o file.lo" >&5
738 if { (eval echo $progname:738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
740 # The compiler can only warn and ignore the option if not recognized
741 # So say no if there are warnings
742 if test -s conftest.err; then
743 echo "$ac_t"no 1>&6
744 compiler_o_lo=no
745 else
746 echo "$ac_t"yes 1>&6
747 compiler_o_lo=yes
749 else
750 # Append any errors to the config.log.
751 cat conftest.err 1>&5
752 compiler_o_lo=no
753 echo "$ac_t"no 1>&6
755 CFLAGS="$save_CFLAGS"
756 $rm conftest*
757 else
758 compiler_o_lo=no
761 # Check to see if we can do hard links to lock some files if needed
762 hard_links="nottested"
763 if test "$compiler_c_o" = no && test "$need_locks" != no; then
764 # do not overwrite the value of need_locks provided by the user
765 echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
766 hard_links=yes
767 $rm conftest*
768 ln conftest.a conftest.b 2>/dev/null && hard_links=no
769 touch conftest.a
770 ln conftest.a conftest.b 2>&5 || hard_links=no
771 ln conftest.a conftest.b 2>/dev/null && hard_links=no
772 echo "$ac_t$hard_links" 1>&6
773 $rm conftest*
774 if test "$hard_links" = no; then
775 echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
776 need_locks=warn
778 else
779 need_locks=no
782 if test "$with_gcc" = yes; then
783 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
784 echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
785 $rm conftest*
786 echo "int some_variable = 0;" > conftest.c
787 save_CFLAGS="$CFLAGS"
788 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
789 echo "$progname:789: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
790 if { (eval echo $progname:790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
792 # The compiler can only warn and ignore the option if not recognized
793 # So say no if there are warnings
794 if test -s conftest.err; then
795 echo "$ac_t"no 1>&6
796 compiler_rtti_exceptions=no
797 else
798 echo "$ac_t"yes 1>&6
799 compiler_rtti_exceptions=yes
801 else
802 # Append any errors to the config.log.
803 cat conftest.err 1>&5
804 compiler_rtti_exceptions=no
805 echo "$ac_t"no 1>&6
807 CFLAGS="$save_CFLAGS"
808 $rm conftest*
810 if test "$compiler_rtti_exceptions" = "yes"; then
811 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
812 else
813 no_builtin_flag=' -fno-builtin'
818 # Check for any special shared library compilation flags.
819 if test -n "$special_shlib_compile_flags"; then
820 echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
821 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
822 else
823 echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
824 can_build_shared=no
828 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
829 $rm conftest*
830 echo 'main(){return(0);}' > conftest.c
831 save_LDFLAGS="$LDFLAGS"
832 LDFLAGS="$LDFLAGS $link_static_flag"
833 echo "$progname:833: checking if $compiler static flag $link_static_flag works" >&5
834 if { (eval echo $progname:834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
835 echo "$ac_t$link_static_flag" 1>&6
836 else
837 echo "$ac_t"none 1>&6
838 link_static_flag=
840 LDFLAGS="$save_LDFLAGS"
841 $rm conftest*
843 if test -z "$LN_S"; then
844 # Check to see if we can use ln -s, or we need hard links.
845 echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
846 $rm conftestdata
847 if ln -s X conftestdata 2>/dev/null; then
848 $rm conftestdata
849 LN_S="ln -s"
850 else
851 LN_S=ln
853 if test "$LN_S" = "ln -s"; then
854 echo "$ac_t"yes 1>&6
855 else
856 echo "$ac_t"no 1>&6
860 # Make sure LD is an absolute path.
861 if test -z "$LD"; then
862 ac_prog=ld
863 if test "$with_gcc" = yes; then
864 # Check if gcc -print-prog-name=ld gives a path.
865 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
866 echo "$progname:866: checking for ld used by GCC" >&5
867 ac_prog=`($CC -print-prog-name=ld) 2>&5`
868 case "$ac_prog" in
869 # Accept absolute paths.
870 /* | [A-Za-z]:/*)
871 re_direlt='/[^/][^/]*/\.\./'
872 sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%'
873 # Canonicalize the path of ld
874 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
875 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
876 done
877 case "$host_os" in
878 cygwin*)
879 # Convert to a UNC path for cygwin
880 test -z "$LD" && LD=`echo X$ac_prog | $Xsed -e "$sub_uncdrive"`
883 test -z "$LD" && LD="$ac_prog"
885 esac
888 ## FIXME: The code fails later on if we try to use an $LD with
889 ## '\\' path separators.
891 [A-Za-z]:[\\]*)
892 re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)'
893 sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%'
894 sub_uncdir='s%\\%/%g'
895 # Canonicalize the path of ld
896 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
897 ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"`
898 done
899 case "$host_os" in
900 cygwin*)
901 # Convert to a UNC path for cygwin
902 test -z "$LD" && LD=`echo X$ac_prog | $Xsed -e "$sub_uncdrive" -e "$sub_uncdir"`
905 test -z "$LD" && LD="$ac_prog"
907 esac
910 # If it fails, then pretend we are not using GCC.
911 ac_prog=ld
914 # If it is relative, then search for the first ld in PATH.
915 with_gnu_ld=unknown
917 esac
918 elif test "$with_gnu_ld" = yes; then
919 echo $ac_n "checking for GNU ld... $ac_c" 1>&6
920 echo "$progname:920: checking for GNU ld" >&5
921 else
922 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
923 echo "$progname:923: checking for non-GNU ld" >&5
926 if test -z "$LD"; then
927 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
928 for ac_dir in $PATH; do
929 test -z "$ac_dir" && ac_dir=.
930 if test -f "$ac_dir/$ac_prog"; then
931 LD="$ac_dir/$ac_prog"
932 # Check to see if the program is GNU ld. I'd rather use --version,
933 # but apparently some GNU ld's only accept -v.
934 # Break only if it was the GNU/non-GNU ld that we prefer.
935 if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
936 test "$with_gnu_ld" != no && break
937 else
938 test "$with_gnu_ld" != yes && break
941 done
942 IFS="$ac_save_ifs"
945 if test -n "$LD"; then
946 echo "$ac_t$LD" 1>&6
947 else
948 echo "$ac_t"no 1>&6
951 if test -z "$LD"; then
952 echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
953 exit 1
957 # Check to see if it really is or is not GNU ld.
958 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
959 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
960 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
961 with_gnu_ld=yes
962 else
963 with_gnu_ld=no
965 echo "$ac_t$with_gnu_ld" 1>&6
967 # See if the linker supports building shared libraries.
968 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
970 allow_undefined_flag=
971 no_undefined_flag=
972 archive_cmds=
973 archive_sym_cmds=
974 old_archive_from_new_cmds=
975 export_dynamic_flag_spec=
976 whole_archive_flag_spec=
977 hardcode_libdir_flag_spec=
978 hardcode_libdir_separator=
979 hardcode_direct=no
980 hardcode_minus_L=no
981 hardcode_shlibpath_var=unsupported
982 runpath_var=
984 case "$host_os" in
985 aix3* | aix4*)
986 # On AIX, the GNU linker works like the native linker.
987 with_gnu_ld=no
989 esac
991 ld_shlibs=yes
992 if test "$with_gnu_ld" = yes; then
994 # See if GNU ld supports shared libraries.
995 case "$host_os" in
996 amigaos*)
997 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)'
998 hardcode_libdir_flag_spec='-L$libdir'
999 hardcode_minus_L=yes
1002 sunos4*)
1003 archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs$deplibs'
1004 hardcode_direct=yes
1005 hardcode_minus_L=yes
1006 hardcode_shlibpath_var=no
1009 cygwin32* | mingw32*)
1010 if test "$with_gcc" = yes; then
1011 # hardcode_libdir_flag_spec is actually meaningless, as there is
1012 # no search path for DLLs.
1013 hardcode_libdir_flag_spec='-L$libdir'
1014 allow_undefined_flag=unsupported
1015 # Very, very bogus.
1016 echo '
1017 #define WIN32_LEAN_AND_MEAN
1018 #include <windows.h>
1019 #undef WIN32_LEAN_AND_MEAN
1020 #include <stdio.h>
1022 BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
1024 #include <cygwin/cygwin_dll.h>
1025 DECLARE_CYGWIN_DLL( DllMain );
1026 HINSTANCE __hDllInstance_base;
1028 BOOL APIENTRY
1029 DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
1031 __hDllInstance_base = hInst;
1032 return TRUE;
1034 ' > ltdll.c
1035 archive_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
1036 $DLLTOOL --export-all --output-def $lib-def $libobjs ltdll.$objext~
1037 $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
1038 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
1039 $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
1040 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
1041 $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
1042 $rm ltdll.$objext $soname-base $soname-exp'
1043 archive_sym_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
1044 cat "$export_symbols" >> $lib-def~
1045 $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
1046 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
1047 $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
1048 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
1049 $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
1050 $rm ltdll.$objext $soname-base $soname-exp'
1051 old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib-def --output-lib $objdir/$libname.a~$rm $lib.exp'
1052 else
1053 # When not using gcc, we currently assume that we are using
1054 # Microsoft Visual C++.
1055 with_gnu_ld=no
1056 # hardcode_libdir_flag_spec is actually meaningless, as there is
1057 # no search path for DLLs.
1058 hardcode_libdir_flag_spec=' '
1059 allow_undefined_flag=unsupported
1060 # Tell ltmain to make .lib files, not .a files.
1061 libext=lib
1062 # FIXME: Setting linknames here is a bad hack.
1063 archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1064 # The linker will automatically build a .lib file if we build a DLL.
1065 old_archive_from_new_cmds='true'
1066 # FIXME: Should let the user specify the lib program.
1067 old_archive_cmds='lib /OUT:$oldlib$oldobjs'
1068 fix_srcfile_path='`cygpath -w $srcfile`'
1073 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1074 archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs'
1075 archive_sym_cmds='$CC -shared ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib$libobjs$deplibs'
1076 else
1077 ld_shlibs=no
1080 esac
1082 if test "$ld_shlibs" = yes && test "$with_gnu_ld" = yes; then
1083 runpath_var=LD_RUN_PATH
1084 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1085 export_dynamic_flag_spec='${wl}--export-dynamic'
1086 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
1088 else
1089 # PORTME fill in a description of your system's linker (not GNU ld)
1090 case "$host_os" in
1091 aix3*)
1092 allow_undefined_flag=unsupported
1093 archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp~
1094 $LD -o $objdir/$soname$libobjs$deplibs -bE:$lib.exp -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
1095 archive_sym_cmds='$LD -o $objdir/$soname$libobjs$deplibs -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
1096 # Note: this linker hardcodes the directories in LIBPATH if there
1097 # are no directories specified by -L.
1098 hardcode_minus_L=yes
1099 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
1100 # Neither direct hardcoding nor static linking is supported with a
1101 # broken collect2.
1102 hardcode_direct=unsupported
1106 aix4*)
1107 allow_undefined_flag=unsupported
1108 archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp else cat $export_symbols > $lib.exp~
1109 $CC -o $objdir/$soname$libobjs$deplibs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry~$AR cru $lib $objdir/$soname'
1110 archive_sym_cmds='$CC -o $objdir/$soname$libobjs$deplibs ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry~$AR cru $lib $objdir/$soname'
1111 hardcode_direct=yes
1112 hardcode_minus_L=yes
1115 amigaos*)
1116 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)'
1117 hardcode_libdir_flag_spec='-L$libdir'
1118 hardcode_minus_L=yes
1121 cygwin32* | mingw32*)
1122 if test "$with_gcc" = yes; then
1123 # hardcode_libdir_flag_spec is actually meaningless, as there is
1124 # no search path for DLLs.
1125 hardcode_libdir_flag_spec='-L$libdir'
1126 allow_undefined_flag=unsupported
1127 # Very, very bogus.
1128 echo '
1129 #define WIN32_LEAN_AND_MEAN
1130 #include <windows.h>
1131 #undef WIN32_LEAN_AND_MEAN
1132 #include <stdio.h>
1134 BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
1136 #include <cygwin/cygwin_dll.h>
1137 DECLARE_CYGWIN_DLL( DllMain );
1138 HINSTANCE __hDllInstance_base;
1140 BOOL APIENTRY
1141 DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
1143 __hDllInstance_base = hInst;
1144 return TRUE;
1146 ' > ltdll.c
1147 archive_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
1148 $DLLTOOL --export-all --output-def $lib-def $libobjs ltdll.$objext~
1149 $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
1150 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
1151 $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
1152 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
1153 $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
1154 $rm ltdll.$objext $soname-base $soname-exp'
1155 archive_sym_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib-def~
1156 cat "$export_symbols" >> $lib-def~
1157 $CC -Wl,--base-file,$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 $libobjs ltdll.$objext~
1158 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
1159 $CC -Wl,--base-file,$soname-base $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
1160 $DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $lib-def --base-file $soname-base --output-exp $soname-exp~
1161 $CC $soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $libobjs ltdll.$objext$deplibs~
1162 $rm ltdll.$objext $soname-base $soname-exp'
1163 old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib-def --output-lib $objdir/$libname.a~$rm $lib.exp'
1164 else
1165 # When not using gcc, we currently assume that we are using
1166 # Microsoft Visual C++.
1167 # hardcode_libdir_flag_spec is actually meaningless, as there is
1168 # no search path for DLLs.
1169 hardcode_libdir_flag_spec=' '
1170 allow_undefined_flag=unsupported
1171 # Tell ltmain to make .lib files, not .a files.
1172 libext=lib
1173 # FIXME: Setting linknames here is a bad hack.
1174 archive_cmds='$CC -o $lib$libobjs`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1175 # The linker will automatically build a .lib file if we build a DLL.
1176 old_archive_from_new_cmds='true'
1177 # FIXME: Should let the user specify the lib program.
1178 old_archive_cmds='lib /OUT:$oldlib$oldobjs'
1179 fix_srcfile_path='`cygpath -w $srcfile`'
1183 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1184 # support. Future versions do this automatically, but an explicit c++rt0.o
1185 # does not break anything, and helps significantly (at the cost of a little
1186 # extra space).
1187 freebsd2.2*)
1188 archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs /usr/lib/c++rt0.o'
1189 hardcode_libdir_flag_spec='-R$libdir'
1190 hardcode_direct=yes
1191 hardcode_minus_L=yes
1192 hardcode_shlibpath_var=no
1195 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1196 freebsd2*)
1197 archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
1198 hardcode_direct=yes
1199 hardcode_minus_L=yes
1200 hardcode_shlibpath_var=no
1203 # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
1204 freebsd3*)
1205 archive_cmds='$CC -shared -o $lib$libobjs$deplibs'
1206 hardcode_libdir_flag_spec='-R$libdir'
1207 hardcode_direct=yes
1208 hardcode_minus_L=no
1209 hardcode_shlibpath_var=no
1212 hpux9*)
1213 archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs$deplibs~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
1214 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1215 hardcode_direct=yes
1216 hardcode_minus_L=yes
1217 export_dynamic_flag_spec='${wl}-E'
1220 hpux10* | hpux11*)
1221 archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs$deplibs'
1222 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1223 hardcode_direct=yes
1224 hardcode_minus_L=yes
1225 export_dynamic_flag_spec='${wl}-E'
1228 irix5* | irix6*)
1229 if test "$with_gcc" = yes; then
1230 archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs$deplibs'
1231 else
1232 archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
1234 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1237 netbsd*)
1238 # Tested with NetBSD 1.2 ld
1239 archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
1240 hardcode_libdir_flag_spec='-R$libdir'
1241 hardcode_direct=yes
1242 hardcode_shlibpath_var=no
1245 openbsd*)
1246 archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
1247 hardcode_libdir_flag_spec='-R$libdir'
1248 hardcode_direct=yes
1249 hardcode_shlibpath_var=no
1252 os2*)
1253 hardcode_libdir_flag_spec='-L$libdir'
1254 hardcode_minus_L=yes
1255 allow_undefined_flag=unsupported
1256 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$deplibs $objdir/$libname.def'
1257 old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
1260 osf3* | osf4*)
1261 if test "$with_gcc" = yes; then
1262 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1263 archive_cmds='$CC -shared${allow_undefined_flag} -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs$deplibs'
1264 else
1265 allow_undefined_flag=' -expect_unresolved \*'
1266 archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
1268 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1269 hardcode_libdir_separator=:
1272 sco3.2v5*)
1273 archive_cmds='$LD -G -o $lib$libobjs$deplibs'
1274 hardcode_direct=yes
1277 solaris*)
1278 no_undefined_flag=' -z text'
1279 # $CC -shared without GNU ld will not create a library from C++
1280 # object files and a static libstdc++, better avoid it by now
1281 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs$deplibs'
1282 archive_sym_cmds='$echo "{ global:" > $lib.exp~sed $export_symbols -e "s/.*/\1;/" >> $lib.exp~$echo "local: * }" >> $lib.exp~
1283 $LD -G${allow_undefined_flag} -M $export_symbols -h $soname -o $lib$libobjs$deplibs~$rm $lib.exp'
1284 hardcode_libdir_flag_spec='-R$libdir'
1285 hardcode_shlibpath_var=no
1287 # Solaris 2 before 2.5 hardcodes -L paths.
1288 case "$host_os" in
1289 solaris2.[0-4]*)
1290 hardcode_minus_L=yes
1292 esac
1295 sunos4*)
1296 # Why do we need -Bstatic? To avoid inter-library dependencies, maybe...
1297 if test "$with_gcc" = yes; then
1298 archive_cmds='$CC -shared ${wl}-Bstatic -o $lib$libobjs$deplibs'
1299 else
1300 archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs$deplibs'
1302 hardcode_libdir_flag_spec='-L$libdir'
1303 hardcode_direct=yes
1304 hardcode_minus_L=yes
1305 hardcode_shlibpath_var=no
1308 uts4*)
1309 archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
1310 hardcode_libdir_flag_spec='-L$libdir'
1311 hardcode_direct=no
1312 hardcode_minus_L=no
1313 hardcode_shlibpath_var=no
1316 dgux*)
1317 archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
1318 hardcode_libdir_flag_spec='-L$libdir'
1319 hardcode_direct=no
1320 hardcode_minus_L=no
1321 hardcode_shlibpath_var=no
1325 ld_shlibs=no
1326 can_build_shared=no
1328 esac
1330 echo "$ac_t$ld_shlibs" 1>&6
1332 if test -z "$NM"; then
1333 echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
1334 case "$NM" in
1335 /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
1337 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1338 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
1339 test -z "$ac_dir" && ac_dir=.
1340 if test -f $ac_dir/nm; then
1341 # Check to see if the nm accepts a BSD-compat flag.
1342 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1343 # nm: unknown option "B" ignored
1344 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1345 NM="$ac_dir/nm -B"
1346 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1347 NM="$ac_dir/nm -p"
1348 else
1349 NM="$ac_dir/nm"
1351 break
1353 done
1354 IFS="$ac_save_ifs"
1355 test -z "$NM" && NM=nm
1357 esac
1358 echo "$ac_t$NM" 1>&6
1361 # Check for command to grab the raw symbol name followed by C symbol from nm.
1362 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1364 # These are sane defaults that work on at least a few old systems.
1365 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1367 # Character class describing NM global symbol codes.
1368 symcode='[BCDEGRSTU]'
1370 # Regexp to match symbols that can be accessed directly from C.
1371 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1373 # Transform the above into a raw symbol and a C symbol.
1374 symxfrm='\1 \1'
1376 # Define system-specific variables.
1377 case "$host_os" in
1378 aix*)
1379 symcode='[BCDTU]'
1381 sunos* | cygwin32* | mingw32*)
1382 sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
1383 symxfrm='_\1 \1'
1385 irix*)
1386 # Cannot use undefined symbols on IRIX because inlined functions mess us up.
1387 symcode='[BCDEGRST]'
1389 solaris*)
1390 symcode='[BDTU]'
1392 esac
1394 # If we're using GNU nm, then use its standard symbol codes.
1395 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1396 symcode='[ABCDGISTUW]'
1399 case "$host_os" in
1400 cygwin32* | mingw32*)
1401 # We do not want undefined symbols on cygwin32. The user must
1402 # arrange to define them via -l arguments.
1403 symcode='[ABCDGISTW]'
1405 esac
1407 # Write the raw and C identifiers.
1408 global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
1410 # Check to see that the pipe works correctly.
1411 pipe_works=no
1412 $rm conftest*
1413 cat > conftest.c <<EOF
1414 #ifdef __cplusplus
1415 extern "C" {
1416 #endif
1417 char nm_test_var;
1418 void nm_test_func(){}
1419 #ifdef __cplusplus
1421 #endif
1422 main(){nm_test_var='a';nm_test_func();return(0);}
1425 echo "$progname:1425: checking if global_symbol_pipe works" >&5
1426 if { (eval echo $progname:1426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
1427 # Now try to grab the symbols.
1428 nlist=conftest.nm
1429 if { echo "$progname:1429: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1431 # Try sorting and uniquifying the output.
1432 if sort "$nlist" | uniq > "$nlist"T; then
1433 mv -f "$nlist"T "$nlist"
1434 wcout=`wc "$nlist" 2>/dev/null`
1435 count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
1436 (test "$count" -ge 0) 2>/dev/null || count=-1
1437 else
1438 rm -f "$nlist"T
1439 count=-1
1442 # Make sure that we snagged all the symbols we need.
1443 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1444 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1445 cat <<EOF > conftest.c
1446 #ifdef __cplusplus
1447 extern "C" {
1448 #endif
1451 # Now generate the symbol file.
1452 sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
1454 cat <<EOF >> conftest.c
1455 #if defined (__STDC__) && __STDC__
1456 # define __ptr_t void *
1457 #else
1458 # define __ptr_t char *
1459 #endif
1461 /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
1462 int dld_preloaded_symbol_count = $count;
1464 /* The mapping between symbol names and symbols. */
1465 struct {
1466 char *name;
1467 __ptr_t address;
1469 dld_preloaded_symbols[] =
1472 sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c
1473 cat <<\EOF >> conftest.c
1474 {0, (__ptr_t) 0}
1477 #ifdef __cplusplus
1479 #endif
1481 # Now try linking the two files.
1482 mv conftest.$objext conftestm.$objext
1483 save_LIBS="$LIBS"
1484 save_CFLAGS="$CFLAGS"
1485 LIBS="conftestm.$objext"
1486 CFLAGS="$CFLAGS$no_builtin_flag"
1487 if { (eval echo $progname:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1488 pipe_works=yes
1489 else
1490 echo "$progname: failed program was:" >&5
1491 cat conftest.c >&5
1493 LIBS="$save_LIBS"
1494 else
1495 echo "cannot find nm_test_func in $nlist" >&5
1497 else
1498 echo "cannot find nm_test_var in $nlist" >&5
1500 else
1501 echo "cannot run $global_symbol_pipe" >&5
1503 else
1504 echo "$progname: failed program was:" >&5
1505 cat conftest.c >&5
1507 $rm conftest*
1509 # Do not use the global_symbol_pipe unless it works.
1510 echo "$ac_t$pipe_works" 1>&6
1511 test "$pipe_works" = yes || global_symbol_pipe=
1513 # Check hardcoding attributes.
1514 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1515 hardcode_action=
1516 if test -n "$hardcode_libdir_flag_spec" || \
1517 test -n "$runpath_var"; then
1519 # We can hardcode non-existant directories.
1520 if test "$hardcode_direct" != no && \
1521 test "$hardcode_minus_L" != no && \
1522 test "$hardcode_shlibpath_var" != no; then
1524 # Linking always hardcodes the temporary library directory.
1525 hardcode_action=relink
1526 else
1527 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1528 hardcode_action=immediate
1530 else
1531 # We cannot hardcode anything, or else we can only hardcode existing
1532 # directories.
1533 hardcode_action=unsupported
1535 echo "$ac_t$hardcode_action" 1>&6
1538 reload_flag=
1539 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1540 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1541 # PORTME Some linkers may need a different reload flag.
1542 reload_flag='-r'
1543 echo "$ac_t$reload_flag" 1>&6
1544 test -n "$reload_flag" && reload_flag=" $reload_flag"
1546 # PORTME Fill in your ld.so characteristics
1547 library_names_spec=
1548 libname_spec='lib$name'
1549 soname_spec=
1550 postinstall_cmds=
1551 postuninstall_cmds=
1552 finish_cmds=
1553 finish_eval=
1554 shlibpath_var=
1555 version_type=none
1556 dynamic_linker="$host_os ld.so"
1557 sys_lib_search_path="/lib /usr/lib /usr/local/lib"
1558 check_shared_deplibs_method='none'
1559 # Need to set the preceding variable on all platforms that support
1560 # interlibrary dependencies.
1561 # 'none' -- dependencies not supported.
1562 # 'pass_all' -- all dependencies passed with no checks.
1563 # 'test_compile' -- check by making test program.
1564 # 'file_regex' -- check by looking for filenames that look like the shared
1565 # library in the library path.
1566 # 'file_magic [regex]' -- check by looking for files in library path which
1567 # responds to the "file" command with a given regex. This is actually a
1568 # superset of the file_regex command. If you have file on your system, you'll
1569 # want to use this instead.
1570 # Notes: regexes are run through expr.
1572 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1573 case "$host_os" in
1574 aix3* | aix4*)
1575 version_type=linux
1576 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1577 shlibpath_var=LIBPATH
1579 # AIX has no versioning support, so we append a major version to the name.
1580 soname_spec='${libname}${release}.so$major'
1583 amigaos*)
1584 library_names_spec='$libname.ixlibrary $libname.a'
1585 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1586 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'
1589 bsdi4*)
1590 version_type=linux
1591 library_names_spec='${libname}.so.$major ${libname}.so'
1592 soname_spec='${libname}.so'
1593 finish_cmds='PATH="$PATH:/sbin" ldconfig $libdir'
1594 shlibpath_var=LD_LIBRARY_PATH
1597 cygwin32* | mingw32*)
1598 version_type=windows
1599 if test "$with_gcc" = yes; then
1600 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
1601 else
1602 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1604 dynamic_linker='Win32 ld.exe'
1605 libname_spec='$name'
1606 shlibpath_var=PATH
1609 freebsd2* | freebsd3*)
1610 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1611 version_type=freebsd-$objformat
1612 library_names_spec='${libname}${release}.so$versuffix $libname.so'
1613 finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="$objformat" ldconfig -m $libdir'
1614 shlibpath_var=LD_LIBRARY_PATH
1617 gnu*)
1618 version_type=linux
1619 library_names_spec='${libname}${release}.so$versuffix ${libname}.so'
1620 shlibpath_var=LD_LIBRARY_PATH
1623 hpux9* | hpux10* | hpux11*)
1624 # Give a soname corresponding to the major version so that dld.sl refuses to
1625 # link against other versions.
1626 dynamic_linker="$host_os dld.sl"
1627 version_type=sunos
1628 shlibpath_var=SHLIB_PATH
1629 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1630 soname_spec='${libname}${release}.sl$major'
1631 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1632 postinstall_cmds='chmod 555 $lib'
1635 irix5*)
1636 version_type=osf
1637 soname_spec='${libname}${release}.so'
1638 library_names_spec='${libname}${release}.so$versuffix $libname.so'
1639 shlibpath_var=LD_LIBRARY_PATH
1642 irix6*)
1643 version_type=osf
1644 soname_spec='${libname}${release}.so'
1645 library_names_spec='${libname}${release}.so$versuffix $libname.so'
1646 shlibpath_var=LD_LIBRARYN32_PATH
1649 # No shared lib support for Linux oldld, aout, or coff.
1650 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1651 dynamic_linker=no
1654 # This must be Linux ELF.
1655 linux-gnu*)
1656 version_type=linux
1657 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1658 soname_spec='${libname}${release}.so$major'
1659 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1660 shlibpath_var=LD_LIBRARY_PATH
1661 check_shared_deplibs_method='file_magic ELF 32-bit LSB shared object'
1662 sys_lib_search_path="/lib /usr/lib /usr/local/lib `echo $LD_LIBRARY_PATH | sed -e 's/:/ /g'`"
1664 if test -f /lib/ld.so.1; then
1665 dynamic_linker='GNU ld.so'
1666 else
1667 # Only the GNU ld.so supports shared libraries on MkLinux.
1668 case "$host_cpu" in
1669 powerpc*) dynamic_linker=no ;;
1670 *) dynamic_linker='Linux ld.so' ;;
1671 esac
1675 netbsd* | openbsd*)
1676 version_type=sunos
1677 library_names_spec='${libname}${release}.so$versuffix'
1678 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1679 shlibpath_var=LD_LIBRARY_PATH
1682 os2*)
1683 libname_spec='$name'
1684 library_names_spec='$libname.dll $libname.a'
1685 dynamic_linker='OS/2 ld.exe'
1686 shlibpath_var=LIBPATH
1689 osf3* | osf4*)
1690 version_type=osf
1691 soname_spec='${libname}${release}.so'
1692 library_names_spec='${libname}${release}.so$versuffix $libname.so'
1693 shlibpath_var=LD_LIBRARY_PATH
1694 check_shared_deplibs_method='pass_all'
1697 sco3.2v5*)
1698 version_type=osf
1699 soname_spec='${libname}${release}.so$major'
1700 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1701 shlibpath_var=LD_LIBRARY_PATH
1704 solaris*)
1705 version_type=linux
1706 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1707 soname_spec='${libname}${release}.so$major'
1708 shlibpath_var=LD_LIBRARY_PATH
1709 # ldd complains unless libraries are executable
1710 postinstall_cmds='chmod +x $lib'
1713 sunos4*)
1714 version_type=sunos
1715 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1716 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1717 shlibpath_var=LD_LIBRARY_PATH
1720 sysv4.2uw2*)
1721 version_type=linux
1722 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1723 soname_spec='${libname}${release}.so$major'
1724 shlibpath_var=LD_LIBRARY_PATH
1727 uts4*)
1728 version_type=linux
1729 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
1730 soname_spec='${libname}${release}.so.$major'
1731 shlibpath_var=LD_LIBRARY_PATH
1734 dgux*)
1735 version_type=linux
1736 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1737 soname_spec='${libname}${release}.so$major'
1738 shlibpath_var=LD_LIBRARY_PATH
1742 dynamic_linker=no
1744 esac
1745 echo "$ac_t$dynamic_linker" 1>&6
1746 test "$dynamic_linker" = no && can_build_shared=no
1748 # Report the final consequences.
1749 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1751 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
1752 test "$can_build_shared" = "no" && enable_shared=no
1754 # On AIX, shared libraries and static libraries use the same namespace, and
1755 # are all built from PIC.
1756 case "$host_os" in
1757 aix*)
1758 test "$enable_shared" = yes && enable_static=no
1759 if test -n "$RANLIB"; then
1760 archive_cmds="$archive_cmds~\$RANLIB \$lib"
1761 postinstall_cmds='$RANLIB $lib'
1764 esac
1766 echo "$ac_t$enable_shared" 1>&6
1768 # Make sure either enable_shared or enable_static is yes.
1769 test "$enable_shared" = yes || enable_static=yes
1771 echo "checking whether to build static libraries... $enable_static" 1>&6
1773 echo $ac_n "checking for objdir... $ac_c" 1>&6
1774 rm -f .libs 2>/dev/null
1775 mkdir .libs 2>/dev/null
1776 if test -d .libs; then
1777 objdir=.libs
1778 else
1779 # MS-DOS does not allow filenames that begin with a dot.
1780 objdir=_libs
1782 rmdir .libs 2>/dev/null
1783 echo "$ac_t$objdir" 1>&6
1785 # Copy echo and quote the copy, instead of the original, because it is
1786 # used later.
1787 ltecho="$echo"
1788 if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
1789 ltecho="$CONFIG_SHELL \$0 --fallback-echo"
1791 LTSHELL="$SHELL"
1793 # Only quote variables if we're using ltmain.sh.
1794 case "$ltmain" in
1795 *.sh)
1796 # Now quote all the things that may contain metacharacters.
1797 for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
1798 old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL VERSION \
1799 reload_flag reload_cmds wl \
1800 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
1801 whole_archive_flag_spec libname_spec library_names_spec soname_spec \
1802 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
1803 old_postuninstall_cmds archive_cmds archive_sym_cmds postinstall_cmds postuninstall_cmds \
1804 check_shared_deplibs_method allow_undefined_flag no_undefined_flag \
1805 finish_cmds finish_eval global_symbol_pipe \
1806 hardcode_libdir_flag_spec hardcode_libdir_separator sys_lib_search_path \
1807 compiler_c_o compiler_o_lo need_locks; do
1809 case "$var" in
1810 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
1811 old_postinstall_cmds | old_postuninstall_cmds | \
1812 archive_cmds | archive_sym_cmds | \
1813 postinstall_cmds | postuninstall_cmds | \
1814 finish_cmds | sys_lib_search_path)
1815 # Double-quote double-evaled strings.
1816 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`\\\""
1819 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
1821 esac
1822 done
1824 case "$ltecho" in
1825 *'\$0 --fallback-echo"')
1826 ltecho=`$echo "X$ltecho" |
1827 $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
1829 esac
1831 trap "$rm \"$ofile\"; exit 1" 1 2 15
1832 echo "creating $ofile"
1833 $rm "$ofile"
1834 cat <<EOF > "$ofile"
1835 #! $SHELL
1837 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1838 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION)
1839 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
1841 # Copyright (C) 1996-1998 Free Software Foundation, Inc.
1842 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1844 # This program is free software; you can redistribute it and/or modify
1845 # it under the terms of the GNU General Public License as published by
1846 # the Free Software Foundation; either version 2 of the License, or
1847 # (at your option) any later version.
1849 # This program is distributed in the hope that it will be useful, but
1850 # WITHOUT ANY WARRANTY; without even the implied warranty of
1851 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1852 # General Public License for more details.
1854 # You should have received a copy of the GNU General Public License
1855 # along with this program; if not, write to the Free Software
1856 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1858 # As a special exception to the GNU General Public License, if you
1859 # distribute this file as part of a program that contains a
1860 # configuration script generated by Autoconf, you may include it under
1861 # the same distribution terms that you use for the rest of that program.
1863 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
1864 Xsed="sed -e s/^X//"
1866 # The HP-UX ksh and POSIX shell print the target directory to stdout
1867 # if CDPATH is set.
1868 if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
1870 ### BEGIN LIBTOOL CONFIG
1872 cfgfile="$ofile"
1876 # Double-quote the variables that need it (for aesthetics).
1877 for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
1878 old_LN_S old_DLLTOOL old_AS; do
1879 eval "$var=\\\"\$var\\\""
1880 done
1882 # Just create a config file.
1883 cfgfile="$ofile.cfg"
1884 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
1885 echo "creating $cfgfile"
1886 $rm "$cfgfile"
1887 cat <<EOF > "$cfgfile"
1888 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
1889 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION)
1892 esac
1894 cat <<EOF >> "$cfgfile"
1895 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1897 # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
1898 # LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
1899 # DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
1900 # $0$ltconfig_args
1902 # Compiler and other test output produced by $progname, useful for
1903 # debugging $progname, is in ./config.log if it exists.
1905 # The version of $progname that generated this script.
1906 LTCONFIG_VERSION=$VERSION
1908 # Shell to use when invoking shell scripts.
1909 SHELL=$LTSHELL
1911 # Whether or not to build shared libraries.
1912 build_libtool_libs=$enable_shared
1914 # Whether or not to build static libraries.
1915 build_old_libs=$enable_static
1917 # The host system.
1918 host_alias=$host_alias
1919 host=$host
1921 # An echo program that does not interpret backslashes.
1922 echo=$ltecho
1924 # The archiver.
1925 AR=$AR
1927 # The default C compiler.
1928 CC=$CC
1930 # The linker used to build libraries.
1931 LD=$LD
1933 # Whether we need hard or soft links.
1934 LN_S=$LN_S
1936 # A BSD-compatible nm program.
1937 NM=$NM
1939 # Used on cygwin32: DLL creation program.
1940 DLLTOOL="$DLLTOOL"
1942 # Used on cygwin32: assembler.
1943 AS="$AS"
1945 # The name of the directory that contains temporary libtool files.
1946 objdir=$objdir
1948 # How to create reloadable object files.
1949 reload_flag=$reload_flag
1950 reload_cmds=$reload_cmds
1952 # How to pass a linker flag through the compiler.
1953 wl=$wl
1955 # Object file suffix (normally "o").
1956 objext="$objext"
1958 # Old archive suffix (normally "a").
1959 libext="$libext"
1961 # Additional compiler flags for building library objects.
1962 pic_flag=$pic_flag
1964 # Does compiler simultaneously support -c and -o options
1965 compiler_c_o=$compiler_c_o
1967 # Can we write directly to a .lo ?
1968 compiler_o_lo=$compiler_o_lo
1970 # Must we lock files when doing compilation ?
1971 need_locks=$need_locks
1973 # Compiler flag to prevent dynamic linking.
1974 link_static_flag=$link_static_flag
1976 # Compiler flag to turn off builtin functions.
1977 no_builtin_flag=$no_builtin_flag
1979 # Compiler flag to allow reflexive dlopens.
1980 export_dynamic_flag_spec=$export_dynamic_flag_spec
1982 # Compiler flag to generate shared objects directly from archives.
1983 whole_archive_flag_spec=$whole_archive_flag_spec
1985 # Library versioning type.
1986 version_type=$version_type
1988 # Format of library name prefix.
1989 libname_spec=$libname_spec
1991 # List of archive names. First name is the real one, the rest are links.
1992 # The last name is the one that the linker finds with -lNAME.
1993 library_names_spec=$library_names_spec
1995 # The coded name of the library, if different from the real name.
1996 soname_spec=$soname_spec
1998 # Commands used to build and install an old-style archive.
1999 RANLIB=$RANLIB
2000 old_archive_cmds=$old_archive_cmds
2001 old_postinstall_cmds=$old_postinstall_cmds
2002 old_postuninstall_cmds=$old_postuninstall_cmds
2004 # Create an old-style archive from a shared archive.
2005 old_archive_from_new_cmds=$old_archive_from_new_cmds
2007 # Commands used to build and install a shared archive.
2008 archive_cmds=$archive_cmds
2009 archive_sym_cmds=$archive_sym_cmds
2010 postinstall_cmds=$postinstall_cmds
2011 postuninstall_cmds=$postuninstall_cmds
2013 # Method to check whether dependent libraries are shared objects.
2014 check_shared_deplibs_method=$check_shared_deplibs_method
2016 # Flag that allows shared libraries with undefined symbols to be built.
2017 allow_undefined_flag=$allow_undefined_flag
2019 # Flag that forces no undefined symbols.
2020 no_undefined_flag=$no_undefined_flag
2022 # Commands used to finish a libtool library installation in a directory.
2023 finish_cmds=$finish_cmds
2025 # Same as above, but a single script fragment to be evaled but not shown.
2026 finish_eval=$finish_eval
2028 # Take the output of nm and produce a listing of raw symbols and C names.
2029 global_symbol_pipe=$global_symbol_pipe
2031 # This is the shared library runtime path variable.
2032 runpath_var=$runpath_var
2034 # This is the shared library path variable.
2035 shlibpath_var=$shlibpath_var
2037 # How to hardcode a shared library path into an executable.
2038 hardcode_action=$hardcode_action
2040 # Flag to hardcode \$libdir into a binary during linking.
2041 # This must work even if \$libdir does not exist.
2042 hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
2044 # Whether we need a single -rpath flag with a separated argument.
2045 hardcode_libdir_separator=$hardcode_libdir_separator
2047 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2048 # resulting binary.
2049 hardcode_direct=$hardcode_direct
2051 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2052 # resulting binary.
2053 hardcode_minus_L=$hardcode_minus_L
2055 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2056 # the resulting binary.
2057 hardcode_shlibpath_var=$hardcode_shlibpath_var
2059 # System search path for libraries
2060 sys_lib_search_path=$sys_lib_search_path
2062 # Fix the shell variable \$srcfile for the compiler.
2063 fix_srcfile_path="$fix_srcfile_path"
2066 case "$ltmain" in
2067 *.sh)
2068 echo '### END LIBTOOL CONFIG' >> "$ofile"
2069 echo >> "$ofile"
2070 case "$host_os" in
2071 aix3*)
2072 cat <<\EOF >> "$ofile"
2074 # AIX sometimes has problems with the GCC collect2 program. For some
2075 # reason, if we set the COLLECT_NAMES environment variable, the problems
2076 # vanish in a puff of smoke.
2077 if test "${COLLECT_NAMES+set}" != set; then
2078 COLLECT_NAMES=
2079 export COLLECT_NAMES
2083 esac
2085 # Append the ltmain.sh script.
2086 cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
2088 chmod +x "$ofile"
2092 # Compile the libtool program.
2093 echo "FIXME: would compile $ltmain"
2095 esac
2096 exit 0
2098 # Local Variables:
2099 # mode:shell-script
2100 # sh-indentation:2
2101 # End: