]> Pileus Git - ~andy/gtk/blob - ltconfig
2b366f5fc1f1d2eff673e2f761e62fbf5d059157
[~andy/gtk] / ltconfig
1 #! /bin/sh
2
3 # ltconfig - Create a system-specific libtool.
4 # Generated automatically from ltconfig.in by configure.
5 # Copyright (C) 1996, 1997, 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.
30 progname=`echo "$0" | sed 's%^.*/%%'`
31
32 # Constants:
33 PROGRAM=ltconfig
34 PACKAGE=libtool
35 VERSION=1.0f
36 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
37 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
38 rm="rm -f"
39
40 help="Try \`$progname --help' for more information."
41
42 # Sed substitution that helps us do robust quoting.  It backslashifies
43 # metacharacters that are still active within double-quoted strings.
44 sed_quote_subst='s/\([\\"$\\\\]\)/\\\1/g'
45
46 # Same as above, but don't quote variable references.
47 double_quote_subst='s/\([\\"\\\\]\)/\\\1/g'
48
49 # Global variables:
50 can_build_shared=yes
51 enable_shared=yes
52 # All known linkers require a `.a' archive for static linking.
53 enable_static=yes
54 ltmain=
55 silent=
56 srcdir=
57 ac_config_guess=
58 ac_config_sub=
59 host=
60 nonopt=
61 verify_host=yes
62 with_gcc=no
63 with_gnu_ld=no
64
65 old_AR="$AR"
66 old_CC="$CC"
67 old_CFLAGS="$CFLAGS"
68 old_CPPFLAGS="$CPPFLAGS"
69 old_LD="$LD"
70 old_LN_S="$LN_S"
71 old_NM="$NM"
72 old_RANLIB="$RANLIB"
73
74 # Parse the command line options.
75 args=
76 prev=
77 for option
78 do
79   case "$option" in
80   -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81   *) optarg= ;;
82   esac
83
84   # If the previous option needs an argument, assign it.
85   if test -n "$prev"; then
86     eval "$prev=\$option"
87     prev=
88     continue
89   fi
90
91   case "$option" in
92   --help) cat <<EOM
93 Usage: $progname [OPTION]... LTMAIN [HOST]
94
95 Generate a system-specific libtool script.
96
97     --disable-shared       do not build shared libraries
98     --disable-static       do not build static libraries
99     --help                 display this help and exit
100     --no-verify            do not verify that HOST is a valid host type
101     --quiet                same as \`--silent'
102     --silent               don't print informational messages
103     --srcdir=DIR           find \`config.guess' in DIR
104     --version              output version information and exit
105     --with-gcc             assume that the GNU C compiler will be used
106     --with-gnu-ld          assume that the C compiler uses the GNU linker
107
108 LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
109 functionality.
110
111 HOST is the canonical host system name [default=guessed].
112 EOM
113   exit 0
114   ;;
115
116   --disable-shared) enable_shared=no ;;
117
118   --disable-static) enable_static=no ;;
119
120   --quiet | --silent) silent=yes ;;
121
122   --srcdir) prev=srcdir ;;
123   --srcdir=*) srcdir="$optarg" ;;
124
125   --no-verify) verify_host=no ;;
126
127   --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
128
129   --with-gcc) with_gcc=yes ;;
130   --with-gnu-ld) with_gnu_ld=yes ;;
131
132   -*)
133     echo "$progname: unrecognized option \`$option'" 1>&2
134     echo "$help" 1>&2
135     exit 1
136     ;;
137
138   *)
139     if test -z "$ltmain"; then
140       ltmain="$option"
141     elif test -z "$host"; then
142 # FIXME This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
143 #      if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
144 #        echo "$progname: warning \`$option' is not a valid host type" 1>&2
145 #      fi
146       host="$option"
147     else
148       echo "$progname: too many arguments" 1>&2
149       echo "$help" 1>&2
150       exit 1
151     fi ;;
152   esac
153 done
154
155 if test -z "$ltmain"; then
156   echo "$progname: you must specify a LTMAIN file" 1>&2
157   echo "$help" 1>&2
158   exit 1
159 fi
160
161 if test -f "$ltmain"; then :
162 else
163   echo "$progname: warning: \`$ltmain' does not exist" 1>&2
164 fi
165
166 # Quote any args containing shell metacharacters.
167 ltconfig_args=
168 for arg
169 do
170   case "$arg" in
171   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
172   ltconfig_args="$ltconfig_args '$arg'" ;;
173   *) ltconfig_args="$ltconfig_args $arg" ;;
174   esac
175 done
176
177 # A relevant subset of AC_INIT.
178
179 # File descriptor usage:
180 # 0 standard input
181 # 1 file creation
182 # 2 errors and warnings
183 # 3 some systems may open it to /dev/tty
184 # 4 used on the Kubota Titan
185 # 5 compiler messages saved in config.log
186 # 6 checking for... messages and results
187 if test "$silent" = yes; then
188   exec 6>/dev/null
189 else
190   exec 6>&1
191 fi
192 exec 5>>./config.log
193
194 # NLS nuisances.
195 # Only set LANG and LC_ALL to C if already set.
196 # These must not be set unconditionally because not all systems understand
197 # e.g. LANG=C (notably SCO).
198 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
199 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
200
201 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
202   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
203   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
204     ac_n= ac_c='
205 ' ac_t='        '
206   else
207     ac_n=-n ac_c= ac_t=
208   fi
209 else
210   ac_n= ac_c='\c' ac_t=
211 fi
212
213 if test -z "$srcdir"; then
214   # Assume the source directory is the same one as the path to ltmain.sh.
215   srcdir=`echo "$ltmain" | sed 's%/[^/]*$%%'`
216   test "$srcdir" = "$ltmain" && srcdir=.
217 fi
218
219 trap "$rm conftest*; exit 1" 1 2 15
220 if test "$verify_host" = yes; then
221   # Check for config.guess and config.sub.
222   ac_aux_dir=
223   for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
224     if test -f $ac_dir/config.guess; then
225       ac_aux_dir=$ac_dir
226       break
227     fi
228   done
229   if test -z "$ac_aux_dir"; then
230     echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
231     echo "$help" 1>&2
232     exit 1
233   fi
234   ac_config_guess=$ac_aux_dir/config.guess
235   ac_config_sub=$ac_aux_dir/config.sub
236
237   # Make sure we can run config.sub.
238   if $ac_config_sub sun4 >/dev/null 2>&1; then :
239   else
240     echo "$progname: cannot run $ac_config_sub" 1>&2
241     echo "$help" 1>&2
242     exit 1
243   fi
244
245   echo $ac_n "checking host system type""... $ac_c" 1>&6
246
247   host_alias=$host
248   case "$host_alias" in
249   "")
250     if host_alias=`$ac_config_guess`; then :
251     else
252       echo "$progname: cannot guess host type; you must specify one" 1>&2
253       echo "$help" 1>&2
254       exit 1
255     fi ;;
256   esac
257   host=`$ac_config_sub $host_alias`
258   echo "$ac_t$host" 1>&6
259
260   # Make sure the host verified.
261   test -z "$host" && exit 1
262
263 elif test -z "$host"; then
264   echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
265   echo "$help" 1>&2
266   exit 1
267 else
268   host_alias=$host
269 fi
270
271 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
272 case "$host" in
273 *-*-linux-gnu*) ;;
274 *-*-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
275 esac
276
277 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
278 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
279 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
280
281 case "$host_os" in
282 aix*)
283   # AIX sometimes has problems with the GCC collect2 program.  For some
284   # reason, if we set the COLLECT_NAMES environment variable, the problems
285   # vanish in a puff of smoke.
286   if test "${COLLECT_NAMES+set}" != set; then
287     COLLECT_NAMES=
288     export COLLECT_NAMES
289   fi
290   ;;
291 esac
292
293 # Determine commands to create old-style static archives.
294 old_archive_cmds='$AR cru $oldlib$oldobjs'
295 old_postinstall_cmds='chmod 644 $oldlib'
296
297 # Set a sane default for `AR'.
298 test -z "$AR" && AR=ar
299
300 # If RANLIB is not set, then run the test.
301 if test "${RANLIB+set}" != "set"; then
302   result=no
303
304   echo $ac_n "checking for ranlib... $ac_c" 1>&6
305   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
306   for dir in $PATH; do
307     test -z "$dir" && dir=.
308     if test -f $dir/ranlib; then
309       RANLIB="ranlib"
310       result="ranlib"
311       break
312     fi
313   done
314   IFS="$save_ifs"
315
316   echo "$ac_t$result" 1>&6
317 fi
318
319 if test -n "$RANLIB"; then
320   old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib"
321   old_postinstall_cmds="$old_postinstall_cmds;\$RANLIB \$oldlib"
322 fi
323
324 # Check to see if we are using GCC.
325 if test "$with_gcc" != yes || test -z "$CC"; then
326   # If CC is not set, then try to find GCC or a usable CC.
327   if test -z "$CC"; then
328     echo $ac_n "checking for gcc... $ac_c" 1>&6
329     IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
330     for dir in $PATH; do
331       IFS="$save_ifs"
332       test -z "$dir" && dir=.
333       if test -f $dir/gcc; then
334         CC="gcc"
335         break
336       fi
337     done
338     IFS="$save_ifs"
339
340     if test -n "$CC"; then
341       echo "$ac_t$CC" 1>&6
342     else
343       echo "$ac_t"no 1>&6
344     fi
345   fi
346
347   # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
348   if test -z "$CC"; then
349     echo $ac_n "checking for cc... $ac_c" 1>&6
350     IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
351     cc_rejected=no
352     for dir in $PATH; do
353       test -z "$dir" && dir=.
354       if test -f $dir/cc; then
355         if test "$dir/cc" = "/usr/ucb/cc"; then
356           cc_rejected=yes
357           continue
358         fi
359         CC="cc"
360         break
361       fi
362     done
363     IFS="$save_ifs"
364     if test $cc_rejected = yes; then
365       # We found a bogon in the path, so make sure we never use it.
366       set dummy $CC
367       shift
368       if test $# -gt 0; then
369         # We chose a different compiler from the bogus one.
370         # However, it has the same name, so the bogon will be chosen
371         # first if we set CC to just the name; use the full file name.
372         shift
373         set dummy "$dir/cc" "$@"
374         shift
375         CC="$@"
376       fi
377     fi
378
379     if test -n "$CC"; then
380       echo "$ac_t$CC" 1>&6
381     else
382       echo "$ac_t"no 1>&6
383     fi
384
385     if test -z "$CC"; then
386       echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
387       exit 1
388     fi
389   fi
390
391   # Now see if the compiler is really GCC.
392   with_gcc=no
393   echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
394   echo "$progname:394: checking whether we are using GNU C" >&5
395
396   $rm conftest.c
397   cat > conftest.c <<EOF
398 #ifdef __GNUC__
399   yes;
400 #endif
401 EOF
402   if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
403     with_gcc=yes
404   fi
405   $rm conftest.c
406   echo "$ac_t$with_gcc" 1>&6
407 fi
408
409 # Allow CC to be a program name with arguments.
410 set dummy $CC
411 compiler="$2"
412
413 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
414 pic_flag=
415 profile_flag_pattern=
416 special_shlib_compile_flags=
417 wl=
418 link_static_flag=
419 no_builtin_flag=
420
421 if test "$with_gcc" = yes; then
422   profile_flag_pattern='-pg?'
423   wl='-Wl,'
424   link_static_flag='-static'
425   no_builtin_flag=' -fno-builtin'
426
427   case "$host_os" in
428   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
429     # PIC is the default for these OSes.
430     ;;
431   os2*)
432     # We can build DLLs from non-PIC.
433     ;;
434   *)
435     pic_flag='-fPIC'
436     ;;
437   esac
438 else
439   # PORTME Check for PIC flags for the system compiler.
440   case "$host_os" in
441   aix3* | aix4*)
442     # All AIX code is PIC.
443     link_static_flag='-bnso -bI:/lib/syscalls.exp'
444     ;;
445
446   hpux9* | hpux10*)
447     # Is there a better link_static_flag that works with the bundled CC?
448     wl='-Wl,'
449     link_static_flag='${wl}-a ${wl}archive'
450     pic_flag='+Z'
451     ;;
452
453   irix5* | irix6*)
454     wl='-Wl,'
455     link_static_flag='-non_shared'
456     # PIC (with -KPIC) is the default.
457     ;;
458
459   os2*)
460     # We can build DLLs from non-PIC.
461     ;;
462
463   osf3* | osf4*)
464     # All OSF/1 code is PIC.
465     wl='-Wl,'
466     link_static_flag='-non_shared'
467     ;;
468
469   sco3.2v5*)
470     pic_flag='-Kpic'
471     link_static_flag='-dn'
472     special_shlib_compile_flags='-belf'
473     ;;
474
475   solaris2*)
476     pic_flag='-KPIC'
477     link_static_flag='-Bstatic'
478     wl='-Wl,'
479     ;;
480
481   sunos4*)
482     pic_flag='-PIC'
483     link_static_flag='-Bstatic'
484     wl='-Qoption ld '
485     ;;
486
487   uts4*)
488     pic_flag='-pic'
489     link_static_flag='-Bstatic'
490     ;;
491
492   *)
493     can_build_shared=no
494     ;;
495   esac
496 fi
497
498 if test -n "$pic_flag"; then
499   echo "$ac_t$pic_flag" 1>&6
500
501   # Check to make sure the pic_flag actually works.
502   echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
503   $rm conftest*
504   echo > conftest.c
505   save_CFLAGS="$CFLAGS"
506   CFLAGS="$CFLAGS $pic_flag -DPIC"
507   echo "$progname:507: checking if $compiler PIC flag $pic_flag works" >&5
508   if { (eval echo $progname:508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
509     # Append any errors to the config.log.
510     cat conftest.err 1>&5
511
512     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
513     # reports no error.  So, we need to grep stderr for (Bundled).
514     if grep '(Bundled)' conftest.err >/dev/null; then
515       echo "$ac_t"no 1>&6
516       can_build_shared=no
517       pic_flag=
518     else
519       echo "$ac_t"yes 1>&6
520       pic_flag=" $pic_flag"
521     fi
522   else
523     # Append any errors to the config.log.
524     cat conftest.err 1>&5
525     can_build_shared=no
526     pic_flag=
527     echo "$ac_t"no 1>&6
528   fi
529   CFLAGS="$save_CFLAGS"
530   $rm conftest*
531 else
532   echo "$ac_t"none 1>&6
533 fi
534
535 # Check for any special shared library compilation flags.
536 if test -n "$special_shlib_compile_flags"; then
537   echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
538   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$special_shlib_compile_flags[  ]" >/dev/null; then :
539   else
540     echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
541     can_build_shared=no
542   fi
543 fi
544
545 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
546 $rm conftest*
547 echo 'main(){return(0);}' > conftest.c
548 save_LDFLAGS="$LDFLAGS"
549 LDFLAGS="$LDFLAGS $link_static_flag"
550 echo "$progname:550: checking if $compiler static flag $link_static_flag works" >&5
551 if { (eval echo $progname:551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
552   echo "$ac_t$link_static_flag" 1>&6
553 else
554   echo "$ac_t"none 1>&6
555   link_static_flag=
556 fi
557 LDFLAGS="$save_LDFLAGS"
558 $rm conftest*
559
560 if test -z "$LN_S"; then
561   # Check to see if we can use ln -s, or we need hard links.
562   echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
563   $rm conftestdata
564   if ln -s X conftestdata 2>/dev/null; then
565     $rm conftestdata
566     LN_S="ln -s"
567   else
568     LN_S=ln
569   fi
570   if test "$LN_S" = "ln -s"; then
571     echo "$ac_t"yes 1>&6
572   else
573     echo "$ac_t"no 1>&6
574   fi
575 fi
576
577 # Make sure LD is an absolute path.
578 if test -z "$LD"; then
579   ac_prog=ld
580   if test "$with_gcc" = yes; then
581     # Check if gcc -print-prog-name=ld gives a path.
582     echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
583     echo "$progname:583: checking for ld used by GCC" >&5
584     ac_prog=`($CC -print-prog-name=ld) 2>&5`
585     case "$ac_prog" in
586     # Accept absolute paths.
587     /*)
588       test -z "$LD" && LD="$ac_prog"
589       ;;
590     "")
591       # If it fails, then pretend we aren't using GCC.
592       ac_prog=ld
593       ;;
594     *)
595       # If it is relative, then search for the first ld in PATH.
596       with_gnu_ld=unknown
597       ;;
598     esac
599   elif test "$with_gnu_ld" = yes; then
600     echo $ac_n "checking for GNU ld... $ac_c" 1>&6
601     echo "$progname:601: checking for GNU ld" >&5
602   else
603     echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
604     echo "$progname:604: checking for non-GNU ld" >&5
605   fi
606
607   if test -z "$LD"; then
608     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
609     for ac_dir in $PATH; do
610       test -z "$ac_dir" && ac_dir=.
611       if test -f "$ac_dir/$ac_prog"; then
612         LD="$ac_dir/$ac_prog"
613         # Check to see if the program is GNU ld.  I'd rather use --version,
614         # but apparently some GNU ld's only accept -v.
615         # Break only if it was the GNU/non-GNU ld that we prefer.
616         if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
617           test "$with_gnu_ld" != no && break
618         else
619           test "$with_gnu_ld" != yes && break
620         fi
621       fi
622     done
623     IFS="$ac_save_ifs"
624   fi
625
626   if test -n "$LD"; then
627     echo "$ac_t$LD" 1>&6
628   else
629     echo "$ac_t"no 1>&6
630   fi
631
632   if test -z "$LD"; then
633     echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
634     exit 1
635   fi
636 fi
637
638 # Check to see if it really is or isn't GNU ld.
639 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
640 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
641 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
642   with_gnu_ld=yes
643 else
644   with_gnu_ld=no
645 fi
646 echo "$ac_t$with_gnu_ld" 1>&6
647
648 # See if the linker supports building shared libraries.
649 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
650
651 allow_undefined_flag=
652 archive_cmds=
653 old_archive_from_new_cmds=
654 export_dynamic_flag_spec=
655 hardcode_libdir_flag_spec=
656 hardcode_libdir_separator=
657 hardcode_direct=no
658 hardcode_minus_L=no
659 hardcode_runpath_var=no
660 hardcode_shlibpath_var=unsupported
661 runpath_var=
662
663 ld_shlibs=yes
664 if test "$with_gnu_ld" = yes; then
665   # See if GNU ld supports shared libraries.
666
667   case "$host_os" in
668   sunos4*)
669     ld_shlibs=yes
670     hardcode_direct=yes
671     hardcode_shlibpath_var=no
672     ;;
673
674   *)
675     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
676       runpath_var=LD_RUN_PATH
677       hardcode_runpath_var=yes
678       ld_shlibs=yes
679     else
680       ld_shlibs=no
681     fi
682     ;;
683   esac
684
685   if test "$ld_shlibs" = yes; then
686     archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs$deplibs'
687     hardcode_libdir_flag_spec='${wl}-rpath $wl$libdir'
688     export_dynamic_flag_spec='${wl}-export-dynamic'
689   fi
690 else
691   # PORTME fill in a description of your system's linker (not GNU ld)
692   case "$host_os" in
693   aix3*)
694     allow_undefined_flag=unsupported
695     archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '"'s/.* //'"' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE$deplibs;$AR cru $lib $objdir/$soname'
696     # Note: this linker hardcodes the directories in LIBPATH if there
697     # are no directories specified by -L.
698     hardcode_minus_L=yes
699     if test "$with_gcc" = yes && test -z "$link_static_flag"; then
700       # Neither direct hardcoding nor static linking is supported with a
701       # broken collect2.
702       hardcode_direct=unsupported
703     fi
704     ;;
705
706   aix4*)
707     allow_undefined_flag=unsupported
708     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$deplibs;$AR cru $lib $objdir/$soname'
709     hardcode_direct=yes
710     hardcode_minus_L=yes
711     ;;
712
713   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
714   # support.  Future versions do this automatically, but an explicit c++rt0.o
715   # doesn't break anything, and helps significantly (at the cost of a little
716   # extra space).
717   freebsd2.2*)
718     archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs /usr/lib/c++rt0.o'
719     hardcode_direct=yes
720     hardcode_minus_L=yes
721     hardcode_shlibpath_var=no
722     ;;
723
724   # Unfortunately, older versions of FreeBSD 2 don't have this feature.
725   freebsd2*)
726     archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
727     hardcode_direct=yes
728     hardcode_minus_L=yes
729     hardcode_shlibpath_var=no
730     ;;
731
732   # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
733   freebsd3*)
734     archive_cmds='$CC -shared -o $lib$libobjs$deplibs'
735     hardcode_libdir_flag_spec='-R$libdir'
736     hardcode_direct=yes
737     hardcode_minus_L=yes
738     hardcode_shlibpath_var=no
739     ;;
740
741   hpux9*)
742     archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs$deplibs;mv $objdir/$soname $lib'
743     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
744     hardcode_direct=yes
745     hardcode_minus_L=yes
746     ;;
747
748   hpux10*)
749     archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs$deplibs'
750     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
751     hardcode_direct=yes
752     hardcode_minus_L=yes
753     ;;
754
755   irix5* | irix6*)
756     archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
757     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
758     ;;
759
760   netbsd*)
761     # Tested with NetBSD 1.2 ld
762     archive_cmds='$LD -Bshareable -o $lib$libobjs'
763     hardcode_libdir_flag_spec='-R$libdir'
764     hardcode_direct=yes
765     hardcode_shlibpath_var=no
766     ;;
767
768   openbsd*)
769     archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
770     hardcode_libdir_flag_spec='-R$libdir'
771     hardcode_direct=yes
772     hardcode_shlibpath_var=no
773     ;;
774
775   os2*)
776     hardcode_libdir_flag_spec='-L$libdir'
777     hardcode_minus_L=yes
778     allow_undefined_flag=unsupported
779     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;e
780 mxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
781     old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
782     ;;
783
784   osf3* | osf4*)
785     allow_undefined_flag=' -expect_unresolved \*'
786     archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
787     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
788     hardcode_libdir_separator=:
789     ;;
790
791   sco3.2v5*)
792     archive_cmds='$LD -G -o $lib$libobjs$deplibs'
793     hardcode_direct=yes
794     ;;
795
796   solaris2*)
797     case "$host_cpu" in
798     i386) archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs' ;;
799     *) archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs' ;;
800     esac
801     hardcode_libdir_flag_spec='-R$libdir'
802     hardcode_shlibpath_var=no
803     ;;
804
805   sunos4*)
806     archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
807     hardcode_libdir_flag_spec='-L$libdir'
808     hardcode_direct=yes
809     hardcode_minus_L=yes
810     hardcode_shlibpath_var=no
811     ;;
812
813    uts4*)
814      archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
815      hardcode_libdir_flag_spec='-L$libdir'
816      hardcode_direct=no
817      hardcode_minus_L=no
818      hardcode_shlibpath_var=no
819      ;;
820
821   *)
822     ld_shlibs=no
823     can_build_shared=no
824     ;;
825   esac
826 fi
827 echo "$ac_t$ld_shlibs" 1>&6
828
829 if test -z "$NM"; then
830   echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
831   case "$NM" in
832   /*) ;; # Let the user override the test with a path.
833   *)
834     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
835     for ac_dir in /usr/ucb $PATH /bin; do
836       test -z "$ac_dir" && dir=.
837       if test -f $ac_dir/nm; then
838         # Check to see if the nm accepts a BSD-compat flag.
839         if ($ac_dir/nm -B /dev/null 2>&1; exit 0) | grep /dev/null >/dev/null; then
840           NM="$ac_dir/nm -B"
841         elif ($ac_dir/nm -p /dev/null 2>&1; exit 0) | grep /dev/null >/dev/null; then
842           NM="$ac_dir/nm -p"
843         else
844           NM="$ac_dir/nm"
845         fi
846         break
847       fi
848     done
849     IFS="$ac_save_ifs"
850     test -z "$NM" && NM=nm
851     ;;
852   esac
853   echo "$ac_t$NM" 1>&6
854 fi
855
856 # Check for command to grab the raw symbol name followed by C symbol from nm.
857 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
858
859 # These are sane defaults that work on at least a few old systems.
860 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
861
862 # Character class describing NM global symbol codes.
863 symcode='[BCDEGRSTU]'
864
865 # Regexp to match symbols that can be accessed directly from C.
866 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
867
868 # Transform the above into a raw symbol and a C symbol.
869 symxfrm='\1 \1'
870
871 # Define system-specific variables.
872 case "$host_os" in
873 aix*)
874   symcode='[BCDTU]'
875   ;;
876 solaris2*)
877   symcode='[BDTU]'
878   ;;
879 esac
880
881 # If we're using GNU nm, then use its standard symbol codes.
882 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
883   symcode='[ABCDGISTUW]'
884 fi
885
886 # Write the raw and C identifiers.
887 global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
888
889 # Check to see that the pipe works correctly.
890 pipe_works=no
891 $rm conftest*
892 cat > conftest.c <<EOF
893 #ifdef __cplusplus
894 extern "C" {
895 #endif
896 char nm_test_var;
897 void nm_test_func(){}
898 #ifdef __cplusplus
899 }
900 #endif
901 main(){nm_test_var='a';nm_test_func();return(0);}
902 EOF
903
904 echo "$progname:900: checking if global_symbol_pipe works" >&5
905 if { (eval echo $progname:901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
906   # Now try to grab the symbols.
907   nlist=conftest.nm
908   if { echo "$progname:904: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
909
910     # Try sorting and uniquifying the output.
911     if sort "$nlist" | uniq > "$nlist"T; then
912       mv -f "$nlist"T "$nlist"
913       wcout=`wc "$nlist" 2>/dev/null`
914       count=`echo "$wcout" | sed 's/^[  ]*\([0-9][0-9]*\).*$/\1/'`
915       (test "$count" -ge 0) 2>/dev/null || count=-1
916     else
917       rm -f "$nlist"T
918       count=-1
919     fi
920
921     # Make sure that we snagged all the symbols we need.
922     if egrep ' nm_test_var$' "$nlist" >/dev/null; then
923       if egrep ' nm_test_func$' "$nlist" >/dev/null; then
924         cat <<EOF > conftest.c
925 #ifdef __cplusplus
926 extern "C" {
927 #endif
928
929 EOF
930         # Now generate the symbol file.
931         sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
932
933         cat <<EOF >> conftest.c
934 #if defined (__STDC__) && __STDC__
935 # define __ptr_t void *
936 #else
937 # define __ptr_t char *
938 #endif
939
940 /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
941 int dld_preloaded_symbol_count = $count;
942
943 /* The mapping between symbol names and symbols. */
944 struct {
945   char *name;
946   __ptr_t address;
947 }
948 dld_preloaded_symbols[] =
949 {
950 EOF
951         sed 's/^\(.*\) \(.*\)$/  {"\1", \&\2},/' < "$nlist" >> conftest.c
952         cat <<\EOF >> conftest.c
953   {0},
954 };
955
956 #ifdef __cplusplus
957 }
958 #endif
959 EOF
960         # Now try linking the two files.
961         mv conftest.o conftestm.o
962         save_LIBS="$LIBS"
963         save_CFLAGS="$CFLAGS"
964         LIBS='conftestm.o'
965         CFLAGS="$CFLAGS$no_builtin_flag"
966         if { (eval echo $progname:962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
967           pipe_works=yes
968         else
969           echo "$progname: failed program was:" >&5
970           cat conftest.c >&5
971         fi
972         LIBS="$save_LIBS"
973       else
974         echo "cannot find nm_test_func in $nlist" >&5
975       fi
976     else
977       echo "cannot find nm_test_var in $nlist" >&5
978     fi
979   else
980     echo "cannot run $global_symbol_pipe" >&5
981   fi
982 else
983   echo "$progname: failed program was:" >&5
984   cat conftest.c >&5
985 fi
986 $rm conftest*
987
988 # Don't use the global_symbol_pipe unless it works.
989 echo "$ac_t$pipe_works" 1>&6
990 test "$pipe_works" = yes || global_symbol_pipe=
991
992 # Check hardcoding attributes.
993 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
994 hardcode_action=
995 if test -n "$hardcode_libdir_flag_spec" || \
996    test "$hardcode_runpath_var" = yes; then
997
998   # We can hardcode non-existant directories.
999   if test "$hardcode_direct" != no && \
1000      test "$hardcode_minus_L" != no && \
1001      test "$hardcode_shlibpath_var" != no; then
1002
1003     # Linking always hardcodes the temporary library directory.
1004     hardcode_action=relink
1005   else
1006     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1007     hardcode_action=immediate
1008   fi
1009 elif test "$hardcode_direct" != yes && \
1010      test "$hardcode_minus_L" != yes && \
1011      test "$hardcode_shlibpath_var" != yes; then
1012   # We can't hardcode anything.
1013   hardcode_action=unsupported
1014 else
1015   # We can only hardcode existing directories.
1016   hardcode_action=relink
1017 fi
1018 echo "$ac_t$hardcode_action" 1>&6
1019 test "$hardcode_action" = unsupported && can_build_shared=no
1020
1021
1022 reload_flag=
1023 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1024 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1025 # PORTME Some linker may need a different reload flag.
1026 reload_flag='-r'
1027 echo "$ac_t$reload_flag"
1028 test -n "$reload_flag" && reload_flag=" $reload_flag"
1029
1030 # PORTME Fill in your ld.so characteristics
1031 library_names_spec=
1032 libname_spec='lib$name'
1033 soname_spec=
1034 postinstall_cmds=
1035 finish_cmds=
1036 shlibpath_var=
1037 version_type=none
1038 dynamic_linker="$host_os ld.so"
1039
1040 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1041 case "$host_os" in
1042 aix3* | aix4*)
1043   version_type=linux
1044   library_names_spec='$libname.so.$versuffix $libname.a'
1045   shlibpath_var=LIBPATH
1046
1047   # AIX has no versioning support, so we append a major version to the name.
1048   soname_spec='$libname.so.$major'
1049   ;;
1050
1051 freebsd2* | freebsd3*)
1052   version_type=sunos
1053   library_names_spec='$libname.so.$versuffix $libname.so'
1054   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1055   shlibpath_var=LD_LIBRARY_PATH
1056   ;;
1057
1058 gnu*)
1059   version_type=sunos
1060   library_names_spec='$libname.so.$versuffix'
1061   shlibpath_var=LD_LIBRARY_PATH
1062   ;;
1063
1064 hpux9* | hpux10*)
1065   # Give a soname corresponding to the major version so that dld.sl refuses to
1066   # link against other versions.
1067   dynamic_linker="$host_os dld.sl"
1068   version_type=sunos
1069   shlibpath_var=SHLIB_PATH
1070   library_names_spec='$libname.sl.$versuffix $libname.sl.$major $libname.sl'
1071   soname_spec='$libname.sl.$major'
1072   # HP-UX runs *really* slowly unless shared libraries are mode 555.
1073   postinstall_cmds='chmod 555 $lib'
1074   ;;
1075
1076 irix5* | irix6*)
1077   version_type=osf
1078   soname_spec='$libname.so'
1079   library_names_spec='$libname.so.$versuffix $libname.so'
1080   shlibpath_var=LD_LIBRARY_PATH
1081   ;;
1082
1083 # No shared lib support for Linux oldld, aout, or coff.
1084 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1085   dynamic_linker=no
1086   ;;
1087
1088 # This must be Linux ELF.
1089 linux-gnu*)
1090   version_type=linux
1091   library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1092   soname_spec='$libname.so.$major'
1093   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1094   shlibpath_var=LD_LIBRARY_PATH
1095
1096   if test -f /lib/ld.so.1; then
1097     dynamic_linker='GNU ld.so'
1098   else
1099     # Only the GNU ld.so supports shared libraries on MkLinux.
1100     case "$host_cpu" in
1101     powerpc*) dynamic_linker=no ;;
1102     *) dynamic_linker='Linux ld.so' ;;
1103     esac
1104   fi
1105   ;;
1106
1107 netbsd* | openbsd*)
1108   version_type=sunos
1109   library_names_spec='$libname.so.$versuffix'
1110   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1111   shlibpath_var=LD_LIBRARY_PATH
1112   ;;
1113
1114 os2*)
1115   version_type=none
1116   libname_spec='$name'
1117   library_names_spec='$libname.dll $libname.a'
1118   dynamic_linker='OS/2 ld.exe'
1119   shlibpath_var=LIBPATH
1120   ;;
1121
1122 osf3* | osf4*)
1123   version_type=osf
1124   soname_spec='$libname.so'
1125   library_names_spec='$libname.so.$versuffix $libname.so'
1126   shlibpath_var=LD_LIBRARY_PATH
1127   ;;
1128
1129 sco3.2v5*)
1130   version_type=osf
1131   soname_spec='$libname.so.$major'
1132   library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1133   shlibpath_var=LD_LIBRARY_PATH
1134   ;;
1135
1136 solaris2*)
1137   version_type=linux
1138   library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1139   soname_spec='$libname.so.$major'
1140   shlibpath_var=LD_LIBRARY_PATH
1141   ;;
1142
1143 sunos4*)
1144   version_type=sunos
1145   library_names_spec='$libname.so.$versuffix'
1146   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1147   shlibpath_var=LD_LIBRARY_PATH
1148   ;;
1149
1150 uts4*)
1151   version_type=linux
1152   library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1153   soname_spec='$libname.so.$major'
1154   shlibpath_var=LD_LIBRARY_PATH
1155   ;;
1156
1157 *)
1158   dynamic_linker=no
1159   ;;
1160 esac
1161 echo "$ac_t$dynamic_linker"
1162 test "$dynamic_linker" = no && can_build_shared=no
1163
1164 # FIXME add checks for striplib and old_striplib here.
1165 # strip -x works for most platforms, though not for static libraries on NetBSD
1166 # HP-UX requires "-r" for library stripping
1167 striplib=
1168 old_striplib=
1169
1170 # Report the final consequences.
1171 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
1172
1173 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
1174 test "$can_build_shared" = "no" && enable_shared=no
1175
1176 # On AIX, shared libraries and static libraries use the same namespace, and
1177 # are all built from PIC.
1178 case "$host_os" in
1179 aix*)
1180   test "$enable_shared" = yes && enable_static=no
1181   if test -n "$RANLIB"; then
1182     archive_cmds="$archive_cmds;\$RANLIB \$lib"
1183     postinstall_cmds='$RANLIB $lib'
1184   fi
1185   ;;
1186 esac
1187
1188 echo "$ac_t$enable_shared" 1>&6
1189
1190 # Make sure either enable_shared or enable_static is yes.
1191 test "$enable_shared" = yes || enable_static=yes
1192
1193 echo "checking whether to build static libraries... $enable_static" 1>&6
1194
1195 echo $ac_n "checking for objdir... $ac_c" 1>&6
1196 rm -f .libs 2>/dev/null
1197 mkdir .libs 2>/dev/null
1198 if test -d .libs; then
1199   objdir=.libs
1200 else
1201   # MS-DOS does not allow filenames that begin with a dot.
1202   objdir=_libs
1203 fi
1204 rmdir .libs 2>/dev/null
1205 echo "$ac_t$objdir" 1>&6
1206
1207 # Now quote all the things that may contain metacharacters.
1208 for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
1209   old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
1210   link_static_flag no_builtin_flag export_dynamic_flag_spec \
1211   profile_flag_pattern libname_spec library_names_spec soname_spec RANLIB \
1212   old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
1213   archive_cmds postinstall_cmds \
1214   allow_undefined_flag finish_cmds global_symbol_pipe \
1215   striplib old_striplib \
1216   hardcode_libdir_flag_spec hardcode_libdir_separator; do
1217
1218   case "$var" in
1219   reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
1220   old_postinstall_cmds | archive_cmds | postinstall_cmds | finish_cmds)
1221     # Double-quote double-evaled strings.
1222     eval "$var=\`echo \"\$$var\" | sed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
1223     ;;
1224   *)
1225     eval "$var=\`echo \"\$$var\" | sed \"\$sed_quote_subst\"\`"
1226     ;;
1227   esac
1228 done
1229
1230 ofile=libtool
1231 trap "$rm $ofile; exit 1" 1 2 15
1232 echo creating $ofile
1233 $rm $ofile
1234 cat <<EOF > $ofile
1235 #! /bin/sh
1236
1237 # libtool - Provide generalized library-building support services.
1238 #
1239 # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
1240 # This program was configured as follows,
1241 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1242 #
1243 # CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
1244 # LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
1245 #   $0$ltconfig_args
1246 #
1247 # Compiler and other test output produced by $progname, useful for
1248 # debugging $progname, is in ./config.log if it exists.
1249
1250 # The version of $progname that generated this script.
1251 LTCONFIG_VERSION="$VERSION"
1252
1253 # Shell to use when invoking shell scripts.
1254 SHELL=${CONFIG_SHELL-/bin/sh}
1255
1256 # Whether or not to build libtool libraries.
1257 build_libtool_libs=$enable_shared
1258
1259 # Whether or not to build old-style libraries.
1260 build_old_libs=$enable_static
1261
1262 # The host system.
1263 host_alias="$host_alias"
1264 host="$host"
1265
1266 # The archiver.
1267 AR="$AR"
1268
1269 # The default C compiler.
1270 CC="$CC"
1271
1272 # The linker used to build libraries.
1273 LD="$LD"
1274
1275 # Whether we need hard or soft links.
1276 LN_S="$LN_S"
1277
1278 # A BSD-compatible nm program.
1279 NM="$NM"
1280
1281 # The name of the directory that contains temporary libtool files.
1282 objdir="$objdir"
1283
1284 # How to create reloadable object files.
1285 reload_flag="$reload_flag"
1286 reload_cmds="$reload_cmds"
1287
1288 # How to pass a linker flag through the compiler.
1289 wl="$wl"
1290
1291 # Additional compiler flags for building library objects.
1292 pic_flag="$pic_flag"
1293
1294 # Compiler flag to prevent dynamic linking.
1295 link_static_flag="$link_static_flag"
1296
1297 # Compiler flag to turn off builtin functions.
1298 no_builtin_flag="$no_builtin_flag"
1299
1300 # Compiler flag to allow reflexive dlopens.
1301 export_dynamic_flag_spec="$export_dynamic_flag_spec"
1302
1303 # Pattern to match compiler flags for creating libNAME_p libraries:
1304 profile_flag_pattern="$profile_flag_pattern"
1305
1306 # Library versioning type.
1307 version_type=$version_type
1308
1309 # Format of library name prefix.
1310 libname_spec="$libname_spec"
1311
1312 # List of archive names.  First name is the real one, the rest are links.
1313 # The last name is the one that the linker finds with -lNAME.
1314 library_names_spec="$library_names_spec"
1315
1316 # The coded name of the library, if different from the real name.
1317 soname_spec="$soname_spec"
1318
1319 # Commands used to build and install an old-style archive.
1320 RANLIB="$RANLIB"
1321 old_archive_cmds="$old_archive_cmds"
1322 old_postinstall_cmds="$old_postinstall_cmds"
1323
1324 # Create an old-style archive from a shared archive.
1325 old_archive_from_new_cmds="$old_archive_from_new_cmds"
1326
1327 # Commands used to build and install a shared archive.
1328 archive_cmds="$archive_cmds"
1329 postinstall_cmds="$postinstall_cmds"
1330
1331 # Flag that allows shared libraries with undefined symbols to be built.
1332 allow_undefined_flag="$allow_undefined_flag"
1333
1334 # Commands used to finish a libtool library installation in a directory.
1335 finish_cmds="$finish_cmds"
1336
1337 # Take the output of nm and produce a listing of raw symbols and C names.
1338 global_symbol_pipe="$global_symbol_pipe"
1339
1340 # How to strip a library file.
1341 striplib="$striplib"
1342 old_striplib="$old_striplib"
1343
1344 # This is the shared library runtime path variable.
1345 runpath_var=$runpath_var
1346
1347 # This is the shared library path variable.
1348 shlibpath_var=$shlibpath_var
1349
1350 # How to hardcode a shared library path into an executable.
1351 hardcode_action=$hardcode_action
1352
1353 # Flag to hardcode \$libdir into a binary during linking.
1354 # This must work even if \$libdir does not exist.
1355 #hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
1356
1357 # Whether we need a single -rpath flag with a separated argument.
1358 hardcode_libdir_separator="$hardcode_libdir_separator"
1359
1360 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
1361 # resulting binary.
1362 hardcode_direct=$hardcode_direct
1363
1364 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
1365 # resulting binary.
1366 hardcode_minus_L=$hardcode_minus_L
1367
1368 # Set to yes if using RUNPATH_VAR=DIR during linking hardcodes DIR into the
1369 # resulting binary.
1370 hardcode_runpath_var=$hardcode_runpath_var
1371
1372 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
1373 # the resulting binary.
1374 hardcode_shlibpath_var=$hardcode_shlibpath_var
1375
1376 EOF
1377
1378 case "$host_os" in
1379 aix*)
1380   cat <<\EOF >> $ofile
1381 # AIX sometimes has problems with the GCC collect2 program.  For some
1382 # reason, if we set the COLLECT_NAMES environment variable, the problems
1383 # vanish in a puff of smoke.
1384 if test "${COLLECT_NAMES+set}" != set; then
1385   COLLECT_NAMES=
1386   export COLLECT_NAMES
1387 fi
1388
1389 EOF
1390   ;;
1391 esac
1392
1393 # Detect if we are using a relative or absolute path to ltmain.sh.
1394 case "$ltmain" in
1395 /*) cat <<EOF >> $ofile
1396 # Execute the libtool backend.
1397 . $ltmain
1398 EOF
1399   ;;
1400 *) cat <<EOF >> $ofile
1401 # Find the path to this script.
1402 thisdir=\`echo "\$0" | sed -e 's%/[^/]*\$%%'\`
1403 test "X\$0" = "X\$thisdir" && thisdir=.
1404
1405 # Execute the libtool backend.
1406 . \$thisdir/$ltmain
1407 EOF
1408   ;;
1409 esac
1410
1411 echo 'exit 1' >> $ofile
1412
1413 chmod +x $ofile
1414 exit 0
1415
1416 # Local Variables:
1417 # mode:shell-script
1418 # sh-indentation:2
1419 # End: