Code

Initial revision
[rrdtool-all.git] / contrib / php4 / ltconfig
1 #! /bin/sh
3 # ltconfig - Create a system-specific libtool.
4 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
5 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6 #
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.
11 #
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.
16 #
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.
20 #
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   # Avoid inline document here, it may be left over
36   :
37 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
38   # Yippee, $echo works!
39   :
40 else
41   # Restart under the correct shell.
42   exec "$SHELL" "$0" --no-reexec ${1+"$@"}
43 fi
45 if test "X$1" = X--fallback-echo; then
46   # used as fallback echo
47   shift
48   cat <<EOF
49 $*
50 EOF
51   exit 0
52 fi
54 # Find the correct PATH separator.  Usually this is `:', but
55 # DJGPP uses `;' like DOS.
56 if test "X${PATH_SEPARATOR+set}" != "Xset"; then
57   UNAME=${UNAME-`uname 2>/dev/null`}
58   case X$UNAME in
59     *-DOS) PATH_SEPARATOR=';' ;;
60     *)     PATH_SEPARATOR=':' ;;
61   esac
62 fi
64 # The HP-UX ksh and POSIX shell print the target directory to stdout
65 # if CDPATH is set.
66 if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
68 if test "X${echo_test_string+set}" != "Xset"; then
69   # find a string as large as possible, as long as the shell can cope with it
70   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
71     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
72     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
73        echo_test_string="`eval $cmd`" &&
74        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
75       break
76     fi
77   done
78 fi
80 if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
81    test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
82   # The Solaris, AIX, and Digital Unix default echo programs unquote
83   # backslashes.  This makes it impossible to quote backslashes using
84   #   echo "$something" | sed 's/\\/\\\\/g'
85   #
86   # So, first we look for a working echo in the user's PATH.
88   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
89   for dir in $PATH /usr/ucb; do
90     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
91        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
92        test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
93       echo="$dir/echo"
94       break
95     fi
96   done
97   IFS="$save_ifs"
99   if test "X$echo" = Xecho; then
100     # We didn't find a better echo, so look for alternatives.
101     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
102        test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
103       # This shell has a builtin print -r that does the trick.
104       echo='print -r'
105     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
106          test "X$CONFIG_SHELL" != X/bin/ksh; then
107       # If we have ksh, try running ltconfig again with it.
108       ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
109       export ORIGINAL_CONFIG_SHELL
110       CONFIG_SHELL=/bin/ksh
111       export CONFIG_SHELL
112       exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
113     else
114       # Try using printf.
115       echo='printf "%s\n"'
116       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
117          test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
118         # Cool, printf works
119         :
120       elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
121            test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
122         CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
123         export CONFIG_SHELL
124         SHELL="$CONFIG_SHELL"
125         export SHELL
126         echo="$CONFIG_SHELL $0 --fallback-echo"
127       elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
128            test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
129         echo="$CONFIG_SHELL $0 --fallback-echo"
130       else
131         # maybe with a smaller string...
132         prev=:
134         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
135           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
136             break
137           fi
138           prev="$cmd"
139         done
141         if test "$prev" != 'sed 50q "$0"'; then
142           echo_test_string=`eval $prev`
143           export echo_test_string
144           exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
145         else
146           # Oops.  We lost completely, so just stick with echo.
147           echo=echo
148         fi
149       fi
150     fi
151   fi
152 fi
154 # Sed substitution that helps us do robust quoting.  It backslashifies
155 # metacharacters that are still active within double-quoted strings.
156 Xsed='sed -e s/^X//'
157 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
159 # Same as above, but do not quote variable references.
160 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
162 # Sed substitution to delay expansion of an escaped shell variable in a
163 # double_quote_subst'ed string.
164 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
166 # The name of this program.
167 progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
169 # Constants:
170 PROGRAM=ltconfig
171 PACKAGE=libtool
172 VERSION=1.3.3-freebsd-ports
173 TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
174 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
175 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
176 rm="rm -f"
178 help="Try \`$progname --help' for more information."
180 # Global variables:
181 default_ofile=libtool
182 can_build_shared=yes
183 enable_shared=yes
184 # All known linkers require a `.a' archive for static linking (except M$VC,
185 # which needs '.lib').
186 enable_static=yes
187 enable_fast_install=yes
188 install_ltlibs=yes
189 release_suffix=yes
190 enable_dlopen=unknown
191 enable_win32_dll=no
192 ltmain=
193 silent=
194 srcdir=
195 ac_config_guess=
196 ac_config_sub=
197 host=
198 nonopt=
199 ofile="$default_ofile"
200 verify_host=yes
201 with_gcc=no
202 with_gnu_ld=no
203 need_locks=yes
204 ac_ext=c
205 objext=o
206 libext=a
207 exeext=
208 cache_file=
210 old_AR="$AR"
211 old_CC="$CC"
212 old_CFLAGS="$CFLAGS"
213 old_CPPFLAGS="$CPPFLAGS"
214 old_LDFLAGS="$LDFLAGS"
215 old_LD="$LD"
216 old_LN_S="$LN_S"
217 old_LIBS="$LIBS"
218 old_NM="$NM"
219 old_RANLIB="$RANLIB"
220 old_DLLTOOL="$DLLTOOL"
221 old_OBJDUMP="$OBJDUMP"
222 old_AS="$AS"
224 # Parse the command line options.
225 args=
226 prev=
227 for option
228 do
229   case "$option" in
230   -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
231   *) optarg= ;;
232   esac
234   # If the previous option needs an argument, assign it.
235   if test -n "$prev"; then
236     eval "$prev=\$option"
237     prev=
238     continue
239   fi
241   case "$option" in
242   --help) cat <<EOM
243 Usage: $progname [OPTION]... [HOST [LTMAIN]]
245 Generate a system-specific libtool script.
247     --debug                enable verbose shell tracing
248     --disable-shared       do not build shared libraries
249     --disable-static       do not build static libraries
250     --disable-fast-install do not optimize for fast installation
251     --disable-ltlibs       don't install the .la archives
252     --release-ignore       don't use -release specification
253     --release-suffix       use -release suffix for all files
254     --enable-dlopen        enable dlopen support
255     --enable-win32-dll     enable building dlls on win32 hosts
256     --help                 display this help and exit
257     --no-verify            do not verify that HOST is a valid host type
258 -o, --output=FILE          specify the output file [default=$default_ofile]
259     --quiet                same as \`--silent'
260     --silent               do not print informational messages
261     --srcdir=DIR           find \`config.guess' in DIR
262     --version              output version information and exit
263     --with-gcc             assume that the GNU C compiler will be used
264     --with-gnu-ld          assume that the C compiler uses the GNU linker
265     --disable-lock         disable file locking
266     --cache-file=FILE      configure cache file
268 LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
269 that provides basic libtool functionality.
271 HOST is the canonical host system name [default=guessed].
272 EOM
273   exit 0
274   ;;
276   --debug)
277     echo "$progname: enabling shell trace mode"
278     set -x
279     ;;
281   --disable-shared) enable_shared=no ;;
283   --disable-static) enable_static=no ;;
285   --disable-fast-install) enable_fast_install=no ;;
287   --disable-ltlibs) install_ltlibs=no ;;
289   --release-ignore) release_suffix=no ;;
291   --release-suffix) release_suffix=all ;;
293   --enable-dlopen) enable_dlopen=yes ;;
295   --enable-win32-dll) enable_win32_dll=yes ;;
297   --quiet | --silent) silent=yes ;;
299   --srcdir) prev=srcdir ;;
300   --srcdir=*) srcdir="$optarg" ;;
302   --no-verify) verify_host=no ;;
304   --output | -o) prev=ofile ;;
305   --output=*) ofile="$optarg" ;;
307   --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
309   --with-gcc) with_gcc=yes ;;
310   --with-gnu-ld) with_gnu_ld=yes ;;
312   --disable-lock) need_locks=no ;;
314   --cache-file=*) cache_file="$optarg" ;;
316   -*)
317     echo "$progname: unrecognized option \`$option'" 1>&2
318     echo "$help" 1>&2
319     exit 1
320     ;;
322   *)
323     if test -z "$ltmain"; then
324       ltmain="$option"
325     elif test -z "$host"; then
326 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
327 #      if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
328 #        echo "$progname: warning \`$option' is not a valid host type" 1>&2
329 #      fi
330       host="$option"
331     else
332       echo "$progname: too many arguments" 1>&2
333       echo "$help" 1>&2
334       exit 1
335     fi ;;
336   esac
337 done
339 if test -z "$ltmain"; then
340   echo "$progname: you must specify a LTMAIN file" 1>&2
341   echo "$help" 1>&2
342   exit 1
343 fi
345 if test ! -f "$ltmain"; then
346   echo "$progname: \`$ltmain' does not exist" 1>&2
347   echo "$help" 1>&2
348   exit 1
349 fi
351 # Quote any args containing shell metacharacters.
352 ltconfig_args=
353 for arg
354 do
355   case "$arg" in
356   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
357   ltconfig_args="$ltconfig_args '$arg'" ;;
358   *) ltconfig_args="$ltconfig_args $arg" ;;
359   esac
360 done
362 # A relevant subset of AC_INIT.
364 # File descriptor usage:
365 # 0 standard input
366 # 1 file creation
367 # 2 errors and warnings
368 # 3 some systems may open it to /dev/tty
369 # 4 used on the Kubota Titan
370 # 5 compiler messages saved in config.log
371 # 6 checking for... messages and results
372 if test "$silent" = yes; then
373   exec 6>/dev/null
374 else
375   exec 6>&1
376 fi
377 exec 5>>./config.log
379 # NLS nuisances.
380 # Only set LANG and LC_ALL to C if already set.
381 # These must not be set unconditionally because not all systems understand
382 # e.g. LANG=C (notably SCO).
383 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
384 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
386 if test -n "$cache_file" && test -r "$cache_file"; then
387   echo "loading cache $cache_file within ltconfig"
388   . $cache_file
389 fi
391 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
392   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
393   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
394     ac_n= ac_c='
395 ' ac_t='        '
396   else
397     ac_n=-n ac_c= ac_t=
398   fi
399 else
400   ac_n= ac_c='\c' ac_t=
401 fi
403 if test -z "$srcdir"; then
404   # Assume the source directory is the same one as the path to LTMAIN.
405   srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
406   test "$srcdir" = "$ltmain" && srcdir=.
407 fi
409 trap "$rm conftest*; exit 1" 1 2 15
410 if test "$verify_host" = yes; then
411   # Check for config.guess and config.sub.
412   ac_aux_dir=
413   for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
414     if test -f $ac_dir/config.guess; then
415       ac_aux_dir=$ac_dir
416       break
417     fi
418   done
419   if test -z "$ac_aux_dir"; then
420     echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
421     echo "$help" 1>&2
422     exit 1
423   fi
424   ac_config_guess=$ac_aux_dir/config.guess
425   ac_config_sub=$ac_aux_dir/config.sub
427   # Make sure we can run config.sub.
428   if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
429   else
430     echo "$progname: cannot run $ac_config_sub" 1>&2
431     echo "$help" 1>&2
432     exit 1
433   fi
435   echo $ac_n "checking host system type""... $ac_c" 1>&6
437   host_alias=$host
438   case "$host_alias" in
439   "")
440     if host_alias=`$SHELL $ac_config_guess`; then :
441     else
442       echo "$progname: cannot guess host type; you must specify one" 1>&2
443       echo "$help" 1>&2
444       exit 1
445     fi ;;
446   esac
447   host=`$SHELL $ac_config_sub $host_alias`
448   echo "$ac_t$host" 1>&6
450   # Make sure the host verified.
451   test -z "$host" && exit 1
453 elif test -z "$host"; then
454   echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
455   echo "$help" 1>&2
456   exit 1
457 else
458   host_alias=$host
459 fi
461 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
462 case "$host_os" in
463 linux-gnu*) ;;
464 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
465 esac
467 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
468 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
469 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
471 case "$host_os" in
472 aix3*)
473   # AIX sometimes has problems with the GCC collect2 program.  For some
474   # reason, if we set the COLLECT_NAMES environment variable, the problems
475   # vanish in a puff of smoke.
476   if test "${COLLECT_NAMES+set}" != set; then
477     COLLECT_NAMES=
478     export COLLECT_NAMES
479   fi
480   ;;
481 esac
483 # Determine commands to create old-style static archives.
484 old_archive_cmds='$AR cru $oldlib$oldobjs'
485 old_postinstall_cmds='chmod 644 $oldlib'
486 old_postuninstall_cmds=
488 # Set a sane default for `AR'.
489 test -z "$AR" && AR=ar
491 # Set a sane default for `OBJDUMP'.
492 test -z "$OBJDUMP" && OBJDUMP=objdump
494 # If RANLIB is not set, then run the test.
495 if test "${RANLIB+set}" != "set"; then
496   result=no
498   echo $ac_n "checking for ranlib... $ac_c" 1>&6
499   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
500   for dir in $PATH; do
501     test -z "$dir" && dir=.
502     if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
503       RANLIB="ranlib"
504       result="ranlib"
505       break
506     fi
507   done
508   IFS="$save_ifs"
510   echo "$ac_t$result" 1>&6
511 fi
513 if test -n "$RANLIB"; then
514   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
515   old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
516 fi
518 # Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
519 test -z "$DLLTOOL" && DLLTOOL=dlltool
520 test -z "$OBJDUMP" && OBJDUMP=objdump
521 test -z "$AS" && AS=as
523 # Check to see if we are using GCC.
524 if test "$with_gcc" != yes || test -z "$CC"; then
525   # If CC is not set, then try to find GCC or a usable CC.
526   if test -z "$CC"; then
527     echo $ac_n "checking for gcc... $ac_c" 1>&6
528     IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
529     for dir in $PATH; do
530       test -z "$dir" && dir=.
531       if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
532         CC="gcc"
533         break
534       fi
535     done
536     IFS="$save_ifs"
538     if test -n "$CC"; then
539       echo "$ac_t$CC" 1>&6
540     else
541       echo "$ac_t"no 1>&6
542     fi
543   fi
545   # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
546   if test -z "$CC"; then
547     echo $ac_n "checking for cc... $ac_c" 1>&6
548     IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
549     cc_rejected=no
550     for dir in $PATH; do
551       test -z "$dir" && dir=.
552       if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
553         if test "$dir/cc" = "/usr/ucb/cc"; then
554           cc_rejected=yes
555           continue
556         fi
557         CC="cc"
558         break
559       fi
560     done
561     IFS="$save_ifs"
562     if test $cc_rejected = yes; then
563       # We found a bogon in the path, so make sure we never use it.
564       set dummy $CC
565       shift
566       if test $# -gt 0; then
567         # We chose a different compiler from the bogus one.
568         # However, it has the same name, so the bogon will be chosen
569         # first if we set CC to just the name; use the full file name.
570         shift
571         set dummy "$dir/cc" "$@"
572         shift
573         CC="$@"
574       fi
575     fi
577     if test -n "$CC"; then
578       echo "$ac_t$CC" 1>&6
579     else
580       echo "$ac_t"no 1>&6
581     fi
583     if test -z "$CC"; then
584       echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
585       exit 1
586     fi
587   fi
589   # Now see if the compiler is really GCC.
590   with_gcc=no
591   echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
592   echo "$progname:581: checking whether we are using GNU C" >&5
594   $rm conftest.c
595   cat > conftest.c <<EOF
596 #ifdef __GNUC__
597   yes;
598 #endif
599 EOF
600   if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
601     with_gcc=yes
602   fi
603   $rm conftest.c
604   echo "$ac_t$with_gcc" 1>&6
605 fi
607 # Allow CC to be a program name with arguments.
608 set dummy $CC
609 compiler="$2"
611 echo $ac_n "checking for object suffix... $ac_c" 1>&6
612 $rm conftest*
613 echo 'int i = 1;' > conftest.c
614 echo "$progname:603: checking for object suffix" >& 5
615 if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
616   # Append any warnings to the config.log.
617   cat conftest.err 1>&5
619   for ac_file in conftest.*; do
620     case $ac_file in
621     *.c) ;;
622     *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
623     esac
624   done
625 else
626   cat conftest.err 1>&5
627   echo "$progname: failed program was:" >&5
628   cat conftest.c >&5
629 fi
630 $rm conftest*
631 echo "$ac_t$objext" 1>&6
633 echo $ac_n "checking for executable suffix... $ac_c" 1>&6
634 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
635   echo $ac_n "(cached) $ac_c" 1>&6
636 else
637   ac_cv_exeext="no"
638   $rm conftest*
639   echo 'main () { return 0; }' > conftest.c
640   echo "$progname:629: checking for executable suffix" >& 5
641   if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
642     # Append any warnings to the config.log.
643     cat conftest.err 1>&5
645     for ac_file in conftest.*; do
646       case $ac_file in
647       *.c | *.err | *.$objext ) ;;
648       *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
649       esac
650     done
651   else
652     cat conftest.err 1>&5
653     echo "$progname: failed program was:" >&5
654     cat conftest.c >&5
655   fi
656   $rm conftest*
657 fi
658 if test "X$ac_cv_exeext" = Xno; then
659   exeext=""
660 else
661   exeext="$ac_cv_exeext"
662 fi
663 echo "$ac_t$ac_cv_exeext" 1>&6
665 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
666 pic_flag=
667 special_shlib_compile_flags=
668 wl=
669 link_static_flag=
670 no_builtin_flag=
672 if test "$with_gcc" = yes; then
673   wl='-Wl,'
674   link_static_flag='-static'
676   case "$host_os" in
677   beos* | irix5* | irix6* | osf3* | osf4*)
678     # PIC is the default for these OSes.
679     ;;
680   aix*)
681     # Below there is a dirty hack to force normal static linking with -ldl
682     # The problem is because libdl dynamically linked with both libc and
683     # libC (AIX C++ library), which obviously doesn't included in libraries
684     # list by gcc. This cause undefined symbols with -static flags.
685     # This hack allows C programs to be linked with "-static -ldl", but
686     # we not sure about C++ programs.
687     link_static_flag="$link_static_flag ${wl}-lC"
688     ;;
689   cygwin* | mingw* | os2*)
690     # We can build DLLs from non-PIC.
691     ;;
692   amigaos*)
693     # FIXME: we need at least 68020 code to build shared libraries, but
694     # adding the `-m68020' flag to GCC prevents building anything better,
695     # like `-m68040'.
696     pic_flag='-m68020 -resident32 -malways-restore-a4'
697     ;;
698   sysv4*MP*)
699     if test -d /usr/nec; then
700        pic_flag=-Kconform_pic
701     fi
702     ;;
703   *)
704     pic_flag='-fPIC'
705     ;;
706   esac
707 else
708   # PORTME Check for PIC flags for the system compiler.
709   case "$host_os" in
710   aix3* | aix4*)
711     # All AIX code is PIC.
712     link_static_flag='-bnso -bI:/lib/syscalls.exp'
713     ;;
715   hpux9* | hpux10* | hpux11*)
716     # Is there a better link_static_flag that works with the bundled CC?
717     wl='-Wl,'
718     link_static_flag="${wl}-a ${wl}archive"
719     pic_flag='+Z'
720     ;;
722   irix5* | irix6*)
723     wl='-Wl,'
724     link_static_flag='-non_shared'
725     # PIC (with -KPIC) is the default.
726     ;;
728   cygwin* | mingw* | os2*)
729     # We can build DLLs from non-PIC.
730     ;;
732   osf3* | osf4*)
733     # All OSF/1 code is PIC.
734     wl='-Wl,'
735     link_static_flag='-non_shared'
736     ;;
738   sco3.2v5*)
739     pic_flag='-Kpic'
740     link_static_flag='-dn'
741     special_shlib_compile_flags='-belf'
742     ;;
744   solaris*)
745     pic_flag='-KPIC'
746     link_static_flag='-Bstatic'
747     wl='-Wl,'
748     ;;
750   sunos4*)
751     pic_flag='-PIC'
752     link_static_flag='-Bstatic'
753     wl='-Qoption ld '
754     ;;
756   sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
757     pic_flag='-KPIC'
758     link_static_flag='-Bstatic'
759     wl='-Wl,'
760     ;;
762   uts4*)
763     pic_flag='-pic'
764     link_static_flag='-Bstatic'
765     ;;
766   sysv4*MP*)
767     if test -d /usr/nec ;then
768       pic_flag='-Kconform_pic'
769       link_static_flag='-Bstatic'
770     fi
771     ;;
772   *)
773     can_build_shared=no
774     ;;
775   esac
776 fi
778 if test -n "$pic_flag"; then
779   echo "$ac_t$pic_flag" 1>&6
781   # Check to make sure the pic_flag actually works.
782   echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
783   $rm conftest*
784   echo "int some_variable = 0;" > conftest.c
785   save_CFLAGS="$CFLAGS"
786   CFLAGS="$CFLAGS $pic_flag -DPIC"
787   echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
788   if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
789     # Append any warnings to the config.log.
790     cat conftest.err 1>&5
791     
792     case "$host_os" in
793     hpux9* | hpux10* | hpux11*)
794       # On HP-UX, both CC and GCC only warn that PIC is supported... then they
795       # create non-PIC objects.  So, if there were any warnings, we assume that
796       # PIC is not supported.
797       if test -s conftest.err; then
798         echo "$ac_t"no 1>&6
799         can_build_shared=no
800         pic_flag=
801       else
802         echo "$ac_t"yes 1>&6
803         pic_flag=" $pic_flag"
804       fi
805       ;;
806     *)
807       echo "$ac_t"yes 1>&6
808       pic_flag=" $pic_flag"
809       ;;
810     esac
811   else
812     # Append any errors to the config.log.
813     cat conftest.err 1>&5
814     can_build_shared=no
815     pic_flag=
816     echo "$ac_t"no 1>&6
817   fi
818   CFLAGS="$save_CFLAGS"
819   $rm conftest*
820 else
821   echo "$ac_t"none 1>&6
822 fi
824 # Check to see if options -o and -c are simultaneously supported by compiler
825 echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
826 $rm -r conftest 2>/dev/null
827 mkdir conftest
828 cd conftest
829 $rm conftest*
830 echo "int some_variable = 0;" > conftest.c
831 mkdir out
832 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
833 # that will create temporary files in the current directory regardless of
834 # the output directory.  Thus, making CWD read-only will cause this test
835 # to fail, enabling locking or at least warning the user not to do parallel
836 # builds.
837 chmod -w .
838 save_CFLAGS="$CFLAGS"
839 CFLAGS="$CFLAGS -o out/conftest2.o"
840 echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
841 if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
843   # The compiler can only warn and ignore the option if not recognized
844   # So say no if there are warnings
845     if test -s out/conftest.err; then
846       echo "$ac_t"no 1>&6
847       compiler_c_o=no
848     else
849       echo "$ac_t"yes 1>&6
850       compiler_c_o=yes
851     fi
852 else
853   # Append any errors to the config.log.
854   cat out/conftest.err 1>&5
855   compiler_c_o=no
856   echo "$ac_t"no 1>&6
857 fi
858 CFLAGS="$save_CFLAGS"
859 chmod u+w .
860 $rm conftest* out/*
861 rmdir out
862 cd ..
863 rmdir conftest
864 $rm -r conftest 2>/dev/null
866 if test x"$compiler_c_o" = x"yes"; then
867   # Check to see if we can write to a .lo
868   echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
869   $rm conftest*
870   echo "int some_variable = 0;" > conftest.c
871   save_CFLAGS="$CFLAGS"
872   CFLAGS="$CFLAGS -c -o conftest.lo"
873   echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
874 if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
876     # The compiler can only warn and ignore the option if not recognized
877     # So say no if there are warnings
878       if test -s conftest.err; then
879         echo "$ac_t"no 1>&6
880         compiler_o_lo=no
881       else
882         echo "$ac_t"yes 1>&6
883         compiler_o_lo=yes
884       fi
885   else
886     # Append any errors to the config.log.
887     cat conftest.err 1>&5
888     compiler_o_lo=no
889     echo "$ac_t"no 1>&6
890   fi
891   CFLAGS="$save_CFLAGS"
892   $rm conftest*
893 else
894   compiler_o_lo=no
895 fi
897 # Check to see if we can do hard links to lock some files if needed
898 hard_links="nottested"
899 if test "$compiler_c_o" = no && test "$need_locks" != no; then
900   # do not overwrite the value of need_locks provided by the user
901   echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
902   hard_links=yes
903   $rm conftest*
904   ln conftest.a conftest.b 2>/dev/null && hard_links=no
905   touch conftest.a
906   ln conftest.a conftest.b 2>&5 || hard_links=no
907   ln conftest.a conftest.b 2>/dev/null && hard_links=no
908   echo "$ac_t$hard_links" 1>&6
909   $rm conftest*
910   if test "$hard_links" = no; then
911     echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
912     need_locks=warn
913   fi
914 else
915   need_locks=no
916 fi
918 if test "$with_gcc" = yes; then
919   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
920   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
921   $rm conftest*
922   echo "int some_variable = 0;" > conftest.c
923   save_CFLAGS="$CFLAGS"
924   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
925   echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
926   if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
928     # The compiler can only warn and ignore the option if not recognized
929     # So say no if there are warnings
930       if test -s conftest.err; then
931         echo "$ac_t"no 1>&6
932         compiler_rtti_exceptions=no
933       else
934         echo "$ac_t"yes 1>&6
935         compiler_rtti_exceptions=yes
936       fi
937   else
938     # Append any errors to the config.log.
939     cat conftest.err 1>&5
940     compiler_rtti_exceptions=no
941     echo "$ac_t"no 1>&6
942   fi
943   CFLAGS="$save_CFLAGS"
944   $rm conftest*
946   if test "$compiler_rtti_exceptions" = "yes"; then
947     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
948   else
949     no_builtin_flag=' -fno-builtin'
950   fi
951   
952 fi
954 # Check for any special shared library compilation flags.
955 if test -n "$special_shlib_compile_flags"; then
956   echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
957   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$special_shlib_compile_flags[  ]" >/dev/null; then :
958   else
959     echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
960     can_build_shared=no
961   fi
962 fi
964 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
965 $rm conftest*
966 echo 'main(){return(0);}' > conftest.c
967 save_LDFLAGS="$LDFLAGS"
968 LDFLAGS="$LDFLAGS $link_static_flag"
969 echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
970 if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
971   echo "$ac_t$link_static_flag" 1>&6
972 else
973   echo "$ac_t"none 1>&6
974   link_static_flag=
975 fi
976 LDFLAGS="$save_LDFLAGS"
977 $rm conftest*
979 if test -z "$LN_S"; then
980   # Check to see if we can use ln -s, or we need hard links.
981   echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
982   $rm conftest.dat
983   if ln -s X conftest.dat 2>/dev/null; then
984     $rm conftest.dat
985     LN_S="ln -sf"
986   else
987     LN_S=ln
988   fi
989   if test "$LN_S" = "ln -sf"; then
990     echo "$ac_t"yes 1>&6
991   else
992     echo "$ac_t"no 1>&6
993   fi
994 fi
996 # Make sure LD is an absolute path.
997 if test -z "$LD"; then
998   ac_prog=ld
999   if test "$with_gcc" = yes; then
1000     # Check if gcc -print-prog-name=ld gives a path.
1001     echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
1002     echo "$progname:991: checking for ld used by GCC" >&5
1003     ac_prog=`($CC -print-prog-name=ld) 2>&5`
1004     case "$ac_prog" in
1005     # Accept absolute paths.
1006     [\\/]* | [A-Za-z]:[\\/]*)
1007       re_direlt='/[^/][^/]*/\.\./'
1008       # Canonicalize the path of ld
1009       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1010       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1011         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1012       done
1013       test -z "$LD" && LD="$ac_prog"
1014       ;;
1015     "")
1016       # If it fails, then pretend we are not using GCC.
1017       ac_prog=ld
1018       ;;
1019     *)
1020       # If it is relative, then search for the first ld in PATH.
1021       with_gnu_ld=unknown
1022       ;;
1023     esac
1024   elif test "$with_gnu_ld" = yes; then
1025     echo $ac_n "checking for GNU ld... $ac_c" 1>&6
1026     echo "$progname:1015: checking for GNU ld" >&5
1027   else
1028     echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1029     echo "$progname:1018: checking for non-GNU ld" >&5
1030   fi
1032   if test -z "$LD"; then
1033     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1034     for ac_dir in $PATH; do
1035       test -z "$ac_dir" && ac_dir=.
1036       if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1037         LD="$ac_dir/$ac_prog"
1038         # Check to see if the program is GNU ld.  I'd rather use --version,
1039         # but apparently some GNU ld's only accept -v.
1040         # Break only if it was the GNU/non-GNU ld that we prefer.
1041         if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1042           test "$with_gnu_ld" != no && break
1043         else
1044           test "$with_gnu_ld" != yes && break
1045         fi
1046       fi
1047     done
1048     IFS="$ac_save_ifs"
1049   fi
1051   if test -n "$LD"; then
1052     echo "$ac_t$LD" 1>&6
1053   else
1054     echo "$ac_t"no 1>&6
1055   fi
1057   if test -z "$LD"; then
1058     echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
1059     exit 1
1060   fi
1061 fi
1063 # Check to see if it really is or is not GNU ld.
1064 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
1065 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1066 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1067   with_gnu_ld=yes
1068 else
1069   with_gnu_ld=no
1070 fi
1071 echo "$ac_t$with_gnu_ld" 1>&6
1073 # See if the linker supports building shared libraries.
1074 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
1076 allow_undefined_flag=
1077 no_undefined_flag=
1078 need_lib_prefix=unknown
1079 need_version=unknown
1080 # when you set need_version to no, make sure it does not cause -set_version
1081 # flags to be left without arguments
1082 archive_cmds=
1083 archive_expsym_cmds=
1084 old_archive_from_new_cmds=
1085 export_dynamic_flag_spec=
1086 whole_archive_flag_spec=
1087 thread_safe_flag_spec=
1088 hardcode_libdir_flag_spec=
1089 hardcode_libdir_separator=
1090 hardcode_direct=no
1091 hardcode_minus_L=no
1092 hardcode_shlibpath_var=unsupported
1093 runpath_var=
1094 always_export_symbols=no
1095 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1096 # include_expsyms should be a list of space-separated symbols to be *always*
1097 # included in the symbol list
1098 include_expsyms=
1099 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1100 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1101 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1102 # as well as any symbol that contains `d'.
1103 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1104 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1105 # platforms (ab)use it in PIC code, but their linkers get confused if
1106 # the symbol is explicitly referenced.  Since portable code cannot
1107 # rely on this symbol name, it's probably fine to never include it in
1108 # preloaded symbol tables.
1110 case "$host_os" in
1111 cygwin* | mingw*)
1112   # FIXME: the MSVC++ port hasn't been tested in a loooong time
1113   # When not using gcc, we currently assume that we are using
1114   # Microsoft Visual C++.
1115   if test "$with_gcc" != yes; then
1116     with_gnu_ld=no
1117   fi
1118   ;;
1120 esac
1122 ld_shlibs=yes
1123 if test "$with_gnu_ld" = yes; then
1124   # If archive_cmds runs LD, not CC, wlarc should be empty
1125   wlarc='${wl}'
1127   # See if GNU ld supports shared libraries.
1128   case "$host_os" in
1129   aix3* | aix4*)
1130     # On AIX, the GNU linker is very broken
1131     ld_shlibs=no
1132     cat <<EOF 1>&2
1134 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1135 *** to be unable to reliably create shared libraries on AIX.
1136 *** Therefore, libtool is disabling shared libraries support.  If you
1137 *** really care for shared libraries, you may want to modify your PATH
1138 *** so that a non-GNU linker is found, and then restart.
1140 EOF
1141     ;;
1143   amigaos*)
1144     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)'
1145     hardcode_libdir_flag_spec='-L$libdir'
1146     hardcode_minus_L=yes
1148     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1149     # that the semantics of dynamic libraries on AmigaOS, at least up
1150     # to version 4, is to share data among multiple programs linked
1151     # with the same dynamic library.  Since this doesn't match the
1152     # behavior of shared libraries on other platforms, we can use
1153     # them.
1154     ld_shlibs=no
1155     ;;
1157   beos*)
1158     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1159       allow_undefined_flag=unsupported
1160       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1161       # support --undefined.  This deserves some investigation.  FIXME
1162       archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1163     else
1164       ld_shlibs=no
1165     fi
1166     ;;
1168   cygwin* | mingw*)
1169     # hardcode_libdir_flag_spec is actually meaningless, as there is
1170     # no search path for DLLs.
1171     hardcode_libdir_flag_spec='-L$libdir'
1172     allow_undefined_flag=unsupported
1173     always_export_symbols=yes
1175     # Extract the symbol export list from an `--export-all' def file,
1176     # then regenerate the def file from the symbol export list, so that
1177     # the compiled dll only exports the symbol export list.
1178     export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
1179       test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
1180       $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs $convenience~
1181       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
1183     archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
1184       _lt_hint=1;
1185       for symbol in `cat $export_symbols`; do
1186         echo "  \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
1187         _lt_hint=`expr 1 + \$_lt_hint`;
1188       done~
1189       test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
1190       test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
1191       $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
1192       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1193       $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
1194       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1195       $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
1197       old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' 
1198     ;;
1200   netbsd*)
1201     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1202       archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1203       archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1204     else
1205       archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
1206       # can we support soname and/or expsyms with a.out? -oliva
1207     fi
1208     ;;
1210   solaris*)
1211     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1212       ld_shlibs=no
1213       cat <<EOF 1>&2
1215 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1216 *** create shared libraries on Solaris systems.  Therefore, libtool
1217 *** is disabling shared libraries support.  We urge you to upgrade GNU
1218 *** binutils to release 2.9.1 or newer.  Another option is to modify
1219 *** your PATH or compiler configuration so that the native linker is
1220 *** used, and then restart.
1222 EOF
1223     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1224       archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1225       archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1226     else
1227       ld_shlibs=no
1228     fi
1229     ;;      
1231   sunos4*)
1232     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
1233     wlarc=
1234     hardcode_direct=yes
1235     hardcode_shlibpath_var=no
1236     ;;
1238   *)
1239     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1240       archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1241       archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1242     else
1243       ld_shlibs=no
1244     fi
1245     ;;
1246   esac
1248   if test "$ld_shlibs" = yes; then
1249     runpath_var=LD_RUN_PATH
1250     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1251     export_dynamic_flag_spec='${wl}--export-dynamic'
1252     case $host_os in
1253     cygwin* | mingw*)
1254       # dlltool doesn't understand --whole-archive et. al.
1255       whole_archive_flag_spec=
1256       ;;
1257     *)
1258       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1259       ;;
1260     esac
1261   fi
1262 else
1263   # PORTME fill in a description of your system's linker (not GNU ld)
1264   case "$host_os" in
1265   aix3*)
1266     allow_undefined_flag=unsupported
1267     always_export_symbols=yes
1268     archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
1269     # Note: this linker hardcodes the directories in LIBPATH if there
1270     # are no directories specified by -L.
1271     hardcode_minus_L=yes
1272     if test "$with_gcc" = yes && test -z "$link_static_flag"; then
1273       # Neither direct hardcoding nor static linking is supported with a
1274       # broken collect2.
1275       hardcode_direct=unsupported
1276     fi
1277     ;;
1279   aix4*)
1280     hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
1281     hardcode_libdir_separator=':'
1282     if test "$with_gcc" = yes; then
1283       collect2name=`${CC} -print-prog-name=collect2`
1284       if test -f "$collect2name" && \
1285          strings "$collect2name" | grep resolve_lib_name >/dev/null
1286       then
1287         # We have reworked collect2
1288         hardcode_direct=yes
1289       else
1290         # We have old collect2
1291         hardcode_direct=unsupported
1292         # It fails to find uninstalled libraries when the uninstalled
1293         # path is not listed in the libpath.  Setting hardcode_minus_L
1294         # to unsupported forces relinking
1295         hardcode_minus_L=yes
1296         hardcode_libdir_flag_spec='-L$libdir'
1297         hardcode_libdir_separator=
1298       fi
1299       shared_flag='-shared'
1300     else
1301       shared_flag='${wl}-bM:SRE'
1302       hardcode_direct=yes
1303     fi
1304     allow_undefined_flag=' ${wl}-berok'
1305     archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
1306     archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
1307     case "$host_os" in aix4.[01]|aix4.[01].*)
1308       # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
1309       always_export_symbols=yes ;;
1310     esac
1311    ;;
1313   amigaos*)
1314     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)'
1315     hardcode_libdir_flag_spec='-L$libdir'
1316     hardcode_minus_L=yes
1317     # see comment about different semantics on the GNU ld section
1318     ld_shlibs=no
1319     ;;
1321   cygwin* | mingw*)
1322     # When not using gcc, we currently assume that we are using
1323     # Microsoft Visual C++.
1324     # hardcode_libdir_flag_spec is actually meaningless, as there is
1325     # no search path for DLLs.
1326     hardcode_libdir_flag_spec=' '
1327     allow_undefined_flag=unsupported
1328     # Tell ltmain to make .lib files, not .a files.
1329     libext=lib
1330     # FIXME: Setting linknames here is a bad hack.
1331     archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1332     # The linker will automatically build a .lib file if we build a DLL.
1333     old_archive_from_new_cmds='true'
1334     # FIXME: Should let the user specify the lib program.
1335     old_archive_cmds='lib /OUT:$oldlib$oldobjs'
1336     fix_srcfile_path='`cygpath -w $srcfile`'
1337     ;;
1339   freebsd1*)
1340     ld_shlibs=no
1341     ;;
1343   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1344   # support.  Future versions do this automatically, but an explicit c++rt0.o
1345   # does not break anything, and helps significantly (at the cost of a little
1346   # extra space).
1347   freebsd2.2*)
1348     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
1349     hardcode_libdir_flag_spec='-R$libdir'
1350     hardcode_direct=yes
1351     hardcode_shlibpath_var=no
1352     ;;
1354   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1355   freebsd2*)
1356     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1357     hardcode_direct=yes
1358     hardcode_minus_L=yes
1359     hardcode_shlibpath_var=no
1360     ;;
1362   hpux9* | hpux10* | hpux11*)
1363     case "$host_os" in
1364     hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
1365     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
1366     esac
1367     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1368     hardcode_libdir_separator=:
1369     hardcode_direct=yes
1370     hardcode_minus_L=yes # Not in the search PATH, but as the default
1371                          # location of the library.
1372     export_dynamic_flag_spec='${wl}-E'
1373     ;;
1375   irix5* | irix6*)
1376     if test "$with_gcc" = yes; then
1377       archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1378     else
1379       archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1380     fi
1381     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1382     hardcode_libdir_separator=:
1383     ;;
1385   netbsd*)
1386     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1387       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'  # a.out
1388     else
1389       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts'      # ELF
1390     fi
1391     hardcode_libdir_flag_spec='${wl}-R$libdir'
1392     hardcode_direct=yes
1393     hardcode_shlibpath_var=no
1394     ;;
1396   openbsd*)
1397     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1398     hardcode_libdir_flag_spec='-R$libdir'
1399     hardcode_direct=yes
1400     hardcode_shlibpath_var=no
1401     ;;
1403   os2*)
1404     hardcode_libdir_flag_spec='-L$libdir'
1405     hardcode_minus_L=yes
1406     allow_undefined_flag=unsupported
1407     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 $linkopts $objdir/$libname.def'
1408     old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
1409     ;;
1411   osf3* | osf4*)
1412     if test "$with_gcc" = yes; then
1413       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1414       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1415     else
1416       allow_undefined_flag=' -expect_unresolved \*'
1417       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1418     fi
1419     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1420     hardcode_libdir_separator=:
1421     ;;
1423   sco3.2v5*)
1424     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1425     hardcode_shlibpath_var=no
1426     runpath_var=LD_RUN_PATH
1427     hardcode_runpath_var=yes
1428     ;;
1430   solaris*)
1431     no_undefined_flag=' -z text'
1432     # $CC -shared without GNU ld will not create a library from C++
1433     # object files and a static libstdc++, better avoid it by now
1434     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
1435     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1436                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
1437     hardcode_libdir_flag_spec='-R$libdir'
1438     hardcode_shlibpath_var=no
1439     case "$host_os" in
1440     solaris2.[0-5] | solaris2.[0-5].*) ;;
1441     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
1442       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1443     esac
1444     ;;
1446   sunos4*)
1447     archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
1448     hardcode_libdir_flag_spec='-L$libdir'
1449     hardcode_direct=yes
1450     hardcode_minus_L=yes
1451     hardcode_shlibpath_var=no
1452     ;;
1454   sysv4)
1455     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1456     runpath_var='LD_RUN_PATH'
1457     hardcode_shlibpath_var=no
1458     hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
1459     ;;  
1461   sysv4.3*)
1462     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1463     hardcode_shlibpath_var=no
1464     export_dynamic_flag_spec='-Bexport'
1465     ;;
1467   uts4*)
1468     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1469     hardcode_libdir_flag_spec='-L$libdir'
1470     hardcode_shlibpath_var=no
1471     ;;
1473   dgux*)
1474     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1475     hardcode_libdir_flag_spec='-L$libdir'
1476     hardcode_shlibpath_var=no
1477     ;;
1479   sysv4*MP*)
1480     if test -d /usr/nec ;then
1481     # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
1482     archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
1483     hardcode_shlibpath_var=no
1484     runpath_var=LD_RUN_PATH
1485     hardcode_runpath_var=yes
1486     ld_shlibs=yes
1487     fi
1488     ;;
1490   *)
1491     ld_shlibs=no
1492     ;;
1493   esac
1494 fi
1495 echo "$ac_t$ld_shlibs" 1>&6
1496 test "$ld_shlibs" = no && can_build_shared=no
1498 if test -z "$NM"; then
1499   echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
1500   case "$NM" in
1501   [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
1502   *)
1503     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1504     for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
1505       test -z "$ac_dir" && ac_dir=.
1506       if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
1507         # Check to see if the nm accepts a BSD-compat flag.
1508         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1509         #   nm: unknown option "B" ignored
1510         if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1511           NM="$ac_dir/nm -B"
1512           break
1513         elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1514           NM="$ac_dir/nm -p"
1515           break
1516         else
1517           NM=${NM="$ac_dir/nm"} # keep the first match, but
1518           continue # so that we can try to find one that supports BSD flags
1519         fi
1520       fi
1521     done
1522     IFS="$ac_save_ifs"
1523     test -z "$NM" && NM=nm
1524     ;;
1525   esac
1526   echo "$ac_t$NM" 1>&6
1527 fi
1529 # Check for command to grab the raw symbol name followed by C symbol from nm.
1530 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1532 # These are sane defaults that work on at least a few old systems.
1533 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1535 # Character class describing NM global symbol codes.
1536 symcode='[BCDEGRST]'
1538 # Regexp to match symbols that can be accessed directly from C.
1539 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1541 # Transform the above into a raw symbol and a C symbol.
1542 symxfrm='\1 \2\3 \3'
1544 # Transform an extracted symbol line into a proper C declaration
1545 global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1547 # Define system-specific variables.
1548 case "$host_os" in
1549 aix*)
1550   symcode='[BCDT]'
1551   ;;
1552 cygwin* | mingw*)
1553   symcode='[ABCDGISTW]'
1554   ;;
1555 hpux*) # Its linker distinguishes data from code symbols
1556   global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1557   ;;
1558 irix*)
1559   symcode='[BCDEGRST]'
1560   ;;
1561 solaris*)
1562   symcode='[BDT]'
1563   ;;
1564 sysv4)
1565   symcode='[DFNSTU]'
1566   ;;
1567 esac
1569 # If we're using GNU nm, then use its standard symbol codes.
1570 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1571   symcode='[ABCDGISTW]'
1572 fi
1574 # Try without a prefix undercore, then with it.
1575 for ac_symprfx in "" "_"; do
1577   # Write the raw and C identifiers.
1578   global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode\)[  ][      ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
1580   # Check to see that the pipe works correctly.
1581   pipe_works=no
1582   $rm conftest*
1583   cat > conftest.c <<EOF
1584 #ifdef __cplusplus
1585 extern "C" {
1586 #endif
1587 char nm_test_var;
1588 void nm_test_func(){}
1589 #ifdef __cplusplus
1591 #endif
1592 main(){nm_test_var='a';nm_test_func();return(0);}
1593 EOF
1595   echo "$progname:1592: checking if global_symbol_pipe works" >&5
1596   if { (eval echo $progname:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
1597     # Now try to grab the symbols.
1598     nlist=conftest.nm
1599     if { echo "$progname:1596: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1601       # Try sorting and uniquifying the output.
1602       if sort "$nlist" | uniq > "$nlist"T; then
1603         mv -f "$nlist"T "$nlist"
1604       else
1605         rm -f "$nlist"T
1606       fi
1608       # Make sure that we snagged all the symbols we need.
1609       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1610         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1611           cat <<EOF > conftest.c
1612 #ifdef __cplusplus
1613 extern "C" {
1614 #endif
1616 EOF
1617           # Now generate the symbol file.
1618           eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
1620           cat <<EOF >> conftest.c
1621 #if defined (__STDC__) && __STDC__
1622 # define lt_ptr_t void *
1623 #else
1624 # define lt_ptr_t char *
1625 # define const
1626 #endif
1628 /* The mapping between symbol names and symbols. */
1629 const struct {
1630   const char *name;
1631   lt_ptr_t address;
1633 lt_preloaded_symbols[] =
1635 EOF
1636           sed 's/^. \(.*\) \(.*\)$/  {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
1637           cat <<\EOF >> conftest.c
1638   {0, (lt_ptr_t) 0}
1639 };
1641 #ifdef __cplusplus
1643 #endif
1644 EOF
1645           # Now try linking the two files.
1646           mv conftest.$objext conftstm.$objext
1647           save_LIBS="$LIBS"
1648           save_CFLAGS="$CFLAGS"
1649           LIBS="conftstm.$objext"
1650           CFLAGS="$CFLAGS$no_builtin_flag"
1651           if { (eval echo $progname:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1652             pipe_works=yes
1653           else
1654             echo "$progname: failed program was:" >&5
1655             cat conftest.c >&5
1656           fi
1657           LIBS="$save_LIBS"
1658         else
1659           echo "cannot find nm_test_func in $nlist" >&5
1660         fi
1661       else
1662         echo "cannot find nm_test_var in $nlist" >&5
1663       fi
1664     else
1665       echo "cannot run $global_symbol_pipe" >&5
1666     fi
1667   else
1668     echo "$progname: failed program was:" >&5
1669     cat conftest.c >&5
1670   fi
1671   $rm conftest* conftst*
1673   # Do not use the global_symbol_pipe unless it works.
1674   if test "$pipe_works" = yes; then
1675     break
1676   else
1677     global_symbol_pipe=
1678   fi
1679 done
1680 if test "$pipe_works" = yes; then
1681   echo "${ac_t}ok" 1>&6
1682 else
1683   echo "${ac_t}failed" 1>&6
1684 fi
1686 if test -z "$global_symbol_pipe"; then
1687   global_symbol_to_cdecl=
1688 fi
1690 # Check hardcoding attributes.
1691 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1692 hardcode_action=
1693 if test -n "$hardcode_libdir_flag_spec" || \
1694    test -n "$runpath_var"; then
1696   # We can hardcode non-existant directories.
1697   if test "$hardcode_direct" != no &&
1698      # If the only mechanism to avoid hardcoding is shlibpath_var, we
1699      # have to relink, otherwise we might link with an installed library
1700      # when we should be linking with a yet-to-be-installed one
1701      ## test "$hardcode_shlibpath_var" != no &&
1702      test "$hardcode_minus_L" != no; then
1703     # Linking always hardcodes the temporary library directory.
1704     hardcode_action=relink
1705   else
1706     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1707     hardcode_action=immediate
1708   fi
1709 else
1710   # We cannot hardcode anything, or else we can only hardcode existing
1711   # directories.
1712   hardcode_action=unsupported
1713 fi
1714 echo "$ac_t$hardcode_action" 1>&6
1717 reload_flag=
1718 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1719 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1720 # PORTME Some linkers may need a different reload flag.
1721 reload_flag='-r'
1722 echo "$ac_t$reload_flag" 1>&6
1723 test -n "$reload_flag" && reload_flag=" $reload_flag"
1725 # PORTME Fill in your ld.so characteristics
1726 library_names_spec=
1727 libname_spec='lib$name'
1728 soname_spec=
1729 postinstall_cmds=
1730 postuninstall_cmds=
1731 finish_cmds=
1732 finish_eval=
1733 shlibpath_var=
1734 shlibpath_overrides_runpath=unknown
1735 version_type=none
1736 dynamic_linker="$host_os ld.so"
1737 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1738 sys_lib_search_path_spec="/lib /usr/lib"
1739 file_magic_cmd=
1740 file_magic_test_file=
1741 deplibs_check_method='unknown'
1742 # Need to set the preceding variable on all platforms that support
1743 # interlibrary dependencies.
1744 # 'none' -- dependencies not supported.
1745 # `unknown' -- same as none, but documents that we really don't know.
1746 # 'pass_all' -- all dependencies passed with no checks.
1747 # 'test_compile' -- check by making test program.
1748 # 'file_magic [regex]' -- check by looking for files in library path
1749 # which responds to the $file_magic_cmd with a given egrep regex.
1750 # If you have `file' or equivalent on your system and you're not sure
1751 # whether `pass_all' will *always* work, you probably want this one.
1752 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1753 case "$host_os" in
1754 aix3*)
1755   version_type=linux
1756   library_names_spec='${libname}${release}.so$versuffix $libname.a'
1757   shlibpath_var=LIBPATH
1759   # AIX has no versioning support, so we append a major version to the name.
1760   soname_spec='${libname}${release}.so$major'
1761   ;;
1763 aix4*)
1764   version_type=linux
1765   # AIX has no versioning support, so currently we can not hardcode correct
1766   # soname into executable. Probably we can add versioning support to
1767   # collect2, so additional links can be useful in future.
1768   # We preserve .a as extension for shared libraries though AIX4.2
1769   # and later linker supports .so
1770   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
1771   shlibpath_var=LIBPATH
1772   deplibs_check_method=pass_all
1773   ;;
1775 amigaos*)
1776   library_names_spec='$libname.ixlibrary $libname.a'
1777   # Create ${libname}_ixlibrary.a entries in /sys/libs.
1778   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'
1779   ;;
1781 beos*)
1782   library_names_spec='${libname}.so'
1783   dynamic_linker="$host_os ld.so"
1784   shlibpath_var=LIBRARY_PATH
1785   deplibs_check_method=pass_all
1786   lt_cv_dlopen="load_add_on"
1787   lt_cv_dlopen_libs=
1788   lt_cv_dlopen_self=yes
1789   ;;
1791 bsdi4*)
1792   version_type=linux
1793   library_names_spec='${libname}.so$major ${libname}.so'
1794   soname_spec='${libname}.so'
1795   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1796   shlibpath_var=LD_LIBRARY_PATH
1797   deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1798   file_magic_cmd=/usr/bin/file
1799   file_magic_test_file=/shlib/libc.so
1800   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1801   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1802   # the default ld.so.conf also contains /usr/contrib/lib and
1803   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1804   # libtool to hard-code these into programs
1805   ;;
1807 cygwin* | mingw*)
1808   version_type=windows
1809   need_version=no
1810   need_lib_prefix=no
1811   if test "$with_gcc" = yes; then
1812     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
1813   else
1814     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1815   fi
1816   dynamic_linker='Win32 ld.exe'
1817   deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1818   file_magic_cmd='${OBJDUMP} -f'
1819   # FIXME: first we should search . and the directory the executable is in
1820   shlibpath_var=PATH
1821   lt_cv_dlopen="LoadLibrary"
1822   lt_cv_dlopen_libs=
1823   ;;
1825 freebsd1*)
1826   dynamic_linker=no
1827   ;;
1828   
1829 freebsd*)
1830   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1831   version_type=freebsd-$objformat
1832   case "$version_type" in
1833     freebsd-elf*)
1834       deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1835       ;;
1836     freebsd-*)
1837       deplibs_check_method='file_magic FreeBSD.* shared library'
1838       ;;
1839   esac
1840   file_magic_cmd=/usr/bin/file
1841   file_magic_test_file=`echo /usr/lib/libc.so.*`
1842   if test "$release_suffix" = all; then
1843     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so'
1844   else
1845     library_names_spec='${libname}${release}.so$versuffix ${libname}.so'
1846   fi 
1847   need_version=no
1848   need_lib_prefix=no
1849   finish_cmds='/usr/bin/env OBJFORMAT="'"$objformat"'" /sbin/ldconfig -m $libdir'
1850   shlibpath_var=LD_LIBRARY_PATH
1851   case "$host_os" in
1852   freebsd2* | freebsd3.[01]*)
1853     shlibpath_overrides_runpath=yes
1854     ;;
1855   *) # from 3.2 on
1856     shlibpath_overrides_runpath=no
1857     ;;
1858   esac
1859   ;;
1861 gnu*)
1862   version_type=linux
1863   need_lib_prefix=no
1864   need_version=no
1865   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1866   soname_spec='${libname}${release}.so$major'
1867   shlibpath_var=LD_LIBRARY_PATH
1868   ;;
1870 hpux9* | hpux10* | hpux11*)
1871   # Give a soname corresponding to the major version so that dld.sl refuses to
1872   # link against other versions.
1873   dynamic_linker="$host_os dld.sl"
1874   version_type=sunos
1875   need_lib_prefix=no
1876   need_version=no
1877   shlibpath_var=SHLIB_PATH
1878   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1879   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1880   soname_spec='${libname}${release}.sl$major'
1881   # HP-UX runs *really* slowly unless shared libraries are mode 555.
1882   postinstall_cmds='chmod 555 $lib'
1883   ;;
1885 irix5* | irix6*)
1886   version_type=irix
1887   need_lib_prefix=no
1888   need_version=no
1889   soname_spec='${libname}${release}.so.$major'
1890   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
1891   case "$host_os" in
1892   irix5*)
1893     libsuff= shlibsuff=
1894     # this will be overridden with pass_all, but let us keep it just in case
1895     deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1896     ;;
1897   *)
1898     case "$LD" in # libtool.m4 will add one of these switches to LD
1899     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1900     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1901     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1902     *) libsuff= shlibsuff= libmagic=never-match;;
1903     esac
1904     # this will be overridden with pass_all, but let us keep it just in case
1905     deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1906     ;;
1907   esac
1908   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1909   shlibpath_overrides_runpath=no
1910   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1911   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1912   file_magic_cmd=/usr/bin/file
1913   file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1914   deplibs_check_method='pass_all'
1915   ;;
1917 # No shared lib support for Linux oldld, aout, or coff.
1918 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1919   dynamic_linker=no
1920   ;;
1922 # This must be Linux ELF.
1923 linux-gnu*)
1924   version_type=linux
1925   need_lib_prefix=no
1926   need_version=no
1927   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1928   soname_spec='${libname}${release}.so$major'
1929   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1930   shlibpath_var=LD_LIBRARY_PATH
1931   shlibpath_overrides_runpath=no
1932   deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
1933   file_magic_cmd=/usr/bin/file
1934   file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1936   if test -f /lib/ld.so.1; then
1937     dynamic_linker='GNU ld.so'
1938   else
1939     # Only the GNU ld.so supports shared libraries on MkLinux.
1940     case "$host_cpu" in
1941     powerpc*) dynamic_linker=no ;;
1942     *) dynamic_linker='Linux ld.so' ;;
1943     esac
1944   fi
1945   ;;
1947 netbsd*)
1948   version_type=sunos
1949   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1950     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1951     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1952     dynamic_linker='NetBSD (a.out) ld.so'
1953   else
1954     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1955     soname_spec='${libname}${release}.so$major'
1956     dynamic_linker='NetBSD ld.elf_so'
1957   fi
1958   shlibpath_var=LD_LIBRARY_PATH
1959   ;;
1961 openbsd*)
1962   version_type=sunos
1963   if test "$with_gnu_ld" = yes; then
1964     need_lib_prefix=no
1965     need_version=no
1966   fi
1967   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1968   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1969   shlibpath_var=LD_LIBRARY_PATH
1970   ;;
1972 os2*)
1973   libname_spec='$name'
1974   need_lib_prefix=no
1975   library_names_spec='$libname.dll $libname.a'
1976   dynamic_linker='OS/2 ld.exe'
1977   shlibpath_var=LIBPATH
1978   ;;
1980 osf3* | osf4*)
1981   version_type=osf
1982   need_version=no
1983   soname_spec='${libname}${release}.so'
1984   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1985   shlibpath_var=LD_LIBRARY_PATH
1986   # this will be overridden with pass_all, but let us keep it just in case
1987   deplibs_check_method='file_magic COFF format alpha shared library'
1988   file_magic_cmd=/usr/bin/file
1989   file_magic_test_file=/shlib/libc.so
1990   deplibs_check_method='pass_all'
1991   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1992   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1993   ;;
1995 sco3.2v5*)
1996   version_type=osf
1997   soname_spec='${libname}${release}.so$major'
1998   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1999   shlibpath_var=LD_LIBRARY_PATH
2000   ;;
2002 solaris*)
2003   version_type=linux
2004   need_lib_prefix=no
2005   need_version=no
2006   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2007   soname_spec='${libname}${release}.so$major'
2008   shlibpath_var=LD_LIBRARY_PATH
2009   shlibpath_overrides_runpath=yes
2010   # ldd complains unless libraries are executable
2011   postinstall_cmds='chmod +x $lib'
2012   deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
2013   file_magic_cmd=/usr/bin/file
2014   file_magic_test_file=/lib/libc.so
2015   ;;
2017 sunos4*)
2018   version_type=sunos
2019   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2020   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2021   shlibpath_var=LD_LIBRARY_PATH
2022   shlibpath_overrides_runpath=yes
2023   if test "$with_gnu_ld" = yes; then
2024     need_lib_prefix=no
2025   fi
2026   need_version=yes
2027   ;;
2029 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2030   version_type=linux
2031   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2032   soname_spec='${libname}${release}.so$major'
2033   shlibpath_var=LD_LIBRARY_PATH
2034   case "$host_vendor" in
2035     ncr)
2036       deplibs_check_method='pass_all'
2037       ;;
2038     motorola)
2039       need_lib_prefix=no
2040       need_version=no
2041       shlibpath_overrides_runpath=no
2042       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2043       deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2044       file_magic_cmd=/usr/bin/file
2045       file_magic_test_file=`echo /usr/lib/libc.so*`
2046       ;;
2047   esac
2048   ;;
2050 uts4*)
2051   version_type=linux
2052   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2053   soname_spec='${libname}${release}.so$major'
2054   shlibpath_var=LD_LIBRARY_PATH
2055   ;;
2057 dgux*)
2058   version_type=linux
2059   need_lib_prefix=no
2060   need_version=no
2061   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2062   soname_spec='${libname}${release}.so$major'
2063   shlibpath_var=LD_LIBRARY_PATH
2064   ;;
2066 sysv4*MP*)
2067   if test -d /usr/nec ;then
2068     version_type=linux
2069     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2070     soname_spec='$libname.so.$major'
2071     shlibpath_var=LD_LIBRARY_PATH
2072   fi
2073   ;;
2075 *)
2076   dynamic_linker=no
2077   ;;
2078 esac
2079 echo "$ac_t$dynamic_linker" 1>&6
2080 test "$dynamic_linker" = no && can_build_shared=no
2082 # Report the final consequences.
2083 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
2085 # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
2086 # configure.in, otherwise build static only libraries.
2087 case "$host_os" in
2088 cygwin* | mingw* | os2*)
2089   if test x$can_build_shared = xyes; then
2090     test x$enable_win32_dll = xno && can_build_shared=no
2091     echo "checking if package supports dlls... $can_build_shared" 1>&6
2092   fi
2093 ;;
2094 esac
2096 if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
2097   case "$deplibs_check_method" in
2098   "file_magic "*)
2099     file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2100     if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2101        egrep "$file_magic_regex" > /dev/null; then
2102       :
2103     else
2104       cat <<EOF 1>&2
2106 *** Warning: the command libtool uses to detect shared libraries,
2107 *** $file_magic_cmd, produces output that libtool cannot recognize.
2108 *** The result is that libtool may fail to recognize shared libraries
2109 *** as such.  This will affect the creation of libtool libraries that
2110 *** depend on shared libraries, but programs linked with such libtool
2111 *** libraries will work regardless of this problem.  Nevertheless, you
2112 *** may want to report the problem to your system manager and/or to
2113 *** bug-libtool@gnu.org
2115 EOF
2116     fi ;;
2117   esac
2118 fi
2120 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
2121 test "$can_build_shared" = "no" && enable_shared=no
2123 # On AIX, shared libraries and static libraries use the same namespace, and
2124 # are all built from PIC.
2125 case "$host_os" in
2126 aix3*)
2127   test "$enable_shared" = yes && enable_static=no
2128   if test -n "$RANLIB"; then
2129     archive_cmds="$archive_cmds~\$RANLIB \$lib"
2130     postinstall_cmds='$RANLIB $lib'
2131   fi
2132   ;;
2134 aix4*)
2135   test "$enable_shared" = yes && enable_static=no
2136   ;;
2137 esac
2139 echo "$ac_t$enable_shared" 1>&6
2141 # Make sure either enable_shared or enable_static is yes.
2142 test "$enable_shared" = yes || enable_static=yes
2144 echo "checking whether to build static libraries... $enable_static" 1>&6
2146 if test "$hardcode_action" = relink; then
2147   # Fast installation is not supported
2148   enable_fast_install=no
2149 elif test "$shlibpath_overrides_runpath" = yes ||
2150      test "$enable_shared" = no; then
2151   # Fast installation is not necessary
2152   enable_fast_install=needless
2153 fi
2155 echo $ac_n "checking for objdir... $ac_c" 1>&6
2156 rm -f .libs 2>/dev/null
2157 mkdir .libs 2>/dev/null
2158 if test -d .libs; then
2159   objdir=.libs
2160 else
2161   # MS-DOS does not allow filenames that begin with a dot.
2162   objdir=_libs
2163 fi
2164 rmdir .libs 2>/dev/null
2165 echo "$ac_t$objdir" 1>&6
2167 if test "x$enable_dlopen" != xyes; then
2168   enable_dlopen=unknown
2169   enable_dlopen_self=unknown
2170   enable_dlopen_self_static=unknown
2171 else
2172 if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
2173   lt_cv_dlopen=no lt_cv_dlopen_libs=
2174 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2175 echo "$progname:2170: checking for dlopen in -ldl" >&5
2176 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2177 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2178   echo $ac_n "(cached) $ac_c" 1>&6
2179 else
2180   ac_save_LIBS="$LIBS"
2181 LIBS="-ldl  $LIBS"
2182 cat > conftest.$ac_ext <<EOF
2183 #line 2178 "ltconfig"
2184 /* Override any gcc2 internal prototype to avoid an error.  */
2185 /* We use char because int might match the return type of a gcc2
2186     builtin and then its argument prototype would still apply.  */
2187 char dlopen();
2189 int main() {
2190 dlopen()
2191 ; return 0; }
2192 EOF
2193 if { (eval echo $progname:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2194   rm -rf conftest*
2195   eval "ac_cv_lib_$ac_lib_var=yes"
2196 else
2197   echo "$progname: failed program was:" >&5
2198   cat conftest.$ac_ext >&5
2199   rm -rf conftest*
2200   eval "ac_cv_lib_$ac_lib_var=no"
2201 fi
2202 rm -f conftest*
2203 LIBS="$ac_save_LIBS"
2205 fi
2206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2207   echo "$ac_t""yes" 1>&6
2208   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
2209 else
2210   echo "$ac_t""no" 1>&6
2211 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
2212 echo "$progname:2207: checking for dlopen" >&5
2213 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
2214   echo $ac_n "(cached) $ac_c" 1>&6
2215 else
2216   cat > conftest.$ac_ext <<EOF
2217 #line 2212 "ltconfig"
2218 /* System header to define __stub macros and hopefully few prototypes,
2219     which can conflict with char dlopen(); below.  */
2220 #include <assert.h>
2221 /* Override any gcc2 internal prototype to avoid an error.  */
2222 /* We use char because int might match the return type of a gcc2
2223     builtin and then its argument prototype would still apply.  */
2224 char dlopen();
2226 int main() {
2228 /* The GNU C library defines this for functions which it implements
2229     to always fail with ENOSYS.  Some functions are actually named
2230     something starting with __ and the normal name is an alias.  */
2231 #if defined (__stub_dlopen) || defined (__stub___dlopen)
2232 choke me
2233 #else
2234 dlopen();
2235 #endif
2237 ; return 0; }
2238 EOF
2239 if { (eval echo $progname:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2240   rm -rf conftest*
2241   eval "ac_cv_func_dlopen=yes"
2242 else
2243   echo "$progname: failed program was:" >&5
2244   cat conftest.$ac_ext >&5
2245   rm -rf conftest*
2246   eval "ac_cv_func_dlopen=no"
2247 fi
2248 rm -f conftest*
2249 fi
2250 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
2251   echo "$ac_t""yes" 1>&6
2252   lt_cv_dlopen="dlopen"
2253 else
2254   echo "$ac_t""no" 1>&6
2255 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2256 echo "$progname:2251: checking for dld_link in -ldld" >&5
2257 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
2258 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2259   echo $ac_n "(cached) $ac_c" 1>&6
2260 else
2261   ac_save_LIBS="$LIBS"
2262 LIBS="-ldld  $LIBS"
2263 cat > conftest.$ac_ext <<EOF
2264 #line 2259 "ltconfig"
2265 /* Override any gcc2 internal prototype to avoid an error.  */
2266 /* We use char because int might match the return type of a gcc2
2267     builtin and then its argument prototype would still apply.  */
2268 char dld_link();
2270 int main() {
2271 dld_link()
2272 ; return 0; }
2273 EOF
2274 if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2275   rm -rf conftest*
2276   eval "ac_cv_lib_$ac_lib_var=yes"
2277 else
2278   echo "$progname: failed program was:" >&5
2279   cat conftest.$ac_ext >&5
2280   rm -rf conftest*
2281   eval "ac_cv_lib_$ac_lib_var=no"
2282 fi
2283 rm -f conftest*
2284 LIBS="$ac_save_LIBS"
2286 fi
2287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2288   echo "$ac_t""yes" 1>&6
2289   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
2290 else
2291   echo "$ac_t""no" 1>&6
2292 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
2293 echo "$progname:2288: checking for shl_load" >&5
2294 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
2295   echo $ac_n "(cached) $ac_c" 1>&6
2296 else
2297   cat > conftest.$ac_ext <<EOF
2298 #line 2293 "ltconfig"
2299 /* System header to define __stub macros and hopefully few prototypes,
2300     which can conflict with char shl_load(); below.  */
2301 #include <assert.h>
2302 /* Override any gcc2 internal prototype to avoid an error.  */
2303 /* We use char because int might match the return type of a gcc2
2304     builtin and then its argument prototype would still apply.  */
2305 char shl_load();
2307 int main() {
2309 /* The GNU C library defines this for functions which it implements
2310     to always fail with ENOSYS.  Some functions are actually named
2311     something starting with __ and the normal name is an alias.  */
2312 #if defined (__stub_shl_load) || defined (__stub___shl_load)
2313 choke me
2314 #else
2315 shl_load();
2316 #endif
2318 ; return 0; }
2319 EOF
2320 if { (eval echo $progname:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2321   rm -rf conftest*
2322   eval "ac_cv_func_shl_load=yes"
2323 else
2324   echo "$progname: failed program was:" >&5
2325   cat conftest.$ac_ext >&5
2326   rm -rf conftest*
2327   eval "ac_cv_func_shl_load=no"
2328 fi
2329 rm -f conftest*
2330 fi
2332 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
2333   echo "$ac_t""yes" 1>&6
2334   lt_cv_dlopen="shl_load"
2335 else
2336   echo "$ac_t""no" 1>&6
2337 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2338 echo "$progname:2333: checking for shl_load in -ldld" >&5
2339 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2341   echo $ac_n "(cached) $ac_c" 1>&6
2342 else
2343   ac_save_LIBS="$LIBS"
2344 LIBS="-ldld  $LIBS"
2345 cat > conftest.$ac_ext <<EOF
2346 #line 2341 "ltconfig"
2347 #include "confdefs.h"
2348 /* Override any gcc2 internal prototype to avoid an error.  */
2349 /* We use char because int might match the return type of a gcc2
2350     builtin and then its argument prototype would still apply.  */
2351 char shl_load();
2353 int main() {
2354 shl_load()
2355 ; return 0; }
2356 EOF
2357 if { (eval echo $progname:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2358   rm -rf conftest*
2359   eval "ac_cv_lib_$ac_lib_var=yes"
2360 else
2361   echo "$progname: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -rf conftest*
2364   eval "ac_cv_lib_$ac_lib_var=no"
2365 fi
2366 rm -f conftest*
2367 LIBS="$ac_save_LIBS"
2369 fi
2370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2371   echo "$ac_t""yes" 1>&6
2372   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
2373 else
2374   echo "$ac_t""no" 1>&6
2375 fi
2378 fi
2380     
2381 fi
2383   
2384 fi
2387 fi
2389 fi
2391   if test "x$lt_cv_dlopen" != xno; then
2392     enable_dlopen=yes
2393   fi
2395   case "$lt_cv_dlopen" in
2396   dlopen)
2397 for ac_hdr in dlfcn.h; do
2398 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2399 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2400 echo "$progname:2395: checking for $ac_hdr" >&5
2401 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2402   echo $ac_n "(cached) $ac_c" 1>&6
2403 else
2404   cat > conftest.$ac_ext <<EOF
2405 #line 2400 "ltconfig"
2406 #include <$ac_hdr>
2407 int fnord = 0;
2408 EOF
2409 ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
2410 { (eval echo $progname:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2412 if test -z "$ac_err"; then
2413   rm -rf conftest*
2414   eval "ac_cv_header_$ac_safe=yes"
2415 else
2416   echo "$ac_err" >&5
2417   echo "$progname: failed program was:" >&5
2418   cat conftest.$ac_ext >&5
2419   rm -rf conftest*
2420   eval "ac_cv_header_$ac_safe=no"
2421 fi
2422 rm -f conftest*
2423 fi
2424 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2425   echo "$ac_t""yes" 1>&6
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429 done
2431     if test "x$ac_cv_header_dlfcn_h" = xyes; then
2432       CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2433     fi
2434     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2435     LIBS="$lt_cv_dlopen_libs $LIBS"
2437   echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
2438 echo "$progname:2433: checking whether a program can dlopen itself" >&5
2439 if test "${lt_cv_dlopen_self+set}" = set; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   if test "$cross_compiling" = yes; then
2443     lt_cv_dlopen_self=cross
2444   else
2445     cat > conftest.c <<EOF
2446 #line 2441 "ltconfig"
2448 #if HAVE_DLFCN_H
2449 #include <dlfcn.h>
2450 #endif
2452 #include <stdio.h>
2454 #ifdef RTLD_GLOBAL
2455 # define LTDL_GLOBAL    RTLD_GLOBAL
2456 #else
2457 # ifdef DL_GLOBAL
2458 #  define LTDL_GLOBAL   DL_GLOBAL
2459 # else
2460 #  define LTDL_GLOBAL   0
2461 # endif
2462 #endif
2464 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2465    find out it does not work in some platform. */
2466 #ifndef LTDL_LAZY_OR_NOW
2467 # ifdef RTLD_LAZY
2468 #  define LTDL_LAZY_OR_NOW      RTLD_LAZY
2469 # else
2470 #  ifdef DL_LAZY
2471 #   define LTDL_LAZY_OR_NOW     DL_LAZY
2472 #  else
2473 #   ifdef RTLD_NOW
2474 #    define LTDL_LAZY_OR_NOW    RTLD_NOW
2475 #   else
2476 #    ifdef DL_NOW
2477 #     define LTDL_LAZY_OR_NOW   DL_NOW
2478 #    else
2479 #     define LTDL_LAZY_OR_NOW   0
2480 #    endif
2481 #   endif
2482 #  endif
2483 # endif
2484 #endif
2486 fnord() { int i=42;}
2487 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2488     if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2489                if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
2491 EOF
2492 if { (eval echo $progname:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2493 then
2494   lt_cv_dlopen_self=yes
2495 else
2496   echo "$progname: failed program was:" >&5
2497   cat conftest.$ac_ext >&5
2498   rm -fr conftest*
2499   lt_cv_dlopen_self=no
2500 fi
2501 rm -fr conftest*
2502 fi
2504 fi
2506 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
2508   if test "$lt_cv_dlopen_self" = yes; then
2509     LDFLAGS="$LDFLAGS $link_static_flag"
2510   echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
2511 echo "$progname:2506: checking whether a statically linked program can dlopen itself" >&5
2512 if test "${lt_cv_dlopen_self_static+set}" = set; then
2513   echo $ac_n "(cached) $ac_c" 1>&6
2514 else
2515   if test "$cross_compiling" = yes; then
2516     lt_cv_dlopen_self_static=cross
2517   else
2518     cat > conftest.c <<EOF
2519 #line 2514 "ltconfig"
2521 #if HAVE_DLFCN_H
2522 #include <dlfcn.h>
2523 #endif
2525 #include <stdio.h>
2527 #ifdef RTLD_GLOBAL
2528 # define LTDL_GLOBAL    RTLD_GLOBAL
2529 #else
2530 # ifdef DL_GLOBAL
2531 #  define LTDL_GLOBAL   DL_GLOBAL
2532 # else
2533 #  define LTDL_GLOBAL   0
2534 # endif
2535 #endif
2537 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2538    find out it does not work in some platform. */
2539 #ifndef LTDL_LAZY_OR_NOW
2540 # ifdef RTLD_LAZY
2541 #  define LTDL_LAZY_OR_NOW      RTLD_LAZY
2542 # else
2543 #  ifdef DL_LAZY
2544 #   define LTDL_LAZY_OR_NOW     DL_LAZY
2545 #  else
2546 #   ifdef RTLD_NOW
2547 #    define LTDL_LAZY_OR_NOW    RTLD_NOW
2548 #   else
2549 #    ifdef DL_NOW
2550 #     define LTDL_LAZY_OR_NOW   DL_NOW
2551 #    else
2552 #     define LTDL_LAZY_OR_NOW   0
2553 #    endif
2554 #   endif
2555 #  endif
2556 # endif
2557 #endif
2559 fnord() { int i=42;}
2560 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2561     if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2562     if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
2564 EOF
2565 if { (eval echo $progname:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2566 then
2567   lt_cv_dlopen_self_static=yes
2568 else
2569   echo "$progname: failed program was:" >&5
2570   cat conftest.$ac_ext >&5
2571   rm -fr conftest*
2572   lt_cv_dlopen_self_static=no
2573 fi
2574 rm -fr conftest*
2575 fi
2577 fi
2579 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
2580 fi
2581     ;;
2582   esac
2584   case "$lt_cv_dlopen_self" in
2585   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2586   *) enable_dlopen_self=unknown ;;
2587   esac
2589   case "$lt_cv_dlopen_self_static" in
2590   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2591   *) enable_dlopen_self_static=unknown ;;
2592   esac
2593 fi
2595 # Copy echo and quote the copy, instead of the original, because it is
2596 # used later.
2597 ltecho="$echo"
2598 if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
2599    ltecho="$CONFIG_SHELL \$0 --fallback-echo"
2600 fi
2601 LTSHELL="$SHELL"
2603 LTCONFIG_VERSION="$VERSION"
2605 # Only quote variables if we're using ltmain.sh.
2606 case "$ltmain" in
2607 *.sh)
2608   # Now quote all the things that may contain metacharacters.
2609   for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
2610     old_LD old_LDFLAGS old_LIBS \
2611     old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
2612     AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
2613     reload_flag reload_cmds wl \
2614     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2615     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2616     library_names_spec soname_spec \
2617     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2618     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
2619     file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
2620     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2621     hardcode_libdir_flag_spec hardcode_libdir_separator  \
2622     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2623     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2625     case "$var" in
2626     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2627     old_postinstall_cmds | old_postuninstall_cmds | \
2628     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2629     postinstall_cmds | postuninstall_cmds | \
2630     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2631       # Double-quote double-evaled strings.
2632       eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2633       ;;
2634     *)
2635       eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2636       ;;
2637     esac
2638   done
2640   case "$ltecho" in
2641   *'\$0 --fallback-echo"')
2642     ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
2643     ;;
2644   esac
2646   trap "$rm \"$ofile\"; exit 1" 1 2 15
2647   echo "creating $ofile"
2648   $rm "$ofile"
2649   cat <<EOF > "$ofile"
2650 #! $SHELL
2652 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2653 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2654 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
2656 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
2657 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2659 # This program is free software; you can redistribute it and/or modify
2660 # it under the terms of the GNU General Public License as published by
2661 # the Free Software Foundation; either version 2 of the License, or
2662 # (at your option) any later version.
2664 # This program is distributed in the hope that it will be useful, but
2665 # WITHOUT ANY WARRANTY; without even the implied warranty of
2666 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2667 # General Public License for more details.
2669 # You should have received a copy of the GNU General Public License
2670 # along with this program; if not, write to the Free Software
2671 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2673 # As a special exception to the GNU General Public License, if you
2674 # distribute this file as part of a program that contains a
2675 # configuration script generated by Autoconf, you may include it under
2676 # the same distribution terms that you use for the rest of that program.
2678 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2679 Xsed="sed -e s/^X//"
2681 # The HP-UX ksh and POSIX shell print the target directory to stdout
2682 # if CDPATH is set.
2683 if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
2685 ### BEGIN LIBTOOL CONFIG
2686 EOF
2687   cfgfile="$ofile"
2688   ;;
2690 *)
2691   # Double-quote the variables that need it (for aesthetics).
2692   for var in old_CC old_CFLAGS old_CPPFLAGS \
2693     old_LD old_LDFLAGS old_LIBS \
2694     old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
2695     eval "$var=\\\"\$var\\\""
2696   done
2698   # Just create a config file.
2699   cfgfile="$ofile.cfg"
2700   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2701   echo "creating $cfgfile"
2702   $rm "$cfgfile"
2703   cat <<EOF > "$cfgfile"
2704 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
2705 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2706 EOF
2707   ;;
2708 esac
2710 cat <<EOF >> "$cfgfile"
2711 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2713 # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
2714 # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
2715 # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
2716 # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
2717 #   $0$ltconfig_args
2719 # Compiler and other test output produced by $progname, useful for
2720 # debugging $progname, is in ./config.log if it exists.
2722 # The version of $progname that generated this script.
2723 LTCONFIG_VERSION=$LTCONFIG_VERSION
2725 # Shell to use when invoking shell scripts.
2726 SHELL=$LTSHELL
2728 # Whether to waste disk space.
2729 install_ltlibs=$install_ltlibs 
2731 # What to do with -release.
2732 #  yes - only for shared archive
2733 #  no  - ingnore
2734 #  all - for all archives
2735 release_suffix=$release_suffix
2737 # Whether or not to build shared libraries.
2738 build_libtool_libs=$enable_shared
2740 # Whether or not to build static libraries.
2741 build_old_libs=$enable_static
2743 # Whether or not to optimize for fast installation.
2744 fast_install=$enable_fast_install
2746 # The host system.
2747 host_alias=$host_alias
2748 host=$host
2750 # An echo program that does not interpret backslashes.
2751 echo=$ltecho
2753 # The archiver.
2754 AR=$AR
2756 # The default C compiler.
2757 CC=$CC
2759 # The linker used to build libraries.
2760 LD=$LD
2762 # Whether we need hard or soft links.
2763 LN_S=$LN_S
2765 # A BSD-compatible nm program.
2766 NM=$NM
2768 # Used on cygwin: DLL creation program.
2769 DLLTOOL="$DLLTOOL"
2771 # Used on cygwin: object dumper.
2772 OBJDUMP="$OBJDUMP"
2774 # Used on cygwin: assembler.
2775 AS="$AS"
2777 # The name of the directory that contains temporary libtool files.
2778 objdir=$objdir
2780 # How to create reloadable object files.
2781 reload_flag=$reload_flag
2782 reload_cmds=$reload_cmds
2784 # How to pass a linker flag through the compiler.
2785 wl=$wl
2787 # Object file suffix (normally "o").
2788 objext="$objext"
2790 # Old archive suffix (normally "a").
2791 libext="$libext"
2793 # Executable file suffix (normally "").
2794 exeext="$exeext"
2796 # Additional compiler flags for building library objects.
2797 pic_flag=$pic_flag
2799 # Does compiler simultaneously support -c and -o options?
2800 compiler_c_o=$compiler_c_o
2802 # Can we write directly to a .lo ?
2803 compiler_o_lo=$compiler_o_lo
2805 # Must we lock files when doing compilation ?
2806 need_locks=$need_locks
2808 # Do we need the lib prefix for modules?
2809 need_lib_prefix=$need_lib_prefix
2811 # Do we need a version for libraries?
2812 need_version=$need_version
2814 # Whether dlopen is supported.
2815 dlopen=$enable_dlopen
2817 # Whether dlopen of programs is supported.
2818 dlopen_self=$enable_dlopen_self
2820 # Whether dlopen of statically linked programs is supported.
2821 dlopen_self_static=$enable_dlopen_self_static
2823 # Compiler flag to prevent dynamic linking.
2824 link_static_flag=$link_static_flag
2826 # Compiler flag to turn off builtin functions.
2827 no_builtin_flag=$no_builtin_flag
2829 # Compiler flag to allow reflexive dlopens.
2830 export_dynamic_flag_spec=$export_dynamic_flag_spec
2832 # Compiler flag to generate shared objects directly from archives.
2833 whole_archive_flag_spec=$whole_archive_flag_spec
2835 # Compiler flag to generate thread-safe objects.
2836 thread_safe_flag_spec=$thread_safe_flag_spec
2838 # Library versioning type.
2839 version_type=$version_type
2841 # Format of library name prefix.
2842 libname_spec=$libname_spec
2844 # List of archive names.  First name is the real one, the rest are links.
2845 # The last name is the one that the linker finds with -lNAME.
2846 library_names_spec=$library_names_spec
2848 # The coded name of the library, if different from the real name.
2849 soname_spec=$soname_spec
2851 # Commands used to build and install an old-style archive.
2852 RANLIB=$RANLIB
2853 old_archive_cmds=$old_archive_cmds
2854 old_postinstall_cmds=$old_postinstall_cmds
2855 old_postuninstall_cmds=$old_postuninstall_cmds
2857 # Create an old-style archive from a shared archive.
2858 old_archive_from_new_cmds=$old_archive_from_new_cmds
2860 # Commands used to build and install a shared archive.
2861 archive_cmds=$archive_cmds
2862 archive_expsym_cmds=$archive_expsym_cmds
2863 postinstall_cmds=$postinstall_cmds
2864 postuninstall_cmds=$postuninstall_cmds
2866 # Method to check whether dependent libraries are shared objects.
2867 deplibs_check_method=$deplibs_check_method
2869 # Command to use when deplibs_check_method == file_magic.
2870 file_magic_cmd=$file_magic_cmd
2872 # Flag that allows shared libraries with undefined symbols to be built.
2873 allow_undefined_flag=$allow_undefined_flag
2875 # Flag that forces no undefined symbols.
2876 no_undefined_flag=$no_undefined_flag
2878 # Commands used to finish a libtool library installation in a directory.
2879 finish_cmds=$finish_cmds
2881 # Same as above, but a single script fragment to be evaled but not shown.
2882 finish_eval=$finish_eval
2884 # Take the output of nm and produce a listing of raw symbols and C names.
2885 global_symbol_pipe=$global_symbol_pipe
2887 # Transform the output of nm in a proper C declaration
2888 global_symbol_to_cdecl=$global_symbol_to_cdecl
2890 # This is the shared library runtime path variable.
2891 runpath_var=$runpath_var
2893 # This is the shared library path variable.
2894 shlibpath_var=$shlibpath_var
2896 # Is shlibpath searched before the hard-coded library search path?
2897 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2899 # How to hardcode a shared library path into an executable.
2900 hardcode_action=$hardcode_action
2902 # Flag to hardcode \$libdir into a binary during linking.
2903 # This must work even if \$libdir does not exist.
2904 hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
2906 # Whether we need a single -rpath flag with a separated argument.
2907 hardcode_libdir_separator=$hardcode_libdir_separator
2909 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2910 # resulting binary.
2911 hardcode_direct=$hardcode_direct
2913 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2914 # resulting binary.
2915 hardcode_minus_L=$hardcode_minus_L
2917 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2918 # the resulting binary.
2919 hardcode_shlibpath_var=$hardcode_shlibpath_var
2921 # Compile-time system search path for libraries
2922 sys_lib_search_path_spec=$sys_lib_search_path_spec
2924 # Run-time system search path for libraries
2925 sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
2927 # Fix the shell variable \$srcfile for the compiler.
2928 fix_srcfile_path="$fix_srcfile_path"
2930 # Set to yes if exported symbols are required.
2931 always_export_symbols=$always_export_symbols
2933 # The commands to list exported symbols.
2934 export_symbols_cmds=$export_symbols_cmds
2936 # Symbols that should not be listed in the preloaded symbols.
2937 exclude_expsyms=$exclude_expsyms
2939 # Symbols that must always be exported.
2940 include_expsyms=$include_expsyms
2942 EOF
2944 case "$ltmain" in
2945 *.sh)
2946   echo '### END LIBTOOL CONFIG' >> "$ofile"
2947   echo >> "$ofile"
2948   case "$host_os" in
2949   aix3*)
2950     cat <<\EOF >> "$ofile"
2952 # AIX sometimes has problems with the GCC collect2 program.  For some
2953 # reason, if we set the COLLECT_NAMES environment variable, the problems
2954 # vanish in a puff of smoke.
2955 if test "${COLLECT_NAMES+set}" != set; then
2956   COLLECT_NAMES=
2957   export COLLECT_NAMES
2958 fi
2959 EOF
2960     ;;
2961   esac
2963   # Append the ltmain.sh script.
2964   sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
2966   chmod +x "$ofile"
2967   ;;
2969 *)
2970   # Compile the libtool program.
2971   echo "FIXME: would compile $ltmain"
2972   ;;
2973 esac
2975 test -n "$cache_file" || exit 0
2977 # AC_CACHE_SAVE
2978 trap '' 1 2 15
2979 cat > confcache <<\EOF
2980 # This file is a shell script that caches the results of configure
2981 # tests run on this system so they can be shared between configure
2982 # scripts and configure runs.  It is not useful on other systems.
2983 # If it contains results you don't want to keep, you may remove or edit it.
2985 # By default, configure uses ./config.cache as the cache file,
2986 # creating it if it does not exist already.  You can give configure
2987 # the --cache-file=FILE option to use a different cache file; that is
2988 # what configure does when it calls configure scripts in
2989 # subdirectories, so they share the cache.
2990 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2991 # config.status only pays attention to the cache file if you give it the
2992 # --recheck option to rerun configure.
2994 EOF
2995 # The following way of writing the cache mishandles newlines in values,
2996 # but we know of no workaround that is simple, portable, and efficient.
2997 # So, don't put newlines in cache variables' values.
2998 # Ultrix sh set writes to stderr and can't be redirected directly,
2999 # and sets the high bit in the cache file unless we assign to the vars.
3000 (set) 2>&1 |
3001   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3002   *ac_space=\ *)
3003     # `set' does not quote correctly, so add quotes (double-quote substitution
3004     # turns \\\\ into \\, and sed turns \\ into \).
3005     sed -n \
3006       -e "s/'/'\\\\''/g" \
3007       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3008     ;;
3009   *)
3010     # `set' quotes correctly as required by POSIX, so do not add quotes.
3011     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3012     ;;
3013   esac >> confcache
3014 if cmp -s $cache_file confcache; then
3015   :
3016 else
3017   if test -w $cache_file; then
3018     echo "updating cache $cache_file"
3019     cat confcache > $cache_file
3020   else
3021     echo "not updating unwritable cache $cache_file"
3022   fi
3023 fi
3024 rm -f confcache
3026 exit 0
3028 # Local Variables:
3029 # mode:shell-script
3030 # sh-indentation:2
3031 # End: