Unbreak distcheck on OpenBSD.
[gnash.git] / macros / libltdl.m4
blob9f6df474e2dd19a307e19d380618a28a4633fb56
1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
3 ##    2006, 2007, 2008, 2009, 2010
4 ## Free Software Foundation, Inc.
5 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6 ##
7 ## This file is free software; the Free Software Foundation gives
8 ## unlimited permission to copy and/or distribute it, with or without
9 ## modifications, as long as this notice is preserved.
11 # serial 48 AC_PROG_LIBTOOL
13 # serial 7 AC_LIB_LTDL
15 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
16 # -----------------------------------------------------------
17 # If this macro is not defined by Autoconf, define it here.
18 m4_ifdef([AC_PROVIDE_IFELSE],
19          [],
20          [m4_define([AC_PROVIDE_IFELSE],
21                  [m4_ifdef([AC_PROVIDE_$1],
22                            [$2], [$3])])])
25 # AC_PROG_LIBTOOL
26 # ---------------
27 AC_DEFUN([AC_PROG_LIBTOOL],
28 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
29 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
30 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
31   AC_PROVIDE_IFELSE([AC_PROG_CXX],
32     [AC_LIBTOOL_CXX],
33     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
34   ])])
35 dnl And a similar setup for Fortran 77 support
36   AC_PROVIDE_IFELSE([AC_PROG_F77],
37     [AC_LIBTOOL_F77],
38     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
39 ])])
41 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
42 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
43 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
44   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
45     [AC_LIBTOOL_GCJ],
46     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
47       [AC_LIBTOOL_GCJ],
48       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
49         [AC_LIBTOOL_GCJ],
50       [ifdef([AC_PROG_GCJ],
51              [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
52        ifdef([A][M_PROG_GCJ],
53              [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
54        ifdef([LT_AC_PROG_GCJ],
55              [define([LT_AC_PROG_GCJ],
56                 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
57 ])])# AC_PROG_LIBTOOL
60 # _AC_PROG_LIBTOOL
61 # ----------------
62 AC_DEFUN([_AC_PROG_LIBTOOL],
63 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
64 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
65 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
66 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
68 # This can be used to rebuild libtool when needed
69 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
71 # Always use our own libtool.
72 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
73 AC_SUBST(LIBTOOL)dnl
75 # Prevent multiple expansion
76 define([AC_PROG_LIBTOOL], [])
77 ])# _AC_PROG_LIBTOOL
80 # AC_LIBTOOL_SETUP
81 # ----------------
82 AC_DEFUN([AC_LIBTOOL_SETUP],
83 [AC_PREREQ(2.50)dnl
84 AC_REQUIRE([AC_ENABLE_SHARED])dnl
85 AC_REQUIRE([AC_ENABLE_STATIC])dnl
86 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
87 AC_REQUIRE([AC_CANONICAL_HOST])dnl
88 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
89 AC_REQUIRE([AC_PROG_CC])dnl
90 AC_REQUIRE([AC_PROG_LD])dnl
91 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
92 AC_REQUIRE([AC_PROG_NM])dnl
94 AC_REQUIRE([AC_PROG_LN_S])dnl
95 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
96 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
97 AC_REQUIRE([AC_OBJEXT])dnl
98 AC_REQUIRE([AC_EXEEXT])dnl
99 dnl
101 AC_LIBTOOL_SYS_MAX_CMD_LEN
102 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
103 AC_LIBTOOL_OBJDIR
105 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
106 _LT_AC_PROG_ECHO_BACKSLASH
108 case $host_os in
109 aix3*)
110   # AIX sometimes has problems with the GCC collect2 program.  For some
111   # reason, if we set the COLLECT_NAMES environment variable, the problems
112   # vanish in a puff of smoke.
113   if test "X${COLLECT_NAMES+set}" != Xset; then
114     COLLECT_NAMES=
115     export COLLECT_NAMES
116   fi
117   ;;
118 esac
120 # Sed substitution that helps us do robust quoting.  It backslashifies
121 # metacharacters that are still active within double-quoted strings.
122 Xsed='sed -e 1s/^X//'
123 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
125 # Same as above, but do not quote variable references.
126 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
128 # Sed substitution to delay expansion of an escaped shell variable in a
129 # double_quote_subst'ed string.
130 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
132 # Sed substitution to avoid accidental globbing in evaled expressions
133 no_glob_subst='s/\*/\\\*/g'
135 # Constants:
136 rm="rm -f"
138 # Global variables:
139 default_ofile=libtool
140 can_build_shared=yes
142 # All known linkers require a `.a' archive for static linking (except MSVC,
143 # which needs '.lib').
144 libext=a
145 ltmain="$ac_aux_dir/ltmain.sh"
146 ofile="$default_ofile"
147 with_gnu_ld="$lt_cv_prog_gnu_ld"
149 AC_CHECK_TOOL(AR, ar, false)
150 AC_CHECK_TOOL(RANLIB, ranlib, :)
151 AC_CHECK_TOOL(STRIP, strip, :)
153 old_CC="$CC"
154 old_CFLAGS="$CFLAGS"
156 # Set sane defaults for various variables
157 test -z "$AR" && AR=ar
158 test -z "$AR_FLAGS" && AR_FLAGS=cru
159 test -z "$AS" && AS=as
160 test -z "$CC" && CC=cc
161 test -z "$LTCC" && LTCC=$CC
162 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
163 test -z "$DLLTOOL" && DLLTOOL=dlltool
164 test -z "$LD" && LD=ld
165 test -z "$LN_S" && LN_S="ln -s"
166 test -z "$MAGIC_CMD" && MAGIC_CMD=file
167 test -z "$NM" && NM=nm
168 test -z "$SED" && SED=sed
169 test -z "$OBJDUMP" && OBJDUMP=objdump
170 test -z "$RANLIB" && RANLIB=:
171 test -z "$STRIP" && STRIP=:
172 test -z "$ac_objext" && ac_objext=o
174 # Determine commands to create old-style static archives.
175 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
176 old_postinstall_cmds='chmod 644 $oldlib'
177 old_postuninstall_cmds=
179 if test -n "$RANLIB"; then
180   case $host_os in
181   openbsd*)
182     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
183     ;;
184   *)
185     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
186     ;;
187   esac
188   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
191 _LT_CC_BASENAME([$compiler])
193 # Only perform the check for file, if the check method requires it
194 case $deplibs_check_method in
195 file_magic*)
196   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
197     AC_PATH_MAGIC
198   fi
199   ;;
200 esac
202 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
203 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
204 enable_win32_dll=yes, enable_win32_dll=no)
206 AC_ARG_ENABLE([libtool-lock],
207     [AC_HELP_STRING([--disable-libtool-lock],
208         [avoid locking (might break parallel builds)])])
209 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
211 AC_ARG_WITH([pic],
212     [AC_HELP_STRING([--with-pic],
213         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
214     [pic_mode="$withval"],
215     [pic_mode=default])
216 test -z "$pic_mode" && pic_mode=default
218 # Use C for the default configuration in the libtool script
219 tagname=
220 AC_LIBTOOL_LANG_C_CONFIG
221 _LT_AC_TAGCONFIG
222 ])# AC_LIBTOOL_SETUP
225 # _LT_AC_SYS_COMPILER
226 # -------------------
227 AC_DEFUN([_LT_AC_SYS_COMPILER],
228 [AC_REQUIRE([AC_PROG_CC])dnl
230 # If no C compiler was specified, use CC.
231 LTCC=${LTCC-"$CC"}
233 # If no C compiler flags were specified, use CFLAGS.
234 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
236 # Allow CC to be a program name with arguments.
237 compiler=$CC
238 ])# _LT_AC_SYS_COMPILER
241 # _LT_CC_BASENAME(CC)
242 # -------------------
243 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
244 AC_DEFUN([_LT_CC_BASENAME],
245 [for cc_temp in $1""; do
246   case $cc_temp in
247     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
248     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
249     \-*) ;;
250     *) break;;
251   esac
252 done
253 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
257 # _LT_COMPILER_BOILERPLATE
258 # ------------------------
259 # Check for compiler boilerplate output or warnings with
260 # the simple compiler test code.
261 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
262 [ac_outfile=conftest.$ac_objext
263 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
264 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
265 _lt_compiler_boilerplate=`cat conftest.err`
266 $rm conftest*
267 ])# _LT_COMPILER_BOILERPLATE
270 # _LT_LINKER_BOILERPLATE
271 # ----------------------
272 # Check for linker boilerplate output or warnings with
273 # the simple link test code.
274 AC_DEFUN([_LT_LINKER_BOILERPLATE],
275 [ac_outfile=conftest.$ac_objext
276 printf "$lt_simple_link_test_code" >conftest.$ac_ext
277 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
278 _lt_linker_boilerplate=`cat conftest.err`
279 $rm conftest*
280 ])# _LT_LINKER_BOILERPLATE
283 # _LT_AC_SYS_LIBPATH_AIX
284 # ----------------------
285 # Links a minimal program and checks the executable
286 # for the system default hardcoded library path. In most cases,
287 # this is /usr/lib:/lib, but when the MPI compilers are used
288 # the location of the communication and MPI libs are included too.
289 # If we don't find anything, use the default library path according
290 # to the aix ld manual.
291 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
292 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
293 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
295 # Check for a 64-bit object if we didn't find anything.
296 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
297 }'`; fi],[])
298 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
299 ])# _LT_AC_SYS_LIBPATH_AIX
302 # _LT_AC_SHELL_INIT(ARG)
303 # ----------------------
304 AC_DEFUN([_LT_AC_SHELL_INIT],
305 [ifdef([AC_DIVERSION_NOTICE],
306              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
307          [AC_DIVERT_PUSH(NOTICE)])
309 AC_DIVERT_POP
310 ])# _LT_AC_SHELL_INIT
313 # _LT_AC_PROG_ECHO_BACKSLASH
314 # --------------------------
315 # Add some code to the start of the generated configure script which
316 # will find an echo command which doesn't interpret backslashes.
317 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
318 [_LT_AC_SHELL_INIT([
319 # Check that we are running under the correct shell.
320 SHELL=${CONFIG_SHELL-/bin/sh}
322 case X$ECHO in
323 X*--fallback-echo)
324   # Remove one level of quotation (which was required for Make).
325   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
326   ;;
327 esac
329 echo=${ECHO-echo}
330 if test "X[$]1" = X--no-reexec; then
331   # Discard the --no-reexec flag, and continue.
332   shift
333 elif test "X[$]1" = X--fallback-echo; then
334   # Avoid inline document here, it may be left over
335   :
336 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
337   # Yippee, $echo works!
338   :
339 else
340   # Restart under the correct shell.
341   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
344 if test "X[$]1" = X--fallback-echo; then
345   # used as fallback echo
346   shift
347   cat <<EOF
348 [$]*
350   exit 0
353 # The HP-UX ksh and POSIX shell print the target directory to stdout
354 # if CDPATH is set.
355 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
357 if test -z "$ECHO"; then
358 if test "X${echo_test_string+set}" != Xset; then
359 # find a string as large as possible, as long as the shell can cope with it
360   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
361     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
362     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
363        echo_test_string=`eval $cmd` &&
364        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
365     then
366       break
367     fi
368   done
371 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
372    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
373    test "X$echo_testing_string" = "X$echo_test_string"; then
374   :
375 else
376   # The Solaris, AIX, and Digital Unix default echo programs unquote
377   # backslashes.  This makes it impossible to quote backslashes using
378   #   echo "$something" | sed 's/\\/\\\\/g'
379   #
380   # So, first we look for a working echo in the user's PATH.
382   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
383   for dir in $PATH /usr/ucb; do
384     IFS="$lt_save_ifs"
385     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
386        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
387        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
388        test "X$echo_testing_string" = "X$echo_test_string"; then
389       echo="$dir/echo"
390       break
391     fi
392   done
393   IFS="$lt_save_ifs"
395   if test "X$echo" = Xecho; then
396     # We didn't find a better echo, so look for alternatives.
397     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
398        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
399        test "X$echo_testing_string" = "X$echo_test_string"; then
400       # This shell has a builtin print -r that does the trick.
401       echo='print -r'
402     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
403          test "X$CONFIG_SHELL" != X/bin/ksh; then
404       # If we have ksh, try running configure again with it.
405       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
406       export ORIGINAL_CONFIG_SHELL
407       CONFIG_SHELL=/bin/ksh
408       export CONFIG_SHELL
409       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
410     else
411       # Try using printf.
412       echo='printf %s\n'
413       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
414          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
415          test "X$echo_testing_string" = "X$echo_test_string"; then
416         # Cool, printf works
417         :
418       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
419            test "X$echo_testing_string" = 'X\t' &&
420            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
421            test "X$echo_testing_string" = "X$echo_test_string"; then
422         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
423         export CONFIG_SHELL
424         SHELL="$CONFIG_SHELL"
425         export SHELL
426         echo="$CONFIG_SHELL [$]0 --fallback-echo"
427       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
428            test "X$echo_testing_string" = 'X\t' &&
429            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
430            test "X$echo_testing_string" = "X$echo_test_string"; then
431         echo="$CONFIG_SHELL [$]0 --fallback-echo"
432       else
433         # maybe with a smaller string...
434         prev=:
436         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
437           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
438           then
439             break
440           fi
441           prev="$cmd"
442         done
444         if test "$prev" != 'sed 50q "[$]0"'; then
445           echo_test_string=`eval $prev`
446           export echo_test_string
447           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
448         else
449           # Oops.  We lost completely, so just stick with echo.
450           echo=echo
451         fi
452       fi
453     fi
454   fi
458 # Copy echo and quote the copy suitably for passing to libtool from
459 # the Makefile, instead of quoting the original, which is used later.
460 ECHO=$echo
461 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
462    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
465 AC_SUBST(ECHO)
466 ])])# _LT_AC_PROG_ECHO_BACKSLASH
469 # _LT_AC_LOCK
470 # -----------
471 AC_DEFUN([_LT_AC_LOCK],
472 [AC_ARG_ENABLE([libtool-lock],
473     [AC_HELP_STRING([--disable-libtool-lock],
474         [avoid locking (might break parallel builds)])])
475 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
477 # Some flags need to be propagated to the compiler or linker for good
478 # libtool support.
479 case $host in
480 ia64-*-hpux*)
481   # Find out which ABI we are using.
482   echo 'int i;' > conftest.$ac_ext
483   if AC_TRY_EVAL(ac_compile); then
484     case `/usr/bin/file conftest.$ac_objext` in
485     *ELF-32*)
486       HPUX_IA64_MODE="32"
487       ;;
488     *ELF-64*)
489       HPUX_IA64_MODE="64"
490       ;;
491     esac
492   fi
493   rm -rf conftest*
494   ;;
495 *-*-irix6*)
496   # Find out which ABI we are using.
497   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
498   if AC_TRY_EVAL(ac_compile); then
499    if test "$lt_cv_prog_gnu_ld" = yes; then
500     case `/usr/bin/file conftest.$ac_objext` in
501     *32-bit*)
502       LD="${LD-ld} -melf32bsmip"
503       ;;
504     *N32*)
505       LD="${LD-ld} -melf32bmipn32"
506       ;;
507     *64-bit*)
508       LD="${LD-ld} -melf64bmip"
509       ;;
510     esac
511    else
512     case `/usr/bin/file conftest.$ac_objext` in
513     *32-bit*)
514       LD="${LD-ld} -32"
515       ;;
516     *N32*)
517       LD="${LD-ld} -n32"
518       ;;
519     *64-bit*)
520       LD="${LD-ld} -64"
521       ;;
522     esac
523    fi
524   fi
525   rm -rf conftest*
526   ;;
528 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
529   # Find out which ABI we are using.
530   echo 'int i;' > conftest.$ac_ext
531   if AC_TRY_EVAL(ac_compile); then
532     case `/usr/bin/file conftest.o` in
533     *32-bit*)
534       case $host in
535         x86_64-*linux*)
536           LD="${LD-ld} -m elf_i386"
537           ;;
538         ppc64-*linux*|powerpc64-*linux*)
539           LD="${LD-ld} -m elf32ppclinux"
540           ;;
541         s390x-*linux*)
542           LD="${LD-ld} -m elf_s390"
543           ;;
544         sparc64-*linux*)
545           LD="${LD-ld} -m elf32_sparc"
546           ;;
547       esac
548       ;;
549     *64-bit*)
550       case $host in
551         x86_64-*linux*)
552           LD="${LD-ld} -m elf_x86_64"
553           ;;
554         ppc*-*linux*|powerpc*-*linux*)
555           LD="${LD-ld} -m elf64ppc"
556           ;;
557         s390*-*linux*)
558           LD="${LD-ld} -m elf64_s390"
559           ;;
560         sparc*-*linux*)
561           LD="${LD-ld} -m elf64_sparc"
562           ;;
563       esac
564       ;;
565     esac
566   fi
567   rm -rf conftest*
568   ;;
570 *-*-sco3.2v5*)
571   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
572   SAVE_CFLAGS="$CFLAGS"
573   CFLAGS="$CFLAGS -belf"
574   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
575     [AC_LANG_PUSH(C)
576      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
577      AC_LANG_POP])
578   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
579     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
580     CFLAGS="$SAVE_CFLAGS"
581   fi
582   ;;
583 sparc*-*solaris*)
584   # Find out which ABI we are using.
585   echo 'int i;' > conftest.$ac_ext
586   if AC_TRY_EVAL(ac_compile); then
587     case `/usr/bin/file conftest.o` in
588     *64-bit*)
589       case $lt_cv_prog_gnu_ld in
590       yes*) LD="${LD-ld} -m elf64_sparc" ;;
591       *)    LD="${LD-ld} -64" ;;
592       esac
593       ;;
594     esac
595   fi
596   rm -rf conftest*
597   ;;
599 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
600 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
601   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
602   AC_CHECK_TOOL(AS, as, false)
603   AC_CHECK_TOOL(OBJDUMP, objdump, false)
604   ;;
605   ])
606 esac
608 need_locks="$enable_libtool_lock"
610 ])# _LT_AC_LOCK
613 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
614 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
615 # ----------------------------------------------------------------
616 # Check whether the given compiler option works
617 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
618 [AC_REQUIRE([LT_AC_PROG_SED])
619 AC_CACHE_CHECK([$1], [$2],
620   [$2=no
621   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
622    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
623    lt_compiler_flag="$3"
624    # Insert the option either (1) after the last *FLAGS variable, or
625    # (2) before a word containing "conftest.", or (3) at the end.
626    # Note that $ac_compile itself does not contain backslashes and begins
627    # with a dollar sign (not a hyphen), so the echo should work correctly.
628    # The option is referenced via a variable to avoid confusing sed.
629    lt_compile=`echo "$ac_compile" | $SED \
630    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
631    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
632    -e 's:$: $lt_compiler_flag:'`
633    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
634    (eval "$lt_compile" 2>conftest.err)
635    ac_status=$?
636    cat conftest.err >&AS_MESSAGE_LOG_FD
637    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
638    if (exit $ac_status) && test -s "$ac_outfile"; then
639      # The compiler can only warn and ignore the option if not recognized
640      # So say no if there are warnings other than the usual output.
641      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
642      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
643      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
644        $2=yes
645      fi
646    fi
647    $rm conftest*
650 if test x"[$]$2" = xyes; then
651     ifelse([$5], , :, [$5])
652 else
653     ifelse([$6], , :, [$6])
655 ])# AC_LIBTOOL_COMPILER_OPTION
658 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
659 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
660 # ------------------------------------------------------------
661 # Check whether the given compiler option works
662 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
663 [AC_CACHE_CHECK([$1], [$2],
664   [$2=no
665    save_LDFLAGS="$LDFLAGS"
666    LDFLAGS="$LDFLAGS $3"
667    printf "$lt_simple_link_test_code" > conftest.$ac_ext
668    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
669      # The linker can only warn and ignore the option if not recognized
670      # So say no if there are warnings
671      if test -s conftest.err; then
672        # Append any errors to the config.log.
673        cat conftest.err 1>&AS_MESSAGE_LOG_FD
674        $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
675        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
676        if diff conftest.exp conftest.er2 >/dev/null; then
677          $2=yes
678        fi
679      else
680        $2=yes
681      fi
682    fi
683    $rm conftest*
684    LDFLAGS="$save_LDFLAGS"
687 if test x"[$]$2" = xyes; then
688     ifelse([$4], , :, [$4])
689 else
690     ifelse([$5], , :, [$5])
692 ])# AC_LIBTOOL_LINKER_OPTION
695 # AC_LIBTOOL_SYS_MAX_CMD_LEN
696 # --------------------------
697 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
698 [# find the maximum length of command line arguments
699 AC_MSG_CHECKING([the maximum length of command line arguments])
700 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
701   i=0
702   teststring="ABCD"
704   case $build_os in
705   msdosdjgpp*)
706     # On DJGPP, this test can blow up pretty badly due to problems in libc
707     # (any single argument exceeding 2000 bytes causes a buffer overrun
708     # during glob expansion).  Even if it were fixed, the result of this
709     # check would be larger than it should be.
710     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
711     ;;
713   gnu*)
714     # Under GNU Hurd, this test is not required because there is
715     # no limit to the length of command line arguments.
716     # Libtool will interpret -1 as no limit whatsoever
717     lt_cv_sys_max_cmd_len=-1;
718     ;;
720   cygwin* | mingw*)
721     # On Win9x/ME, this test blows up -- it succeeds, but takes
722     # about 5 minutes as the teststring grows exponentially.
723     # Worse, since 9x/ME are not pre-emptively multitasking,
724     # you end up with a "frozen" computer, even though with patience
725     # the test eventually succeeds (with a max line length of 256k).
726     # Instead, let's just punt: use the minimum linelength reported by
727     # all of the supported platforms: 8192 (on NT/2K/XP).
728     lt_cv_sys_max_cmd_len=8192;
729     ;;
731   amigaos*)
732     # On AmigaOS with pdksh, this test takes hours, literally.
733     # So we just punt and use a minimum line length of 8192.
734     lt_cv_sys_max_cmd_len=8192;
735     ;;
737   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
738     # This has been around since 386BSD, at least.  Likely further.
739     if test -x /sbin/sysctl; then
740       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
741     elif test -x /usr/sbin/sysctl; then
742       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
743     else
744       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
745     fi
746     # And add a safety zone
747     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
748     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
749     ;;
751   interix*)
752     # We know the value 262144 and hardcode it with a safety zone (like BSD)
753     lt_cv_sys_max_cmd_len=196608
754     ;;
756   osf*)
757     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
758     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
759     # nice to cause kernel panics so lets avoid the loop below.
760     # First set a reasonable default.
761     lt_cv_sys_max_cmd_len=16384
762     #
763     if test -x /sbin/sysconfig; then
764       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
765         *1*) lt_cv_sys_max_cmd_len=-1 ;;
766       esac
767     fi
768     ;;
769   sco3.2v5*)
770     lt_cv_sys_max_cmd_len=102400
771     ;;
772   sysv5* | sco5v6* | sysv4.2uw2*)
773     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
774     if test -n "$kargmax"; then
775       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
776     else
777       lt_cv_sys_max_cmd_len=32768
778     fi
779     ;;
780   *)
781     # If test is not a shell built-in, we'll probably end up computing a
782     # maximum length that is only half of the actual maximum length, but
783     # we can't tell.
784     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
785     while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
786                = "XX$teststring") >/dev/null 2>&1 &&
787             new_result=`expr "X$teststring" : ".*" 2>&1` &&
788             lt_cv_sys_max_cmd_len=$new_result &&
789             test $i != 17 # 1/2 MB should be enough
790     do
791       i=`expr $i + 1`
792       teststring=$teststring$teststring
793     done
794     teststring=
795     # Add a significant safety factor because C++ compilers can tack on massive
796     # amounts of additional arguments before passing them to the linker.
797     # It appears as though 1/2 is a usable value.
798     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
799     ;;
800   esac
802 if test -n $lt_cv_sys_max_cmd_len ; then
803   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
804 else
805   AC_MSG_RESULT(none)
807 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
810 # _LT_AC_CHECK_DLFCN
811 # ------------------
812 AC_DEFUN([_LT_AC_CHECK_DLFCN],
813 [AC_CHECK_HEADERS(dlfcn.h)dnl
814 ])# _LT_AC_CHECK_DLFCN
817 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
818 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
819 # ---------------------------------------------------------------------
820 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
821 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
822 if test "$cross_compiling" = yes; then :
823   [$4]
824 else
825   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
826   lt_status=$lt_dlunknown
827   cat > conftest.$ac_ext <<EOF
828 [#line __oline__ "configure"
829 #include "confdefs.h"
831 #if HAVE_DLFCN_H
832 #include <dlfcn.h>
833 #endif
835 #include <stdio.h>
837 #ifdef RTLD_GLOBAL
838 #  define LT_DLGLOBAL           RTLD_GLOBAL
839 #else
840 #  ifdef DL_GLOBAL
841 #    define LT_DLGLOBAL         DL_GLOBAL
842 #  else
843 #    define LT_DLGLOBAL         0
844 #  endif
845 #endif
847 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
848    find out it does not work in some platform. */
849 #ifndef LT_DLLAZY_OR_NOW
850 #  ifdef RTLD_LAZY
851 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
852 #  else
853 #    ifdef DL_LAZY
854 #      define LT_DLLAZY_OR_NOW          DL_LAZY
855 #    else
856 #      ifdef RTLD_NOW
857 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
858 #      else
859 #        ifdef DL_NOW
860 #          define LT_DLLAZY_OR_NOW      DL_NOW
861 #        else
862 #          define LT_DLLAZY_OR_NOW      0
863 #        endif
864 #      endif
865 #    endif
866 #  endif
867 #endif
869 #ifdef __cplusplus
870 extern "C" void exit (int);
871 #endif
873 void fnord() { int i=42;}
874 int main ()
876   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
877   int status = $lt_dlunknown;
879   if (self)
880     {
881       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
882       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
883       /* dlclose (self); */
884     }
885   else
886     puts (dlerror ());
888     exit (status);
891   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
892     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
893     lt_status=$?
894     case x$lt_status in
895       x$lt_dlno_uscore) $1 ;;
896       x$lt_dlneed_uscore) $2 ;;
897       x$lt_dlunknown|x*) $3 ;;
898     esac
899   else :
900     # compilation failed
901     $3
902   fi
904 rm -fr conftest*
905 ])# _LT_AC_TRY_DLOPEN_SELF
908 # AC_LIBTOOL_DLOPEN_SELF
909 # ----------------------
910 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
911 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
912 if test "x$enable_dlopen" != xyes; then
913   enable_dlopen=unknown
914   enable_dlopen_self=unknown
915   enable_dlopen_self_static=unknown
916 else
917   lt_cv_dlopen=no
918   lt_cv_dlopen_libs=
920   case $host_os in
921   beos*)
922     lt_cv_dlopen="load_add_on"
923     lt_cv_dlopen_libs=
924     lt_cv_dlopen_self=yes
925     ;;
927   mingw* | pw32*)
928     lt_cv_dlopen="LoadLibrary"
929     lt_cv_dlopen_libs=
930    ;;
932   cygwin*)
933     lt_cv_dlopen="dlopen"
934     lt_cv_dlopen_libs=
935    ;;
937   darwin*)
938   # if libdl is installed we need to link against it
939     AC_CHECK_LIB([dl], [dlopen],
940                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
941     lt_cv_dlopen="dyld"
942     lt_cv_dlopen_libs=
943     lt_cv_dlopen_self=yes
944     ])
945    ;;
947   *)
948     AC_CHECK_FUNC([shl_load],
949           [lt_cv_dlopen="shl_load"],
950       [AC_CHECK_LIB([dld], [shl_load],
951             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
952         [AC_CHECK_FUNC([dlopen],
953               [lt_cv_dlopen="dlopen"],
954           [AC_CHECK_LIB([dl], [dlopen],
955                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
956             [AC_CHECK_LIB([svld], [dlopen],
957                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
958               [AC_CHECK_LIB([dld], [dld_link],
959                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
960               ])
961             ])
962           ])
963         ])
964       ])
965     ;;
966   esac
968   if test "x$lt_cv_dlopen" != xno; then
969     enable_dlopen=yes
970   else
971     enable_dlopen=no
972   fi
974   case $lt_cv_dlopen in
975   dlopen)
976     save_CPPFLAGS="$CPPFLAGS"
977     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
979     save_LDFLAGS="$LDFLAGS"
980     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
982     save_LIBS="$LIBS"
983     LIBS="$lt_cv_dlopen_libs $LIBS"
985     AC_CACHE_CHECK([whether a program can dlopen itself],
986           lt_cv_dlopen_self, [dnl
987           _LT_AC_TRY_DLOPEN_SELF(
988             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
989             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
990     ])
992     if test "x$lt_cv_dlopen_self" = xyes; then
993       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
994       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
995           lt_cv_dlopen_self_static, [dnl
996           _LT_AC_TRY_DLOPEN_SELF(
997             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
998             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
999       ])
1000     fi
1002     CPPFLAGS="$save_CPPFLAGS"
1003     LDFLAGS="$save_LDFLAGS"
1004     LIBS="$save_LIBS"
1005     ;;
1006   esac
1008   case $lt_cv_dlopen_self in
1009   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1010   *) enable_dlopen_self=unknown ;;
1011   esac
1013   case $lt_cv_dlopen_self_static in
1014   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1015   *) enable_dlopen_self_static=unknown ;;
1016   esac
1018 ])# AC_LIBTOOL_DLOPEN_SELF
1021 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1022 # ---------------------------------
1023 # Check to see if options -c and -o are simultaneously supported by compiler
1024 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1025 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1026 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1027   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1028   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1029    $rm -r conftest 2>/dev/null
1030    mkdir conftest
1031    cd conftest
1032    mkdir out
1033    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1035    lt_compiler_flag="-o out/conftest2.$ac_objext"
1036    # Insert the option either (1) after the last *FLAGS variable, or
1037    # (2) before a word containing "conftest.", or (3) at the end.
1038    # Note that $ac_compile itself does not contain backslashes and begins
1039    # with a dollar sign (not a hyphen), so the echo should work correctly.
1040    lt_compile=`echo "$ac_compile" | $SED \
1041    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1042    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1043    -e 's:$: $lt_compiler_flag:'`
1044    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1045    (eval "$lt_compile" 2>out/conftest.err)
1046    ac_status=$?
1047    cat out/conftest.err >&AS_MESSAGE_LOG_FD
1048    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1049    if (exit $ac_status) && test -s out/conftest2.$ac_objext
1050    then
1051      # The compiler can only warn and ignore the option if not recognized
1052      # So say no if there are warnings
1053      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1054      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1055      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1056        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1057      fi
1058    fi
1059    chmod u+w . 2>&AS_MESSAGE_LOG_FD
1060    $rm conftest*
1061    # SGI C++ compiler will create directory out/ii_files/ for
1062    # template instantiation
1063    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1064    $rm out/* && rmdir out
1065    cd ..
1066    rmdir conftest
1067    $rm conftest*
1069 ])# AC_LIBTOOL_PROG_CC_C_O
1072 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1073 # -----------------------------------------
1074 # Check to see if we can do hard links to lock some files if needed
1075 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1076 [AC_REQUIRE([_LT_AC_LOCK])dnl
1078 hard_links="nottested"
1079 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1080   # do not overwrite the value of need_locks provided by the user
1081   AC_MSG_CHECKING([if we can lock with hard links])
1082   hard_links=yes
1083   $rm conftest*
1084   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1085   touch conftest.a
1086   ln conftest.a conftest.b 2>&5 || hard_links=no
1087   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1088   AC_MSG_RESULT([$hard_links])
1089   if test "$hard_links" = no; then
1090     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1091     need_locks=warn
1092   fi
1093 else
1094   need_locks=no
1096 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1099 # AC_LIBTOOL_OBJDIR
1100 # -----------------
1101 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1102 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1103 [rm -f .libs 2>/dev/null
1104 mkdir .libs 2>/dev/null
1105 if test -d .libs; then
1106   lt_cv_objdir=.libs
1107 else
1108   # MS-DOS does not allow filenames that begin with a dot.
1109   lt_cv_objdir=_libs
1111 rmdir .libs 2>/dev/null])
1112 objdir=$lt_cv_objdir
1113 ])# AC_LIBTOOL_OBJDIR
1116 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1117 # ----------------------------------------------
1118 # Check hardcoding attributes.
1119 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1120 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1121 _LT_AC_TAGVAR(hardcode_action, $1)=
1122 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1123    test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1124    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1126   # We can hardcode non-existant directories.
1127   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1128      # If the only mechanism to avoid hardcoding is shlibpath_var, we
1129      # have to relink, otherwise we might link with an installed library
1130      # when we should be linking with a yet-to-be-installed one
1131      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1132      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1133     # Linking always hardcodes the temporary library directory.
1134     _LT_AC_TAGVAR(hardcode_action, $1)=relink
1135   else
1136     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1137     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1138   fi
1139 else
1140   # We cannot hardcode anything, or else we can only hardcode existing
1141   # directories.
1142   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1144 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1146 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1147   # Fast installation is not supported
1148   enable_fast_install=no
1149 elif test "$shlibpath_overrides_runpath" = yes ||
1150      test "$enable_shared" = no; then
1151   # Fast installation is not necessary
1152   enable_fast_install=needless
1154 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1157 # AC_LIBTOOL_SYS_LIB_STRIP
1158 # ------------------------
1159 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1160 [striplib=
1161 old_striplib=
1162 AC_MSG_CHECKING([whether stripping libraries is possible])
1163 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1164   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1165   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1166   AC_MSG_RESULT([yes])
1167 else
1168 # FIXME - insert some real tests, host_os isn't really good enough
1169   case $host_os in
1170    darwin*)
1171        if test -n "$STRIP" ; then
1172          striplib="$STRIP -x"
1173          AC_MSG_RESULT([yes])
1174        else
1175   AC_MSG_RESULT([no])
1177        ;;
1178    *)
1179   AC_MSG_RESULT([no])
1180     ;;
1181   esac
1183 ])# AC_LIBTOOL_SYS_LIB_STRIP
1186 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1187 # -----------------------------
1188 # PORTME Fill in your ld.so characteristics
1189 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1190 [AC_MSG_CHECKING([dynamic linker characteristics])
1191 library_names_spec=
1192 libname_spec='lib$name'
1193 soname_spec=
1194 shrext_cmds=".so"
1195 postinstall_cmds=
1196 postuninstall_cmds=
1197 finish_cmds=
1198 finish_eval=
1199 shlibpath_var=
1200 shlibpath_overrides_runpath=unknown
1201 version_type=none
1202 dynamic_linker="$host_os ld.so"
1203 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1204 if test "$GCC" = yes; then
1205   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1206   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1207     # if the path contains ";" then we assume it to be the separator
1208     # otherwise default to the standard path separator (i.e. ":") - it is
1209     # assumed that no part of a normal pathname contains ";" but that should
1210     # okay in the real world where ";" in dirpaths is itself problematic.
1211     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1212   else
1213     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1214   fi
1215 else
1216   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1218 need_lib_prefix=unknown
1219 hardcode_into_libs=no
1221 # when you set need_version to no, make sure it does not cause -set_version
1222 # flags to be left without arguments
1223 need_version=unknown
1225 case $host_os in
1226 aix3*)
1227   version_type=linux
1228   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1229   shlibpath_var=LIBPATH
1231   # AIX 3 has no versioning support, so we append a major version to the name.
1232   soname_spec='${libname}${release}${shared_ext}$major'
1233   ;;
1235 aix4* | aix5*)
1236   version_type=linux
1237   need_lib_prefix=no
1238   need_version=no
1239   hardcode_into_libs=yes
1240   if test "$host_cpu" = ia64; then
1241     # AIX 5 supports IA64
1242     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1243     shlibpath_var=LD_LIBRARY_PATH
1244   else
1245     # With GCC up to 2.95.x, collect2 would create an import file
1246     # for dependence libraries.  The import file would start with
1247     # the line `#! .'.  This would cause the generated library to
1248     # depend on `.', always an invalid library.  This was fixed in
1249     # development snapshots of GCC prior to 3.0.
1250     case $host_os in
1251       aix4 | aix4.[[01]] | aix4.[[01]].*)
1252       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1253            echo ' yes '
1254            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1255         :
1256       else
1257         can_build_shared=no
1258       fi
1259       ;;
1260     esac
1261     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1262     # soname into executable. Probably we can add versioning support to
1263     # collect2, so additional links can be useful in future.
1264     if test "$aix_use_runtimelinking" = yes; then
1265       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1266       # instead of lib<name>.a to let people know that these are not
1267       # typical AIX shared libraries.
1268       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1269     else
1270       # We preserve .a as extension for shared libraries through AIX4.2
1271       # and later when we are not doing run time linking.
1272       library_names_spec='${libname}${release}.a $libname.a'
1273       soname_spec='${libname}${release}${shared_ext}$major'
1274     fi
1275     shlibpath_var=LIBPATH
1276   fi
1277   ;;
1279 amigaos*)
1280   library_names_spec='$libname.ixlibrary $libname.a'
1281   # Create ${libname}_ixlibrary.a entries in /sys/libs.
1282   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'
1283   ;;
1285 beos*)
1286   library_names_spec='${libname}${shared_ext}'
1287   dynamic_linker="$host_os ld.so"
1288   shlibpath_var=LIBRARY_PATH
1289   ;;
1291 bsdi[[45]]*)
1292   version_type=linux
1293   need_version=no
1294   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1295   soname_spec='${libname}${release}${shared_ext}$major'
1296   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1297   shlibpath_var=LD_LIBRARY_PATH
1298   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1299   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1300   # the default ld.so.conf also contains /usr/contrib/lib and
1301   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1302   # libtool to hard-code these into programs
1303   ;;
1305 cygwin* | mingw* | pw32*)
1306   version_type=windows
1307   shrext_cmds=".dll"
1308   need_version=no
1309   need_lib_prefix=no
1311   case $GCC,$host_os in
1312   yes,cygwin* | yes,mingw* | yes,pw32*)
1313     library_names_spec='$libname.dll.a'
1314     # DLL is installed to $(libdir)/../bin by postinstall_cmds
1315     postinstall_cmds='base_file=`basename \${file}`~
1316       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1317       dldir=$destdir/`dirname \$dlpath`~
1318       test -d \$dldir || mkdir -p \$dldir~
1319       $install_prog $dir/$dlname \$dldir/$dlname~
1320       chmod a+x \$dldir/$dlname'
1321     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1322       dlpath=$dir/\$dldll~
1323        $rm \$dlpath'
1324     shlibpath_overrides_runpath=yes
1326     case $host_os in
1327     cygwin*)
1328       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1329       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1330       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1331       ;;
1332     mingw*)
1333       # MinGW DLLs use traditional 'lib' prefix
1334       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1335       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1336       if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1337         # It is most probably a Windows format PATH printed by
1338         # mingw gcc, but we are running on Cygwin. Gcc prints its search
1339         # path with ; separators, and with drive letters. We can handle the
1340         # drive letters (cygwin fileutils understands them), so leave them,
1341         # especially as we might pass files found there to a mingw objdump,
1342         # which wouldn't understand a cygwinified path. Ahh.
1343         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1344       else
1345         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1346       fi
1347       ;;
1348     pw32*)
1349       # pw32 DLLs use 'pw' prefix rather than 'lib'
1350       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1351       ;;
1352     esac
1353     ;;
1355   *)
1356     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1357     ;;
1358   esac
1359   dynamic_linker='Win32 ld.exe'
1360   # FIXME: first we should search . and the directory the executable is in
1361   shlibpath_var=PATH
1362   ;;
1364 darwin* | rhapsody*)
1365   dynamic_linker="$host_os dyld"
1366   version_type=darwin
1367   need_lib_prefix=no
1368   need_version=no
1369   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1370   soname_spec='${libname}${release}${major}$shared_ext'
1371   shlibpath_overrides_runpath=yes
1372   shlibpath_var=DYLD_LIBRARY_PATH
1373   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1374   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1375   if test "$GCC" = yes; then
1376     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1377   else
1378     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1379   fi
1380   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1381   ;;
1383 dgux*)
1384   version_type=linux
1385   need_lib_prefix=no
1386   need_version=no
1387   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1388   soname_spec='${libname}${release}${shared_ext}$major'
1389   shlibpath_var=LD_LIBRARY_PATH
1390   ;;
1392 freebsd1*)
1393   dynamic_linker=no
1394   ;;
1396 kfreebsd*-gnu)
1397   version_type=linux
1398   need_lib_prefix=no
1399   need_version=no
1400   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1401   soname_spec='${libname}${release}${shared_ext}$major'
1402   shlibpath_var=LD_LIBRARY_PATH
1403   shlibpath_overrides_runpath=no
1404   hardcode_into_libs=yes
1405   dynamic_linker='GNU ld.so'
1406   ;;
1408 freebsd* | dragonfly*)
1409   # DragonFly does not have aout.  When/if they implement a new
1410   # versioning mechanism, adjust this.
1411   if test -x /usr/bin/objformat; then
1412     objformat=`/usr/bin/objformat`
1413   else
1414     case $host_os in
1415     freebsd[[123]]*) objformat=aout ;;
1416     *) objformat=elf ;;
1417     esac
1418   fi
1419   version_type=freebsd-$objformat
1420   case $version_type in
1421     freebsd-elf*)
1422       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1423       need_version=no
1424       need_lib_prefix=no
1425       ;;
1426     freebsd-*)
1427       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1428       need_version=yes
1429       ;;
1430   esac
1431   shlibpath_var=LD_LIBRARY_PATH
1432   case $host_os in
1433   freebsd2*)
1434     shlibpath_overrides_runpath=yes
1435     ;;
1436   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1437     shlibpath_overrides_runpath=yes
1438     hardcode_into_libs=yes
1439     ;;
1440   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1441   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1442     shlibpath_overrides_runpath=no
1443     hardcode_into_libs=yes
1444     ;;
1445   freebsd*) # from 4.6 on
1446     shlibpath_overrides_runpath=yes
1447     hardcode_into_libs=yes
1448     ;;
1449   esac
1450   ;;
1452 gnu*)
1453   version_type=linux
1454   need_lib_prefix=no
1455   need_version=no
1456   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1457   soname_spec='${libname}${release}${shared_ext}$major'
1458   shlibpath_var=LD_LIBRARY_PATH
1459   hardcode_into_libs=yes
1460   ;;
1462 hpux9* | hpux10* | hpux11*)
1463   # Give a soname corresponding to the major version so that dld.sl refuses to
1464   # link against other versions.
1465   version_type=sunos
1466   need_lib_prefix=no
1467   need_version=no
1468   case $host_cpu in
1469   ia64*)
1470     shrext_cmds='.so'
1471     hardcode_into_libs=yes
1472     dynamic_linker="$host_os dld.so"
1473     shlibpath_var=LD_LIBRARY_PATH
1474     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1475     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1476     soname_spec='${libname}${release}${shared_ext}$major'
1477     if test "X$HPUX_IA64_MODE" = X32; then
1478       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1479     else
1480       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1481     fi
1482     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1483     ;;
1484    hppa*64*)
1485      shrext_cmds='.sl'
1486      hardcode_into_libs=yes
1487      dynamic_linker="$host_os dld.sl"
1488      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1489      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1490      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1491      soname_spec='${libname}${release}${shared_ext}$major'
1492      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1493      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1494      ;;
1495    *)
1496     shrext_cmds='.sl'
1497     dynamic_linker="$host_os dld.sl"
1498     shlibpath_var=SHLIB_PATH
1499     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1500     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1501     soname_spec='${libname}${release}${shared_ext}$major'
1502     ;;
1503   esac
1504   # HP-UX runs *really* slowly unless shared libraries are mode 555.
1505   postinstall_cmds='chmod 555 $lib'
1506   ;;
1508 interix3*)
1509   version_type=linux
1510   need_lib_prefix=no
1511   need_version=no
1512   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1513   soname_spec='${libname}${release}${shared_ext}$major'
1514   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1515   shlibpath_var=LD_LIBRARY_PATH
1516   shlibpath_overrides_runpath=no
1517   hardcode_into_libs=yes
1518   ;;
1520 irix5* | irix6* | nonstopux*)
1521   case $host_os in
1522     nonstopux*) version_type=nonstopux ;;
1523     *)
1524         if test "$lt_cv_prog_gnu_ld" = yes; then
1525                 version_type=linux
1526         else
1527                 version_type=irix
1528         fi ;;
1529   esac
1530   need_lib_prefix=no
1531   need_version=no
1532   soname_spec='${libname}${release}${shared_ext}$major'
1533   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1534   case $host_os in
1535   irix5* | nonstopux*)
1536     libsuff= shlibsuff=
1537     ;;
1538   *)
1539     case $LD in # libtool.m4 will add one of these switches to LD
1540     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1541       libsuff= shlibsuff= libmagic=32-bit;;
1542     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1543       libsuff=32 shlibsuff=N32 libmagic=N32;;
1544     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1545       libsuff=64 shlibsuff=64 libmagic=64-bit;;
1546     *) libsuff= shlibsuff= libmagic=never-match;;
1547     esac
1548     ;;
1549   esac
1550   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1551   shlibpath_overrides_runpath=no
1552   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1553   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1554   hardcode_into_libs=yes
1555   ;;
1557 # No shared lib support for Linux oldld, aout, or coff.
1558 linux*oldld* | linux*aout* | linux*coff*)
1559   dynamic_linker=no
1560   ;;
1562 # This must be Linux ELF.
1563 linux*)
1564   version_type=linux
1565   need_lib_prefix=no
1566   need_version=no
1567   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1568   soname_spec='${libname}${release}${shared_ext}$major'
1569   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1570   shlibpath_var=LD_LIBRARY_PATH
1571   shlibpath_overrides_runpath=no
1572   # This implies no fast_install, which is unacceptable.
1573   # Some rework will be needed to allow for fast_install
1574   # before this can be enabled.
1575   hardcode_into_libs=yes
1577   # find out which ABI we are using
1578   libsuff=
1579   case "$host_cpu" in
1580   x86_64*|s390x*|powerpc64*)
1581     echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1582     if AC_TRY_EVAL(ac_compile); then
1583       case `/usr/bin/file conftest.$ac_objext` in
1584       *64-bit*)
1585         libsuff=64
1586         sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1587         ;;
1588       esac
1589     fi
1590     rm -rf conftest*
1591     ;;
1592   esac
1594   # Append ld.so.conf contents to the search path
1595   if test -f /etc/ld.so.conf; then
1596     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1597     sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
1598   fi
1600   # We used to test for /lib/ld.so.1 and disable shared libraries on
1601   # powerpc, because MkLinux only supported shared libraries with the
1602   # GNU dynamic linker.  Since this was broken with cross compilers,
1603   # most powerpc-linux boxes support dynamic linking these days and
1604   # people can always --disable-shared, the test was removed, and we
1605   # assume the GNU/Linux dynamic linker is in use.
1606   dynamic_linker='GNU/Linux ld.so'
1607   ;;
1609 knetbsd*-gnu)
1610   version_type=linux
1611   need_lib_prefix=no
1612   need_version=no
1613   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1614   soname_spec='${libname}${release}${shared_ext}$major'
1615   shlibpath_var=LD_LIBRARY_PATH
1616   shlibpath_overrides_runpath=no
1617   hardcode_into_libs=yes
1618   dynamic_linker='GNU ld.so'
1619   ;;
1621 netbsd*)
1622   version_type=sunos
1623   need_lib_prefix=no
1624   need_version=no
1625   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1626     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1627     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1628     dynamic_linker='NetBSD (a.out) ld.so'
1629   else
1630     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1631     soname_spec='${libname}${release}${shared_ext}$major'
1632     dynamic_linker='NetBSD ld.elf_so'
1633   fi
1634   shlibpath_var=LD_LIBRARY_PATH
1635   shlibpath_overrides_runpath=yes
1636   hardcode_into_libs=yes
1637   ;;
1639 newsos6)
1640   version_type=linux
1641   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1642   shlibpath_var=LD_LIBRARY_PATH
1643   shlibpath_overrides_runpath=yes
1644   ;;
1646 nto-qnx*)
1647   version_type=linux
1648   need_lib_prefix=no
1649   need_version=no
1650   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1651   soname_spec='${libname}${release}${shared_ext}$major'
1652   shlibpath_var=LD_LIBRARY_PATH
1653   shlibpath_overrides_runpath=yes
1654   ;;
1656 openbsd*)
1657   version_type=sunos
1658   sys_lib_dlsearch_path_spec="/usr/lib"
1659   need_lib_prefix=no
1660   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1661   case $host_os in
1662     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1663     *)                         need_version=no  ;;
1664   esac
1665   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1666   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1667   shlibpath_var=LD_LIBRARY_PATH
1668   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1669     case $host_os in
1670       openbsd2.[[89]] | openbsd2.[[89]].*)
1671         shlibpath_overrides_runpath=no
1672         ;;
1673       *)
1674         shlibpath_overrides_runpath=yes
1675         ;;
1676       esac
1677   else
1678     shlibpath_overrides_runpath=yes
1679   fi
1680   ;;
1682 os2*)
1683   libname_spec='$name'
1684   shrext_cmds=".dll"
1685   need_lib_prefix=no
1686   library_names_spec='$libname${shared_ext} $libname.a'
1687   dynamic_linker='OS/2 ld.exe'
1688   shlibpath_var=LIBPATH
1689   ;;
1691 osf3* | osf4* | osf5*)
1692   version_type=osf
1693   need_lib_prefix=no
1694   need_version=no
1695   soname_spec='${libname}${release}${shared_ext}$major'
1696   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1697   shlibpath_var=LD_LIBRARY_PATH
1698   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1699   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1700   ;;
1702 solaris*)
1703   version_type=linux
1704   need_lib_prefix=no
1705   need_version=no
1706   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1707   soname_spec='${libname}${release}${shared_ext}$major'
1708   shlibpath_var=LD_LIBRARY_PATH
1709   shlibpath_overrides_runpath=yes
1710   hardcode_into_libs=yes
1711   # ldd complains unless libraries are executable
1712   postinstall_cmds='chmod +x $lib'
1713   ;;
1715 sunos4*)
1716   version_type=sunos
1717   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1718   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1719   shlibpath_var=LD_LIBRARY_PATH
1720   shlibpath_overrides_runpath=yes
1721   if test "$with_gnu_ld" = yes; then
1722     need_lib_prefix=no
1723   fi
1724   need_version=yes
1725   ;;
1727 sysv4 | sysv4.3*)
1728   version_type=linux
1729   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1730   soname_spec='${libname}${release}${shared_ext}$major'
1731   shlibpath_var=LD_LIBRARY_PATH
1732   case $host_vendor in
1733     sni)
1734       shlibpath_overrides_runpath=no
1735       need_lib_prefix=no
1736       export_dynamic_flag_spec='${wl}-Blargedynsym'
1737       runpath_var=LD_RUN_PATH
1738       ;;
1739     siemens)
1740       need_lib_prefix=no
1741       ;;
1742     motorola)
1743       need_lib_prefix=no
1744       need_version=no
1745       shlibpath_overrides_runpath=no
1746       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1747       ;;
1748   esac
1749   ;;
1751 sysv4*MP*)
1752   if test -d /usr/nec ;then
1753     version_type=linux
1754     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1755     soname_spec='$libname${shared_ext}.$major'
1756     shlibpath_var=LD_LIBRARY_PATH
1757   fi
1758   ;;
1760 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1761   version_type=freebsd-elf
1762   need_lib_prefix=no
1763   need_version=no
1764   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1765   soname_spec='${libname}${release}${shared_ext}$major'
1766   shlibpath_var=LD_LIBRARY_PATH
1767   hardcode_into_libs=yes
1768   if test "$with_gnu_ld" = yes; then
1769     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1770     shlibpath_overrides_runpath=no
1771   else
1772     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1773     shlibpath_overrides_runpath=yes
1774     case $host_os in
1775       sco3.2v5*)
1776         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1777         ;;
1778     esac
1779   fi
1780   sys_lib_dlsearch_path_spec='/usr/lib'
1781   ;;
1783 uts4*)
1784   version_type=linux
1785   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1786   soname_spec='${libname}${release}${shared_ext}$major'
1787   shlibpath_var=LD_LIBRARY_PATH
1788   ;;
1791   dynamic_linker=no
1792   ;;
1793 esac
1794 AC_MSG_RESULT([$dynamic_linker])
1795 test "$dynamic_linker" = no && can_build_shared=no
1797 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1798 if test "$GCC" = yes; then
1799   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1801 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1804 # _LT_AC_TAGCONFIG
1805 # ----------------
1806 AC_DEFUN([_LT_AC_TAGCONFIG],
1807 [AC_ARG_WITH([tags],
1808     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1809         [include additional configurations @<:@automatic@:>@])],
1810     [tagnames="$withval"])
1812 if test -f "$ltmain" && test -n "$tagnames"; then
1813   if test ! -f "${ofile}"; then
1814     AC_MSG_WARN([output file `$ofile' does not exist])
1815   fi
1817   if test -z "$LTCC"; then
1818     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1819     if test -z "$LTCC"; then
1820       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1821     else
1822       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1823     fi
1824   fi
1825   if test -z "$LTCFLAGS"; then
1826     eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1827   fi
1829   # Extract list of available tagged configurations in $ofile.
1830   # Note that this assumes the entire list is on one line.
1831   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1833   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1834   for tagname in $tagnames; do
1835     IFS="$lt_save_ifs"
1836     # Check whether tagname contains only valid characters
1837     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1838     "") ;;
1839     *)  AC_MSG_ERROR([invalid tag name: $tagname])
1840         ;;
1841     esac
1843     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1844     then
1845       AC_MSG_ERROR([tag name \"$tagname\" already exists])
1846     fi
1848     # Update the list of available tags.
1849     if test -n "$tagname"; then
1850       echo appending configuration tag \"$tagname\" to $ofile
1852       case $tagname in
1853       CXX)
1854         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1855             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1856             (test "X$CXX" != "Xg++"))) ; then
1857           AC_LIBTOOL_LANG_CXX_CONFIG
1858         else
1859           tagname=""
1860         fi
1861         ;;
1863       F77)
1864         if test -n "$F77" && test "X$F77" != "Xno"; then
1865           AC_LIBTOOL_LANG_F77_CONFIG
1866         else
1867           tagname=""
1868         fi
1869         ;;
1871       GCJ)
1872         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1873           AC_LIBTOOL_LANG_GCJ_CONFIG
1874         else
1875           tagname=""
1876         fi
1877         ;;
1879       RC)
1880         AC_LIBTOOL_LANG_RC_CONFIG
1881         ;;
1883       *)
1884         AC_MSG_ERROR([Unsupported tag name: $tagname])
1885         ;;
1886       esac
1888       # Append the new tag name to the list of available tags.
1889       if test -n "$tagname" ; then
1890       available_tags="$available_tags $tagname"
1891     fi
1892     fi
1893   done
1894   IFS="$lt_save_ifs"
1896   # Now substitute the updated list of available tags.
1897   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1898     mv "${ofile}T" "$ofile"
1899     chmod +x "$ofile"
1900   else
1901     rm -f "${ofile}T"
1902     AC_MSG_ERROR([unable to update list of available tagged configurations.])
1903   fi
1905 ])# _LT_AC_TAGCONFIG
1908 # AC_LIBTOOL_DLOPEN
1909 # -----------------
1910 # enable checks for dlopen support
1911 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1912  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1913 ])# AC_LIBTOOL_DLOPEN
1916 # AC_LIBTOOL_WIN32_DLL
1917 # --------------------
1918 # declare package support for building win32 DLLs
1919 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1920 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1921 ])# AC_LIBTOOL_WIN32_DLL
1924 # AC_ENABLE_SHARED([DEFAULT])
1925 # ---------------------------
1926 # implement the --enable-shared flag
1927 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1928 AC_DEFUN([AC_ENABLE_SHARED],
1929 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1930 AC_ARG_ENABLE([shared],
1931     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1932         [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1933     [p=${PACKAGE-default}
1934     case $enableval in
1935     yes) enable_shared=yes ;;
1936     no) enable_shared=no ;;
1937     *)
1938       enable_shared=no
1939       # Look at the argument we got.  We use all the common list separators.
1940       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1941       for pkg in $enableval; do
1942         IFS="$lt_save_ifs"
1943         if test "X$pkg" = "X$p"; then
1944           enable_shared=yes
1945         fi
1946       done
1947       IFS="$lt_save_ifs"
1948       ;;
1949     esac],
1950     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1951 ])# AC_ENABLE_SHARED
1954 # AC_DISABLE_SHARED
1955 # -----------------
1956 # set the default shared flag to --disable-shared
1957 AC_DEFUN([AC_DISABLE_SHARED],
1958 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1959 AC_ENABLE_SHARED(no)
1960 ])# AC_DISABLE_SHARED
1963 # AC_ENABLE_STATIC([DEFAULT])
1964 # ---------------------------
1965 # implement the --enable-static flag
1966 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1967 AC_DEFUN([AC_ENABLE_STATIC],
1968 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1969 AC_ARG_ENABLE([static],
1970     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1971         [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1972     [p=${PACKAGE-default}
1973     case $enableval in
1974     yes) enable_static=yes ;;
1975     no) enable_static=no ;;
1976     *)
1977      enable_static=no
1978       # Look at the argument we got.  We use all the common list separators.
1979       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1980       for pkg in $enableval; do
1981         IFS="$lt_save_ifs"
1982         if test "X$pkg" = "X$p"; then
1983           enable_static=yes
1984         fi
1985       done
1986       IFS="$lt_save_ifs"
1987       ;;
1988     esac],
1989     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1990 ])# AC_ENABLE_STATIC
1993 # AC_DISABLE_STATIC
1994 # -----------------
1995 # set the default static flag to --disable-static
1996 AC_DEFUN([AC_DISABLE_STATIC],
1997 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1998 AC_ENABLE_STATIC(no)
1999 ])# AC_DISABLE_STATIC
2002 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2003 # ---------------------------------
2004 # implement the --enable-fast-install flag
2005 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2006 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2007 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2008 AC_ARG_ENABLE([fast-install],
2009     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2010     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2011     [p=${PACKAGE-default}
2012     case $enableval in
2013     yes) enable_fast_install=yes ;;
2014     no) enable_fast_install=no ;;
2015     *)
2016       enable_fast_install=no
2017       # Look at the argument we got.  We use all the common list separators.
2018       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2019       for pkg in $enableval; do
2020         IFS="$lt_save_ifs"
2021         if test "X$pkg" = "X$p"; then
2022           enable_fast_install=yes
2023         fi
2024       done
2025       IFS="$lt_save_ifs"
2026       ;;
2027     esac],
2028     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2029 ])# AC_ENABLE_FAST_INSTALL
2032 # AC_DISABLE_FAST_INSTALL
2033 # -----------------------
2034 # set the default to --disable-fast-install
2035 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2036 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2037 AC_ENABLE_FAST_INSTALL(no)
2038 ])# AC_DISABLE_FAST_INSTALL
2041 # AC_LIBTOOL_PICMODE([MODE])
2042 # --------------------------
2043 # implement the --with-pic flag
2044 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2045 AC_DEFUN([AC_LIBTOOL_PICMODE],
2046 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2047 pic_mode=ifelse($#,1,$1,default)
2048 ])# AC_LIBTOOL_PICMODE
2051 # AC_PROG_EGREP
2052 # -------------
2053 # This is predefined starting with Autoconf 2.54, so this conditional
2054 # definition can be removed once we require Autoconf 2.54 or later.
2055 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2056 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2057    [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2058     then ac_cv_prog_egrep='grep -E'
2059     else ac_cv_prog_egrep='egrep'
2060     fi])
2061  EGREP=$ac_cv_prog_egrep
2062  AC_SUBST([EGREP])
2063 ])])
2066 # AC_PATH_TOOL_PREFIX
2067 # -------------------
2068 # find a file program which can recognise shared library
2069 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2070 [AC_REQUIRE([AC_PROG_EGREP])dnl
2071 AC_MSG_CHECKING([for $1])
2072 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2073 [case $MAGIC_CMD in
2074 [[\\/*] |  ?:[\\/]*])
2075   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2076   ;;
2078   lt_save_MAGIC_CMD="$MAGIC_CMD"
2079   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2080 dnl $ac_dummy forces splitting on constant user-supplied paths.
2081 dnl POSIX.2 word splitting is done only on the output of word expansions,
2082 dnl not every word.  This closes a longstanding sh security hole.
2083   ac_dummy="ifelse([$2], , $PATH, [$2])"
2084   for ac_dir in $ac_dummy; do
2085     IFS="$lt_save_ifs"
2086     test -z "$ac_dir" && ac_dir=.
2087     if test -f $ac_dir/$1; then
2088       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2089       if test -n "$file_magic_test_file"; then
2090         case $deplibs_check_method in
2091         "file_magic "*)
2092           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2093           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2094           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2095             $EGREP "$file_magic_regex" > /dev/null; then
2096             :
2097           else
2098             cat <<EOF 1>&2
2100 *** Warning: the command libtool uses to detect shared libraries,
2101 *** $file_magic_cmd, produces output that libtool cannot recognize.
2102 *** The result is that libtool may fail to recognize shared libraries
2103 *** as such.  This will affect the creation of libtool libraries that
2104 *** depend on shared libraries, but programs linked with such libtool
2105 *** libraries will work regardless of this problem.  Nevertheless, you
2106 *** may want to report the problem to your system manager and/or to
2107 *** bug-libtool@gnu.org
2110           fi ;;
2111         esac
2112       fi
2113       break
2114     fi
2115   done
2116   IFS="$lt_save_ifs"
2117   MAGIC_CMD="$lt_save_MAGIC_CMD"
2118   ;;
2119 esac])
2120 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2121 if test -n "$MAGIC_CMD"; then
2122   AC_MSG_RESULT($MAGIC_CMD)
2123 else
2124   AC_MSG_RESULT(no)
2126 ])# AC_PATH_TOOL_PREFIX
2129 # AC_PATH_MAGIC
2130 # -------------
2131 # find a file program which can recognise a shared library
2132 AC_DEFUN([AC_PATH_MAGIC],
2133 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2134 if test -z "$lt_cv_path_MAGIC_CMD"; then
2135   if test -n "$ac_tool_prefix"; then
2136     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2137   else
2138     MAGIC_CMD=:
2139   fi
2141 ])# AC_PATH_MAGIC
2144 # AC_PROG_LD
2145 # ----------
2146 # find the pathname to the GNU or non-GNU linker
2147 AC_DEFUN([AC_PROG_LD],
2148 [AC_ARG_WITH([gnu-ld],
2149     [AC_HELP_STRING([--with-gnu-ld],
2150         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2151     [test "$withval" = no || with_gnu_ld=yes],
2152     [with_gnu_ld=no])
2153 AC_REQUIRE([LT_AC_PROG_SED])dnl
2154 AC_REQUIRE([AC_PROG_CC])dnl
2155 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2156 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2157 ac_prog=ld
2158 if test "$GCC" = yes; then
2159   # Check if gcc -print-prog-name=ld gives a path.
2160   AC_MSG_CHECKING([for ld used by $CC])
2161   case $host in
2162   *-*-mingw*)
2163     # gcc leaves a trailing carriage return which upsets mingw
2164     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2165   *)
2166     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2167   esac
2168   case $ac_prog in
2169     # Accept absolute paths.
2170     [[\\/]]* | ?:[[\\/]]*)
2171       re_direlt='/[[^/]][[^/]]*/\.\./'
2172       # Canonicalize the pathname of ld
2173       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2174       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2175         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2176       done
2177       test -z "$LD" && LD="$ac_prog"
2178       ;;
2179   "")
2180     # If it fails, then pretend we aren't using GCC.
2181     ac_prog=ld
2182     ;;
2183   *)
2184     # If it is relative, then search for the first ld in PATH.
2185     with_gnu_ld=unknown
2186     ;;
2187   esac
2188 elif test "$with_gnu_ld" = yes; then
2189   AC_MSG_CHECKING([for GNU ld])
2190 else
2191   AC_MSG_CHECKING([for non-GNU ld])
2193 AC_CACHE_VAL(lt_cv_path_LD,
2194 [if test -z "$LD"; then
2195   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2196   for ac_dir in $PATH; do
2197     IFS="$lt_save_ifs"
2198     test -z "$ac_dir" && ac_dir=.
2199     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2200       lt_cv_path_LD="$ac_dir/$ac_prog"
2201       # Check to see if the program is GNU ld.  I'd rather use --version,
2202       # but apparently some variants of GNU ld only accept -v.
2203       # Break only if it was the GNU/non-GNU ld that we prefer.
2204       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2205       *GNU* | *'with BFD'*)
2206         test "$with_gnu_ld" != no && break
2207         ;;
2208       *)
2209         test "$with_gnu_ld" != yes && break
2210         ;;
2211       esac
2212     fi
2213   done
2214   IFS="$lt_save_ifs"
2215 else
2216   lt_cv_path_LD="$LD" # Let the user override the test with a path.
2217 fi])
2218 LD="$lt_cv_path_LD"
2219 if test -n "$LD"; then
2220   AC_MSG_RESULT($LD)
2221 else
2222   AC_MSG_RESULT(no)
2224 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2225 AC_PROG_LD_GNU
2226 ])# AC_PROG_LD
2229 # AC_PROG_LD_GNU
2230 # --------------
2231 AC_DEFUN([AC_PROG_LD_GNU],
2232 [AC_REQUIRE([AC_PROG_EGREP])dnl
2233 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2234 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2235 case `$LD -v 2>&1 </dev/null` in
2236 *GNU* | *'with BFD'*)
2237   lt_cv_prog_gnu_ld=yes
2238   ;;
2240   lt_cv_prog_gnu_ld=no
2241   ;;
2242 esac])
2243 with_gnu_ld=$lt_cv_prog_gnu_ld
2244 ])# AC_PROG_LD_GNU
2247 # AC_PROG_LD_RELOAD_FLAG
2248 # ----------------------
2249 # find reload flag for linker
2250 #   -- PORTME Some linkers may need a different reload flag.
2251 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2252 [AC_CACHE_CHECK([for $LD option to reload object files],
2253   lt_cv_ld_reload_flag,
2254   [lt_cv_ld_reload_flag='-r'])
2255 reload_flag=$lt_cv_ld_reload_flag
2256 case $reload_flag in
2257 "" | " "*) ;;
2258 *) reload_flag=" $reload_flag" ;;
2259 esac
2260 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2261 case $host_os in
2262   darwin*)
2263     if test "$GCC" = yes; then
2264       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2265     else
2266       reload_cmds='$LD$reload_flag -o $output$reload_objs'
2267     fi
2268     ;;
2269 esac
2270 ])# AC_PROG_LD_RELOAD_FLAG
2273 # AC_DEPLIBS_CHECK_METHOD
2274 # -----------------------
2275 # how to check for library dependencies
2276 #  -- PORTME fill in with the dynamic library characteristics
2277 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2278 [AC_CACHE_CHECK([how to recognise dependent libraries],
2279 lt_cv_deplibs_check_method,
2280 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2281 lt_cv_file_magic_test_file=
2282 lt_cv_deplibs_check_method='unknown'
2283 # Need to set the preceding variable on all platforms that support
2284 # interlibrary dependencies.
2285 # 'none' -- dependencies not supported.
2286 # `unknown' -- same as none, but documents that we really don't know.
2287 # 'pass_all' -- all dependencies passed with no checks.
2288 # 'test_compile' -- check by making test program.
2289 # 'file_magic [[regex]]' -- check by looking for files in library path
2290 # which responds to the $file_magic_cmd with a given extended regex.
2291 # If you have `file' or equivalent on your system and you're not sure
2292 # whether `pass_all' will *always* work, you probably want this one.
2294 case $host_os in
2295 aix4* | aix5*)
2296   lt_cv_deplibs_check_method=pass_all
2297   ;;
2299 beos*)
2300   lt_cv_deplibs_check_method=pass_all
2301   ;;
2303 bsdi[[45]]*)
2304   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2305   lt_cv_file_magic_cmd='/usr/bin/file -L'
2306   lt_cv_file_magic_test_file=/shlib/libc.so
2307   ;;
2309 cygwin*)
2310   # func_win32_libid is a shell function defined in ltmain.sh
2311   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2312   lt_cv_file_magic_cmd='func_win32_libid'
2313   ;;
2315 mingw* | pw32*)
2316   # Base MSYS/MinGW do not provide the 'file' command needed by
2317   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2318   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2319   lt_cv_file_magic_cmd='$OBJDUMP -f'
2320   ;;
2322 darwin* | rhapsody*)
2323   lt_cv_deplibs_check_method=pass_all
2324   ;;
2326 freebsd* | kfreebsd*-gnu | dragonfly*)
2327   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2328     case $host_cpu in
2329     i*86 )
2330       # Not sure whether the presence of OpenBSD here was a mistake.
2331       # Let's accept both of them until this is cleared up.
2332       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2333       lt_cv_file_magic_cmd=/usr/bin/file
2334       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2335       ;;
2336     esac
2337   else
2338     lt_cv_deplibs_check_method=pass_all
2339   fi
2340   ;;
2342 gnu*)
2343   lt_cv_deplibs_check_method=pass_all
2344   ;;
2346 hpux10.20* | hpux11*)
2347   lt_cv_file_magic_cmd=/usr/bin/file
2348   case $host_cpu in
2349   ia64*)
2350     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2351     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2352     ;;
2353   hppa*64*)
2354     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2355     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2356     ;;
2357   *)
2358     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2359     lt_cv_file_magic_test_file=/usr/lib/libc.sl
2360     ;;
2361   esac
2362   ;;
2364 interix3*)
2365   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2366   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2367   ;;
2369 irix5* | irix6* | nonstopux*)
2370   case $LD in
2371   *-32|*"-32 ") libmagic=32-bit;;
2372   *-n32|*"-n32 ") libmagic=N32;;
2373   *-64|*"-64 ") libmagic=64-bit;;
2374   *) libmagic=never-match;;
2375   esac
2376   lt_cv_deplibs_check_method=pass_all
2377   ;;
2379 # This must be Linux ELF.
2380 linux*)
2381   lt_cv_deplibs_check_method=pass_all
2382   ;;
2384 netbsd*)
2385   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2386     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2387   else
2388     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2389   fi
2390   ;;
2392 newos6*)
2393   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2394   lt_cv_file_magic_cmd=/usr/bin/file
2395   lt_cv_file_magic_test_file=/usr/lib/libnls.so
2396   ;;
2398 nto-qnx*)
2399   lt_cv_deplibs_check_method=unknown
2400   ;;
2402 openbsd*)
2403   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2404     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2405   else
2406     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2407   fi
2408   ;;
2410 osf3* | osf4* | osf5*)
2411   lt_cv_deplibs_check_method=pass_all
2412   ;;
2414 solaris*)
2415   lt_cv_deplibs_check_method=pass_all
2416   ;;
2418 sysv4 | sysv4.3*)
2419   case $host_vendor in
2420   motorola)
2421     lt_cv_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]]'
2422     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2423     ;;
2424   ncr)
2425     lt_cv_deplibs_check_method=pass_all
2426     ;;
2427   sequent)
2428     lt_cv_file_magic_cmd='/bin/file'
2429     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2430     ;;
2431   sni)
2432     lt_cv_file_magic_cmd='/bin/file'
2433     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2434     lt_cv_file_magic_test_file=/lib/libc.so
2435     ;;
2436   siemens)
2437     lt_cv_deplibs_check_method=pass_all
2438     ;;
2439   pc)
2440     lt_cv_deplibs_check_method=pass_all
2441     ;;
2442   esac
2443   ;;
2445 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2446   lt_cv_deplibs_check_method=pass_all
2447   ;;
2448 esac
2450 file_magic_cmd=$lt_cv_file_magic_cmd
2451 deplibs_check_method=$lt_cv_deplibs_check_method
2452 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2453 ])# AC_DEPLIBS_CHECK_METHOD
2456 # AC_PROG_NM
2457 # ----------
2458 # find the pathname to a BSD-compatible name lister
2459 AC_DEFUN([AC_PROG_NM],
2460 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2461 [if test -n "$NM"; then
2462   # Let the user override the test.
2463   lt_cv_path_NM="$NM"
2464 else
2465   lt_nm_to_check="${ac_tool_prefix}nm"
2466   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
2467     lt_nm_to_check="$lt_nm_to_check nm"
2468   fi
2469   for lt_tmp_nm in $lt_nm_to_check; do
2470     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2471     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2472       IFS="$lt_save_ifs"
2473       test -z "$ac_dir" && ac_dir=.
2474       tmp_nm="$ac_dir/$lt_tmp_nm"
2475       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2476         # Check to see if the nm accepts a BSD-compat flag.
2477         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2478         #   nm: unknown option "B" ignored
2479         # Tru64's nm complains that /dev/null is an invalid object file
2480         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2481         */dev/null* | *'Invalid file or object type'*)
2482           lt_cv_path_NM="$tmp_nm -B"
2483           break
2484           ;;
2485         *)
2486           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2487           */dev/null*)
2488             lt_cv_path_NM="$tmp_nm -p"
2489             break
2490             ;;
2491           *)
2492             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2493             continue # so that we can try to find one that supports BSD flags
2494             ;;
2495           esac
2496           ;;
2497         esac
2498       fi
2499     done
2500     IFS="$lt_save_ifs"
2501   done
2502   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2503 fi])
2504 NM="$lt_cv_path_NM"
2505 ])# AC_PROG_NM
2508 # AC_CHECK_LIBM
2509 # -------------
2510 # check for math library
2511 AC_DEFUN([AC_CHECK_LIBM],
2512 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2513 LIBM=
2514 case $host in
2515 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2516   # These system don't have libm, or don't need it
2517   ;;
2518 *-ncr-sysv4.3*)
2519   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2520   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2521   ;;
2523   AC_CHECK_LIB(m, cos, LIBM="-lm")
2524   ;;
2525 esac
2526 ])# AC_CHECK_LIBM
2529 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2530 # -----------------------------------
2531 # sets LIBLTDL to the link flags for the libltdl convenience library and
2532 # LTDLINCL to the include flags for the libltdl header and adds
2533 # --enable-ltdl-convenience to the configure arguments.  Note that
2534 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2535 # it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2536 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2537 # (note the single quotes!).  If your package is not flat and you're not
2538 # using automake, define top_builddir and top_srcdir appropriately in
2539 # the Makefiles.
2540 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2541 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2542   case $enable_ltdl_convenience in
2543   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2544   "") enable_ltdl_convenience=yes
2545       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2546   esac
2547   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libbase'])/libltdlc.la
2548   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2549   # For backwards non-gettext consistent compatibility...
2550   INCLTDL="$LTDLINCL"
2551 ])# AC_LIBLTDL_CONVENIENCE
2554 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2555 # -----------------------------------
2556 # sets LIBLTDL to the link flags for the libltdl installable library and
2557 # LTDLINCL to the include flags for the libltdl header and adds
2558 # --enable-ltdl-install to the configure arguments.  Note that
2559 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2560 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2561 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2562 # '${top_srcdir}/' (note the single quotes!).  If your package is not
2563 # flat and you're not using automake, define top_builddir and top_srcdir
2564 # appropriately in the Makefiles.
2565 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2566 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2567 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2568   AC_CHECK_LIB(ltdl, lt_dlinit,
2569   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2570   [if test x"$enable_ltdl_install" = xno; then
2571      AC_MSG_WARN([libltdl not installed, but installation disabled])
2572    else
2573      enable_ltdl_install=yes
2574    fi
2575   ])
2576   if test x"$enable_ltdl_install" = x"yes"; then
2577     ac_configure_args="$ac_configure_args --enable-ltdl-install"
2578     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libbase'])/libltdl.la
2579     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2580   else
2581     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2582     LIBLTDL="-lltdl"
2583     LTDLINCL=
2584   fi
2585   # For backwards non-gettext consistent compatibility...
2586   INCLTDL="$LTDLINCL"
2587 ])# AC_LIBLTDL_INSTALLABLE
2590 # AC_LIBTOOL_CXX
2591 # --------------
2592 # enable support for C++ libraries
2593 AC_DEFUN([AC_LIBTOOL_CXX],
2594 [AC_REQUIRE([_LT_AC_LANG_CXX])
2595 ])# AC_LIBTOOL_CXX
2598 # _LT_AC_LANG_CXX
2599 # ---------------
2600 AC_DEFUN([_LT_AC_LANG_CXX],
2601 [AC_REQUIRE([AC_PROG_CXX])
2602 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2603 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2604 ])# _LT_AC_LANG_CXX
2606 # _LT_AC_PROG_CXXCPP
2607 # ------------------
2608 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2610 AC_REQUIRE([AC_PROG_CXX])
2611 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2612     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2613     (test "X$CXX" != "Xg++"))) ; then
2614   AC_PROG_CXXCPP
2616 ])# _LT_AC_PROG_CXXCPP
2618 # AC_LIBTOOL_F77
2619 # --------------
2620 # enable support for Fortran 77 libraries
2621 AC_DEFUN([AC_LIBTOOL_F77],
2622 [AC_REQUIRE([_LT_AC_LANG_F77])
2623 ])# AC_LIBTOOL_F77
2626 # _LT_AC_LANG_F77
2627 # ---------------
2628 AC_DEFUN([_LT_AC_LANG_F77],
2629 [AC_REQUIRE([AC_PROG_F77])
2630 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2631 ])# _LT_AC_LANG_F77
2634 # AC_LIBTOOL_GCJ
2635 # --------------
2636 # enable support for GCJ libraries
2637 AC_DEFUN([AC_LIBTOOL_GCJ],
2638 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2639 ])# AC_LIBTOOL_GCJ
2642 # _LT_AC_LANG_GCJ
2643 # ---------------
2644 AC_DEFUN([_LT_AC_LANG_GCJ],
2645 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2646   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2647     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2648       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2649          [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2650            [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2651 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2652 ])# _LT_AC_LANG_GCJ
2655 # AC_LIBTOOL_RC
2656 # -------------
2657 # enable support for Windows resource files
2658 AC_DEFUN([AC_LIBTOOL_RC],
2659 [AC_REQUIRE([LT_AC_PROG_RC])
2660 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2661 ])# AC_LIBTOOL_RC
2664 # AC_LIBTOOL_LANG_C_CONFIG
2665 # ------------------------
2666 # Ensure that the configuration vars for the C compiler are
2667 # suitably defined.  Those variables are subsequently used by
2668 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2669 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2670 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2671 [lt_save_CC="$CC"
2672 AC_LANG_PUSH(C)
2674 # Source file extension for C test sources.
2675 ac_ext=c
2677 # Object file extension for compiled C test sources.
2678 objext=o
2679 _LT_AC_TAGVAR(objext, $1)=$objext
2681 # Code to be used in simple compile tests
2682 lt_simple_compile_test_code="int some_variable = 0;\n"
2684 # Code to be used in simple link tests
2685 lt_simple_link_test_code='int main(){return(0);}\n'
2687 _LT_AC_SYS_COMPILER
2689 # save warnings/boilerplate of simple test code
2690 _LT_COMPILER_BOILERPLATE
2691 _LT_LINKER_BOILERPLATE
2693 ## CAVEAT EMPTOR:
2694 ## There is no encapsulation within the following macros, do not change
2695 ## the running order or otherwise move them around unless you know exactly
2696 ## what you are doing...
2697 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2698 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2699 AC_LIBTOOL_PROG_CC_C_O($1)
2700 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2701 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2702 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2703 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2704 AC_LIBTOOL_SYS_LIB_STRIP
2705 AC_LIBTOOL_DLOPEN_SELF
2707 # Report which library types will actually be built
2708 AC_MSG_CHECKING([if libtool supports shared libraries])
2709 AC_MSG_RESULT([$can_build_shared])
2711 AC_MSG_CHECKING([whether to build shared libraries])
2712 test "$can_build_shared" = "no" && enable_shared=no
2714 # On AIX, shared libraries and static libraries use the same namespace, and
2715 # are all built from PIC.
2716 case $host_os in
2717 aix3*)
2718   test "$enable_shared" = yes && enable_static=no
2719   if test -n "$RANLIB"; then
2720     archive_cmds="$archive_cmds~\$RANLIB \$lib"
2721     postinstall_cmds='$RANLIB $lib'
2722   fi
2723   ;;
2725 aix4* | aix5*)
2726   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2727     test "$enable_shared" = yes && enable_static=no
2728   fi
2729     ;;
2730 esac
2731 AC_MSG_RESULT([$enable_shared])
2733 AC_MSG_CHECKING([whether to build static libraries])
2734 # Make sure either enable_shared or enable_static is yes.
2735 test "$enable_shared" = yes || enable_static=yes
2736 AC_MSG_RESULT([$enable_static])
2738 AC_LIBTOOL_CONFIG($1)
2740 AC_LANG_POP
2741 CC="$lt_save_CC"
2742 ])# AC_LIBTOOL_LANG_C_CONFIG
2745 # AC_LIBTOOL_LANG_CXX_CONFIG
2746 # --------------------------
2747 # Ensure that the configuration vars for the C compiler are
2748 # suitably defined.  Those variables are subsequently used by
2749 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2750 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2751 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2752 [AC_LANG_PUSH(C++)
2753 AC_REQUIRE([AC_PROG_CXX])
2754 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2756 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2757 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2758 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2759 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2760 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2761 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2762 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2763 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2764 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2765 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2766 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2767 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2768 _LT_AC_TAGVAR(module_cmds, $1)=
2769 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2770 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2771 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2772 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2773 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2774 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2776 # Dependencies to place before and after the object being linked:
2777 _LT_AC_TAGVAR(predep_objects, $1)=
2778 _LT_AC_TAGVAR(postdep_objects, $1)=
2779 _LT_AC_TAGVAR(predeps, $1)=
2780 _LT_AC_TAGVAR(postdeps, $1)=
2781 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2783 # Source file extension for C++ test sources.
2784 ac_ext=cpp
2786 # Object file extension for compiled C++ test sources.
2787 objext=o
2788 _LT_AC_TAGVAR(objext, $1)=$objext
2790 # Code to be used in simple compile tests
2791 lt_simple_compile_test_code="int some_variable = 0;\n"
2793 # Code to be used in simple link tests
2794 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2796 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2797 _LT_AC_SYS_COMPILER
2799 # save warnings/boilerplate of simple test code
2800 _LT_COMPILER_BOILERPLATE
2801 _LT_LINKER_BOILERPLATE
2803 # Allow CC to be a program name with arguments.
2804 lt_save_CC=$CC
2805 lt_save_LD=$LD
2806 lt_save_GCC=$GCC
2807 GCC=$GXX
2808 lt_save_with_gnu_ld=$with_gnu_ld
2809 lt_save_path_LD=$lt_cv_path_LD
2810 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2811   lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2812 else
2813   $as_unset lt_cv_prog_gnu_ld
2815 if test -n "${lt_cv_path_LDCXX+set}"; then
2816   lt_cv_path_LD=$lt_cv_path_LDCXX
2817 else
2818   $as_unset lt_cv_path_LD
2820 test -z "${LDCXX+set}" || LD=$LDCXX
2821 CC=${CXX-"c++"}
2822 compiler=$CC
2823 _LT_AC_TAGVAR(compiler, $1)=$CC
2824 _LT_CC_BASENAME([$compiler])
2826 # We don't want -fno-exception wen compiling C++ code, so set the
2827 # no_builtin_flag separately
2828 if test "$GXX" = yes; then
2829   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2830 else
2831   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2834 if test "$GXX" = yes; then
2835   # Set up default GNU C++ configuration
2837   AC_PROG_LD
2839   # Check if GNU C++ uses GNU ld as the underlying linker, since the
2840   # archiving commands below assume that GNU ld is being used.
2841   if test "$with_gnu_ld" = yes; then
2842     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2843     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2845     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2846     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2848     # If archive_cmds runs LD, not CC, wlarc should be empty
2849     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2850     #     investigate it a little bit more. (MM)
2851     wlarc='${wl}'
2853     # ancient GNU ld didn't support --whole-archive et. al.
2854     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2855         grep 'no-whole-archive' > /dev/null; then
2856       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2857     else
2858       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2859     fi
2860   else
2861     with_gnu_ld=no
2862     wlarc=
2864     # A generic and very simple default shared library creation
2865     # command for GNU C++ for the case where it uses the native
2866     # linker, instead of GNU ld.  If possible, this setting should
2867     # overridden to take advantage of the native linker features on
2868     # the platform it is being used on.
2869     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2870   fi
2872   # Commands to make compiler produce verbose output that lists
2873   # what "hidden" libraries, object files and flags are used when
2874   # linking a shared library.
2875   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2877 else
2878   GXX=no
2879   with_gnu_ld=no
2880   wlarc=
2883 # PORTME: fill in a description of your system's C++ link characteristics
2884 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2885 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2886 case $host_os in
2887   aix3*)
2888     # FIXME: insert proper C++ library support
2889     _LT_AC_TAGVAR(ld_shlibs, $1)=no
2890     ;;
2891   aix4* | aix5*)
2892     if test "$host_cpu" = ia64; then
2893       # On IA64, the linker does run time linking by default, so we don't
2894       # have to do anything special.
2895       aix_use_runtimelinking=no
2896       exp_sym_flag='-Bexport'
2897       no_entry_flag=""
2898     else
2899       aix_use_runtimelinking=no
2901       # Test if we are trying to use run time linking or normal
2902       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2903       # need to do runtime linking.
2904       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2905         for ld_flag in $LDFLAGS; do
2906           case $ld_flag in
2907           *-brtl*)
2908             aix_use_runtimelinking=yes
2909             break
2910             ;;
2911           esac
2912         done
2913         ;;
2914       esac
2916       exp_sym_flag='-bexport'
2917       no_entry_flag='-bnoentry'
2918     fi
2920     # When large executables or shared objects are built, AIX ld can
2921     # have problems creating the table of contents.  If linking a library
2922     # or program results in "error TOC overflow" add -mminimal-toc to
2923     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2924     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2926     _LT_AC_TAGVAR(archive_cmds, $1)=''
2927     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2928     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2929     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2931     if test "$GXX" = yes; then
2932       case $host_os in aix4.[[012]]|aix4.[[012]].*)
2933       # We only want to do this on AIX 4.2 and lower, the check
2934       # below for broken collect2 doesn't work under 4.3+
2935         collect2name=`${CC} -print-prog-name=collect2`
2936         if test -f "$collect2name" && \
2937            strings "$collect2name" | grep resolve_lib_name >/dev/null
2938         then
2939           # We have reworked collect2
2940           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2941         else
2942           # We have old collect2
2943           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2944           # It fails to find uninstalled libraries when the uninstalled
2945           # path is not listed in the libpath.  Setting hardcode_minus_L
2946           # to unsupported forces relinking
2947           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2948           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2949           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2950         fi
2951         ;;
2952       esac
2953       shared_flag='-shared'
2954       if test "$aix_use_runtimelinking" = yes; then
2955         shared_flag="$shared_flag "'${wl}-G'
2956       fi
2957     else
2958       # not using gcc
2959       if test "$host_cpu" = ia64; then
2960         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2961         # chokes on -Wl,-G. The following line is correct:
2962         shared_flag='-G'
2963       else
2964         if test "$aix_use_runtimelinking" = yes; then
2965           shared_flag='${wl}-G'
2966         else
2967           shared_flag='${wl}-bM:SRE'
2968         fi
2969       fi
2970     fi
2972     # It seems that -bexpall does not export symbols beginning with
2973     # underscore (_), so it is better to generate a list of symbols to export.
2974     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2975     if test "$aix_use_runtimelinking" = yes; then
2976       # Warning - without using the other runtime loading flags (-brtl),
2977       # -berok will link without error, but may produce a broken library.
2978       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2979       # Determine the default libpath from the value encoded in an empty executable.
2980       _LT_AC_SYS_LIBPATH_AIX
2981       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2983       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2984      else
2985       if test "$host_cpu" = ia64; then
2986         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2987         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2988         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
2989       else
2990         # Determine the default libpath from the value encoded in an empty executable.
2991         _LT_AC_SYS_LIBPATH_AIX
2992         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2993         # Warning - without using the other run time loading flags,
2994         # -berok will link without error, but may produce a broken library.
2995         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2996         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2997         # Exported symbols can be pulled into shared objects from archives
2998         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2999         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3000         # This is similar to how AIX traditionally builds its shared libraries.
3001         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3002       fi
3003     fi
3004     ;;
3006   beos*)
3007     if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3008       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3009       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3010       # support --undefined.  This deserves some investigation.  FIXME
3011       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3012     else
3013       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3014     fi
3015     ;;
3017   chorus*)
3018     case $cc_basename in
3019       *)
3020         # FIXME: insert proper C++ library support
3021         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3022         ;;
3023     esac
3024     ;;
3026   cygwin* | mingw* | pw32*)
3027     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3028     # as there is no search path for DLLs.
3029     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3030     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3031     _LT_AC_TAGVAR(always_export_symbols, $1)=no
3032     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3034     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3035       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3036       # If the export-symbols file already is a .def file (1st line
3037       # is EXPORTS), use it as is; otherwise, prepend...
3038       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3039         cp $export_symbols $output_objdir/$soname.def;
3040       else
3041         echo EXPORTS > $output_objdir/$soname.def;
3042         cat $export_symbols >> $output_objdir/$soname.def;
3043       fi~
3044       $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3045     else
3046       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3047     fi
3048   ;;
3049       darwin* | rhapsody*)
3050         case $host_os in
3051         rhapsody* | darwin1.[[012]])
3052          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3053          ;;
3054        *) # Darwin 1.3 on
3055          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3056            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3057          else
3058            case ${MACOSX_DEPLOYMENT_TARGET} in
3059              10.[[012]])
3060                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3061                ;;
3062              10.*)
3063                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3064                ;;
3065            esac
3066          fi
3067          ;;
3068         esac
3069       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3070       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3071       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3072       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3073       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3074       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3076     if test "$GXX" = yes ; then
3077       lt_int_apple_cc_single_mod=no
3078       output_verbose_link_cmd='echo'
3079       if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3080        lt_int_apple_cc_single_mod=yes
3081       fi
3082       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3083        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3084       else
3085           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3086         fi
3087         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3088         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3089           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3090             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3091           else
3092             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3093           fi
3094             _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3095       else
3096       case $cc_basename in
3097         xlc*)
3098          output_verbose_link_cmd='echo'
3099           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3100           _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3101           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3102           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3103           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3104           ;;
3105        *)
3106          _LT_AC_TAGVAR(ld_shlibs, $1)=no
3107           ;;
3108       esac
3109       fi
3110         ;;
3112   dgux*)
3113     case $cc_basename in
3114       ec++*)
3115         # FIXME: insert proper C++ library support
3116         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3117         ;;
3118       ghcx*)
3119         # Green Hills C++ Compiler
3120         # FIXME: insert proper C++ library support
3121         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3122         ;;
3123       *)
3124         # FIXME: insert proper C++ library support
3125         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3126         ;;
3127     esac
3128     ;;
3129   freebsd[[12]]*)
3130     # C++ shared libraries reported to be fairly broken before switch to ELF
3131     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3132     ;;
3133   freebsd-elf*)
3134     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3135     ;;
3136   freebsd* | kfreebsd*-gnu | dragonfly*)
3137     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3138     # conventions
3139     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3140     ;;
3141   gnu*)
3142     ;;
3143   hpux9*)
3144     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3145     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3146     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3147     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3148     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3149                                 # but as the default
3150                                 # location of the library.
3152     case $cc_basename in
3153     CC*)
3154       # FIXME: insert proper C++ library support
3155       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3156       ;;
3157     aCC*)
3158       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3159       # Commands to make compiler produce verbose output that lists
3160       # what "hidden" libraries, object files and flags are used when
3161       # linking a shared library.
3162       #
3163       # There doesn't appear to be a way to prevent this compiler from
3164       # explicitly linking system object files so we need to strip them
3165       # from the output so that they don't get included in the library
3166       # dependencies.
3167       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3168       ;;
3169     *)
3170       if test "$GXX" = yes; then
3171         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3172       else
3173         # FIXME: insert proper C++ library support
3174         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3175       fi
3176       ;;
3177     esac
3178     ;;
3179   hpux10*|hpux11*)
3180     if test $with_gnu_ld = no; then
3181       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3182       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3184       case $host_cpu in
3185       hppa*64*|ia64*)
3186         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3187         ;;
3188       *)
3189         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3190         ;;
3191       esac
3192     fi
3193     case $host_cpu in
3194     hppa*64*|ia64*)
3195       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3196       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3197       ;;
3198     *)
3199       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3200       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3201                                               # but as the default
3202                                               # location of the library.
3203       ;;
3204     esac
3206     case $cc_basename in
3207       CC*)
3208         # FIXME: insert proper C++ library support
3209         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3210         ;;
3211       aCC*)
3212         case $host_cpu in
3213         hppa*64*)
3214           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3215           ;;
3216         ia64*)
3217           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3218           ;;
3219         *)
3220           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3221           ;;
3222         esac
3223         # Commands to make compiler produce verbose output that lists
3224         # what "hidden" libraries, object files and flags are used when
3225         # linking a shared library.
3226         #
3227         # There doesn't appear to be a way to prevent this compiler from
3228         # explicitly linking system object files so we need to strip them
3229         # from the output so that they don't get included in the library
3230         # dependencies.
3231         output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3232         ;;
3233       *)
3234         if test "$GXX" = yes; then
3235           if test $with_gnu_ld = no; then
3236             case $host_cpu in
3237             hppa*64*)
3238               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3239               ;;
3240             ia64*)
3241               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3242               ;;
3243             *)
3244               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3245               ;;
3246             esac
3247           fi
3248         else
3249           # FIXME: insert proper C++ library support
3250           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3251         fi
3252         ;;
3253     esac
3254     ;;
3255   interix3*)
3256     _LT_AC_TAGVAR(hardcode_direct, $1)=no
3257     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3258     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3259     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3260     # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3261     # Instead, shared libraries are loaded at an image base (0x10000000 by
3262     # default) and relocated if they conflict, which is a slow very memory
3263     # consuming and fragmenting process.  To avoid this, we pick a random,
3264     # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3265     # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3266     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3267     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3268     ;;
3269   irix5* | irix6*)
3270     case $cc_basename in
3271       CC*)
3272         # SGI C++
3273         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3275         # Archives containing C++ object files must be created using
3276         # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3277         # necessary to make sure instantiated templates are included
3278         # in the archive.
3279         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3280         ;;
3281       *)
3282         if test "$GXX" = yes; then
3283           if test "$with_gnu_ld" = no; then
3284             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3285           else
3286             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3287           fi
3288         fi
3289         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3290         ;;
3291     esac
3292     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3293     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3294     ;;
3295   linux*)
3296     case $cc_basename in
3297       KCC*)
3298         # Kuck and Associates, Inc. (KAI) C++ Compiler
3300         # KCC will only create a shared library if the output file
3301         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3302         # to its proper name (with version) after linking.
3303         _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3304         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3305         # Commands to make compiler produce verbose output that lists
3306         # what "hidden" libraries, object files and flags are used when
3307         # linking a shared library.
3308         #
3309         # There doesn't appear to be a way to prevent this compiler from
3310         # explicitly linking system object files so we need to strip them
3311         # from the output so that they don't get included in the library
3312         # dependencies.
3313         output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3315         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3316         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3318         # Archives containing C++ object files must be created using
3319         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3320         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3321         ;;
3322       icpc*)
3323         # Intel C++
3324         with_gnu_ld=yes
3325         # version 8.0 and above of icpc choke on multiply defined symbols
3326         # if we add $predep_objects and $postdep_objects, however 7.1 and
3327         # earlier do not add the objects themselves.
3328         case `$CC -V 2>&1` in
3329         *"Version 7."*)
3330           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3331           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3332           ;;
3333         *)  # Version 8.0 or newer
3334           tmp_idyn=
3335           case $host_cpu in
3336             ia64*) tmp_idyn=' -i_dynamic';;
3337           esac
3338           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3339           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3340           ;;
3341         esac
3342         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3343         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3344         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3345         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3346         ;;
3347       pgCC*)
3348         # Portland Group C++ compiler
3349         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3350         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3352         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3353         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3354         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3355         ;;
3356       cxx*)
3357         # Compaq C++
3358         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3359         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3361         runpath_var=LD_RUN_PATH
3362         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3363         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3365         # Commands to make compiler produce verbose output that lists
3366         # what "hidden" libraries, object files and flags are used when
3367         # linking a shared library.
3368         #
3369         # There doesn't appear to be a way to prevent this compiler from
3370         # explicitly linking system object files so we need to strip them
3371         # from the output so that they don't get included in the library
3372         # dependencies.
3373         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3374         ;;
3375     esac
3376     ;;
3377   lynxos*)
3378     # FIXME: insert proper C++ library support
3379     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3380     ;;
3381   m88k*)
3382     # FIXME: insert proper C++ library support
3383     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3384     ;;
3385   mvs*)
3386     case $cc_basename in
3387       cxx*)
3388         # FIXME: insert proper C++ library support
3389         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3390         ;;
3391       *)
3392         # FIXME: insert proper C++ library support
3393         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3394         ;;
3395     esac
3396     ;;
3397   netbsd*)
3398     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3399       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3400       wlarc=
3401       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3402       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3403       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3404     fi
3405     # Workaround some broken pre-1.5 toolchains
3406     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3407     ;;
3408   openbsd2*)
3409     # C++ shared libraries are fairly broken
3410     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3411     ;;
3412   openbsd*)
3413     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3414     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3415     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3416     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3417     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3418       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3419       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3420       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3421     fi
3422     output_verbose_link_cmd='echo'
3423     ;;
3424   osf3*)
3425     case $cc_basename in
3426       KCC*)
3427         # Kuck and Associates, Inc. (KAI) C++ Compiler
3429         # KCC will only create a shared library if the output file
3430         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3431         # to its proper name (with version) after linking.
3432         _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3434         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3435         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3437         # Archives containing C++ object files must be created using
3438         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3439         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3441         ;;
3442       RCC*)
3443         # Rational C++ 2.4.1
3444         # FIXME: insert proper C++ library support
3445         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3446         ;;
3447       cxx*)
3448         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3449         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3451         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3452         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3454         # Commands to make compiler produce verbose output that lists
3455         # what "hidden" libraries, object files and flags are used when
3456         # linking a shared library.
3457         #
3458         # There doesn't appear to be a way to prevent this compiler from
3459         # explicitly linking system object files so we need to strip them
3460         # from the output so that they don't get included in the library
3461         # dependencies.
3462         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3463         ;;
3464       *)
3465         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3466           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3467           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3469           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3470           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3472           # Commands to make compiler produce verbose output that lists
3473           # what "hidden" libraries, object files and flags are used when
3474           # linking a shared library.
3475           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3477         else
3478           # FIXME: insert proper C++ library support
3479           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3480         fi
3481         ;;
3482     esac
3483     ;;
3484   osf4* | osf5*)
3485     case $cc_basename in
3486       KCC*)
3487         # Kuck and Associates, Inc. (KAI) C++ Compiler
3489         # KCC will only create a shared library if the output file
3490         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3491         # to its proper name (with version) after linking.
3492         _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3494         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3495         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3497         # Archives containing C++ object files must be created using
3498         # the KAI C++ compiler.
3499         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3500         ;;
3501       RCC*)
3502         # Rational C++ 2.4.1
3503         # FIXME: insert proper C++ library support
3504         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3505         ;;
3506       cxx*)
3507         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3508         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3509         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3510           echo "-hidden">> $lib.exp~
3511           $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3512           $rm $lib.exp'
3514         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3515         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3517         # Commands to make compiler produce verbose output that lists
3518         # what "hidden" libraries, object files and flags are used when
3519         # linking a shared library.
3520         #
3521         # There doesn't appear to be a way to prevent this compiler from
3522         # explicitly linking system object files so we need to strip them
3523         # from the output so that they don't get included in the library
3524         # dependencies.
3525         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3526         ;;
3527       *)
3528         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3529           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3530          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3532           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3533           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3535           # Commands to make compiler produce verbose output that lists
3536           # what "hidden" libraries, object files and flags are used when
3537           # linking a shared library.
3538           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3540         else
3541           # FIXME: insert proper C++ library support
3542           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3543         fi
3544         ;;
3545     esac
3546     ;;
3547   psos*)
3548     # FIXME: insert proper C++ library support
3549     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3550     ;;
3551   sunos4*)
3552     case $cc_basename in
3553       CC*)
3554         # Sun C++ 4.x
3555         # FIXME: insert proper C++ library support
3556         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3557         ;;
3558       lcc*)
3559         # Lucid
3560         # FIXME: insert proper C++ library support
3561         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3562         ;;
3563       *)
3564         # FIXME: insert proper C++ library support
3565         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3566         ;;
3567     esac
3568     ;;
3569   solaris*)
3570     case $cc_basename in
3571       CC*)
3572         # Sun C++ 4.2, 5.x and Centerline C++
3573         _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3574         _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3575         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3576         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3577         $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3579         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3580         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3581         case $host_os in
3582           solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3583           *)
3584             # The C++ compiler is used as linker so we must use $wl
3585             # flag to pass the commands to the underlying system
3586             # linker. We must also pass each convience library through
3587             # to the system linker between allextract/defaultextract.
3588             # The C++ compiler will combine linker options so we
3589             # cannot just pass the convience library names through
3590             # without $wl.
3591             # Supported since Solaris 2.6 (maybe 2.5.1?)
3592             _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3593             ;;
3594         esac
3595         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3597         output_verbose_link_cmd='echo'
3599         # Archives containing C++ object files must be created using
3600         # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3601         # necessary to make sure instantiated templates are included
3602         # in the archive.
3603         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3604         ;;
3605       gcx*)
3606         # Green Hills C++ Compiler
3607         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3609         # The C++ compiler must be used to create the archive.
3610         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3611         ;;
3612       *)
3613         # GNU C++ compiler with Solaris linker
3614         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3615           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3616           if $CC --version | grep -v '^2\.7' > /dev/null; then
3617             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3618             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3619                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3621             # Commands to make compiler produce verbose output that lists
3622             # what "hidden" libraries, object files and flags are used when
3623             # linking a shared library.
3624             output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3625           else
3626             # g++ 2.7 appears to require `-G' NOT `-shared' on this
3627             # platform.
3628             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3629             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3630                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3632             # Commands to make compiler produce verbose output that lists
3633             # what "hidden" libraries, object files and flags are used when
3634             # linking a shared library.
3635             output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3636           fi
3638           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3639         fi
3640         ;;
3641     esac
3642     ;;
3643   sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3644     _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3645     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3646     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3647     runpath_var='LD_RUN_PATH'
3649     case $cc_basename in
3650       CC*)
3651         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3652         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3653         ;;
3654       *)
3655         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3656         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3657         ;;
3658     esac
3659     ;;
3660   sysv5* | sco3.2v5* | sco5v6*)
3661     # Note: We can NOT use -z defs as we might desire, because we do not
3662     # link with -lc, and that would cause any symbols used from libc to
3663     # always be unresolved, which means just about no library would
3664     # ever link correctly.  If we're not using GNU ld we use -z text
3665     # though, which does catch some bad symbols but isn't as heavy-handed
3666     # as -z defs.
3667     # For security reasons, it is highly recommended that you always
3668     # use absolute paths for naming shared libraries, and exclude the
3669     # DT_RUNPATH tag from executables and libraries.  But doing so
3670     # requires that you compile everything twice, which is a pain.
3671     # So that behaviour is only enabled if SCOABSPATH is set to a
3672     # non-empty value in the environment.  Most likely only useful for
3673     # creating official distributions of packages.
3674     # This is a hack until libtool officially supports absolute path
3675     # names for shared libraries.
3676     _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3677     _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3678     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3679     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3680     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3681     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3682     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3683     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3684     runpath_var='LD_RUN_PATH'
3686     case $cc_basename in
3687       CC*)
3688         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3689         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3690         ;;
3691       *)
3692         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3693         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3694         ;;
3695     esac
3696     ;;
3697   tandem*)
3698     case $cc_basename in
3699       NCC*)
3700         # NonStop-UX NCC 3.20
3701         # FIXME: insert proper C++ library support
3702         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3703         ;;
3704       *)
3705         # FIXME: insert proper C++ library support
3706         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3707         ;;
3708     esac
3709     ;;
3710   vxworks*)
3711     # FIXME: insert proper C++ library support
3712     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3713     ;;
3714   *)
3715     # FIXME: insert proper C++ library support
3716     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3717     ;;
3718 esac
3719 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3720 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3722 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3723 _LT_AC_TAGVAR(LD, $1)="$LD"
3725 ## CAVEAT EMPTOR:
3726 ## There is no encapsulation within the following macros, do not change
3727 ## the running order or otherwise move them around unless you know exactly
3728 ## what you are doing...
3729 AC_LIBTOOL_POSTDEP_PREDEP($1)
3730 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3731 AC_LIBTOOL_PROG_CC_C_O($1)
3732 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3733 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3734 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3735 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3737 AC_LIBTOOL_CONFIG($1)
3739 AC_LANG_POP
3740 CC=$lt_save_CC
3741 LDCXX=$LD
3742 LD=$lt_save_LD
3743 GCC=$lt_save_GCC
3744 with_gnu_ldcxx=$with_gnu_ld
3745 with_gnu_ld=$lt_save_with_gnu_ld
3746 lt_cv_path_LDCXX=$lt_cv_path_LD
3747 lt_cv_path_LD=$lt_save_path_LD
3748 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3749 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3750 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3752 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3753 # ------------------------------------
3754 # Figure out "hidden" library dependencies from verbose
3755 # compiler output when linking a shared library.
3756 # Parse the compiler output and extract the necessary
3757 # objects, libraries and library flags.
3758 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3759 dnl we can't use the lt_simple_compile_test_code here,
3760 dnl because it contains code intended for an executable,
3761 dnl not a library.  It's possible we should let each
3762 dnl tag define a new lt_????_link_test_code variable,
3763 dnl but it's only used here...
3764 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3765 int a;
3766 void foo (void) { a = 0; }
3768 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3769 class Foo
3771 public:
3772   Foo (void) { a = 0; }
3773 private:
3774   int a;
3777 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3778       subroutine foo
3779       implicit none
3780       integer*4 a
3781       a=0
3782       return
3783       end
3785 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3786 public class foo {
3787   private int a;
3788   public void bar (void) {
3789     a = 0;
3790   }
3794 dnl Parse the compiler output and extract the necessary
3795 dnl objects, libraries and library flags.
3796 if AC_TRY_EVAL(ac_compile); then
3797   # Parse the compiler output and extract the necessary
3798   # objects, libraries and library flags.
3800   # Sentinel used to keep track of whether or not we are before
3801   # the conftest object file.
3802   pre_test_object_deps_done=no
3804   # The `*' in the case matches for architectures that use `case' in
3805   # $output_verbose_cmd can trigger glob expansion during the loop
3806   # eval without this substitution.
3807   output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3809   for p in `eval $output_verbose_link_cmd`; do
3810     case $p in
3812     -L* | -R* | -l*)
3813        # Some compilers place space between "-{L,R}" and the path.
3814        # Remove the space.
3815        if test $p = "-L" \
3816           || test $p = "-R"; then
3817          prev=$p
3818          continue
3819        else
3820          prev=
3821        fi
3823        if test "$pre_test_object_deps_done" = no; then
3824          case $p in
3825          -L* | -R*)
3826            # Internal compiler library paths should come after those
3827            # provided the user.  The postdeps already come after the
3828            # user supplied libs so there is no need to process them.
3829            if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3830              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3831            else
3832              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3833            fi
3834            ;;
3835          # The "-l" case would never come before the object being
3836          # linked, so don't bother handling this case.
3837          esac
3838        else
3839          if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3840            _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3841          else
3842            _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3843          fi
3844        fi
3845        ;;
3847     *.$objext)
3848        # This assumes that the test object file only shows up
3849        # once in the compiler output.
3850        if test "$p" = "conftest.$objext"; then
3851          pre_test_object_deps_done=yes
3852          continue
3853        fi
3855        if test "$pre_test_object_deps_done" = no; then
3856          if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3857            _LT_AC_TAGVAR(predep_objects, $1)="$p"
3858          else
3859            _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3860          fi
3861        else
3862          if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3863            _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3864          else
3865            _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3866          fi
3867        fi
3868        ;;
3870     *) ;; # Ignore the rest.
3872     esac
3873   done
3875   # Clean up.
3876   rm -f a.out a.exe
3877 else
3878   echo "libtool.m4: error: problem compiling $1 test program"
3881 $rm -f confest.$objext
3883 # PORTME: override above test on systems where it is broken
3884 ifelse([$1],[CXX],
3885 [case $host_os in
3886 interix3*)
3887   # Interix 3.5 installs completely hosed .la files for C++, so rather than
3888   # hack all around it, let's just trust "g++" to DTRT.
3889   _LT_AC_TAGVAR(predep_objects,$1)=
3890   _LT_AC_TAGVAR(postdep_objects,$1)=
3891   _LT_AC_TAGVAR(postdeps,$1)=
3892   ;;
3894 solaris*)
3895   case $cc_basename in
3896   CC*)
3897     # The more standards-conforming stlport4 library is
3898     # incompatible with the Cstd library. Avoid specifying
3899     # it if it's in CXXFLAGS. Ignore libCrun as
3900     # -library=stlport4 depends on it.
3901     case " $CXX $CXXFLAGS " in
3902     *" -library=stlport4 "*)
3903       solaris_use_stlport4=yes
3904       ;;
3905     esac
3907     # Adding this requires a known-good setup of shared libraries for
3908     # Sun compiler versions before 5.6, else PIC objects from an old
3909     # archive will be linked into the output, leading to subtle bugs.
3910     if test "$solaris_use_stlport4" != yes; then
3911       _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3912     fi
3913     ;;
3914   esac
3915   ;;
3916 esac
3919 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3920 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3921 esac
3922 ])# AC_LIBTOOL_POSTDEP_PREDEP
3924 # AC_LIBTOOL_LANG_F77_CONFIG
3925 # --------------------------
3926 # Ensure that the configuration vars for the C compiler are
3927 # suitably defined.  Those variables are subsequently used by
3928 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3929 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3930 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3931 [AC_REQUIRE([AC_PROG_F77])
3932 AC_LANG_PUSH(Fortran 77)
3934 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3935 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3936 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3937 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3938 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3939 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3940 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3941 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3942 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3943 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3944 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3945 _LT_AC_TAGVAR(module_cmds, $1)=
3946 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3947 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3948 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3949 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3950 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3951 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3953 # Source file extension for f77 test sources.
3954 ac_ext=f
3956 # Object file extension for compiled f77 test sources.
3957 objext=o
3958 _LT_AC_TAGVAR(objext, $1)=$objext
3960 # Code to be used in simple compile tests
3961 lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
3963 # Code to be used in simple link tests
3964 lt_simple_link_test_code="      program t\n      end\n"
3966 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3967 _LT_AC_SYS_COMPILER
3969 # save warnings/boilerplate of simple test code
3970 _LT_COMPILER_BOILERPLATE
3971 _LT_LINKER_BOILERPLATE
3973 # Allow CC to be a program name with arguments.
3974 lt_save_CC="$CC"
3975 CC=${F77-"f77"}
3976 compiler=$CC
3977 _LT_AC_TAGVAR(compiler, $1)=$CC
3978 _LT_CC_BASENAME([$compiler])
3980 AC_MSG_CHECKING([if libtool supports shared libraries])
3981 AC_MSG_RESULT([$can_build_shared])
3983 AC_MSG_CHECKING([whether to build shared libraries])
3984 test "$can_build_shared" = "no" && enable_shared=no
3986 # On AIX, shared libraries and static libraries use the same namespace, and
3987 # are all built from PIC.
3988 case $host_os in
3989 aix3*)
3990   test "$enable_shared" = yes && enable_static=no
3991   if test -n "$RANLIB"; then
3992     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3993     postinstall_cmds='$RANLIB $lib'
3994   fi
3995   ;;
3996 aix4* | aix5*)
3997   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3998     test "$enable_shared" = yes && enable_static=no
3999   fi
4000   ;;
4001 esac
4002 AC_MSG_RESULT([$enable_shared])
4004 AC_MSG_CHECKING([whether to build static libraries])
4005 # Make sure either enable_shared or enable_static is yes.
4006 test "$enable_shared" = yes || enable_static=yes
4007 AC_MSG_RESULT([$enable_static])
4009 _LT_AC_TAGVAR(GCC, $1)="$G77"
4010 _LT_AC_TAGVAR(LD, $1)="$LD"
4012 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4013 AC_LIBTOOL_PROG_CC_C_O($1)
4014 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4015 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4016 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4017 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4019 AC_LIBTOOL_CONFIG($1)
4021 AC_LANG_POP
4022 CC="$lt_save_CC"
4023 ])# AC_LIBTOOL_LANG_F77_CONFIG
4026 # AC_LIBTOOL_LANG_GCJ_CONFIG
4027 # --------------------------
4028 # Ensure that the configuration vars for the C compiler are
4029 # suitably defined.  Those variables are subsequently used by
4030 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4031 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4032 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4033 [AC_LANG_SAVE
4035 # Source file extension for Java test sources.
4036 ac_ext=java
4038 # Object file extension for compiled Java test sources.
4039 objext=o
4040 _LT_AC_TAGVAR(objext, $1)=$objext
4042 # Code to be used in simple compile tests
4043 lt_simple_compile_test_code="class foo {}\n"
4045 # Code to be used in simple link tests
4046 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4048 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4049 _LT_AC_SYS_COMPILER
4051 # save warnings/boilerplate of simple test code
4052 _LT_COMPILER_BOILERPLATE
4053 _LT_LINKER_BOILERPLATE
4055 # Allow CC to be a program name with arguments.
4056 lt_save_CC="$CC"
4057 CC=${GCJ-"gcj"}
4058 compiler=$CC
4059 _LT_AC_TAGVAR(compiler, $1)=$CC
4060 _LT_CC_BASENAME([$compiler])
4062 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4063 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4065 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4067 ## CAVEAT EMPTOR:
4068 ## There is no encapsulation within the following macros, do not change
4069 ## the running order or otherwise move them around unless you know exactly
4070 ## what you are doing...
4071 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4072 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4073 AC_LIBTOOL_PROG_CC_C_O($1)
4074 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4075 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4076 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4077 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4079 AC_LIBTOOL_CONFIG($1)
4081 AC_LANG_RESTORE
4082 CC="$lt_save_CC"
4083 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4086 # AC_LIBTOOL_LANG_RC_CONFIG
4087 # -------------------------
4088 # Ensure that the configuration vars for the Windows resource compiler are
4089 # suitably defined.  Those variables are subsequently used by
4090 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4091 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4092 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4093 [AC_LANG_SAVE
4095 # Source file extension for RC test sources.
4096 ac_ext=rc
4098 # Object file extension for compiled RC test sources.
4099 objext=o
4100 _LT_AC_TAGVAR(objext, $1)=$objext
4102 # Code to be used in simple compile tests
4103 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4105 # Code to be used in simple link tests
4106 lt_simple_link_test_code="$lt_simple_compile_test_code"
4108 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4109 _LT_AC_SYS_COMPILER
4111 # save warnings/boilerplate of simple test code
4112 _LT_COMPILER_BOILERPLATE
4113 _LT_LINKER_BOILERPLATE
4115 # Allow CC to be a program name with arguments.
4116 lt_save_CC="$CC"
4117 CC=${RC-"windres"}
4118 compiler=$CC
4119 _LT_AC_TAGVAR(compiler, $1)=$CC
4120 _LT_CC_BASENAME([$compiler])
4121 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4123 AC_LIBTOOL_CONFIG($1)
4125 AC_LANG_RESTORE
4126 CC="$lt_save_CC"
4127 ])# AC_LIBTOOL_LANG_RC_CONFIG
4130 # AC_LIBTOOL_CONFIG([TAGNAME])
4131 # ----------------------------
4132 # If TAGNAME is not passed, then create an initial libtool script
4133 # with a default configuration from the untagged config vars.  Otherwise
4134 # add code to config.status for appending the configuration named by
4135 # TAGNAME from the matching tagged config vars.
4136 AC_DEFUN([AC_LIBTOOL_CONFIG],
4137 [# The else clause should only fire when bootstrapping the
4138 # libtool distribution, otherwise you forgot to ship ltmain.sh
4139 # with your package, and you will get complaints that there are
4140 # no rules to generate ltmain.sh.
4141 if test -f "$ltmain"; then
4142   # See if we are running on zsh, and set the options which allow our commands through
4143   # without removal of \ escapes.
4144   if test -n "${ZSH_VERSION+set}" ; then
4145     setopt NO_GLOB_SUBST
4146   fi
4147   # Now quote all the things that may contain metacharacters while being
4148   # careful not to overquote the AC_SUBSTed values.  We take copies of the
4149   # variables and quote the copies for generation of the libtool script.
4150   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4151     SED SHELL STRIP \
4152     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4153     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4154     deplibs_check_method reload_flag reload_cmds need_locks \
4155     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4156     lt_cv_sys_global_symbol_to_c_name_address \
4157     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4158     old_postinstall_cmds old_postuninstall_cmds \
4159     _LT_AC_TAGVAR(compiler, $1) \
4160     _LT_AC_TAGVAR(CC, $1) \
4161     _LT_AC_TAGVAR(LD, $1) \
4162     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4163     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4164     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4165     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4166     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4167     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4168     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4169     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4170     _LT_AC_TAGVAR(old_archive_cmds, $1) \
4171     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4172     _LT_AC_TAGVAR(predep_objects, $1) \
4173     _LT_AC_TAGVAR(postdep_objects, $1) \
4174     _LT_AC_TAGVAR(predeps, $1) \
4175     _LT_AC_TAGVAR(postdeps, $1) \
4176     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4177     _LT_AC_TAGVAR(archive_cmds, $1) \
4178     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4179     _LT_AC_TAGVAR(postinstall_cmds, $1) \
4180     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4181     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4182     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4183     _LT_AC_TAGVAR(no_undefined_flag, $1) \
4184     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4185     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4186     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4187     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4188     _LT_AC_TAGVAR(hardcode_automatic, $1) \
4189     _LT_AC_TAGVAR(module_cmds, $1) \
4190     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4191     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4192     _LT_AC_TAGVAR(exclude_expsyms, $1) \
4193     _LT_AC_TAGVAR(include_expsyms, $1); do
4195     case $var in
4196     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4197     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4198     _LT_AC_TAGVAR(archive_cmds, $1) | \
4199     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4200     _LT_AC_TAGVAR(module_cmds, $1) | \
4201     _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4202     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4203     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4204     extract_expsyms_cmds | reload_cmds | finish_cmds | \
4205     postinstall_cmds | postuninstall_cmds | \
4206     old_postinstall_cmds | old_postuninstall_cmds | \
4207     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4208       # Double-quote double-evaled strings.
4209       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4210       ;;
4211     *)
4212       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4213       ;;
4214     esac
4215   done
4217   case $lt_echo in
4218   *'\[$]0 --fallback-echo"')
4219     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4220     ;;
4221   esac
4223 ifelse([$1], [],
4224   [cfgfile="${ofile}T"
4225   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4226   $rm -f "$cfgfile"
4227   AC_MSG_NOTICE([creating $ofile])],
4228   [cfgfile="$ofile"])
4230   cat <<__EOF__ >> "$cfgfile"
4231 ifelse([$1], [],
4232 [#! $SHELL
4234 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4235 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4236 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4238 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4239 # Free Software Foundation, Inc.
4241 # This file is part of GNU Libtool:
4242 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4244 # This program is free software; you can redistribute it and/or modify
4245 # it under the terms of the GNU General Public License as published by
4246 # the Free Software Foundation; either version 3 of the License, or
4247 # (at your option) any later version.
4249 # This program is distributed in the hope that it will be useful, but
4250 # WITHOUT ANY WARRANTY; without even the implied warranty of
4251 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4252 # General Public License for more details.
4254 # You should have received a copy of the GNU General Public License
4255 # along with this program; if not, write to the Free Software
4256 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4258 # As a special exception to the GNU General Public License, if you
4259 # distribute this file as part of a program that contains a
4260 # configuration script generated by Autoconf, you may include it under
4261 # the same distribution terms that you use for the rest of that program.
4263 # A sed program that does not truncate output.
4264 SED=$lt_SED
4266 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4267 Xsed="$SED -e 1s/^X//"
4269 # The HP-UX ksh and POSIX shell print the target directory to stdout
4270 # if CDPATH is set.
4271 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4273 # The names of the tagged configurations supported by this script.
4274 available_tags=
4276 # ### BEGIN LIBTOOL CONFIG],
4277 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4279 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4281 # Shell to use when invoking shell scripts.
4282 SHELL=$lt_SHELL
4284 # Whether or not to build shared libraries.
4285 build_libtool_libs=$enable_shared
4287 # Whether or not to build static libraries.
4288 build_old_libs=$enable_static
4290 # Whether or not to add -lc for building shared libraries.
4291 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4293 # Whether or not to disallow shared libs when runtime libs are static
4294 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4296 # Whether or not to optimize for fast installation.
4297 fast_install=$enable_fast_install
4299 # The host system.
4300 host_alias=$host_alias
4301 host=$host
4302 host_os=$host_os
4304 # The build system.
4305 build_alias=$build_alias
4306 build=$build
4307 build_os=$build_os
4309 # An echo program that does not interpret backslashes.
4310 echo=$lt_echo
4312 # The archiver.
4313 AR=$lt_AR
4314 AR_FLAGS=$lt_AR_FLAGS
4316 # A C compiler.
4317 LTCC=$lt_LTCC
4319 # LTCC compiler flags.
4320 LTCFLAGS=$lt_LTCFLAGS
4322 # A language-specific compiler.
4323 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4325 # Is the compiler the GNU C compiler?
4326 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4328 # An ERE matcher.
4329 EGREP=$lt_EGREP
4331 # The linker used to build libraries.
4332 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4334 # Whether we need hard or soft links.
4335 LN_S=$lt_LN_S
4337 # A BSD-compatible nm program.
4338 NM=$lt_NM
4340 # A symbol stripping program
4341 STRIP=$lt_STRIP
4343 # Used to examine libraries when file_magic_cmd begins "file"
4344 MAGIC_CMD=$MAGIC_CMD
4346 # Used on cygwin: DLL creation program.
4347 DLLTOOL="$DLLTOOL"
4349 # Used on cygwin: object dumper.
4350 OBJDUMP="$OBJDUMP"
4352 # Used on cygwin: assembler.
4353 AS="$AS"
4355 # The name of the directory that contains temporary libtool files.
4356 objdir=$objdir
4358 # How to create reloadable object files.
4359 reload_flag=$lt_reload_flag
4360 reload_cmds=$lt_reload_cmds
4362 # How to pass a linker flag through the compiler.
4363 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4365 # Object file suffix (normally "o").
4366 objext="$ac_objext"
4368 # Old archive suffix (normally "a").
4369 libext="$libext"
4371 # Shared library suffix (normally ".so").
4372 shrext_cmds='$shrext_cmds'
4374 # Executable file suffix (normally "").
4375 exeext="$exeext"
4377 # Additional compiler flags for building library objects.
4378 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4379 pic_mode=$pic_mode
4381 # What is the maximum length of a command?
4382 max_cmd_len=$lt_cv_sys_max_cmd_len
4384 # Does compiler simultaneously support -c and -o options?
4385 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4387 # Must we lock files when doing compilation?
4388 need_locks=$lt_need_locks
4390 # Do we need the lib prefix for modules?
4391 need_lib_prefix=$need_lib_prefix
4393 # Do we need a version for libraries?
4394 need_version=$need_version
4396 # Whether dlopen is supported.
4397 dlopen_support=$enable_dlopen
4399 # Whether dlopen of programs is supported.
4400 dlopen_self=$enable_dlopen_self
4402 # Whether dlopen of statically linked programs is supported.
4403 dlopen_self_static=$enable_dlopen_self_static
4405 # Compiler flag to prevent dynamic linking.
4406 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4408 # Compiler flag to turn off builtin functions.
4409 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4411 # Compiler flag to allow reflexive dlopens.
4412 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4414 # Compiler flag to generate shared objects directly from archives.
4415 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4417 # Compiler flag to generate thread-safe objects.
4418 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4420 # Library versioning type.
4421 version_type=$version_type
4423 # Format of library name prefix.
4424 libname_spec=$lt_libname_spec
4426 # List of archive names.  First name is the real one, the rest are links.
4427 # The last name is the one that the linker finds with -lNAME.
4428 library_names_spec=$lt_library_names_spec
4430 # The coded name of the library, if different from the real name.
4431 soname_spec=$lt_soname_spec
4433 # Commands used to build and install an old-style archive.
4434 RANLIB=$lt_RANLIB
4435 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4436 old_postinstall_cmds=$lt_old_postinstall_cmds
4437 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4439 # Create an old-style archive from a shared archive.
4440 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4442 # Create a temporary old-style archive to link instead of a shared archive.
4443 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4445 # Commands used to build and install a shared archive.
4446 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4447 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4448 postinstall_cmds=$lt_postinstall_cmds
4449 postuninstall_cmds=$lt_postuninstall_cmds
4451 # Commands used to build a loadable module (assumed same as above if empty)
4452 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4453 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4455 # Commands to strip libraries.
4456 old_striplib=$lt_old_striplib
4457 striplib=$lt_striplib
4459 # Dependencies to place before the objects being linked to create a
4460 # shared library.
4461 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4463 # Dependencies to place after the objects being linked to create a
4464 # shared library.
4465 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4467 # Dependencies to place before the objects being linked to create a
4468 # shared library.
4469 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4471 # Dependencies to place after the objects being linked to create a
4472 # shared library.
4473 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4475 # The library search path used internally by the compiler when linking
4476 # a shared library.
4477 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4479 # Method to check whether dependent libraries are shared objects.
4480 deplibs_check_method=$lt_deplibs_check_method
4482 # Command to use when deplibs_check_method == file_magic.
4483 file_magic_cmd=$lt_file_magic_cmd
4485 # Flag that allows shared libraries with undefined symbols to be built.
4486 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4488 # Flag that forces no undefined symbols.
4489 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4491 # Commands used to finish a libtool library installation in a directory.
4492 finish_cmds=$lt_finish_cmds
4494 # Same as above, but a single script fragment to be evaled but not shown.
4495 finish_eval=$lt_finish_eval
4497 # Take the output of nm and produce a listing of raw symbols and C names.
4498 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4500 # Transform the output of nm in a proper C declaration
4501 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4503 # Transform the output of nm in a C name address pair
4504 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4506 # This is the shared library runtime path variable.
4507 runpath_var=$runpath_var
4509 # This is the shared library path variable.
4510 shlibpath_var=$shlibpath_var
4512 # Is shlibpath searched before the hard-coded library search path?
4513 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4515 # How to hardcode a shared library path into an executable.
4516 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4518 # Whether we should hardcode library paths into libraries.
4519 hardcode_into_libs=$hardcode_into_libs
4521 # Flag to hardcode \$libdir into a binary during linking.
4522 # This must work even if \$libdir does not exist.
4523 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4525 # If ld is used when linking, flag to hardcode \$libdir into
4526 # a binary during linking. This must work even if \$libdir does
4527 # not exist.
4528 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4530 # Whether we need a single -rpath flag with a separated argument.
4531 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4533 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4534 # resulting binary.
4535 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4537 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4538 # resulting binary.
4539 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4541 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4542 # the resulting binary.
4543 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4545 # Set to yes if building a shared library automatically hardcodes DIR into the library
4546 # and all subsequent libraries and executables linked against it.
4547 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4549 # Variables whose values should be saved in libtool wrapper scripts and
4550 # restored at relink time.
4551 variables_saved_for_relink="$variables_saved_for_relink"
4553 # Whether libtool must link a program against all its dependency libraries.
4554 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4556 # Compile-time system search path for libraries
4557 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4559 # Run-time system search path for libraries
4560 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4562 # Fix the shell variable \$srcfile for the compiler.
4563 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4565 # Set to yes if exported symbols are required.
4566 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4568 # The commands to list exported symbols.
4569 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4571 # The commands to extract the exported symbol list from a shared archive.
4572 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4574 # Symbols that should not be listed in the preloaded symbols.
4575 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4577 # Symbols that must always be exported.
4578 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4580 ifelse([$1],[],
4581 [# ### END LIBTOOL CONFIG],
4582 [# ### END LIBTOOL TAG CONFIG: $tagname])
4584 __EOF__
4586 ifelse([$1],[], [
4587   case $host_os in
4588   aix3*)
4589     cat <<\EOF >> "$cfgfile"
4591 # AIX sometimes has problems with the GCC collect2 program.  For some
4592 # reason, if we set the COLLECT_NAMES environment variable, the problems
4593 # vanish in a puff of smoke.
4594 if test "X${COLLECT_NAMES+set}" != Xset; then
4595   COLLECT_NAMES=
4596   export COLLECT_NAMES
4599     ;;
4600   esac
4602   # We use sed instead of cat because bash on DJGPP gets confused if
4603   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4604   # text mode, it properly converts lines to CR/LF.  This bash problem
4605   # is reportedly fixed, but why not run on old versions too?
4606   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4608   mv -f "$cfgfile" "$ofile" || \
4609     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4610   chmod +x "$ofile"
4612 else
4613   # If there is no Makefile yet, we rely on a make rule to execute
4614   # `config.status --recheck' to rerun these tests and create the
4615   # libtool script then.
4616   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4617   if test -f "$ltmain_in"; then
4618     test -f Makefile && make "$ltmain"
4619   fi
4621 ])# AC_LIBTOOL_CONFIG
4624 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4625 # -------------------------------------------
4626 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4627 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4629 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4631 if test "$GCC" = yes; then
4632   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4634   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4635     lt_cv_prog_compiler_rtti_exceptions,
4636     [-fno-rtti -fno-exceptions], [],
4637     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4639 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4642 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4643 # ---------------------------------
4644 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4645 [AC_REQUIRE([AC_CANONICAL_HOST])
4646 AC_REQUIRE([AC_PROG_NM])
4647 AC_REQUIRE([AC_OBJEXT])
4648 # Check for command to grab the raw symbol name followed by C symbol from nm.
4649 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4650 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4652 # These are sane defaults that work on at least a few old systems.
4653 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4655 # Character class describing NM global symbol codes.
4656 symcode='[[BCDEGRST]]'
4658 # Regexp to match symbols that can be accessed directly from C.
4659 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4661 # Transform an extracted symbol line into a proper C declaration
4662 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4664 # Transform an extracted symbol line into symbol name and symbol address
4665 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4667 # Define system-specific variables.
4668 case $host_os in
4669 aix*)
4670   symcode='[[BCDT]]'
4671   ;;
4672 cygwin* | mingw* | pw32*)
4673   symcode='[[ABCDGISTW]]'
4674   ;;
4675 hpux*) # Its linker distinguishes data from code symbols
4676   if test "$host_cpu" = ia64; then
4677     symcode='[[ABCDEGRST]]'
4678   fi
4679   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4680   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4681   ;;
4682 linux*)
4683   if test "$host_cpu" = ia64; then
4684     symcode='[[ABCDGIRSTW]]'
4685     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4686     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4687   fi
4688   ;;
4689 irix* | nonstopux*)
4690   symcode='[[BCDEGRST]]'
4691   ;;
4692 osf*)
4693   symcode='[[BCDEGQRST]]'
4694   ;;
4695 solaris*)
4696   symcode='[[BDRT]]'
4697   ;;
4698 sco3.2v5*)
4699   symcode='[[DT]]'
4700   ;;
4701 sysv4.2uw2*)
4702   symcode='[[DT]]'
4703   ;;
4704 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4705   symcode='[[ABDT]]'
4706   ;;
4707 sysv4)
4708   symcode='[[DFNSTU]]'
4709   ;;
4710 esac
4712 # Handle CRLF in mingw tool chain
4713 opt_cr=
4714 case $build_os in
4715 mingw*)
4716   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4717   ;;
4718 esac
4720 # If we're using GNU nm, then use its standard symbol codes.
4721 case `$NM -V 2>&1` in
4722 *GNU* | *'with BFD'*)
4723   symcode='[[ABCDGIRSTW]]' ;;
4724 esac
4726 # Try without a prefix undercore, then with it.
4727 for ac_symprfx in "" "_"; do
4729   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4730   symxfrm="\\1 $ac_symprfx\\2 \\2"
4732   # Write the raw and C identifiers.
4733   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4735   # Check to see that the pipe works correctly.
4736   pipe_works=no
4738   rm -f conftest*
4739   cat > conftest.$ac_ext <<EOF
4740 #ifdef __cplusplus
4741 extern "C" {
4742 #endif
4743 char nm_test_var;
4744 void nm_test_func(){}
4745 #ifdef __cplusplus
4747 #endif
4748 int main(){nm_test_var='a';nm_test_func();return(0);}
4751   if AC_TRY_EVAL(ac_compile); then
4752     # Now try to grab the symbols.
4753     nlist=conftest.nm
4754     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4755       # Try sorting and uniquifying the output.
4756       if sort "$nlist" | uniq > "$nlist"T; then
4757         mv -f "$nlist"T "$nlist"
4758       else
4759         rm -f "$nlist"T
4760       fi
4762       # Make sure that we snagged all the symbols we need.
4763       if grep ' nm_test_var$' "$nlist" >/dev/null; then
4764         if grep ' nm_test_func$' "$nlist" >/dev/null; then
4765           cat <<EOF > conftest.$ac_ext
4766 #ifdef __cplusplus
4767 extern "C" {
4768 #endif
4771           # Now generate the symbol file.
4772           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4774           cat <<EOF >> conftest.$ac_ext
4775 #if defined (__STDC__) && __STDC__
4776 # define lt_ptr_t void *
4777 #else
4778 # define lt_ptr_t char *
4779 # define const
4780 #endif
4782 /* The mapping between symbol names and symbols. */
4783 const struct {
4784   const char *name;
4785   lt_ptr_t address;
4787 lt_preloaded_symbols[[]] =
4790           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4791           cat <<\EOF >> conftest.$ac_ext
4792   {0, (lt_ptr_t) 0}
4795 #ifdef __cplusplus
4797 #endif
4799           # Now try linking the two files.
4800           mv conftest.$ac_objext conftstm.$ac_objext
4801           lt_save_LIBS="$LIBS"
4802           lt_save_CFLAGS="$CFLAGS"
4803           LIBS="conftstm.$ac_objext"
4804           CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4805           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4806             pipe_works=yes
4807           fi
4808           LIBS="$lt_save_LIBS"
4809           CFLAGS="$lt_save_CFLAGS"
4810         else
4811           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4812         fi
4813       else
4814         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4815       fi
4816     else
4817       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4818     fi
4819   else
4820     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4821     cat conftest.$ac_ext >&5
4822   fi
4823   rm -f conftest* conftst*
4825   # Do not use the global_symbol_pipe unless it works.
4826   if test "$pipe_works" = yes; then
4827     break
4828   else
4829     lt_cv_sys_global_symbol_pipe=
4830   fi
4831 done
4833 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4834   lt_cv_sys_global_symbol_to_cdecl=
4836 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4837   AC_MSG_RESULT(failed)
4838 else
4839   AC_MSG_RESULT(ok)
4841 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4844 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4845 # ---------------------------------------
4846 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4847 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4848 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4849 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4851 AC_MSG_CHECKING([for $compiler option to produce PIC])
4852  ifelse([$1],[CXX],[
4853   # C++ specific cases for pic, static, wl, etc.
4854   if test "$GXX" = yes; then
4855     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4856     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4858     case $host_os in
4859     aix*)
4860       # All AIX code is PIC.
4861       if test "$host_cpu" = ia64; then
4862         # AIX 5 now supports IA64 processor
4863         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4864       fi
4865       ;;
4866     amigaos*)
4867       # FIXME: we need at least 68020 code to build shared libraries, but
4868       # adding the `-m68020' flag to GCC prevents building anything better,
4869       # like `-m68040'.
4870       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4871       ;;
4872     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4873       # PIC is the default for these OSes.
4874       ;;
4875     mingw* | os2* | pw32*)
4876       # This hack is so that the source file can tell whether it is being
4877       # built for inclusion in a dll (and should export symbols for example).
4878       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4879       ;;
4880     darwin* | rhapsody*)
4881       # PIC is the default on this platform
4882       # Common symbols not allowed in MH_DYLIB files
4883       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4884       ;;
4885     *djgpp*)
4886       # DJGPP does not support shared libraries at all
4887       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4888       ;;
4889     interix3*)
4890       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4891       # Instead, we relocate shared libraries at runtime.
4892       ;;
4893     sysv4*MP*)
4894       if test -d /usr/nec; then
4895         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4896       fi
4897       ;;
4898     hpux*)
4899       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4900       # not for PA HP-UX.
4901       case $host_cpu in
4902       hppa*64*|ia64*)
4903         ;;
4904       *)
4905         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4906         ;;
4907       esac
4908       ;;
4909     *)
4910       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4911       ;;
4912     esac
4913   else
4914     case $host_os in
4915       aix4* | aix5*)
4916         # All AIX code is PIC.
4917         if test "$host_cpu" = ia64; then
4918           # AIX 5 now supports IA64 processor
4919           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4920         else
4921           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4922         fi
4923         ;;
4924       chorus*)
4925         case $cc_basename in
4926         cxch68*)
4927           # Green Hills C++ Compiler
4928           # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4929           ;;
4930         esac
4931         ;;
4932        darwin*)
4933          # PIC is the default on this platform
4934          # Common symbols not allowed in MH_DYLIB files
4935          case $cc_basename in
4936            xlc*)
4937            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4938            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4939            ;;
4940          esac
4941        ;;
4942       dgux*)
4943         case $cc_basename in
4944           ec++*)
4945             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4946             ;;
4947           ghcx*)
4948             # Green Hills C++ Compiler
4949             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4950             ;;
4951           *)
4952             ;;
4953         esac
4954         ;;
4955       freebsd* | kfreebsd*-gnu | dragonfly*)
4956         # FreeBSD uses GNU C++
4957         ;;
4958       hpux9* | hpux10* | hpux11*)
4959         case $cc_basename in
4960           CC*)
4961             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4962             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4963             if test "$host_cpu" != ia64; then
4964               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4965             fi
4966             ;;
4967           aCC*)
4968             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4969             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4970             case $host_cpu in
4971             hppa*64*|ia64*)
4972               # +Z the default
4973               ;;
4974             *)
4975               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4976               ;;
4977             esac
4978             ;;
4979           *)
4980             ;;
4981         esac
4982         ;;
4983       interix*)
4984         # This is c89, which is MS Visual C++ (no shared libs)
4985         # Anyone wants to do a port?
4986         ;;
4987       irix5* | irix6* | nonstopux*)
4988         case $cc_basename in
4989           CC*)
4990             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4991             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4992             # CC pic flag -KPIC is the default.
4993             ;;
4994           *)
4995             ;;
4996         esac
4997         ;;
4998       linux*)
4999         case $cc_basename in
5000           KCC*)
5001             # KAI C++ Compiler
5002             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5003             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5004             ;;
5005           icpc* | ecpc*)
5006             # Intel C++
5007             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5008             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5009             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5010             ;;
5011           pgCC*)
5012             # Portland Group C++ compiler.
5013             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5014             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5015             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5016             ;;
5017           cxx*)
5018             # Compaq C++
5019             # Make sure the PIC flag is empty.  It appears that all Alpha
5020             # Linux and Compaq Tru64 Unix objects are PIC.
5021             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5022             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5023             ;;
5024           *)
5025             ;;
5026         esac
5027         ;;
5028       lynxos*)
5029         ;;
5030       m88k*)
5031         ;;
5032       mvs*)
5033         case $cc_basename in
5034           cxx*)
5035             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5036             ;;
5037           *)
5038             ;;
5039         esac
5040         ;;
5041       netbsd*)
5042         ;;
5043       osf3* | osf4* | osf5*)
5044         case $cc_basename in
5045           KCC*)
5046             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5047             ;;
5048           RCC*)
5049             # Rational C++ 2.4.1
5050             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5051             ;;
5052           cxx*)
5053             # Digital/Compaq C++
5054             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5055             # Make sure the PIC flag is empty.  It appears that all Alpha
5056             # Linux and Compaq Tru64 Unix objects are PIC.
5057             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5058             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5059             ;;
5060           *)
5061             ;;
5062         esac
5063         ;;
5064       psos*)
5065         ;;
5066       solaris*)
5067         case $cc_basename in
5068           CC*)
5069             # Sun C++ 4.2, 5.x and Centerline C++
5070             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5071             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5072             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5073             ;;
5074           gcx*)
5075             # Green Hills C++ Compiler
5076             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5077             ;;
5078           *)
5079             ;;
5080         esac
5081         ;;
5082       sunos4*)
5083         case $cc_basename in
5084           CC*)
5085             # Sun C++ 4.x
5086             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5087             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5088             ;;
5089           lcc*)
5090             # Lucid
5091             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5092             ;;
5093           *)
5094             ;;
5095         esac
5096         ;;
5097       tandem*)
5098         case $cc_basename in
5099           NCC*)
5100             # NonStop-UX NCC 3.20
5101             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5102             ;;
5103           *)
5104             ;;
5105         esac
5106         ;;
5107       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5108         case $cc_basename in
5109           CC*)
5110             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5111             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5112             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5113             ;;
5114         esac
5115         ;;
5116       vxworks*)
5117         ;;
5118       *)
5119         _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5120         ;;
5121     esac
5122   fi
5125   if test "$GCC" = yes; then
5126     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5127     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5129     case $host_os in
5130       aix*)
5131       # All AIX code is PIC.
5132       if test "$host_cpu" = ia64; then
5133         # AIX 5 now supports IA64 processor
5134         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5135       fi
5136       ;;
5138     amigaos*)
5139       # FIXME: we need at least 68020 code to build shared libraries, but
5140       # adding the `-m68020' flag to GCC prevents building anything better,
5141       # like `-m68040'.
5142       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5143       ;;
5145     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5146       # PIC is the default for these OSes.
5147       ;;
5149     mingw* | pw32* | os2*)
5150       # This hack is so that the source file can tell whether it is being
5151       # built for inclusion in a dll (and should export symbols for example).
5152       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5153       ;;
5155     darwin* | rhapsody*)
5156       # PIC is the default on this platform
5157       # Common symbols not allowed in MH_DYLIB files
5158       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5159       ;;
5161     interix3*)
5162       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5163       # Instead, we relocate shared libraries at runtime.
5164       ;;
5166     msdosdjgpp*)
5167       # Just because we use GCC doesn't mean we suddenly get shared libraries
5168       # on systems that don't support them.
5169       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5170       enable_shared=no
5171       ;;
5173     sysv4*MP*)
5174       if test -d /usr/nec; then
5175         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5176       fi
5177       ;;
5179     hpux*)
5180       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5181       # not for PA HP-UX.
5182       case $host_cpu in
5183       hppa*64*|ia64*)
5184         # +Z the default
5185         ;;
5186       *)
5187         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5188         ;;
5189       esac
5190       ;;
5192     *)
5193       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5194       ;;
5195     esac
5196   else
5197     # PORTME Check for flag to pass linker flags through the system compiler.
5198     case $host_os in
5199     aix*)
5200       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5201       if test "$host_cpu" = ia64; then
5202         # AIX 5 now supports IA64 processor
5203         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5204       else
5205         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5206       fi
5207       ;;
5208       darwin*)
5209         # PIC is the default on this platform
5210         # Common symbols not allowed in MH_DYLIB files
5211        case $cc_basename in
5212          xlc*)
5213          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5214          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5215          ;;
5216        esac
5217        ;;
5219     mingw* | pw32* | os2*)
5220       # This hack is so that the source file can tell whether it is being
5221       # built for inclusion in a dll (and should export symbols for example).
5222       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5223       ;;
5225     hpux9* | hpux10* | hpux11*)
5226       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5227       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5228       # not for PA HP-UX.
5229       case $host_cpu in
5230       hppa*64*|ia64*)
5231         # +Z the default
5232         ;;
5233       *)
5234         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5235         ;;
5236       esac
5237       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5238       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5239       ;;
5241     irix5* | irix6* | nonstopux*)
5242       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5243       # PIC (with -KPIC) is the default.
5244       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5245       ;;
5247     newsos6)
5248       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5249       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5250       ;;
5252     linux*)
5253       case $cc_basename in
5254       icc* | ecc*)
5255         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5256         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5257         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5258         ;;
5259       pgcc* | pgf77* | pgf90* | pgf95*)
5260         # Portland Group compilers (*not* the Pentium gcc compiler,
5261         # which looks to be a dead project)
5262         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5263         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5264         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5265         ;;
5266       ccc*)
5267         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5268         # All Alpha code is PIC.
5269         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5270         ;;
5271       esac
5272       ;;
5274     osf3* | osf4* | osf5*)
5275       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5276       # All OSF/1 code is PIC.
5277       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5278       ;;
5280     solaris*)
5281       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5282       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5283       case $cc_basename in
5284       f77* | f90* | f95*)
5285         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5286       *)
5287         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5288       esac
5289       ;;
5291     sunos4*)
5292       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5293       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5294       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5295       ;;
5297     sysv4 | sysv4.2uw2* | sysv4.3*)
5298       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5299       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5300       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5301       ;;
5303     sysv4*MP*)
5304       if test -d /usr/nec ;then
5305         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5306         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5307       fi
5308       ;;
5310     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5311       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5312       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5313       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5314       ;;
5316     unicos*)
5317       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5318       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5319       ;;
5321     uts4*)
5322       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5323       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5324       ;;
5326     *)
5327       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5328       ;;
5329     esac
5330   fi
5332 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5335 # Check to make sure the PIC flag actually works.
5337 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5338   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5339     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5340     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5341     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5342      "" | " "*) ;;
5343      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5344      esac],
5345     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5346      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5348 case $host_os in
5349   # For platforms which do not support PIC, -DPIC is meaningless:
5350   *djgpp*)
5351     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5352     ;;
5353   *)
5354     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5355     ;;
5356 esac
5359 # Check to make sure the static flag actually works.
5361 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5362 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5363   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5364   $lt_tmp_static_flag,
5365   [],
5366   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5370 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5371 # ------------------------------------
5372 # See if the linker supports building shared libraries.
5373 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5374 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5375 ifelse([$1],[CXX],[
5376   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5377   case $host_os in
5378   aix4* | aix5*)
5379     # If we're using GNU nm, then we don't want the "-C" option.
5380     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5381     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5382       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5383     else
5384       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5385     fi
5386     ;;
5387   pw32*)
5388     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5389   ;;
5390   cygwin* | mingw*)
5391     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5392   ;;
5393   *)
5394     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5395   ;;
5396   esac
5398   runpath_var=
5399   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5400   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5401   _LT_AC_TAGVAR(archive_cmds, $1)=
5402   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5403   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5404   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5405   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5406   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5407   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5408   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5409   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5410   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5411   _LT_AC_TAGVAR(hardcode_direct, $1)=no
5412   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5413   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5414   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5415   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5416   _LT_AC_TAGVAR(module_cmds, $1)=
5417   _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5418   _LT_AC_TAGVAR(always_export_symbols, $1)=no
5419   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5420   # include_expsyms should be a list of space-separated symbols to be *always*
5421   # included in the symbol list
5422   _LT_AC_TAGVAR(include_expsyms, $1)=
5423   # exclude_expsyms can be an extended regexp of symbols to exclude
5424   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5425   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5426   # as well as any symbol that contains `d'.
5427   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5428   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5429   # platforms (ab)use it in PIC code, but their linkers get confused if
5430   # the symbol is explicitly referenced.  Since portable code cannot
5431   # rely on this symbol name, it's probably fine to never include it in
5432   # preloaded symbol tables.
5433   extract_expsyms_cmds=
5434   # Just being paranoid about ensuring that cc_basename is set.
5435   _LT_CC_BASENAME([$compiler])
5436   case $host_os in
5437   cygwin* | mingw* | pw32*)
5438     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5439     # When not using gcc, we currently assume that we are using
5440     # Microsoft Visual C++.
5441     if test "$GCC" != yes; then
5442       with_gnu_ld=no
5443     fi
5444     ;;
5445   interix*)
5446     # we just hope/assume this is gcc and not c89 (= MSVC++)
5447     with_gnu_ld=yes
5448     ;;
5449   openbsd*)
5450     with_gnu_ld=no
5451     ;;
5452   esac
5454   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5455   if test "$with_gnu_ld" = yes; then
5456     # If archive_cmds runs LD, not CC, wlarc should be empty
5457     wlarc='${wl}'
5459     # Set some defaults for GNU ld with shared library support. These
5460     # are reset later if shared libraries are not supported. Putting them
5461     # here allows them to be overridden if necessary.
5462     runpath_var=LD_RUN_PATH
5463     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5464     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5465     # ancient GNU ld didn't support --whole-archive et. al.
5466     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5467         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5468       else
5469         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5470     fi
5471     supports_anon_versioning=no
5472     case `$LD -v 2>/dev/null` in
5473       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5474       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5475       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5476       *\ 2.11.*) ;; # other 2.11 versions
5477       *) supports_anon_versioning=yes ;;
5478     esac
5480     # See if GNU ld supports shared libraries.
5481     case $host_os in
5482     aix3* | aix4* | aix5*)
5483       # On AIX/PPC, the GNU linker is very broken
5484       if test "$host_cpu" != ia64; then
5485         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5486         cat <<EOF 1>&2
5488 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5489 *** to be unable to reliably create shared libraries on AIX.
5490 *** Therefore, libtool is disabling shared libraries support.  If you
5491 *** really care for shared libraries, you may want to modify your PATH
5492 *** so that a non-GNU linker is found, and then restart.
5495       fi
5496       ;;
5498     amigaos*)
5499       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5500       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5501       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5503       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5504       # that the semantics of dynamic libraries on AmigaOS, at least up
5505       # to version 4, is to share data among multiple programs linked
5506       # with the same dynamic library.  Since this doesn't match the
5507       # behavior of shared libraries on other platforms, we can't use
5508       # them.
5509       _LT_AC_TAGVAR(ld_shlibs, $1)=no
5510       ;;
5512     beos*)
5513       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5514         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5515         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5516         # support --undefined.  This deserves some investigation.  FIXME
5517         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5518       else
5519         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5520       fi
5521       ;;
5523     cygwin* | mingw* | pw32*)
5524       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5525       # as there is no search path for DLLs.
5526       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5527       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5528       _LT_AC_TAGVAR(always_export_symbols, $1)=no
5529       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5530       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5532       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5533         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5534         # If the export-symbols file already is a .def file (1st line
5535         # is EXPORTS), use it as is; otherwise, prepend...
5536         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5537           cp $export_symbols $output_objdir/$soname.def;
5538         else
5539           echo EXPORTS > $output_objdir/$soname.def;
5540           cat $export_symbols >> $output_objdir/$soname.def;
5541         fi~
5542         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5543       else
5544         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5545       fi
5546       ;;
5548     interix3*)
5549       _LT_AC_TAGVAR(hardcode_direct, $1)=no
5550       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5551       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5552       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5553       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5554       # Instead, shared libraries are loaded at an image base (0x10000000 by
5555       # default) and relocated if they conflict, which is a slow very memory
5556       # consuming and fragmenting process.  To avoid this, we pick a random,
5557       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5558       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5559       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5560       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5561       ;;
5563     linux*)
5564       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5565         tmp_addflag=
5566         case $cc_basename,$host_cpu in
5567         pgcc*)                          # Portland Group C compiler
5568           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5569           tmp_addflag=' $pic_flag'
5570           ;;
5571         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
5572           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5573           tmp_addflag=' $pic_flag -Mnomain' ;;
5574         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
5575           tmp_addflag=' -i_dynamic' ;;
5576         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5577           tmp_addflag=' -i_dynamic -nofor_main' ;;
5578         ifc* | ifort*)                  # Intel Fortran compiler
5579           tmp_addflag=' -nofor_main' ;;
5580         esac
5581         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5583         if test $supports_anon_versioning = yes; then
5584           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5585   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5586   $echo "local: *; };" >> $output_objdir/$libname.ver~
5587           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5588         fi
5589       else
5590         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5591       fi
5592       ;;
5594     netbsd*)
5595       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5596         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5597         wlarc=
5598       else
5599         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5600         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5601       fi
5602       ;;
5604     solaris*)
5605       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5606         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5607         cat <<EOF 1>&2
5609 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5610 *** create shared libraries on Solaris systems.  Therefore, libtool
5611 *** is disabling shared libraries support.  We urge you to upgrade GNU
5612 *** binutils to release 2.9.1 or newer.  Another option is to modify
5613 *** your PATH or compiler configuration so that the native linker is
5614 *** used, and then restart.
5617       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5618         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5619         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5620       else
5621         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5622       fi
5623       ;;
5625     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5626       case `$LD -v 2>&1` in
5627         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
5628         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5629         cat <<_LT_EOF 1>&2
5631 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5632 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5633 *** is disabling shared libraries support.  We urge you to upgrade GNU
5634 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5635 *** your PATH or compiler configuration so that the native linker is
5636 *** used, and then restart.
5638 _LT_EOF
5639         ;;
5640         *)
5641           if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5642             _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5643             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5644             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5645           else
5646             _LT_AC_TAGVAR(ld_shlibs, $1)=no
5647           fi
5648         ;;
5649       esac
5650       ;;
5652     sunos4*)
5653       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5654       wlarc=
5655       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5656       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5657       ;;
5659     *)
5660       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5661         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5662         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5663       else
5664         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5665       fi
5666       ;;
5667     esac
5669     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5670       runpath_var=
5671       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5672       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5673       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5674     fi
5675   else
5676     # PORTME fill in a description of your system's linker (not GNU ld)
5677     case $host_os in
5678     aix3*)
5679       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5680       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5681       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5682       # Note: this linker hardcodes the directories in LIBPATH if there
5683       # are no directories specified by -L.
5684       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5685       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5686         # Neither direct hardcoding nor static linking is supported with a
5687         # broken collect2.
5688         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5689       fi
5690       ;;
5692     aix4* | aix5*)
5693       if test "$host_cpu" = ia64; then
5694         # On IA64, the linker does run time linking by default, so we don't
5695         # have to do anything special.
5696         aix_use_runtimelinking=no
5697         exp_sym_flag='-Bexport'
5698         no_entry_flag=""
5699       else
5700         # If we're using GNU nm, then we don't want the "-C" option.
5701         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5702         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5703           _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5704         else
5705           _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5706         fi
5707         aix_use_runtimelinking=no
5709         # Test if we are trying to use run time linking or normal
5710         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5711         # need to do runtime linking.
5712         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5713           for ld_flag in $LDFLAGS; do
5714           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5715             aix_use_runtimelinking=yes
5716             break
5717           fi
5718           done
5719           ;;
5720         esac
5722         exp_sym_flag='-bexport'
5723         no_entry_flag='-bnoentry'
5724       fi
5726       # When large executables or shared objects are built, AIX ld can
5727       # have problems creating the table of contents.  If linking a library
5728       # or program results in "error TOC overflow" add -mminimal-toc to
5729       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5730       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5732       _LT_AC_TAGVAR(archive_cmds, $1)=''
5733       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5734       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5735       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5737       if test "$GCC" = yes; then
5738         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5739         # We only want to do this on AIX 4.2 and lower, the check
5740         # below for broken collect2 doesn't work under 4.3+
5741           collect2name=`${CC} -print-prog-name=collect2`
5742           if test -f "$collect2name" && \
5743            strings "$collect2name" | grep resolve_lib_name >/dev/null
5744           then
5745           # We have reworked collect2
5746           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5747           else
5748           # We have old collect2
5749           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5750           # It fails to find uninstalled libraries when the uninstalled
5751           # path is not listed in the libpath.  Setting hardcode_minus_L
5752           # to unsupported forces relinking
5753           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5754           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5755           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5756           fi
5757           ;;
5758         esac
5759         shared_flag='-shared'
5760         if test "$aix_use_runtimelinking" = yes; then
5761           shared_flag="$shared_flag "'${wl}-G'
5762         fi
5763       else
5764         # not using gcc
5765         if test "$host_cpu" = ia64; then
5766         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5767         # chokes on -Wl,-G. The following line is correct:
5768           shared_flag='-G'
5769         else
5770           if test "$aix_use_runtimelinking" = yes; then
5771             shared_flag='${wl}-G'
5772           else
5773             shared_flag='${wl}-bM:SRE'
5774           fi
5775         fi
5776       fi
5778       # It seems that -bexpall does not export symbols beginning with
5779       # underscore (_), so it is better to generate a list of symbols to export.
5780       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5781       if test "$aix_use_runtimelinking" = yes; then
5782         # Warning - without using the other runtime loading flags (-brtl),
5783         # -berok will link without error, but may produce a broken library.
5784         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5785        # Determine the default libpath from the value encoded in an empty executable.
5786        _LT_AC_SYS_LIBPATH_AIX
5787        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5788         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5789        else
5790         if test "$host_cpu" = ia64; then
5791           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5792           _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5793           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5794         else
5795          # Determine the default libpath from the value encoded in an empty executable.
5796          _LT_AC_SYS_LIBPATH_AIX
5797          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5798           # Warning - without using the other run time loading flags,
5799           # -berok will link without error, but may produce a broken library.
5800           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5801           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5802           # Exported symbols can be pulled into shared objects from archives
5803           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5804           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5805           # This is similar to how AIX traditionally builds its shared libraries.
5806           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5807         fi
5808       fi
5809       ;;
5811     amigaos*)
5812       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5813       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5814       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5815       # see comment about different semantics on the GNU ld section
5816       _LT_AC_TAGVAR(ld_shlibs, $1)=no
5817       ;;
5819     bsdi[[45]]*)
5820       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5821       ;;
5823     cygwin* | mingw* | pw32*)
5824       # When not using gcc, we currently assume that we are using
5825       # Microsoft Visual C++.
5826       # hardcode_libdir_flag_spec is actually meaningless, as there is
5827       # no search path for DLLs.
5828       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5829       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5830       # Tell ltmain to make .lib files, not .a files.
5831       libext=lib
5832       # Tell ltmain to make .dll files, not .so files.
5833       shrext_cmds=".dll"
5834       # FIXME: Setting linknames here is a bad hack.
5835       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5836       # The linker will automatically build a .lib file if we build a DLL.
5837       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5838       # FIXME: Should let the user specify the lib program.
5839       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5840       _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5841       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5842       ;;
5844     darwin* | rhapsody*)
5845       case $host_os in
5846         rhapsody* | darwin1.[[012]])
5847          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5848          ;;
5849        *) # Darwin 1.3 on
5850          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5851            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5852          else
5853            case ${MACOSX_DEPLOYMENT_TARGET} in
5854              10.[[012]])
5855                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5856                ;;
5857              10.*)
5858                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5859                ;;
5860            esac
5861          fi
5862          ;;
5863       esac
5864       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5865       _LT_AC_TAGVAR(hardcode_direct, $1)=no
5866       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5867       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5868       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5869       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5870     if test "$GCC" = yes ; then
5871         output_verbose_link_cmd='echo'
5872         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5873       _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5874       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5875       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5876       _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5877     else
5878       case $cc_basename in
5879         xlc*)
5880          output_verbose_link_cmd='echo'
5881          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5882          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5883           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5884          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5885           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5886           ;;
5887        *)
5888          _LT_AC_TAGVAR(ld_shlibs, $1)=no
5889           ;;
5890       esac
5891     fi
5892       ;;
5894     dgux*)
5895       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5896       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5897       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5898       ;;
5900     freebsd1*)
5901       _LT_AC_TAGVAR(ld_shlibs, $1)=no
5902       ;;
5904     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5905     # support.  Future versions do this automatically, but an explicit c++rt0.o
5906     # does not break anything, and helps significantly (at the cost of a little
5907     # extra space).
5908     freebsd2.2*)
5909       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5910       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5911       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5912       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5913       ;;
5915     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5916     freebsd2*)
5917       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5918       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5919       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5920       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5921       ;;
5923     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5924     freebsd* | kfreebsd*-gnu | dragonfly*)
5925       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5926       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5927       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5928       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5929       ;;
5931     hpux9*)
5932       if test "$GCC" = yes; then
5933         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5934       else
5935         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5936       fi
5937       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5938       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5939       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5941       # hardcode_minus_L: Not really in the search PATH,
5942       # but as the default location of the library.
5943       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5944       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5945       ;;
5947     hpux10*)
5948       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5949         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5950       else
5951         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5952       fi
5953       if test "$with_gnu_ld" = no; then
5954         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5955         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5957         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5958         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5960         # hardcode_minus_L: Not really in the search PATH,
5961         # but as the default location of the library.
5962         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5963       fi
5964       ;;
5966     hpux11*)
5967       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5968         case $host_cpu in
5969         hppa*64*)
5970           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5971           ;;
5972         ia64*)
5973           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5974           ;;
5975         *)
5976           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5977           ;;
5978         esac
5979       else
5980         case $host_cpu in
5981         hppa*64*)
5982           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5983           ;;
5984         ia64*)
5985           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5986           ;;
5987         *)
5988           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5989           ;;
5990         esac
5991       fi
5992       if test "$with_gnu_ld" = no; then
5993         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5994         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5996         case $host_cpu in
5997         hppa*64*|ia64*)
5998           _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5999           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6000           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6001           ;;
6002         *)
6003           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6004           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6006           # hardcode_minus_L: Not really in the search PATH,
6007           # but as the default location of the library.
6008           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6009           ;;
6010         esac
6011       fi
6012       ;;
6014     irix5* | irix6* | nonstopux*)
6015       if test "$GCC" = yes; then
6016         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6017       else
6018         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6019         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6020       fi
6021       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6022       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6023       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6024       ;;
6026     netbsd*)
6027       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6028         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6029       else
6030         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6031       fi
6032       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6033       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6034       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6035       ;;
6037     newsos6)
6038       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6039       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6040       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6041       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6042       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6043       ;;
6045     openbsd*)
6046       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6047       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6048       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6049         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6050         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6051         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6052         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6053       else
6054        case $host_os in
6055          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6056            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6057            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6058            ;;
6059          *)
6060            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6061            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6062            ;;
6063        esac
6064       fi
6065       ;;
6067     os2*)
6068       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6069       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6070       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6071       _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6072       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6073       ;;
6075     osf3*)
6076       if test "$GCC" = yes; then
6077         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6078         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6079       else
6080         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6081         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6082       fi
6083       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6084       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6085       ;;
6087     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6088       if test "$GCC" = yes; then
6089         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6090         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6091         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6092       else
6093         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6094         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6095         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6096         $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6098         # Both c and cxx compiler support -rpath directly
6099         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6100       fi
6101       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6102       ;;
6104     solaris*)
6105       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6106       if test "$GCC" = yes; then
6107         wlarc='${wl}'
6108         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6109         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6110           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6111       else
6112         wlarc=''
6113         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6114         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6115         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6116       fi
6117       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6118       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6119       case $host_os in
6120       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6121       *)
6122         # The compiler driver will combine linker options so we
6123         # cannot just pass the convience library names through
6124         # without $wl, iff we do not link with $LD.
6125         # Luckily, gcc supports the same syntax we need for Sun Studio.
6126         # Supported since Solaris 2.6 (maybe 2.5.1?)
6127         case $wlarc in
6128         '')
6129           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6130         *)
6131           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6132         esac ;;
6133       esac
6134       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6135       ;;
6137     sunos4*)
6138       if test "x$host_vendor" = xsequent; then
6139         # Use $CC to link under sequent, because it throws in some extra .o
6140         # files that make .init and .fini sections work.
6141         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6142       else
6143         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6144       fi
6145       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6146       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6147       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6148       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6149       ;;
6151     sysv4)
6152       case $host_vendor in
6153         sni)
6154           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6155           _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6156         ;;
6157         siemens)
6158           ## LD is ld it makes a PLAMLIB
6159           ## CC just makes a GrossModule.
6160           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6161           _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6162           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6163         ;;
6164         motorola)
6165           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6166           _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6167         ;;
6168       esac
6169       runpath_var='LD_RUN_PATH'
6170       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6171       ;;
6173     sysv4.3*)
6174       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6175       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6176       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6177       ;;
6179     sysv4*MP*)
6180       if test -d /usr/nec; then
6181         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6182         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6183         runpath_var=LD_RUN_PATH
6184         hardcode_runpath_var=yes
6185         _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6186       fi
6187       ;;
6189     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6190       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6191       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6192       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6193       runpath_var='LD_RUN_PATH'
6195       if test "$GCC" = yes; then
6196         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6197         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6198       else
6199         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6200         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6201       fi
6202       ;;
6204     sysv5* | sco3.2v5* | sco5v6*)
6205       # Note: We can NOT use -z defs as we might desire, because we do not
6206       # link with -lc, and that would cause any symbols used from libc to
6207       # always be unresolved, which means just about no library would
6208       # ever link correctly.  If we're not using GNU ld we use -z text
6209       # though, which does catch some bad symbols but isn't as heavy-handed
6210       # as -z defs.
6211       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6212       _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6213       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6214       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6215       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6216       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6217       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6218       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6219       runpath_var='LD_RUN_PATH'
6221       if test "$GCC" = yes; then
6222         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6223         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6224       else
6225         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6226         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6227       fi
6228       ;;
6230     uts4*)
6231       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6232       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6233       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6234       ;;
6236     *)
6237       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6238       ;;
6239     esac
6240   fi
6242 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6243 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6246 # Do we need to explicitly link libc?
6248 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6249 x|xyes)
6250   # Assume -lc should be added
6251   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6253   if test "$enable_shared" = yes && test "$GCC" = yes; then
6254     case $_LT_AC_TAGVAR(archive_cmds, $1) in
6255     *'~'*)
6256       # FIXME: we may have to deal with multi-command sequences.
6257       ;;
6258     '$CC '*)
6259       # Test whether the compiler implicitly links with -lc since on some
6260       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6261       # to ld, don't add -lc before -lgcc.
6262       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6263       $rm conftest*
6264       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6266       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6267         soname=conftest
6268         lib=conftest
6269         libobjs=conftest.$ac_objext
6270         deplibs=
6271         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6272         pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6273         compiler_flags=-v
6274         linker_flags=-v
6275         verstring=
6276         output_objdir=.
6277         libname=conftest
6278         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6279         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6280         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6281         then
6282           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6283         else
6284           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6285         fi
6286         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6287       else
6288         cat conftest.err 1>&5
6289       fi
6290       $rm conftest*
6291       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6292       ;;
6293     esac
6294   fi
6295   ;;
6296 esac
6297 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6300 # _LT_AC_FILE_LTDLL_C
6301 # -------------------
6302 # Be careful that the start marker always follows a newline.
6303 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6304 # /* ltdll.c starts here */
6305 # #define WIN32_LEAN_AND_MEAN
6306 # #include <windows.h>
6307 # #undef WIN32_LEAN_AND_MEAN
6308 # #include <stdio.h>
6310 # #ifndef __CYGWIN__
6311 # #  ifdef __CYGWIN32__
6312 # #    define __CYGWIN__ __CYGWIN32__
6313 # #  endif
6314 # #endif
6316 # #ifdef __cplusplus
6317 # extern "C" {
6318 # #endif
6319 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6320 # #ifdef __cplusplus
6321 # }
6322 # #endif
6324 # #ifdef __CYGWIN__
6325 # #include <cygwin/cygwin_dll.h>
6326 # DECLARE_CYGWIN_DLL( DllMain );
6327 # #endif
6328 # HINSTANCE __hDllInstance_base;
6330 # BOOL APIENTRY
6331 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6332 # {
6333 #   __hDllInstance_base = hInst;
6334 #   return TRUE;
6335 # }
6336 # /* ltdll.c ends here */
6337 ])# _LT_AC_FILE_LTDLL_C
6340 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6341 # ---------------------------------
6342 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6345 # old names
6346 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6347 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6348 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6349 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6350 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6351 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6352 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6354 # This is just to silence aclocal about the macro not being used
6355 ifelse([AC_DISABLE_FAST_INSTALL])
6357 AC_DEFUN([LT_AC_PROG_GCJ],
6358 [AC_CHECK_TOOL(GCJ, gcj, no)
6359   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6360   AC_SUBST(GCJFLAGS)
6363 AC_DEFUN([LT_AC_PROG_RC],
6364 [AC_CHECK_TOOL(RC, windres, no)
6367 ############################################################
6368 # NOTE: This macro has been submitted for inclusion into   #
6369 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6370 #  a released version of Autoconf we should remove this    #
6371 #  macro and use it instead.                               #
6372 ############################################################
6373 # LT_AC_PROG_SED
6374 # --------------
6375 # Check for a fully-functional sed program, that truncates
6376 # as few characters as possible.  Prefer GNU sed if found.
6377 AC_DEFUN([LT_AC_PROG_SED],
6378 [AC_MSG_CHECKING([for a sed that does not truncate output])
6379 AC_CACHE_VAL(lt_cv_path_SED,
6380 [# Loop through the user's path and test for sed and gsed.
6381 # Then use that list of sed's as ones to test for truncation.
6382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6383 for as_dir in $PATH
6385   IFS=$as_save_IFS
6386   test -z "$as_dir" && as_dir=.
6387   for lt_ac_prog in sed gsed; do
6388     for ac_exec_ext in '' $ac_executable_extensions; do
6389       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6390         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6391       fi
6392     done
6393   done
6394 done
6395 lt_ac_max=0
6396 lt_ac_count=0
6397 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6398 # along with /bin/sed that truncates output.
6399 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6400   test ! -f $lt_ac_sed && continue
6401   cat /dev/null > conftest.in
6402   lt_ac_count=0
6403   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6404   # Check for GNU sed and select it if it is found.
6405   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6406     lt_cv_path_SED=$lt_ac_sed
6407     break
6408   fi
6409   while true; do
6410     cat conftest.in conftest.in >conftest.tmp
6411     mv conftest.tmp conftest.in
6412     cp conftest.in conftest.nl
6413     echo >>conftest.nl
6414     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6415     cmp -s conftest.out conftest.nl || break
6416     # 10000 chars as input seems more than enough
6417     test $lt_ac_count -gt 10 && break
6418     lt_ac_count=`expr $lt_ac_count + 1`
6419     if test $lt_ac_count -gt $lt_ac_max; then
6420       lt_ac_max=$lt_ac_count
6421       lt_cv_path_SED=$lt_ac_sed
6422     fi
6423   done
6424 done
6426 SED=$lt_cv_path_SED
6427 AC_MSG_RESULT([$SED])
6429 ## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
6430 ## Copyright (C) 1999-2000 Free Software Foundation, Inc.
6432 ## This file is free software; the Free Software Foundation gives
6433 ## unlimited permission to copy and/or distribute it, with or without
6434 ## modifications, as long as this notice is preserved.
6436 # AC_WITH_LTDL
6437 # ------------
6438 # Clients of libltdl can use this macro to allow the installer to
6439 # choose between a shipped copy of the ltdl sources or a preinstalled
6440 # version of the library.
6441 AC_DEFUN([AC_WITH_LTDL],
6442 [AC_REQUIRE([AC_LIB_LTDL])
6443 AC_SUBST([LIBLTDL])
6444 AC_SUBST([INCLTDL])
6446 # Unless the user asks us to check, assume no installed ltdl exists.
6447 use_installed_libltdl=no
6449 AC_ARG_WITH([included_ltdl],
6450     [  --with-included-ltdl    use the GNU ltdl sources included here])
6452 if test "x$with_included_ltdl" != xyes; then
6453   # We are not being forced to use the included libltdl sources, so
6454   # decide whether there is a useful installed version we can use.
6455   AC_CHECK_HEADER([ltdl.h],
6456       [AC_CHECK_LIB([ltdl], [lt_dlcaller_register],
6457           [with_included_ltdl=no],
6458           [with_included_ltdl=yes])
6459   ])
6462 if test "x$enable_ltdl_install" != xyes; then
6463   # If the user did not specify an installable libltdl, then default
6464   # to a convenience lib.
6465   AC_LIBLTDL_CONVENIENCE
6468 if test "x$with_included_ltdl" = xno; then
6469   # If the included ltdl is not to be used. then Use the
6470   # preinstalled libltdl we found.
6471   AC_DEFINE([HAVE_LTDL], [1],
6472     [Define this if a modern libltdl is already installed])
6473   LIBLTDL=-lltdl
6476 # Report our decision...
6477 AC_MSG_CHECKING([whether to use included libltdl])
6478 AC_MSG_RESULT([$with_included_ltdl])
6480 dnl AC_CONFIG_SUBDIRS([libltdl])
6481 ])# AC_WITH_LTDL
6484 # AC_LIB_LTDL
6485 # -----------
6486 # Perform all the checks necessary for compilation of the ltdl objects
6487 #  -- including compiler checks and header checks.
6488 AC_DEFUN([AC_LIB_LTDL],
6489 [AC_PREREQ(2.50)
6490 AC_REQUIRE([AC_PROG_CC])
6491 AC_REQUIRE([AC_C_CONST])
6492 AC_REQUIRE([AC_HEADER_STDC])
6493 AC_REQUIRE([AC_HEADER_DIRENT])
6494 AC_REQUIRE([_LT_AC_CHECK_DLFCN])
6495 AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
6496 AC_REQUIRE([AC_LTDL_SHLIBEXT])
6497 AC_REQUIRE([AC_LTDL_SHLIBPATH])
6498 AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
6499 AC_REQUIRE([AC_LTDL_OBJDIR])
6500 AC_REQUIRE([AC_LTDL_DLPREOPEN])
6501 AC_REQUIRE([AC_LTDL_DLLIB])
6502 AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
6503 AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
6504 AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
6505 AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
6507 AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \
6508                   stdio.h unistd.h])
6509 AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h])
6510 AC_CHECK_HEADERS([string.h strings.h], [break])
6512 AC_CHECK_FUNCS([strchr index], [break])
6513 AC_CHECK_FUNCS([strrchr rindex], [break])
6514 AC_CHECK_FUNCS([memcpy bcopy], [break])
6515 AC_CHECK_FUNCS([memmove strcmp])
6516 AC_CHECK_FUNCS([closedir opendir readdir])
6517 ])# AC_LIB_LTDL
6520 # AC_LTDL_ENABLE_INSTALL
6521 # ----------------------
6522 AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
6523 [AC_ARG_ENABLE([ltdl-install],
6524     [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])])
6526 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
6527 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
6528 ])# AC_LTDL_ENABLE_INSTALL
6531 # AC_LTDL_SYS_DLOPEN_DEPLIBS
6532 # --------------------------
6533 AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS],
6534 [AC_REQUIRE([AC_CANONICAL_HOST])
6535 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
6536   [libltdl_cv_sys_dlopen_deplibs],
6537   [# PORTME does your system automatically load deplibs for dlopen?
6538   # or its logical equivalent (e.g. shl_load for HP-UX < 11)
6539   # For now, we just catch OSes we know something about -- in the
6540   # future, we'll try test this programmatically.
6541   libltdl_cv_sys_dlopen_deplibs=unknown
6542   case "$host_os" in
6543   aix3*|aix4.1.*|aix4.2.*)
6544     # Unknown whether this is true for these versions of AIX, but
6545     # we want this `case' here to explicitly catch those versions.
6546     libltdl_cv_sys_dlopen_deplibs=unknown
6547     ;;
6548   aix[[45]]*)
6549     libltdl_cv_sys_dlopen_deplibs=yes
6550     ;;
6551   darwin*)
6552     # Assuming the user has installed a libdl from somewhere, this is true
6553     # If you are looking for one http://www.opendarwin.org/projects/dlcompat
6554     libltdl_cv_sys_dlopen_deplibs=yes
6555     ;;
6556   gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
6557     # GNU and its variants, using gnu ld.so (Glibc)
6558     libltdl_cv_sys_dlopen_deplibs=yes
6559     ;;
6560   hpux10*|hpux11*)
6561     libltdl_cv_sys_dlopen_deplibs=yes
6562     ;;
6563   interix*)
6564     libltdl_cv_sys_dlopen_deplibs=yes
6565     ;;
6566   irix[[12345]]*|irix6.[[01]]*)
6567     # Catch all versions of IRIX before 6.2, and indicate that we don't
6568     # know how it worked for any of those versions.
6569     libltdl_cv_sys_dlopen_deplibs=unknown
6570     ;;
6571   irix*)
6572     # The case above catches anything before 6.2, and it's known that
6573     # at 6.2 and later dlopen does load deplibs.
6574     libltdl_cv_sys_dlopen_deplibs=yes
6575     ;;
6576   netbsd*)
6577     libltdl_cv_sys_dlopen_deplibs=yes
6578     ;;
6579   openbsd*)
6580     libltdl_cv_sys_dlopen_deplibs=yes
6581     ;;
6582   osf[[1234]]*)
6583     # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
6584     # it did *not* use an RPATH in a shared library to find objects the
6585     # library depends on, so we explictly say `no'.
6586     libltdl_cv_sys_dlopen_deplibs=no
6587     ;;
6588   osf5.0|osf5.0a|osf5.1)
6589     # dlopen *does* load deplibs and with the right loader patch applied
6590     # it even uses RPATH in a shared library to search for shared objects
6591     # that the library depends on, but there's no easy way to know if that
6592     # patch is installed.  Since this is the case, all we can really
6593     # say is unknown -- it depends on the patch being installed.  If
6594     # it is, this changes to `yes'.  Without it, it would be `no'.
6595     libltdl_cv_sys_dlopen_deplibs=unknown
6596     ;;
6597   osf*)
6598     # the two cases above should catch all versions of osf <= 5.1.  Read
6599     # the comments above for what we know about them.
6600     # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
6601     # is used to find them so we can finally say `yes'.
6602     libltdl_cv_sys_dlopen_deplibs=yes
6603     ;;
6604   solaris*)
6605     libltdl_cv_sys_dlopen_deplibs=yes
6606     ;;
6607   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6608     libltdl_cv_sys_dlopen_deplibs=yes
6609     ;;
6610   esac
6611   ])
6612 if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
6613  AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
6614     [Define if the OS needs help to load dependent libraries for dlopen().])
6616 ])# AC_LTDL_SYS_DLOPEN_DEPLIBS
6619 # AC_LTDL_SHLIBEXT
6620 # ----------------
6621 AC_DEFUN([AC_LTDL_SHLIBEXT],
6622 [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
6623 AC_CACHE_CHECK([which extension is used for loadable modules],
6624   [libltdl_cv_shlibext],
6626 module=yes
6627 eval libltdl_cv_shlibext=$shrext_cmds
6628   ])
6629 if test -n "$libltdl_cv_shlibext"; then
6630   AC_DEFINE_UNQUOTED([LTDL_SHLIB_EXT], ["$libltdl_cv_shlibext"],
6631     [Define to the extension used for shared libraries, say, ".so".])
6633 ])# AC_LTDL_SHLIBEXT
6636 # AC_LTDL_SHLIBPATH
6637 # -----------------
6638 AC_DEFUN([AC_LTDL_SHLIBPATH],
6639 [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
6640 AC_CACHE_CHECK([which variable specifies run-time library path],
6641   [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"])
6642 if test -n "$libltdl_cv_shlibpath_var"; then
6643   AC_DEFINE_UNQUOTED([LTDL_SHLIBPATH_VAR], ["$libltdl_cv_shlibpath_var"],
6644     [Define to the name of the environment variable that determines the dynamic library search path.])
6646 ])# AC_LTDL_SHLIBPATH
6649 # AC_LTDL_SYSSEARCHPATH
6650 # ---------------------
6651 AC_DEFUN([AC_LTDL_SYSSEARCHPATH],
6652 [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
6653 AC_CACHE_CHECK([for the default library search path],
6654   [libltdl_cv_sys_search_path],
6655   [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
6656 if test -n "$libltdl_cv_sys_search_path"; then
6657   sys_search_path=
6658   for dir in $libltdl_cv_sys_search_path; do
6659     if test -z "$sys_search_path"; then
6660       sys_search_path="$dir"
6661     else
6662       sys_search_path="$sys_search_path$PATH_SEPARATOR$dir"
6663     fi
6664   done
6665   AC_DEFINE_UNQUOTED([LTDL_SYSSEARCHPATH], ["$sys_search_path"],
6666     [Define to the system default library search path.])
6668 ])# AC_LTDL_SYSSEARCHPATH
6671 # AC_LTDL_OBJDIR
6672 # --------------
6673 AC_DEFUN([AC_LTDL_OBJDIR],
6674 [AC_CACHE_CHECK([for objdir],
6675   [libltdl_cv_objdir],
6676   [libltdl_cv_objdir="$objdir"
6677   if test -n "$objdir"; then
6678     :
6679   else
6680     rm -f .libs 2>/dev/null
6681     mkdir .libs 2>/dev/null
6682     if test -d .libs; then
6683       libltdl_cv_objdir=.libs
6684     else
6685       # MS-DOS does not allow filenames that begin with a dot.
6686       libltdl_cv_objdir=_libs
6687     fi
6688   rmdir .libs 2>/dev/null
6689   fi
6690   ])
6691 AC_DEFINE_UNQUOTED([LTDL_OBJDIR], ["$libltdl_cv_objdir/"],
6692   [Define to the sub-directory in which libtool stores uninstalled libraries.])
6693 ])# AC_LTDL_OBJDIR
6696 # AC_LTDL_DLPREOPEN
6697 # -----------------
6698 AC_DEFUN([AC_LTDL_DLPREOPEN],
6699 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
6700 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
6701   [libltdl_cv_preloaded_symbols],
6702   [if test -n "$lt_cv_sys_global_symbol_pipe"; then
6703     libltdl_cv_preloaded_symbols=yes
6704   else
6705     libltdl_cv_preloaded_symbols=no
6706   fi
6707   ])
6708 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
6709   AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
6710     [Define if libtool can extract symbol lists from object files.])
6712 ])# AC_LTDL_DLPREOPEN
6715 # AC_LTDL_DLLIB
6716 # -------------
6717 AC_DEFUN([AC_LTDL_DLLIB],
6718 [LIBADD_DL=
6719 AC_SUBST(LIBADD_DL)
6720 AC_LANG_PUSH([C])
6722 AC_CHECK_FUNC([shl_load],
6723       [AC_DEFINE([HAVE_SHL_LOAD], [1],
6724                  [Define if you have the shl_load function.])],
6725   [AC_CHECK_LIB([dld], [shl_load],
6726         [AC_DEFINE([HAVE_SHL_LOAD], [1],
6727                    [Define if you have the shl_load function.])
6728         LIBADD_DL="$LIBADD_DL -ldld"],
6729     [AC_CHECK_LIB([dl], [dlopen],
6730           [AC_DEFINE([HAVE_LIBDL], [1],
6731                      [Define if you have the libdl library or equivalent.])
6732                 LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"],
6733       [AC_TRY_LINK([#if HAVE_DLFCN_H
6734 #  include <dlfcn.h>
6735 #endif
6736       ],
6737         [dlopen(0, 0);],
6738             [AC_DEFINE([HAVE_LIBDL], [1],
6739                              [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"],
6740         [AC_CHECK_LIB([svld], [dlopen],
6741               [AC_DEFINE([HAVE_LIBDL], [1],
6742                          [Define if you have the libdl library or equivalent.])
6743                     LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"],
6744           [AC_CHECK_LIB([dld], [dld_link],
6745                 [AC_DEFINE([HAVE_DLD], [1],
6746                            [Define if you have the GNU dld library.])
6747                 LIBADD_DL="$LIBADD_DL -ldld"],
6748                 [AC_CHECK_FUNC([_dyld_func_lookup],
6749                        [AC_DEFINE([HAVE_DYLD], [1],
6750                           [Define if you have the _dyld_func_lookup function.])])
6751           ])
6752         ])
6753       ])
6754     ])
6755   ])
6758 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
6759 then
6760   lt_save_LIBS="$LIBS"
6761   LIBS="$LIBS $LIBADD_DL"
6762   AC_CHECK_FUNCS([dlerror])
6763   LIBS="$lt_save_LIBS"
6765 AC_LANG_POP
6766 ])# AC_LTDL_DLLIB
6769 # AC_LTDL_SYMBOL_USCORE
6770 # ---------------------
6771 # does the compiler prefix global symbols with an underscore?
6772 AC_DEFUN([AC_LTDL_SYMBOL_USCORE],
6773 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
6774 AC_CACHE_CHECK([for _ prefix in compiled symbols],
6775   [ac_cv_sys_symbol_underscore],
6776   [ac_cv_sys_symbol_underscore=no
6777   cat > conftest.$ac_ext <<EOF
6778 void nm_test_func(){}
6779 int main(){nm_test_func;return 0;}
6781   if AC_TRY_EVAL(ac_compile); then
6782     # Now try to grab the symbols.
6783     ac_nlist=conftest.nm
6784     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
6785       # See whether the symbols have a leading underscore.
6786       if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
6787         ac_cv_sys_symbol_underscore=yes
6788       else
6789         if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
6790           :
6791         else
6792           echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
6793         fi
6794       fi
6795     else
6796       echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
6797     fi
6798   else
6799     echo "configure: failed program was:" >&AC_FD_CC
6800     cat conftest.c >&AC_FD_CC
6801   fi
6802   rm -rf conftest*
6803   ])
6804 ])# AC_LTDL_SYMBOL_USCORE
6807 # AC_LTDL_DLSYM_USCORE
6808 # --------------------
6809 AC_DEFUN([AC_LTDL_DLSYM_USCORE],
6810 [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
6811 if test x"$ac_cv_sys_symbol_underscore" = xyes; then
6812   if test x"$libltdl_cv_func_dlopen" = xyes ||
6813      test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
6814         AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
6815           [libltdl_cv_need_uscore],
6816           [libltdl_cv_need_uscore=unknown
6817           save_LIBS="$LIBS"
6818           LIBS="$LIBS $LIBADD_DL"
6819           _LT_AC_TRY_DLOPEN_SELF(
6820             [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
6821             [],                          [libltdl_cv_need_uscore=cross])
6822           LIBS="$save_LIBS"
6823         ])
6824   fi
6827 if test x"$libltdl_cv_need_uscore" = xyes; then
6828   AC_DEFINE([NEED_USCORE], [1],
6829     [Define if dlsym() requires a leading underscore in symbol names.])
6831 ])# AC_LTDL_DLSYM_USCORE
6833 # AC_LTDL_FUNC_ARGZ
6834 # -----------------
6835 AC_DEFUN([AC_LTDL_FUNC_ARGZ],
6836 [AC_CHECK_HEADERS([argz.h])
6838 AC_CHECK_TYPES([error_t],
6839   [],
6840   [AC_DEFINE([error_t], [int],
6841     [Define to a type to use for `error_t' if it is not otherwise available.])],
6842   [#if HAVE_ARGZ_H
6843 #  include <argz.h>
6844 #endif])
6846 AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
6847 ])# AC_LTDL_FUNC_ARGZ
6849 dnl compatibility stubs for libtool 2.x, but when using libtool 1.x.
6850 AC_DEFUN([LT_INIT],
6851 [AC_MSG_ERROR([You shouldn't be here!])
6852 ])# LT_INIT
6854 AC_DEFUN([LTDL_INIT],
6855 [AC_MSG_ERROR([You shouldn't be here!])
6856 ])# LTDL_INIT