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