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