OSDN Git Service

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