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