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