synching
[bpt/guile.git] / ltconfig
CommitLineData
a7a8349d
MV
1#! /bin/sh
2
3# ltconfig - Create a system-specific libtool.
4# Generated automatically from ltconfig.in by configure.
5# Copyright (C) 1996, Free Software Foundation, Inc.
6# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7#
8# This file is free software; you can redistribute it and/or modify it
9# under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16# General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21#
22# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program.
26
27# A lot of this script is taken from autoconf-2.10.
28
29# The name of this program.
30progname=`echo "$0" | sed 's%^.*/%%'`
31
32# Constants:
33PROGRAM=ltconfig
34PACKAGE=libtool
35VERSION=0.7
36ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
37rm="rm -f"
38
39help="Try \`$progname --help' for more information."
40
41# Global variables:
42enable_shared=yes
43# All known linkers require a `.a' archive for static linking.
44enable_static=yes
45ltmain=NONE
46silent=
47srcdir=
48ac_config_guess=
49ac_config_sub=
50host=NONE
51nonopt=NONE
52verify_host=yes
53with_gcc=no
54
55old_CC="$CC"
56old_CFLAGS="$CFLAGS"
57old_CPPFLAGS="$CPPFLAGS"
58old_LD="$LD"
59old_RANLIB="$RANLIB"
60
61# Parse the command line options.
62args=
63prev=
64for option
65do
66 case "$option" in
67 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
68 *) optarg= ;;
69 esac
70
71 # If the previous option needs an argument, assign it.
72 if test -n "$prev"; then
73 eval "$prev=\$option"
74 prev=
75 continue
76 fi
77
78 case "$option" in
79 --help) cat <<EOM
80Usage: $progname [OPTION]... LTMAIN [HOST]
81
82Generate a system-specific libtool script.
83
84 --disable-shared do not build shared libraries
85 --help display this help and exit
86 --no-verify do not verify that HOST is a valid host type
87 --quiet same as \`--silent'
88 --silent don't print informational messages
89 --srcdir=DIR find \`config.guess' in DIR
90 --version output version information and exit
91 --with-gcc assume that the GNU C compiler will be used
92
93LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
94functionality.
95
96HOST is the canonical host system name [default=guessed].
97EOM
98 exit 0
99 ;;
100
101 --disable-shared) enable_shared=no ;;
102
103 --quiet | --silent) silent=yes ;;
104
105 --srcdir) prev=srcdir ;;
106 --srcdir=*) srcdir="$optarg" ;;
107
108 --no-verify) verify_host=no ;;
109
110 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
111
112 --with-gcc) with_gcc=yes ;;
113
114 -*)
115 echo "$progname: unrecognized option \`$option'" 1>&2
116 echo "$help" 1>&2
117 exit 1
118 ;;
119
120 *)
121 if test "$ltmain" = NONE; then
122 ltmain="$option"
123 elif test "$host" = NONE; then
124# FIXME This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
125# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
126# echo "$progname: warning \`$option' is not a valid host type" 1>&2
127# fi
128 host="$option"
129 else
130 echo "$progname: too many arguments" 1>&2
131 echo "$help" 1>&2
132 exit 1
133 fi ;;
134 esac
135done
136
137if test "$ltmain" = NONE; then
138 echo "$progname: you must specify a LTMAIN file" 1>&2
139 echo "$help" 1>&2
140 exit 1
141fi
142
143if test -f "$ltmain"; then :
144else
145 echo "$progname: warning: \`$ltmain' does not exist" 1>&2
146fi
147
148# Quote any args containing shell metacharacters.
149ltconfig_args=
150for arg
151do
152 case "$arg" in
153 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
154 ltconfig_args="$ltconfig_args '$arg'" ;;
155 *) ltconfig_args="$ltconfig_args $arg" ;;
156 esac
157done
158
159# A relevant subset of AC_INIT.
160
161# File descriptor usage:
162# 0 standard input
163# 1 file creation
164# 2 errors and warnings
165# 3 some systems may open it to /dev/tty
166# 4 used on the Kubota Titan
167# 5 compiler messages saved in config.log
168# 6 checking for... messages and results
169if test "$silent" = yes; then
170 exec 6>/dev/null
171else
172 exec 6>&1
173fi
174exec 5>>./config.log
175
176# NLS nuisances.
177# Only set LANG and LC_ALL to C if already set.
178# These must not be set unconditionally because not all systems understand
179# e.g. LANG=C (notably SCO).
180if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
181if test "${LANG+set}" = set; then LANG=C; export LANG; fi
182
183if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
184 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
185 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
186 ac_n= ac_c='
187' ac_t=' '
188 else
189 ac_n=-n ac_c= ac_t=
190 fi
191else
192 ac_n= ac_c='\c' ac_t=
193fi
194
195if test -z "$srcdir"; then
196 # Assume the source directory is the same one as the path to ltmain.sh.
197 srcdir=`echo "$ltmain" | sed 's%/[^/]*$%%'`
198 test "$srcdir" = "$ltmain" && srcdir=.
199fi
200
201if test "$verify_host" = yes; then
202 # Check for config.guess and config.sub.
203 ac_aux_dir=
204 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
205 if test -f $ac_dir/config.guess; then
206 ac_aux_dir=$ac_dir
207 break
208 fi
209 done
210 if test -z "$ac_aux_dir"; then
211 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
212 echo "$help" 1>&2
213 exit 1
214 fi
215 ac_config_guess=$ac_aux_dir/config.guess
216 ac_config_sub=$ac_aux_dir/config.sub
217
218 # Make sure we can run config.sub.
219 if $ac_config_sub sun4 >/dev/null 2>&1; then :
220 else
221 echo "$progname: cannot run $ac_config_sub" 1>&2
222 echo "$help" 1>&2
223 exit 1
224 fi
225
226 echo $ac_n "checking host system type""... $ac_c" 1>&6
227
228 host_alias=$host
229 case "$host_alias" in
230 NONE)
231 if host_alias=`$ac_config_guess`; then :
232 else
233 echo "$progname: cannot guess host type; you must specify one" 1>&2
234 echo "$help" 1>&2
235 exit 1
236 fi ;;
237 esac
238 host=`$ac_config_sub $host_alias`
239 echo "$ac_t""$host" 1>&6
240
241elif test "$host" = NONE; then
242 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
243 echo "$help" 1>&2
244 exit 1
245else
246 host_alias=$host
247fi
248
249host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
250host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
251host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
252
253# Determine commands to create old-style static archives.
254old_archive_cmds='ar cru $oldlib$oldobjs'
255old_postinstall_cmds='chmod 644 $oldlib'
256
257# If RANLIB is not set, then run the test.
258if test "${RANLIB+set}" != "set"; then
259 result=no
260
261 echo $ac_n "checking for ranlib... $ac_c" 1>&6
262 if test "$result" = no; then
263 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
264 for dir in $PATH; do
265 test -z "$dir" && dir=.
266 if test -f $dir/ranlib; then
267 RANLIB="ranlib"
268 result="ranlib"
269 break
270 fi
271 done
272 IFS="$save_ifs"
273 fi
274
275 echo $ac_t "$result" 1>&6
276fi
277
278if test -n "$RANLIB"; then
279 old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib"
280 old_postinstall_cmds="$old_postinstall_cmds;\$RANLIB \$oldlib"
281fi
282
283# FIXME: this is simplistic, and doesn't allow for cross-compiling.
284echo $ac_n "checking for library strip program... $ac_c" 1>&6
285striplib=
286if strip -x /dev/null 2>&1 | grep '/dev/null' >/dev/null 2>&1; then
287 # strip: /dev/null: Inappropriate file type or format
288 striplib="strip -x"
289fi
290
291if test -n "$striplib"; then
292 echo $ac_t "$striplib" 1>&6
293else
294 echo $ac_t none 1>&6
295fi
296
297
298# Check if old-style libraries may be stripped.
299old_striplib=
300if test -n "$striplib"; then
301 echo $ac_n "checking if $striplib works for static archives... $ac_c" 1>&6
302 old_striplib="$striplib"
303 trap 'rm -rf conftest*; exit 1' 1 2 15
304 cat > conftest.c <<EOF
305#line 305 "$progname"
306int external_func() { return 1; }
307static int hidden_func() { return 2; }
308EOF
309 if { (eval echo $progname:308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
310 oldlib=conftest.a
311 oldobjs=' conftest.o'
312
313 # Do each of the archive commands.
314 cmds=`eval echo \"$old_archive_cmds\"`
315 IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
316 for cmd in $cmds; do
317 IFS="$save_ifs"
318 if { (echo $progname:317: \"$cmd\") 1>&5; ($cmd) 2>&5; }; then :
319 else
320 old_striplib=
321 break
322 fi
323 done
324 IFS="$save_ifs"
325
326 if test -n "$old_striplib"; then
327 if { (echo $progname:326: \"$old_striplib conftest.a\") 1>&5; ($old_striplib conftest.a) 2>&5; }; then :
328 else
329 old_striplib=
330 fi
331 fi
332 else
333 old_striplib=
334 fi
335 rm -rf conftest*
336 trap '' 1 2 15
337
338 if test -n "$old_striplib"; then
339 echo "$ac_t""yes" 1>&6
340 else
341 echo "$ac_t""no" 1>&6
342 fi
343fi
344
345
346# Check to see if we are using GCC.
347if test "$with_gcc" = no; then
348 # If CC is not set, then try to find GCC or a usable CC.
349 if test -z "$CC"; then
350 echo $ac_n "checking for gcc... $ac_c" 1>&6
351 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
352 for dir in $PATH; do
353 IFS="$save_ifs"
354 test -z "$dir" && dir=.
355 if test -f $dir/gcc; then
356 CC="gcc"
357 break
358 fi
359 done
360 IFS="$save_ifs"
361
362 if test -n "$CC"; then
363 echo "$ac_t""$CC" 1>&6
364 else
365 echo "$ac_t""no" 1>&6
366 fi
367 fi
368
369 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
370 if test -z "$CC"; then
371 echo $ac_n "checking for cc... $ac_c" 1>&6
372 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
373 cc_rejected=no
374 for dir in $PATH; do
375 test -z "$dir" && dir=.
376 if test -f $dir/cc; then
377 if test "$dir/cc" = "/usr/ucb/cc"; then
378 cc_rejected=yes
379 continue
380 fi
381 CC="cc"
382 break
383 fi
384 done
385 IFS="$save_ifs"
386 if test $cc_rejected = yes; then
387 # We found a bogon in the path, so make sure we never use it.
388 set dummy $CC
389 shift
390 if test $# -gt 0; then
391 # We chose a different compiler from the bogus one.
392 # However, it has the same name, so the bogon will be chosen
393 # first if we set CC to just the name; use the full file name.
394 shift
395 set dummy "$dir/cc" "$@"
396 shift
397 CC="$@"
398 fi
399 fi
400
401 if test -n "$CC"; then
402 echo "$ac_t""$CC" 1>&6
403 else
404 echo "$ac_t""no" 1>&6
405 fi
406
407 if test -z "$CC"; then
408 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
409 exit 1
410 fi
411 fi
412
413 # Now see if the compiler is really GCC.
414 with_gcc=no
415 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
416
417 trap "$rm conftest.c; exit 1" 1 2 15
418 $rm conftest.c
419 cat > conftest.c <<EOF
420#ifdef __GNUC__
421 yes;
422#endif
423EOF
424 if eval "$CC -E conftest.c" | egrep yes >/dev/null 2>&1; then :
425 with_gcc=yes
426 fi
427 $rm conftest.c
428 echo $ac_t "$with_gcc" 1>&6
429fi
430
431# Allow CC to be a program name with arguments.
432set dummy $CC
433compiler="$2"
434
435echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
436pic_flag=
437profile_flag_pattern=
438wl=
439link_static_flag=
440
441if test "$with_gcc" = yes; then
442 pic_flag='-fPIC'
443 profile_flag_pattern='-pg?'
444 wl='-Wl,'
445 link_static_flag='-static'
446else
447 # PORTME Check for PIC flags for the system compiler.
448 case "$host" in
449 *-*-aix3* | *-*-aix4*)
450 # FIXME All rs/6000 code is PIC, but is there any non-rs/6000 AIX platform?
451 link_static_flag='-bnso -bI:/lib/syscalls.exp'
452 ;;
453
454 *-*-hpux10*)
455 # FIXME link_static_flag?
456 pic_flag='+Z'
457 ;;
458
459 *-*-osf3*)
460 # FIXME - pic_flag, link_static_flag?
461 ;;
462
463 *-*-solaris2*)
464 pic_flag='-KPIC'
465 link_static_flag='-Bstatic'
466 ;;
467
468 *-*-sunos4*)
469 pic_flag='-PIC'
470 link_static_flag='-Bstatic'
471 wl='-Qoption ld '
472 ;;
473
474 *)
475 can_build_shared=no
476 ;;
477 esac
478fi
479
480case "$host" in
481rs6000-*-*)
482 # Yippee! All rs/6000 code is position-independent.
483 pic_flag=
484 ;;
485esac
486
487if test -n "$pic_flag"; then
488 echo $ac_t "$pic_flag" 1>&6
489 pic_flag=" $pic_flag"
490else
491 echo $ac_t none 1>&6
492fi
493
494echo $ac_n "checking for $compiler option to statically link programs... $ac_c" 1>&6
495if test -n "$link_static_flag"; then
496 echo $ac_t "$link_static_flag" 1>&6
497else
498 echo $ac_t none 1>&6
499fi
500
501# See if we're really using GNU ld.
502test -z "$LD" && LD="ld"
503with_gnu_ld=no
504# Allow LD to be a program name with arguments.
505set dummy $LD
506linker="$2"
507echo $ac_n "checking if $LD is GNU ld... $ac_c" 1>&6
508if $LD --version 2>&1 | egrep 'with BFD' > /dev/null; then
509 with_gnu_ld=yes
510 linker="GNU ld"
511fi
512echo $ac_t "$with_gnu_ld" 1>&6
513
514# See if the linker supports building shared libraries.
515echo $ac_n "checking if $linker supports shared libraries... $ac_c" 1>&6
516
517archive_cmds=
518link_rpath_flag=
519hardcode_minus_L=no
520hardcode_shlibpath_var=no
521
522ld_shlibs=yes
523if test "$with_gnu_ld" = yes; then
524 # See if GNU ld supports shared libraries.
525
526 case "$host" in
527 *-*-sunos4*)
528 ld_shlibs=yes
529 ;;
530
531 *)
532 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
533 ld_shlibs=yes
534 else
535 ld_shlibs=no
536 fi
537 ;;
538 esac
539
540 if test "$ld_shlibs" = yes; then
541 archive_cmds='$cc -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs'
542 link_rpath_flag='${wl}-rpath $wl$libdir'
543 fi
544else
545 # PORTME fill in a description of your system's linker (not GNU ld)
546 case "$host" in
547 *-*-aix3*)
548 archive_cmds='$rm $lib.exp;/ucb/nm$libobjs | egrep \" D \" | sed \"s/^.* //\" > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE -lc$deplibs;ar cru $lib $objdir/$soname'
549 hardcode_shlibpath_var=yes
550 hardcode_minus_L=yes
551 ;;
552
553 *-*-aix4*)
554 archive_cmds='$rm $lib.exp;/bin/nm -B$libobjs | egrep \" D \" | sed \"s/^.* //\" > $lib.exp;$cc -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry$deplibs;ar cru $lib $objdir/$soname'
555 hardcode_shlibpath_var=yes
556 hardcode_minus_L=yes
557 ;;
558
559 *-*-freebsd*)
560 archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
561 hardcode_minus_L=yes
562 ;;
563
564 *-*-hpux10*)
565 archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs$deplibs'
566 link_rpath_flag='${wl}+b ${wl}$libdir'
567 hardcode_minus_L=yes
568 hardcode_shlibpath_var=yes
569 ;;
570
571 *-*-netbsd*)
572 # Tested with NetBSD 1.2 ld
573 archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
574 link_rpath_flag='-R$libdir'
575 ;;
576
577 *-*-osf3*)
578 archive_cmds='$LD -shared -o $lib -rpath $install_libdir -soname $soname -set_version $verstring$libobjs -lc$deplibs'
579 link_rpath_flag='${wl}-rpath ${wl}$libdir'
580 ;;
581
582 *-*-solaris2*)
583 archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
584 link_rpath_flag='-R$libdir'
585 ;;
586
587 *-*-sunos4*)
588 archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs$deplibs'
589 link_rpath_flag='-L$libdir'
590 hardcode_minus_L=yes
591 ;;
592
593 *)
594 ld_shlibs=no
595 can_build_shared=no
596 ;;
597 esac
598fi
599echo $ac_t "$ld_shlibs" 1>&6
600
601if test "$hardcode_shlibpath_var" = yes && test "$hardcode_minus_L" = yes; then
602 echo "$progname: warning: $LD needlessly hardcodes library paths into binaries" 1>&2
603 echo "$PACKAGE will compensate by relinking binaries at install time." 1>&2
604fi
605
606reload_flag=
607reload_cmds='$LD$reload_flag -o $output$reload_objs'
608echo $ac_n "checking for $linker option to reload object files... $ac_c" 1>&6
609# PORTME Some linker may need a different reload flag.
610reload_flag='-r'
611echo $ac_t "$reload_flag"
612test -n "$reload_flag" && reload_flag=" $reload_flag"
613
614# PORTME Fill in your ld.so characteristics
615can_build_shared=yes
616lib_names=
617soname_spec=
618postinstall_cmds=
619finish_cmds=
620shlibpath_var=
621version_type=none
622dynamic_linker="$host_os ld.so"
623
624echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
625case "$host" in
626*-*-aix3* | *-*-aix4*)
627 # Shared libraries and static libraries currently use the same namespace.
628 test "$enable_shared" = no || enable_static=no
629
630 version_type=linux
631 lib_names='$libname.so.$versuffix $libname.a'
632 shlibpath_var=LIBPATH
633
634 # AIX has no versioning support, so we append a major version to the name.
635 soname_spec='$libname.so.$major'
636 ;;
637
638*-*-freebsd*)
639 version_type=sunos
640 lib_names='$libname.so.$versuffix $libname.so'
641 finish_cmds='ldconfig -m $libdir'
642 shlibpath_var=LD_LIBRARY_PATH
643 ;;
644
645*-*-gnu*)
646 version_type=sunos
647 lib_names='$libname.so.$versuffix'
648 shlibpath_var=LD_LIBRARY_PATH
649 ;;
650
651*-*-hpux10*)
652 # Give a soname corresponding to the major version so that dld.sl refuses to
653 # link against other versions.
654 dynamic_linker="$host_os dld.sl"
655 version_type=sunos
656 shlibpath_var=SHLIB_PATH
657 lib_names='$libname.sl.$versuffix $libname.sl.$major $libname.sl'
658 soname_spec='$libname.sl.$major'
659 # HP-UX runs *really* slowly unless shared libraries are mode 555.
660 postinstall_cmds='chmod 555 $lib'
661 ;;
662
663# No shared lib support for linuxoldld or linuxaout.
664*-*-linuxoldld* | *-*-linuxaout*)
665 dynamic_linker=no
666 can_build_shared=no
667 ;;
668
669*-*-linux*)
670 version_type=linux
671 lib_names='$libname.so.$versuffix $libname.so.$major $libname.so'
672 soname_spec='$libname.so.$major'
673 finish_cmds='ldconfig -n $libdir'
674 shlibpath_var=LD_LIBRARY_PATH
675 ;;
676
677*-*-netbsd*)
678 version_type=sunos
679 lib_names='$libname.so.$versuffix'
680 finish_cmds='ldconfig -m $libdir'
681 shlibpath_var=LD_LIBRARY_PATH
682 ;;
683
684*-*-osf3*)
685 version_type=osf
686 soname_spec='$libname.so'
687 lib_names='$libname.so.$versuffix $libname.so'
688 shlibpath_var=LD_LIBRARY_PATH
689 ;;
690
691*-*-solaris2*)
692 version_type=linux
693 lib_names='$libname.so.$versuffix $libname.so.$major $libname.so'
694 soname_spec='$libname.so.$major'
695 shlibpath_var=LD_LIBRARY_PATH
696 ;;
697
698*-*-sunos4*)
699 version_type=sunos
700 lib_names='$libname.so.$versuffix'
701 finish_cmds='ldconfig $libdir'
702 shlibpath_var=LD_LIBRARY_PATH
703 ;;
704
705*)
706 dynamic_linker=no
707 can_build_shared=no
708 ;;
709esac
710echo "$ac_t""$dynamic_linker"
711
712
713# Report the consequences.
714echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
715
716echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
717test "$can_build_shared" = "no" && enable_shared=no
718
719if test "$enable_shared" = yes; then
720 # On AIX, we do not build both static and shared libraries.
721 case "$host_os" in
722 aix*)
723 test "$enable_static" = yes && enable_static=no
724 if test -n "$RANLIB"; then
725 archive_cmds="$archive_cmds;\$RANLIB \$lib"
726 postinstall_cmds='$RANLIB $lib'
727 fi
728 ;;
729 esac
730fi
731
732echo "$ac_t""$enable_shared" 1>&6
733
734
735ofile=libtool
736trap "$rm $ofile; exit 1" 1 2 15
737echo creating $ofile
738rm -fr $ofile
739cat <<EOF > $ofile
740#! /bin/sh
741
742# libtool - Provide generalized library-building support services.
743#
744# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
745# This program was configured as follows,
746# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
747#
748# CC="$old_CC" CFLAGS="$old_CFLAGS" LD="$old_LD" RANLIB="$old_RANLIB" \\
749# $0$ltconfig_args
750#
751# Compiler and other test output produced by $progname, useful for
752# debugging $progname, is in ./config.log if it exists.
753
754# The version of $progname that generated this script.
755LTCONFIG_VERSION="$VERSION"
756
757# Whether or not to build libtool libraries.
758build_libtool_libs=$enable_shared
759
760# Whether or not to build old-style libraries.
761build_old_libs=$enable_static
762
763# The host system.
764host_alias="$host_alias"
765host="$host"
766
767# The linker used to build libraries.
768LD='$LD'
769
770# How to create reloadable object files.
771reload_flag='$reload_flag'
772reload_cmds='$reload_cmds'
773
774# How to pass a linker flag through the compiler.
775wl='$wl'
776
777# Additional compiler flags for building library objects.
778pic_flag='$pic_flag'
779
780# Compiler flag to prevent dynamic linking.
781link_static_flag='$link_static_flag'
782
783# Pattern to match compiler flags for creating libNAME_p libraries:
784profile_flag_pattern='$profile_flag_pattern'
785
786# Library versioning type.
787version_type=$version_type
788
789# List of archive names. First name is the real one, the rest are links.
790lib_names='$lib_names'
791
792# The coded name of the library, if different from the real name.
793soname_spec='$soname_spec'
794
795# Commands used to build and install an old-style archive.
796RANLIB='$RANLIB'
797old_archive_cmds='$old_archive_cmds'
798old_postinstall_cmds='$old_postinstall_cmds'
799
800# Commands used to build and install a shared archive.
801archive_cmds='$archive_cmds'
802postinstall_cmds='$postinstall_cmds'
803
804# Commands used to finish a libtool library installation in a directory.
805finish_cmds='$finish_cmds'
806
807# The flag that specifies a runtime search path when linking.
808link_rpath_flag='$link_rpath_flag'
809
810# How to strip a library file.
811striplib='$striplib'
812old_striplib='$old_striplib'
813
814# This is the shared library path variable.
815shlibpath_var=$shlibpath_var
816
817# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the
818# the resulting binary.
819hardcode_shlibpath_var=$hardcode_shlibpath_var
820
821# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
822# resulting binary.
823hardcode_minus_L=$hardcode_minus_L
824
825EOF
826
827# Detect if we are using a relative or absolute path to ltmain.sh.
828case "$ltmain" in
829/*) cat <<EOF2 >> $ofile
830# Execute the libtool backend.
831. $ltmain
832EOF2
833 ;;
834*) cat <<EOF3 >> $ofile
835# Find the path to this script.
836thisdir=\`echo "\$0" | sed -e 's%/[^/]*\$%%'\`
837test "X\$0" = "X\$thisdir" && thisdir=.
838
839# Execute the libtool backend.
840. \$thisdir/$ltmain
841EOF3
842 ;;
843esac
844
845echo 'exit 1' >> $ofile
846
847chmod +x $ofile
848exit 0
849
850# Local Variables:
851# mode:shell-script
852# sh-indentation:2
853# End: