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