acinclude.m4
author Sam Lantinga <slouken@libsdl.org>
Wed, 04 Mar 2009 08:57:30 +0000
changeset 3085 4800979de337
parent 3012 7e30c2dc7783
permissions -rw-r--r--
Updated libtool from version 1.5.22 to 2.2.6a, so it works on current QNX
     1 define(AC_CHECK_DEFINE,[dnl
     2   AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1,
     3     AC_EGREP_CPP([YES_IS_DEFINED], [
     4 #include <$2>
     5 #ifdef $1
     6 YES_IS_DEFINED
     7 #endif
     8     ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
     9   )
    10   if test "$ac_cv_define_$1" = "yes" ; then
    11     AC_DEFINE(HAVE_$1)
    12   fi
    13 ])dnl
    14 AC_DEFINE(HAVE_$1)
    15 
    16 ##############################################################################
    17 dnl Configure Paths for Alsa
    18 dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
    19 dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
    20 dnl Jaroslav Kysela <perex@suse.cz>
    21 dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp
    22 dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
    23 dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
    24 dnl enables arguments --with-alsa-prefix=
    25 dnl                   --with-alsa-enc-prefix=
    26 dnl                   --disable-alsatest
    27 dnl
    28 dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
    29 dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
    30 dnl
    31 AC_DEFUN([AM_PATH_ALSA],
    32 [dnl Save the original CFLAGS, LDFLAGS, and LIBS
    33 alsa_save_CFLAGS="$CFLAGS"
    34 alsa_save_LDFLAGS="$LDFLAGS"
    35 alsa_save_LIBS="$LIBS"
    36 alsa_found=yes
    37 
    38 dnl
    39 dnl Get the cflags and libraries for alsa
    40 dnl
    41 AC_ARG_WITH(alsa-prefix,
    42 [  --with-alsa-prefix=PFX  Prefix where Alsa library is installed(optional)],
    43 [alsa_prefix="$withval"], [alsa_prefix=""])
    44 
    45 AC_ARG_WITH(alsa-inc-prefix,
    46 [  --with-alsa-inc-prefix=PFX  Prefix where include libraries are (optional)],
    47 [alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
    48 
    49 dnl FIXME: this is not yet implemented
    50 AC_ARG_ENABLE(alsatest,
    51 [  --disable-alsatest      Do not try to compile and run a test Alsa program],
    52 [enable_alsatest="$enableval"],
    53 [enable_alsatest=yes])
    54 
    55 dnl Add any special include directories
    56 AC_MSG_CHECKING(for ALSA CFLAGS)
    57 if test "$alsa_inc_prefix" != "" ; then
    58 	ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
    59 	CFLAGS="$CFLAGS -I$alsa_inc_prefix"
    60 fi
    61 AC_MSG_RESULT($ALSA_CFLAGS)
    62 
    63 dnl add any special lib dirs
    64 AC_MSG_CHECKING(for ALSA LDFLAGS)
    65 if test "$alsa_prefix" != "" ; then
    66 	ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
    67 	LDFLAGS="$LDFLAGS $ALSA_LIBS"
    68 fi
    69 
    70 dnl add the alsa library
    71 ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
    72 LIBS=`echo $LIBS | sed 's/-lm//'`
    73 LIBS=`echo $LIBS | sed 's/-ldl//'`
    74 LIBS=`echo $LIBS | sed 's/-lpthread//'`
    75 LIBS=`echo $LIBS | sed 's/  //'`
    76 LIBS="$ALSA_LIBS $LIBS"
    77 AC_MSG_RESULT($ALSA_LIBS)
    78 
    79 dnl Check for a working version of libasound that is of the right version.
    80 min_alsa_version=ifelse([$1], ,0.1.1,$1)
    81 AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
    82 no_alsa=""
    83     alsa_min_major_version=`echo $min_alsa_version | \
    84            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
    85     alsa_min_minor_version=`echo $min_alsa_version | \
    86            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
    87     alsa_min_micro_version=`echo $min_alsa_version | \
    88            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
    89 
    90 AC_LANG_SAVE
    91 AC_LANG_C
    92 AC_TRY_COMPILE([
    93 #include <alsa/asoundlib.h>
    94 ], [
    95 /* ensure backward compatibility */
    96 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
    97 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
    98 #endif
    99 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
   100 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
   101 #endif
   102 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
   103 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
   104 #endif
   105 
   106 #  if(SND_LIB_MAJOR > $alsa_min_major_version)
   107   exit(0);
   108 #  else
   109 #    if(SND_LIB_MAJOR < $alsa_min_major_version)
   110 #       error not present
   111 #    endif
   112 
   113 #   if(SND_LIB_MINOR > $alsa_min_minor_version)
   114   exit(0);
   115 #   else
   116 #     if(SND_LIB_MINOR < $alsa_min_minor_version)
   117 #          error not present
   118 #      endif
   119 
   120 #      if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
   121 #        error not present
   122 #      endif
   123 #    endif
   124 #  endif
   125 exit(0);
   126 ],
   127   [AC_MSG_RESULT(found.)],
   128   [AC_MSG_RESULT(not present.)
   129    ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
   130    alsa_found=no]
   131 )
   132 AC_LANG_RESTORE
   133 
   134 dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
   135 if test "x$enable_alsatest" = "xyes"; then
   136 AC_CHECK_LIB([asound], [snd_ctl_open],,
   137 	[ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])
   138 	 alsa_found=no]
   139 )
   140 fi
   141 
   142 if test "x$alsa_found" = "xyes" ; then
   143    ifelse([$2], , :, [$2])
   144    LIBS=`echo $LIBS | sed 's/-lasound//g'`
   145    LIBS=`echo $LIBS | sed 's/  //'`
   146    LIBS="-lasound $LIBS"
   147 fi
   148 if test "x$alsa_found" = "xno" ; then
   149    ifelse([$3], , :, [$3])
   150    CFLAGS="$alsa_save_CFLAGS"
   151    LDFLAGS="$alsa_save_LDFLAGS"
   152    LIBS="$alsa_save_LIBS"
   153    ALSA_CFLAGS=""
   154    ALSA_LIBS=""
   155 fi
   156 
   157 dnl That should be it.  Now just export out symbols:
   158 AC_SUBST(ALSA_CFLAGS)
   159 AC_SUBST(ALSA_LIBS)
   160 ])
   161 
   162 ##############################################################################
   163 #
   164 # --- esd.m4 ---
   165 #
   166 # Configure paths for ESD
   167 # Manish Singh    98-9-30
   168 # stolen back from Frank Belew
   169 # stolen from Manish Singh
   170 # Shamelessly stolen from Owen Taylor
   171 
   172 dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
   173 dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
   174 dnl
   175 AC_DEFUN([AM_PATH_ESD],
   176 [dnl 
   177 dnl Get the cflags and libraries from the esd-config script
   178 dnl
   179 AC_ARG_WITH(esd-prefix,[  --with-esd-prefix=PFX   Prefix where ESD is installed (optional)],
   180             esd_prefix="$withval", esd_prefix="")
   181 AC_ARG_WITH(esd-exec-prefix,[  --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
   182             esd_exec_prefix="$withval", esd_exec_prefix="")
   183 AC_ARG_ENABLE(esdtest, [  --disable-esdtest       Do not try to compile and run a test ESD program],
   184 		    , enable_esdtest=yes)
   185 
   186   if test x$esd_exec_prefix != x ; then
   187      esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
   188      if test x${ESD_CONFIG+set} != xset ; then
   189         ESD_CONFIG=$esd_exec_prefix/bin/esd-config
   190      fi
   191   fi
   192   if test x$esd_prefix != x ; then
   193      esd_args="$esd_args --prefix=$esd_prefix"
   194      if test x${ESD_CONFIG+set} != xset ; then
   195         ESD_CONFIG=$esd_prefix/bin/esd-config
   196      fi
   197   fi
   198 
   199   AC_PATH_PROG(ESD_CONFIG, esd-config, no)
   200   min_esd_version=ifelse([$1], ,0.2.7,$1)
   201   AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
   202   no_esd=""
   203   if test "$ESD_CONFIG" = "no" ; then
   204     no_esd=yes
   205   else
   206     ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
   207     ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
   208 
   209     esd_major_version=`$ESD_CONFIG $esd_args --version | \
   210            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
   211     esd_minor_version=`$ESD_CONFIG $esd_args --version | \
   212            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
   213     esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
   214            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
   215     if test "x$enable_esdtest" = "xyes" ; then
   216       ac_save_CFLAGS="$CFLAGS"
   217       ac_save_LIBS="$LIBS"
   218       CFLAGS="$CFLAGS $ESD_CFLAGS"
   219       LIBS="$LIBS $ESD_LIBS"
   220 dnl
   221 dnl Now check if the installed ESD is sufficiently new. (Also sanity
   222 dnl checks the results of esd-config to some extent
   223 dnl
   224       rm -f conf.esdtest
   225       AC_TRY_RUN([
   226 #include <stdio.h>
   227 #include <stdlib.h>
   228 #include <string.h>
   229 #include <esd.h>
   230 
   231 char*
   232 my_strdup (char *str)
   233 {
   234   char *new_str;
   235   
   236   if (str)
   237     {
   238       new_str = malloc ((strlen (str) + 1) * sizeof(char));
   239       strcpy (new_str, str);
   240     }
   241   else
   242     new_str = NULL;
   243   
   244   return new_str;
   245 }
   246 
   247 int main ()
   248 {
   249   int major, minor, micro;
   250   char *tmp_version;
   251 
   252   system ("touch conf.esdtest");
   253 
   254   /* HP/UX 9 (%@#!) writes to sscanf strings */
   255   tmp_version = my_strdup("$min_esd_version");
   256   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
   257      printf("%s, bad version string\n", "$min_esd_version");
   258      exit(1);
   259    }
   260 
   261    if (($esd_major_version > major) ||
   262       (($esd_major_version == major) && ($esd_minor_version > minor)) ||
   263       (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
   264     {
   265       return 0;
   266     }
   267   else
   268     {
   269       printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
   270       printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
   271       printf("*** best to upgrade to the required version.\n");
   272       printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
   273       printf("*** to point to the correct copy of esd-config, and remove the file\n");
   274       printf("*** config.cache before re-running configure\n");
   275       return 1;
   276     }
   277 }
   278 
   279 ],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
   280        CFLAGS="$ac_save_CFLAGS"
   281        LIBS="$ac_save_LIBS"
   282      fi
   283   fi
   284   if test "x$no_esd" = x ; then
   285      AC_MSG_RESULT(yes)
   286      ifelse([$2], , :, [$2])     
   287   else
   288      AC_MSG_RESULT(no)
   289      if test "$ESD_CONFIG" = "no" ; then
   290        echo "*** The esd-config script installed by ESD could not be found"
   291        echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
   292        echo "*** your path, or set the ESD_CONFIG environment variable to the"
   293        echo "*** full path to esd-config."
   294      else
   295        if test -f conf.esdtest ; then
   296         :
   297        else
   298           echo "*** Could not run ESD test program, checking why..."
   299           CFLAGS="$CFLAGS $ESD_CFLAGS"
   300           LIBS="$LIBS $ESD_LIBS"
   301           AC_TRY_LINK([
   302 #include <stdio.h>
   303 #include <esd.h>
   304 ],      [ return 0; ],
   305         [ echo "*** The test program compiled, but did not run. This usually means"
   306           echo "*** that the run-time linker is not finding ESD or finding the wrong"
   307           echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
   308           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
   309           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
   310           echo "*** is required on your system"
   311 	  echo "***"
   312           echo "*** If you have an old version installed, it is best to remove it, although"
   313           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
   314         [ echo "*** The test program failed to compile or link. See the file config.log for the"
   315           echo "*** exact error that occured. This usually means ESD was incorrectly installed"
   316           echo "*** or that you have moved ESD since it was installed. In the latter case, you"
   317           echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
   318           CFLAGS="$ac_save_CFLAGS"
   319           LIBS="$ac_save_LIBS"
   320        fi
   321      fi
   322      ESD_CFLAGS=""
   323      ESD_LIBS=""
   324      ifelse([$3], , :, [$3])
   325   fi
   326   AC_SUBST(ESD_CFLAGS)
   327   AC_SUBST(ESD_LIBS)
   328   rm -f conf.esdtest
   329 ])
   330 
   331 ##############################################################################
   332 # Based on libtool-2.2.6a
   333 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
   334 #
   335 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
   336 #                 2006, 2007, 2008 Free Software Foundation, Inc.
   337 #   Written by Gordon Matzigkeit, 1996
   338 #
   339 # This file is free software; the Free Software Foundation gives
   340 # unlimited permission to copy and/or distribute it, with or without
   341 # modifications, as long as this notice is preserved.
   342 
   343 m4_define([_LT_COPYING], [dnl
   344 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
   345 #                 2006, 2007, 2008 Free Software Foundation, Inc.
   346 #   Written by Gordon Matzigkeit, 1996
   347 #
   348 #   This file is part of GNU Libtool.
   349 #
   350 # GNU Libtool is free software; you can redistribute it and/or
   351 # modify it under the terms of the GNU General Public License as
   352 # published by the Free Software Foundation; either version 2 of
   353 # the License, or (at your option) any later version.
   354 #
   355 # As a special exception to the GNU General Public License,
   356 # if you distribute this file as part of a program or library that
   357 # is built using GNU Libtool, you may include this file under the
   358 # same distribution terms that you use for the rest of that program.
   359 #
   360 # GNU Libtool is distributed in the hope that it will be useful,
   361 # but WITHOUT ANY WARRANTY; without even the implied warranty of
   362 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   363 # GNU General Public License for more details.
   364 #
   365 # You should have received a copy of the GNU General Public License
   366 # along with GNU Libtool; see the file COPYING.  If not, a copy
   367 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
   368 # obtained by writing to the Free Software Foundation, Inc.,
   369 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
   370 ])
   371 
   372 # serial 56 LT_INIT
   373 
   374 
   375 # LT_PREREQ(VERSION)
   376 # ------------------
   377 # Complain and exit if this libtool version is less that VERSION.
   378 m4_defun([LT_PREREQ],
   379 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
   380        [m4_default([$3],
   381 		   [m4_fatal([Libtool version $1 or higher is required],
   382 		             63)])],
   383        [$2])])
   384 
   385 
   386 # _LT_CHECK_BUILDDIR
   387 # ------------------
   388 # Complain if the absolute build directory name contains unusual characters
   389 m4_defun([_LT_CHECK_BUILDDIR],
   390 [case `pwd` in
   391   *\ * | *\	*)
   392     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
   393 esac
   394 ])
   395 
   396 
   397 # LT_INIT([OPTIONS])
   398 # ------------------
   399 AC_DEFUN([LT_INIT],
   400 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
   401 AC_BEFORE([$0], [LT_LANG])dnl
   402 AC_BEFORE([$0], [LT_OUTPUT])dnl
   403 AC_BEFORE([$0], [LTDL_INIT])dnl
   404 m4_require([_LT_CHECK_BUILDDIR])dnl
   405 
   406 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
   407 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
   408 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
   409 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
   410 dnl unless we require an AC_DEFUNed macro:
   411 AC_REQUIRE([LTOPTIONS_VERSION])dnl
   412 AC_REQUIRE([LTSUGAR_VERSION])dnl
   413 AC_REQUIRE([LTVERSION_VERSION])dnl
   414 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
   415 m4_require([_LT_PROG_LTMAIN])dnl
   416 
   417 dnl Parse OPTIONS
   418 _LT_SET_OPTIONS([$0], [$1])
   419 
   420 # This can be used to rebuild libtool when needed
   421 LIBTOOL_DEPS="$ltmain"
   422 
   423 # Always use our own libtool.
   424 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
   425 AC_SUBST(LIBTOOL)dnl
   426 
   427 _LT_SETUP
   428 
   429 # Only expand once:
   430 m4_define([LT_INIT])
   431 ])# LT_INIT
   432 
   433 # Old names:
   434 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
   435 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
   436 dnl aclocal-1.4 backwards compatibility:
   437 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
   438 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
   439 
   440 
   441 # _LT_CC_BASENAME(CC)
   442 # -------------------
   443 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
   444 m4_defun([_LT_CC_BASENAME],
   445 [for cc_temp in $1""; do
   446   case $cc_temp in
   447     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
   448     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
   449     \-*) ;;
   450     *) break;;
   451   esac
   452 done
   453 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
   454 ])
   455 
   456 
   457 # _LT_FILEUTILS_DEFAULTS
   458 # ----------------------
   459 # It is okay to use these file commands and assume they have been set
   460 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
   461 m4_defun([_LT_FILEUTILS_DEFAULTS],
   462 [: ${CP="cp -f"}
   463 : ${MV="mv -f"}
   464 : ${RM="rm -f"}
   465 ])# _LT_FILEUTILS_DEFAULTS
   466 
   467 
   468 # _LT_SETUP
   469 # ---------
   470 m4_defun([_LT_SETUP],
   471 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
   472 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
   473 _LT_DECL([], [host_alias], [0], [The host system])dnl
   474 _LT_DECL([], [host], [0])dnl
   475 _LT_DECL([], [host_os], [0])dnl
   476 dnl
   477 _LT_DECL([], [build_alias], [0], [The build system])dnl
   478 _LT_DECL([], [build], [0])dnl
   479 _LT_DECL([], [build_os], [0])dnl
   480 dnl
   481 AC_REQUIRE([AC_PROG_CC])dnl
   482 AC_REQUIRE([LT_PATH_LD])dnl
   483 AC_REQUIRE([LT_PATH_NM])dnl
   484 dnl
   485 AC_REQUIRE([AC_PROG_LN_S])dnl
   486 test -z "$LN_S" && LN_S="ln -s"
   487 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
   488 dnl
   489 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
   490 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
   491 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
   492 dnl
   493 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
   494 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
   495 m4_require([_LT_CMD_RELOAD])dnl
   496 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
   497 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
   498 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
   499 
   500 _LT_CONFIG_LIBTOOL_INIT([
   501 # See if we are running on zsh, and set the options which allow our
   502 # commands through without removal of \ escapes INIT.
   503 if test -n "\${ZSH_VERSION+set}" ; then
   504    setopt NO_GLOB_SUBST
   505 fi
   506 ])
   507 if test -n "${ZSH_VERSION+set}" ; then
   508    setopt NO_GLOB_SUBST
   509 fi
   510 
   511 _LT_CHECK_OBJDIR
   512 
   513 m4_require([_LT_TAG_COMPILER])dnl
   514 _LT_PROG_ECHO_BACKSLASH
   515 
   516 case $host_os in
   517 aix3*)
   518   # AIX sometimes has problems with the GCC collect2 program.  For some
   519   # reason, if we set the COLLECT_NAMES environment variable, the problems
   520   # vanish in a puff of smoke.
   521   if test "X${COLLECT_NAMES+set}" != Xset; then
   522     COLLECT_NAMES=
   523     export COLLECT_NAMES
   524   fi
   525   ;;
   526 esac
   527 
   528 # Sed substitution that helps us do robust quoting.  It backslashifies
   529 # metacharacters that are still active within double-quoted strings.
   530 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
   531 
   532 # Same as above, but do not quote variable references.
   533 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
   534 
   535 # Sed substitution to delay expansion of an escaped shell variable in a
   536 # double_quote_subst'ed string.
   537 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
   538 
   539 # Sed substitution to delay expansion of an escaped single quote.
   540 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
   541 
   542 # Sed substitution to avoid accidental globbing in evaled expressions
   543 no_glob_subst='s/\*/\\\*/g'
   544 
   545 # Global variables:
   546 ofile=libtool
   547 can_build_shared=yes
   548 
   549 # All known linkers require a `.a' archive for static linking (except MSVC,
   550 # which needs '.lib').
   551 libext=a
   552 
   553 with_gnu_ld="$lt_cv_prog_gnu_ld"
   554 
   555 old_CC="$CC"
   556 old_CFLAGS="$CFLAGS"
   557 
   558 # Set sane defaults for various variables
   559 test -z "$CC" && CC=cc
   560 test -z "$LTCC" && LTCC=$CC
   561 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
   562 test -z "$LD" && LD=ld
   563 test -z "$ac_objext" && ac_objext=o
   564 
   565 _LT_CC_BASENAME([$compiler])
   566 
   567 # Only perform the check for file, if the check method requires it
   568 test -z "$MAGIC_CMD" && MAGIC_CMD=file
   569 case $deplibs_check_method in
   570 file_magic*)
   571   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
   572     _LT_PATH_MAGIC
   573   fi
   574   ;;
   575 esac
   576 
   577 # Use C for the default configuration in the libtool script
   578 LT_SUPPORTED_TAG([CC])
   579 _LT_LANG_C_CONFIG
   580 _LT_LANG_DEFAULT_CONFIG
   581 _LT_CONFIG_COMMANDS
   582 ])# _LT_SETUP
   583 
   584 
   585 # _LT_PROG_LTMAIN
   586 # ---------------
   587 # Note that this code is called both from `configure', and `config.status'
   588 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
   589 # `config.status' has no value for ac_aux_dir unless we are using Automake,
   590 # so we pass a copy along to make sure it has a sensible value anyway.
   591 m4_defun([_LT_PROG_LTMAIN],
   592 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
   593 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
   594 ltmain="$ac_aux_dir/ltmain.sh"
   595 ])# _LT_PROG_LTMAIN
   596 
   597 
   598 ## ------------------------------------- ##
   599 ## Accumulate code for creating libtool. ##
   600 ## ------------------------------------- ##
   601 
   602 # So that we can recreate a full libtool script including additional
   603 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
   604 # in macros and then make a single call at the end using the `libtool'
   605 # label.
   606 
   607 
   608 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
   609 # ----------------------------------------
   610 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
   611 m4_define([_LT_CONFIG_LIBTOOL_INIT],
   612 [m4_ifval([$1],
   613           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
   614                      [$1
   615 ])])])
   616 
   617 # Initialize.
   618 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
   619 
   620 
   621 # _LT_CONFIG_LIBTOOL([COMMANDS])
   622 # ------------------------------
   623 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
   624 m4_define([_LT_CONFIG_LIBTOOL],
   625 [m4_ifval([$1],
   626           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
   627                      [$1
   628 ])])])
   629 
   630 # Initialize.
   631 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
   632 
   633 
   634 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
   635 # -----------------------------------------------------
   636 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
   637 [_LT_CONFIG_LIBTOOL([$1])
   638 _LT_CONFIG_LIBTOOL_INIT([$2])
   639 ])
   640 
   641 
   642 # _LT_FORMAT_COMMENT([COMMENT])
   643 # -----------------------------
   644 # Add leading comment marks to the start of each line, and a trailing
   645 # full-stop to the whole comment if one is not present already.
   646 m4_define([_LT_FORMAT_COMMENT],
   647 [m4_ifval([$1], [
   648 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
   649               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
   650 )])
   651 
   652 
   653 
   654 ## ------------------------ ##
   655 ## FIXME: Eliminate VARNAME ##
   656 ## ------------------------ ##
   657 
   658 
   659 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
   660 # -------------------------------------------------------------------
   661 # CONFIGNAME is the name given to the value in the libtool script.
   662 # VARNAME is the (base) name used in the configure script.
   663 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
   664 # VARNAME.  Any other value will be used directly.
   665 m4_define([_LT_DECL],
   666 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
   667     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
   668 	[m4_ifval([$1], [$1], [$2])])
   669     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
   670     m4_ifval([$4],
   671 	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
   672     lt_dict_add_subkey([lt_decl_dict], [$2],
   673 	[tagged?], [m4_ifval([$5], [yes], [no])])])
   674 ])
   675 
   676 
   677 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
   678 # --------------------------------------------------------
   679 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
   680 
   681 
   682 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
   683 # ------------------------------------------------
   684 m4_define([lt_decl_tag_varnames],
   685 [_lt_decl_filter([tagged?], [yes], $@)])
   686 
   687 
   688 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
   689 # ---------------------------------------------------------
   690 m4_define([_lt_decl_filter],
   691 [m4_case([$#],
   692   [0], [m4_fatal([$0: too few arguments: $#])],
   693   [1], [m4_fatal([$0: too few arguments: $#: $1])],
   694   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
   695   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
   696   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
   697 ])
   698 
   699 
   700 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
   701 # --------------------------------------------------
   702 m4_define([lt_decl_quote_varnames],
   703 [_lt_decl_filter([value], [1], $@)])
   704 
   705 
   706 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
   707 # ---------------------------------------------------
   708 m4_define([lt_decl_dquote_varnames],
   709 [_lt_decl_filter([value], [2], $@)])
   710 
   711 
   712 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
   713 # ---------------------------------------------------
   714 m4_define([lt_decl_varnames_tagged],
   715 [m4_assert([$# <= 2])dnl
   716 _$0(m4_quote(m4_default([$1], [[, ]])),
   717     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
   718     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
   719 m4_define([_lt_decl_varnames_tagged],
   720 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
   721 
   722 
   723 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
   724 # ------------------------------------------------
   725 m4_define([lt_decl_all_varnames],
   726 [_$0(m4_quote(m4_default([$1], [[, ]])),
   727      m4_if([$2], [],
   728 	   m4_quote(lt_decl_varnames),
   729 	m4_quote(m4_shift($@))))[]dnl
   730 ])
   731 m4_define([_lt_decl_all_varnames],
   732 [lt_join($@, lt_decl_varnames_tagged([$1],
   733 			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
   734 ])
   735 
   736 
   737 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
   738 # ------------------------------------
   739 # Quote a variable value, and forward it to `config.status' so that its
   740 # declaration there will have the same value as in `configure'.  VARNAME
   741 # must have a single quote delimited value for this to work.
   742 m4_define([_LT_CONFIG_STATUS_DECLARE],
   743 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
   744 
   745 
   746 # _LT_CONFIG_STATUS_DECLARATIONS
   747 # ------------------------------
   748 # We delimit libtool config variables with single quotes, so when
   749 # we write them to config.status, we have to be sure to quote all
   750 # embedded single quotes properly.  In configure, this macro expands
   751 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
   752 #
   753 #    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
   754 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
   755 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
   756     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
   757 
   758 
   759 # _LT_LIBTOOL_TAGS
   760 # ----------------
   761 # Output comment and list of tags supported by the script
   762 m4_defun([_LT_LIBTOOL_TAGS],
   763 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
   764 available_tags="_LT_TAGS"dnl
   765 ])
   766 
   767 
   768 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
   769 # -----------------------------------
   770 # Extract the dictionary values for VARNAME (optionally with TAG) and
   771 # expand to a commented shell variable setting:
   772 #
   773 #    # Some comment about what VAR is for.
   774 #    visible_name=$lt_internal_name
   775 m4_define([_LT_LIBTOOL_DECLARE],
   776 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
   777 					   [description])))[]dnl
   778 m4_pushdef([_libtool_name],
   779     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
   780 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
   781     [0], [_libtool_name=[$]$1],
   782     [1], [_libtool_name=$lt_[]$1],
   783     [2], [_libtool_name=$lt_[]$1],
   784     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
   785 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
   786 ])
   787 
   788 
   789 # _LT_LIBTOOL_CONFIG_VARS
   790 # -----------------------
   791 # Produce commented declarations of non-tagged libtool config variables
   792 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
   793 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
   794 # section) are produced by _LT_LIBTOOL_TAG_VARS.
   795 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
   796 [m4_foreach([_lt_var],
   797     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
   798     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
   799 
   800 
   801 # _LT_LIBTOOL_TAG_VARS(TAG)
   802 # -------------------------
   803 m4_define([_LT_LIBTOOL_TAG_VARS],
   804 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
   805     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
   806 
   807 
   808 # _LT_TAGVAR(VARNAME, [TAGNAME])
   809 # ------------------------------
   810 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
   811 
   812 
   813 # _LT_CONFIG_COMMANDS
   814 # -------------------
   815 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
   816 # variables for single and double quote escaping we saved from calls
   817 # to _LT_DECL, we can put quote escaped variables declarations
   818 # into `config.status', and then the shell code to quote escape them in
   819 # for loops in `config.status'.  Finally, any additional code accumulated
   820 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
   821 m4_defun([_LT_CONFIG_COMMANDS],
   822 [AC_PROVIDE_IFELSE([LT_OUTPUT],
   823 	dnl If the libtool generation code has been placed in $CONFIG_LT,
   824 	dnl instead of duplicating it all over again into config.status,
   825 	dnl then we will have config.status run $CONFIG_LT later, so it
   826 	dnl needs to know what name is stored there:
   827         [AC_CONFIG_COMMANDS([libtool],
   828             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
   829     dnl If the libtool generation code is destined for config.status,
   830     dnl expand the accumulated commands and init code now:
   831     [AC_CONFIG_COMMANDS([libtool],
   832         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
   833 ])#_LT_CONFIG_COMMANDS
   834 
   835 
   836 # Initialize.
   837 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
   838 [
   839 
   840 # The HP-UX ksh and POSIX shell print the target directory to stdout
   841 # if CDPATH is set.
   842 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
   843 
   844 sed_quote_subst='$sed_quote_subst'
   845 double_quote_subst='$double_quote_subst'
   846 delay_variable_subst='$delay_variable_subst'
   847 _LT_CONFIG_STATUS_DECLARATIONS
   848 LTCC='$LTCC'
   849 LTCFLAGS='$LTCFLAGS'
   850 compiler='$compiler_DEFAULT'
   851 
   852 # Quote evaled strings.
   853 for var in lt_decl_all_varnames([[ \
   854 ]], lt_decl_quote_varnames); do
   855     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
   856     *[[\\\\\\\`\\"\\\$]]*)
   857       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
   858       ;;
   859     *)
   860       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
   861       ;;
   862     esac
   863 done
   864 
   865 # Double-quote double-evaled strings.
   866 for var in lt_decl_all_varnames([[ \
   867 ]], lt_decl_dquote_varnames); do
   868     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
   869     *[[\\\\\\\`\\"\\\$]]*)
   870       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
   871       ;;
   872     *)
   873       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
   874       ;;
   875     esac
   876 done
   877 
   878 # Fix-up fallback echo if it was mangled by the above quoting rules.
   879 case \$lt_ECHO in
   880 *'\\\[$]0 --fallback-echo"')dnl "
   881   lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
   882   ;;
   883 esac
   884 
   885 _LT_OUTPUT_LIBTOOL_INIT
   886 ])
   887 
   888 
   889 # LT_OUTPUT
   890 # ---------
   891 # This macro allows early generation of the libtool script (before
   892 # AC_OUTPUT is called), incase it is used in configure for compilation
   893 # tests.
   894 AC_DEFUN([LT_OUTPUT],
   895 [: ${CONFIG_LT=./config.lt}
   896 AC_MSG_NOTICE([creating $CONFIG_LT])
   897 cat >"$CONFIG_LT" <<_LTEOF
   898 #! $SHELL
   899 # Generated by $as_me.
   900 # Run this file to recreate a libtool stub with the current configuration.
   901 
   902 lt_cl_silent=false
   903 SHELL=\${CONFIG_SHELL-$SHELL}
   904 _LTEOF
   905 
   906 cat >>"$CONFIG_LT" <<\_LTEOF
   907 AS_SHELL_SANITIZE
   908 _AS_PREPARE
   909 
   910 exec AS_MESSAGE_FD>&1
   911 exec AS_MESSAGE_LOG_FD>>config.log
   912 {
   913   echo
   914   AS_BOX([Running $as_me.])
   915 } >&AS_MESSAGE_LOG_FD
   916 
   917 lt_cl_help="\
   918 \`$as_me' creates a local libtool stub from the current configuration,
   919 for use in further configure time tests before the real libtool is
   920 generated.
   921 
   922 Usage: $[0] [[OPTIONS]]
   923 
   924   -h, --help      print this help, then exit
   925   -V, --version   print version number, then exit
   926   -q, --quiet     do not print progress messages
   927   -d, --debug     don't remove temporary files
   928 
   929 Report bugs to <bug-libtool@gnu.org>."
   930 
   931 lt_cl_version="\
   932 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
   933 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
   934 configured by $[0], generated by m4_PACKAGE_STRING.
   935 
   936 Copyright (C) 2008 Free Software Foundation, Inc.
   937 This config.lt script is free software; the Free Software Foundation
   938 gives unlimited permision to copy, distribute and modify it."
   939 
   940 while test $[#] != 0
   941 do
   942   case $[1] in
   943     --version | --v* | -V )
   944       echo "$lt_cl_version"; exit 0 ;;
   945     --help | --h* | -h )
   946       echo "$lt_cl_help"; exit 0 ;;
   947     --debug | --d* | -d )
   948       debug=: ;;
   949     --quiet | --q* | --silent | --s* | -q )
   950       lt_cl_silent=: ;;
   951 
   952     -*) AC_MSG_ERROR([unrecognized option: $[1]
   953 Try \`$[0] --help' for more information.]) ;;
   954 
   955     *) AC_MSG_ERROR([unrecognized argument: $[1]
   956 Try \`$[0] --help' for more information.]) ;;
   957   esac
   958   shift
   959 done
   960 
   961 if $lt_cl_silent; then
   962   exec AS_MESSAGE_FD>/dev/null
   963 fi
   964 _LTEOF
   965 
   966 cat >>"$CONFIG_LT" <<_LTEOF
   967 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
   968 _LTEOF
   969 
   970 cat >>"$CONFIG_LT" <<\_LTEOF
   971 AC_MSG_NOTICE([creating $ofile])
   972 _LT_OUTPUT_LIBTOOL_COMMANDS
   973 AS_EXIT(0)
   974 _LTEOF
   975 chmod +x "$CONFIG_LT"
   976 
   977 # configure is writing to config.log, but config.lt does its own redirection,
   978 # appending to config.log, which fails on DOS, as config.log is still kept
   979 # open by configure.  Here we exec the FD to /dev/null, effectively closing
   980 # config.log, so it can be properly (re)opened and appended to by config.lt.
   981 if test "$no_create" != yes; then
   982   lt_cl_success=:
   983   test "$silent" = yes &&
   984     lt_config_lt_args="$lt_config_lt_args --quiet"
   985   exec AS_MESSAGE_LOG_FD>/dev/null
   986   $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
   987   exec AS_MESSAGE_LOG_FD>>config.log
   988   $lt_cl_success || AS_EXIT(1)
   989 fi
   990 ])# LT_OUTPUT
   991 
   992 
   993 # _LT_CONFIG(TAG)
   994 # ---------------
   995 # If TAG is the built-in tag, create an initial libtool script with a
   996 # default configuration from the untagged config vars.  Otherwise add code
   997 # to config.status for appending the configuration named by TAG from the
   998 # matching tagged config vars.
   999 m4_defun([_LT_CONFIG],
  1000 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1001 _LT_CONFIG_SAVE_COMMANDS([
  1002   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  1003   m4_if(_LT_TAG, [C], [
  1004     # See if we are running on zsh, and set the options which allow our
  1005     # commands through without removal of \ escapes.
  1006     if test -n "${ZSH_VERSION+set}" ; then
  1007       setopt NO_GLOB_SUBST
  1008     fi
  1009 
  1010     cfgfile="${ofile}T"
  1011     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  1012     $RM "$cfgfile"
  1013 
  1014     cat <<_LT_EOF >> "$cfgfile"
  1015 #! $SHELL
  1016 
  1017 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  1018 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  1019 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1020 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  1021 #
  1022 _LT_COPYING
  1023 _LT_LIBTOOL_TAGS
  1024 
  1025 # ### BEGIN LIBTOOL CONFIG
  1026 _LT_LIBTOOL_CONFIG_VARS
  1027 _LT_LIBTOOL_TAG_VARS
  1028 # ### END LIBTOOL CONFIG
  1029 
  1030 _LT_EOF
  1031 
  1032   case $host_os in
  1033   aix3*)
  1034     cat <<\_LT_EOF >> "$cfgfile"
  1035 # AIX sometimes has problems with the GCC collect2 program.  For some
  1036 # reason, if we set the COLLECT_NAMES environment variable, the problems
  1037 # vanish in a puff of smoke.
  1038 if test "X${COLLECT_NAMES+set}" != Xset; then
  1039   COLLECT_NAMES=
  1040   export COLLECT_NAMES
  1041 fi
  1042 _LT_EOF
  1043     ;;
  1044   esac
  1045 
  1046   _LT_PROG_LTMAIN
  1047 
  1048   # We use sed instead of cat because bash on DJGPP gets confused if
  1049   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
  1050   # text mode, it properly converts lines to CR/LF.  This bash problem
  1051   # is reportedly fixed, but why not run on old versions too?
  1052   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
  1053     || (rm -f "$cfgfile"; exit 1)
  1054 
  1055   _LT_PROG_XSI_SHELLFNS
  1056 
  1057   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
  1058     || (rm -f "$cfgfile"; exit 1)
  1059 
  1060   mv -f "$cfgfile" "$ofile" ||
  1061     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  1062   chmod +x "$ofile"
  1063 ],
  1064 [cat <<_LT_EOF >> "$ofile"
  1065 
  1066 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  1067 dnl in a comment (ie after a #).
  1068 # ### BEGIN LIBTOOL TAG CONFIG: $1
  1069 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  1070 # ### END LIBTOOL TAG CONFIG: $1
  1071 _LT_EOF
  1072 ])dnl /m4_if
  1073 ],
  1074 [m4_if([$1], [], [
  1075     PACKAGE='$PACKAGE'
  1076     VERSION='$VERSION'
  1077     TIMESTAMP='$TIMESTAMP'
  1078     RM='$RM'
  1079     ofile='$ofile'], [])
  1080 ])dnl /_LT_CONFIG_SAVE_COMMANDS
  1081 ])# _LT_CONFIG
  1082 
  1083 
  1084 # LT_SUPPORTED_TAG(TAG)
  1085 # ---------------------
  1086 # Trace this macro to discover what tags are supported by the libtool
  1087 # --tag option, using:
  1088 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
  1089 AC_DEFUN([LT_SUPPORTED_TAG], [])
  1090 
  1091 
  1092 # C support is built-in for now
  1093 m4_define([_LT_LANG_C_enabled], [])
  1094 m4_define([_LT_TAGS], [])
  1095 
  1096 
  1097 # LT_LANG(LANG)
  1098 # -------------
  1099 # Enable libtool support for the given language if not already enabled.
  1100 AC_DEFUN([LT_LANG],
  1101 [AC_BEFORE([$0], [LT_OUTPUT])dnl
  1102 m4_case([$1],
  1103   [C],			[_LT_LANG(C)],
  1104   [C++],		[_LT_LANG(CXX)],
  1105   [Java],		[_LT_LANG(GCJ)],
  1106   [Fortran 77],		[_LT_LANG(F77)],
  1107   [Fortran],		[_LT_LANG(FC)],
  1108   [Windows Resource],	[_LT_LANG(RC)],
  1109   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  1110     [_LT_LANG($1)],
  1111     [m4_fatal([$0: unsupported language: "$1"])])])dnl
  1112 ])# LT_LANG
  1113 
  1114 
  1115 # _LT_LANG(LANGNAME)
  1116 # ------------------
  1117 m4_defun([_LT_LANG],
  1118 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  1119   [LT_SUPPORTED_TAG([$1])dnl
  1120   m4_append([_LT_TAGS], [$1 ])dnl
  1121   m4_define([_LT_LANG_]$1[_enabled], [])dnl
  1122   _LT_LANG_$1_CONFIG($1)])dnl
  1123 ])# _LT_LANG
  1124 
  1125 
  1126 # _LT_LANG_DEFAULT_CONFIG
  1127 # -----------------------
  1128 m4_defun([_LT_LANG_DEFAULT_CONFIG],
  1129 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  1130   [LT_LANG(CXX)],
  1131   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  1132 
  1133 AC_PROVIDE_IFELSE([AC_PROG_F77],
  1134   [LT_LANG(F77)],
  1135   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  1136 
  1137 AC_PROVIDE_IFELSE([AC_PROG_FC],
  1138   [LT_LANG(FC)],
  1139   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  1140 
  1141 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  1142 dnl pulling things in needlessly.
  1143 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  1144   [LT_LANG(GCJ)],
  1145   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  1146     [LT_LANG(GCJ)],
  1147     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  1148       [LT_LANG(GCJ)],
  1149       [m4_ifdef([AC_PROG_GCJ],
  1150 	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  1151        m4_ifdef([A][M_PROG_GCJ],
  1152 	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  1153        m4_ifdef([LT_PROG_GCJ],
  1154 	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  1155 
  1156 AC_PROVIDE_IFELSE([LT_PROG_RC],
  1157   [LT_LANG(RC)],
  1158   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  1159 ])# _LT_LANG_DEFAULT_CONFIG
  1160 
  1161 # Obsolete macros:
  1162 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  1163 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  1164 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  1165 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  1166 dnl aclocal-1.4 backwards compatibility:
  1167 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  1168 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  1169 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  1170 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  1171 
  1172 
  1173 # _LT_TAG_COMPILER
  1174 # ----------------
  1175 m4_defun([_LT_TAG_COMPILER],
  1176 [AC_REQUIRE([AC_PROG_CC])dnl
  1177 
  1178 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  1179 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  1180 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  1181 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  1182 
  1183 # If no C compiler was specified, use CC.
  1184 LTCC=${LTCC-"$CC"}
  1185 
  1186 # If no C compiler flags were specified, use CFLAGS.
  1187 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  1188 
  1189 # Allow CC to be a program name with arguments.
  1190 compiler=$CC
  1191 ])# _LT_TAG_COMPILER
  1192 
  1193 
  1194 # _LT_COMPILER_BOILERPLATE
  1195 # ------------------------
  1196 # Check for compiler boilerplate output or warnings with
  1197 # the simple compiler test code.
  1198 m4_defun([_LT_COMPILER_BOILERPLATE],
  1199 [m4_require([_LT_DECL_SED])dnl
  1200 ac_outfile=conftest.$ac_objext
  1201 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  1202 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  1203 _lt_compiler_boilerplate=`cat conftest.err`
  1204 $RM conftest*
  1205 ])# _LT_COMPILER_BOILERPLATE
  1206 
  1207 
  1208 # _LT_LINKER_BOILERPLATE
  1209 # ----------------------
  1210 # Check for linker boilerplate output or warnings with
  1211 # the simple link test code.
  1212 m4_defun([_LT_LINKER_BOILERPLATE],
  1213 [m4_require([_LT_DECL_SED])dnl
  1214 ac_outfile=conftest.$ac_objext
  1215 echo "$lt_simple_link_test_code" >conftest.$ac_ext
  1216 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  1217 _lt_linker_boilerplate=`cat conftest.err`
  1218 $RM -r conftest*
  1219 ])# _LT_LINKER_BOILERPLATE
  1220 
  1221 # _LT_REQUIRED_DARWIN_CHECKS
  1222 # -------------------------
  1223 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  1224   case $host_os in
  1225     rhapsody* | darwin*)
  1226     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  1227     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  1228     AC_CHECK_TOOL([LIPO], [lipo], [:])
  1229     AC_CHECK_TOOL([OTOOL], [otool], [:])
  1230     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  1231     _LT_DECL([], [DSYMUTIL], [1],
  1232       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  1233     _LT_DECL([], [NMEDIT], [1],
  1234       [Tool to change global to local symbols on Mac OS X])
  1235     _LT_DECL([], [LIPO], [1],
  1236       [Tool to manipulate fat objects and archives on Mac OS X])
  1237     _LT_DECL([], [OTOOL], [1],
  1238       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  1239     _LT_DECL([], [OTOOL64], [1],
  1240       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  1241 
  1242     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  1243       [lt_cv_apple_cc_single_mod=no
  1244       if test -z "${LT_MULTI_MODULE}"; then
  1245 	# By default we will add the -single_module flag. You can override
  1246 	# by either setting the environment variable LT_MULTI_MODULE
  1247 	# non-empty at configure time, or by adding -multi_module to the
  1248 	# link flags.
  1249 	rm -rf libconftest.dylib*
  1250 	echo "int foo(void){return 1;}" > conftest.c
  1251 	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  1252 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  1253 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  1254 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  1255         _lt_result=$?
  1256 	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
  1257 	  lt_cv_apple_cc_single_mod=yes
  1258 	else
  1259 	  cat conftest.err >&AS_MESSAGE_LOG_FD
  1260 	fi
  1261 	rm -rf libconftest.dylib*
  1262 	rm -f conftest.*
  1263       fi])
  1264     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  1265       [lt_cv_ld_exported_symbols_list],
  1266       [lt_cv_ld_exported_symbols_list=no
  1267       save_LDFLAGS=$LDFLAGS
  1268       echo "_main" > conftest.sym
  1269       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  1270       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  1271 	[lt_cv_ld_exported_symbols_list=yes],
  1272 	[lt_cv_ld_exported_symbols_list=no])
  1273 	LDFLAGS="$save_LDFLAGS"
  1274     ])
  1275     case $host_os in
  1276     rhapsody* | darwin1.[[012]])
  1277       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  1278     darwin1.*)
  1279       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  1280     darwin*) # darwin 5.x on
  1281       # if running on 10.5 or later, the deployment target defaults
  1282       # to the OS version, if on x86, and 10.4, the deployment
  1283       # target defaults to 10.4. Don't you love it?
  1284       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  1285 	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  1286 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  1287 	10.[[012]]*)
  1288 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  1289 	10.*)
  1290 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  1291       esac
  1292     ;;
  1293   esac
  1294     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  1295       _lt_dar_single_mod='$single_module'
  1296     fi
  1297     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  1298       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  1299     else
  1300       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1301     fi
  1302     if test "$DSYMUTIL" != ":"; then
  1303       _lt_dsymutil='~$DSYMUTIL $lib || :'
  1304     else
  1305       _lt_dsymutil=
  1306     fi
  1307     ;;
  1308   esac
  1309 ])
  1310 
  1311 
  1312 # _LT_DARWIN_LINKER_FEATURES
  1313 # --------------------------
  1314 # Checks for linker and compiler features on darwin
  1315 m4_defun([_LT_DARWIN_LINKER_FEATURES],
  1316 [
  1317   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  1318   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  1319   _LT_TAGVAR(hardcode_direct, $1)=no
  1320   _LT_TAGVAR(hardcode_automatic, $1)=yes
  1321   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  1322   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  1323   _LT_TAGVAR(link_all_deplibs, $1)=yes
  1324   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  1325   case $cc_basename in
  1326      ifort*) _lt_dar_can_shared=yes ;;
  1327      *) _lt_dar_can_shared=$GCC ;;
  1328   esac
  1329   if test "$_lt_dar_can_shared" = "yes"; then
  1330     output_verbose_link_cmd=echo
  1331     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
  1332     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  1333     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
  1334     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
  1335     m4_if([$1], [CXX],
  1336 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  1337       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
  1338       _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
  1339     fi
  1340 ],[])
  1341   else
  1342   _LT_TAGVAR(ld_shlibs, $1)=no
  1343   fi
  1344 ])
  1345 
  1346 # _LT_SYS_MODULE_PATH_AIX
  1347 # -----------------------
  1348 # Links a minimal program and checks the executable
  1349 # for the system default hardcoded library path. In most cases,
  1350 # this is /usr/lib:/lib, but when the MPI compilers are used
  1351 # the location of the communication and MPI libs are included too.
  1352 # If we don't find anything, use the default library path according
  1353 # to the aix ld manual.
  1354 m4_defun([_LT_SYS_MODULE_PATH_AIX],
  1355 [m4_require([_LT_DECL_SED])dnl
  1356 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  1357 lt_aix_libpath_sed='
  1358     /Import File Strings/,/^$/ {
  1359 	/^0/ {
  1360 	    s/^0  *\(.*\)$/\1/
  1361 	    p
  1362 	}
  1363     }'
  1364 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1365 # Check for a 64-bit object if we didn't find anything.
  1366 if test -z "$aix_libpath"; then
  1367   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1368 fi],[])
  1369 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  1370 ])# _LT_SYS_MODULE_PATH_AIX
  1371 
  1372 
  1373 # _LT_SHELL_INIT(ARG)
  1374 # -------------------
  1375 m4_define([_LT_SHELL_INIT],
  1376 [ifdef([AC_DIVERSION_NOTICE],
  1377 	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  1378 	 [AC_DIVERT_PUSH(NOTICE)])
  1379 $1
  1380 AC_DIVERT_POP
  1381 ])# _LT_SHELL_INIT
  1382 
  1383 
  1384 # _LT_PROG_ECHO_BACKSLASH
  1385 # -----------------------
  1386 # Add some code to the start of the generated configure script which
  1387 # will find an echo command which doesn't interpret backslashes.
  1388 m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1389 [_LT_SHELL_INIT([
  1390 # Check that we are running under the correct shell.
  1391 SHELL=${CONFIG_SHELL-/bin/sh}
  1392 
  1393 case X$lt_ECHO in
  1394 X*--fallback-echo)
  1395   # Remove one level of quotation (which was required for Make).
  1396   ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  1397   ;;
  1398 esac
  1399 
  1400 ECHO=${lt_ECHO-echo}
  1401 if test "X[$]1" = X--no-reexec; then
  1402   # Discard the --no-reexec flag, and continue.
  1403   shift
  1404 elif test "X[$]1" = X--fallback-echo; then
  1405   # Avoid inline document here, it may be left over
  1406   :
  1407 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
  1408   # Yippee, $ECHO works!
  1409   :
  1410 else
  1411   # Restart under the correct shell.
  1412   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  1413 fi
  1414 
  1415 if test "X[$]1" = X--fallback-echo; then
  1416   # used as fallback echo
  1417   shift
  1418   cat <<_LT_EOF
  1419 [$]*
  1420 _LT_EOF
  1421   exit 0
  1422 fi
  1423 
  1424 # The HP-UX ksh and POSIX shell print the target directory to stdout
  1425 # if CDPATH is set.
  1426 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  1427 
  1428 if test -z "$lt_ECHO"; then
  1429   if test "X${echo_test_string+set}" != Xset; then
  1430     # find a string as large as possible, as long as the shell can cope with it
  1431     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  1432       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  1433       if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
  1434 	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
  1435       then
  1436         break
  1437       fi
  1438     done
  1439   fi
  1440 
  1441   if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
  1442      echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
  1443      test "X$echo_testing_string" = "X$echo_test_string"; then
  1444     :
  1445   else
  1446     # The Solaris, AIX, and Digital Unix default echo programs unquote
  1447     # backslashes.  This makes it impossible to quote backslashes using
  1448     #   echo "$something" | sed 's/\\/\\\\/g'
  1449     #
  1450     # So, first we look for a working echo in the user's PATH.
  1451 
  1452     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1453     for dir in $PATH /usr/ucb; do
  1454       IFS="$lt_save_ifs"
  1455       if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  1456          test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  1457          echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  1458          test "X$echo_testing_string" = "X$echo_test_string"; then
  1459         ECHO="$dir/echo"
  1460         break
  1461       fi
  1462     done
  1463     IFS="$lt_save_ifs"
  1464 
  1465     if test "X$ECHO" = Xecho; then
  1466       # We didn't find a better echo, so look for alternatives.
  1467       if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
  1468          echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
  1469          test "X$echo_testing_string" = "X$echo_test_string"; then
  1470         # This shell has a builtin print -r that does the trick.
  1471         ECHO='print -r'
  1472       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
  1473 	   test "X$CONFIG_SHELL" != X/bin/ksh; then
  1474         # If we have ksh, try running configure again with it.
  1475         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  1476         export ORIGINAL_CONFIG_SHELL
  1477         CONFIG_SHELL=/bin/ksh
  1478         export CONFIG_SHELL
  1479         exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  1480       else
  1481         # Try using printf.
  1482         ECHO='printf %s\n'
  1483         if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
  1484 	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
  1485 	   test "X$echo_testing_string" = "X$echo_test_string"; then
  1486 	  # Cool, printf works
  1487 	  :
  1488         elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  1489 	     test "X$echo_testing_string" = 'X\t' &&
  1490 	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  1491 	     test "X$echo_testing_string" = "X$echo_test_string"; then
  1492 	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  1493 	  export CONFIG_SHELL
  1494 	  SHELL="$CONFIG_SHELL"
  1495 	  export SHELL
  1496 	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
  1497         elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  1498 	     test "X$echo_testing_string" = 'X\t' &&
  1499 	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  1500 	     test "X$echo_testing_string" = "X$echo_test_string"; then
  1501 	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
  1502         else
  1503 	  # maybe with a smaller string...
  1504 	  prev=:
  1505 
  1506 	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  1507 	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
  1508 	    then
  1509 	      break
  1510 	    fi
  1511 	    prev="$cmd"
  1512 	  done
  1513 
  1514 	  if test "$prev" != 'sed 50q "[$]0"'; then
  1515 	    echo_test_string=`eval $prev`
  1516 	    export echo_test_string
  1517 	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  1518 	  else
  1519 	    # Oops.  We lost completely, so just stick with echo.
  1520 	    ECHO=echo
  1521 	  fi
  1522         fi
  1523       fi
  1524     fi
  1525   fi
  1526 fi
  1527 
  1528 # Copy echo and quote the copy suitably for passing to libtool from
  1529 # the Makefile, instead of quoting the original, which is used later.
  1530 lt_ECHO=$ECHO
  1531 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  1532    lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  1533 fi
  1534 
  1535 AC_SUBST(lt_ECHO)
  1536 ])
  1537 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1538 _LT_DECL([], [ECHO], [1],
  1539     [An echo program that does not interpret backslashes])
  1540 ])# _LT_PROG_ECHO_BACKSLASH
  1541 
  1542 
  1543 # _LT_ENABLE_LOCK
  1544 # ---------------
  1545 m4_defun([_LT_ENABLE_LOCK],
  1546 [AC_ARG_ENABLE([libtool-lock],
  1547   [AS_HELP_STRING([--disable-libtool-lock],
  1548     [avoid locking (might break parallel builds)])])
  1549 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1550 
  1551 # Some flags need to be propagated to the compiler or linker for good
  1552 # libtool support.
  1553 case $host in
  1554 ia64-*-hpux*)
  1555   # Find out which ABI we are using.
  1556   echo 'int i;' > conftest.$ac_ext
  1557   if AC_TRY_EVAL(ac_compile); then
  1558     case `/usr/bin/file conftest.$ac_objext` in
  1559       *ELF-32*)
  1560 	HPUX_IA64_MODE="32"
  1561 	;;
  1562       *ELF-64*)
  1563 	HPUX_IA64_MODE="64"
  1564 	;;
  1565     esac
  1566   fi
  1567   rm -rf conftest*
  1568   ;;
  1569 *-*-irix6*)
  1570   # Find out which ABI we are using.
  1571   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  1572   if AC_TRY_EVAL(ac_compile); then
  1573     if test "$lt_cv_prog_gnu_ld" = yes; then
  1574       case `/usr/bin/file conftest.$ac_objext` in
  1575 	*32-bit*)
  1576 	  LD="${LD-ld} -melf32bsmip"
  1577 	  ;;
  1578 	*N32*)
  1579 	  LD="${LD-ld} -melf32bmipn32"
  1580 	  ;;
  1581 	*64-bit*)
  1582 	  LD="${LD-ld} -melf64bmip"
  1583 	;;
  1584       esac
  1585     else
  1586       case `/usr/bin/file conftest.$ac_objext` in
  1587 	*32-bit*)
  1588 	  LD="${LD-ld} -32"
  1589 	  ;;
  1590 	*N32*)
  1591 	  LD="${LD-ld} -n32"
  1592 	  ;;
  1593 	*64-bit*)
  1594 	  LD="${LD-ld} -64"
  1595 	  ;;
  1596       esac
  1597     fi
  1598   fi
  1599   rm -rf conftest*
  1600   ;;
  1601 
  1602 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1603 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1604   # Find out which ABI we are using.
  1605   echo 'int i;' > conftest.$ac_ext
  1606   if AC_TRY_EVAL(ac_compile); then
  1607     case `/usr/bin/file conftest.o` in
  1608       *32-bit*)
  1609 	case $host in
  1610 	  x86_64-*kfreebsd*-gnu)
  1611 	    LD="${LD-ld} -m elf_i386_fbsd"
  1612 	    ;;
  1613 	  x86_64-*linux*)
  1614 	    LD="${LD-ld} -m elf_i386"
  1615 	    ;;
  1616 	  ppc64-*linux*|powerpc64-*linux*)
  1617 	    LD="${LD-ld} -m elf32ppclinux"
  1618 	    ;;
  1619 	  s390x-*linux*)
  1620 	    LD="${LD-ld} -m elf_s390"
  1621 	    ;;
  1622 	  sparc64-*linux*)
  1623 	    LD="${LD-ld} -m elf32_sparc"
  1624 	    ;;
  1625 	esac
  1626 	;;
  1627       *64-bit*)
  1628 	case $host in
  1629 	  x86_64-*kfreebsd*-gnu)
  1630 	    LD="${LD-ld} -m elf_x86_64_fbsd"
  1631 	    ;;
  1632 	  x86_64-*linux*)
  1633 	    LD="${LD-ld} -m elf_x86_64"
  1634 	    ;;
  1635 	  ppc*-*linux*|powerpc*-*linux*)
  1636 	    LD="${LD-ld} -m elf64ppc"
  1637 	    ;;
  1638 	  s390*-*linux*|s390*-*tpf*)
  1639 	    LD="${LD-ld} -m elf64_s390"
  1640 	    ;;
  1641 	  sparc*-*linux*)
  1642 	    LD="${LD-ld} -m elf64_sparc"
  1643 	    ;;
  1644 	esac
  1645 	;;
  1646     esac
  1647   fi
  1648   rm -rf conftest*
  1649   ;;
  1650 
  1651 *-*-sco3.2v5*)
  1652   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1653   SAVE_CFLAGS="$CFLAGS"
  1654   CFLAGS="$CFLAGS -belf"
  1655   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1656     [AC_LANG_PUSH(C)
  1657      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1658      AC_LANG_POP])
  1659   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1660     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1661     CFLAGS="$SAVE_CFLAGS"
  1662   fi
  1663   ;;
  1664 sparc*-*solaris*)
  1665   # Find out which ABI we are using.
  1666   echo 'int i;' > conftest.$ac_ext
  1667   if AC_TRY_EVAL(ac_compile); then
  1668     case `/usr/bin/file conftest.o` in
  1669     *64-bit*)
  1670       case $lt_cv_prog_gnu_ld in
  1671       yes*) LD="${LD-ld} -m elf64_sparc" ;;
  1672       *)
  1673 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1674 	  LD="${LD-ld} -64"
  1675 	fi
  1676 	;;
  1677       esac
  1678       ;;
  1679     esac
  1680   fi
  1681   rm -rf conftest*
  1682   ;;
  1683 esac
  1684 
  1685 need_locks="$enable_libtool_lock"
  1686 ])# _LT_ENABLE_LOCK
  1687 
  1688 
  1689 # _LT_CMD_OLD_ARCHIVE
  1690 # -------------------
  1691 m4_defun([_LT_CMD_OLD_ARCHIVE],
  1692 [AC_CHECK_TOOL(AR, ar, false)
  1693 test -z "$AR" && AR=ar
  1694 test -z "$AR_FLAGS" && AR_FLAGS=cru
  1695 _LT_DECL([], [AR], [1], [The archiver])
  1696 _LT_DECL([], [AR_FLAGS], [1])
  1697 
  1698 AC_CHECK_TOOL(STRIP, strip, :)
  1699 test -z "$STRIP" && STRIP=:
  1700 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1701 
  1702 AC_CHECK_TOOL(RANLIB, ranlib, :)
  1703 test -z "$RANLIB" && RANLIB=:
  1704 _LT_DECL([], [RANLIB], [1],
  1705     [Commands used to install an old-style archive])
  1706 
  1707 # Determine commands to create old-style static archives.
  1708 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1709 old_postinstall_cmds='chmod 644 $oldlib'
  1710 old_postuninstall_cmds=
  1711 
  1712 if test -n "$RANLIB"; then
  1713   case $host_os in
  1714   openbsd*)
  1715     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  1716     ;;
  1717   *)
  1718     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  1719     ;;
  1720   esac
  1721   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  1722 fi
  1723 _LT_DECL([], [old_postinstall_cmds], [2])
  1724 _LT_DECL([], [old_postuninstall_cmds], [2])
  1725 _LT_TAGDECL([], [old_archive_cmds], [2],
  1726     [Commands used to build an old-style archive])
  1727 ])# _LT_CMD_OLD_ARCHIVE
  1728 
  1729 
  1730 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1731 #		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1732 # ----------------------------------------------------------------
  1733 # Check whether the given compiler option works
  1734 AC_DEFUN([_LT_COMPILER_OPTION],
  1735 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1736 m4_require([_LT_DECL_SED])dnl
  1737 AC_CACHE_CHECK([$1], [$2],
  1738   [$2=no
  1739    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1740    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1741    lt_compiler_flag="$3"
  1742    # Insert the option either (1) after the last *FLAGS variable, or
  1743    # (2) before a word containing "conftest.", or (3) at the end.
  1744    # Note that $ac_compile itself does not contain backslashes and begins
  1745    # with a dollar sign (not a hyphen), so the echo should work correctly.
  1746    # The option is referenced via a variable to avoid confusing sed.
  1747    lt_compile=`echo "$ac_compile" | $SED \
  1748    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1749    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1750    -e 's:$: $lt_compiler_flag:'`
  1751    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1752    (eval "$lt_compile" 2>conftest.err)
  1753    ac_status=$?
  1754    cat conftest.err >&AS_MESSAGE_LOG_FD
  1755    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1756    if (exit $ac_status) && test -s "$ac_outfile"; then
  1757      # The compiler can only warn and ignore the option if not recognized
  1758      # So say no if there are warnings other than the usual output.
  1759      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  1760      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1761      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1762        $2=yes
  1763      fi
  1764    fi
  1765    $RM conftest*
  1766 ])
  1767 
  1768 if test x"[$]$2" = xyes; then
  1769     m4_if([$5], , :, [$5])
  1770 else
  1771     m4_if([$6], , :, [$6])
  1772 fi
  1773 ])# _LT_COMPILER_OPTION
  1774 
  1775 # Old name:
  1776 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1777 dnl aclocal-1.4 backwards compatibility:
  1778 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1779 
  1780 
  1781 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1782 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
  1783 # ----------------------------------------------------
  1784 # Check whether the given linker option works
  1785 AC_DEFUN([_LT_LINKER_OPTION],
  1786 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1787 m4_require([_LT_DECL_SED])dnl
  1788 AC_CACHE_CHECK([$1], [$2],
  1789   [$2=no
  1790    save_LDFLAGS="$LDFLAGS"
  1791    LDFLAGS="$LDFLAGS $3"
  1792    echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1793    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1794      # The linker can only warn and ignore the option if not recognized
  1795      # So say no if there are warnings
  1796      if test -s conftest.err; then
  1797        # Append any errors to the config.log.
  1798        cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1799        $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
  1800        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1801        if diff conftest.exp conftest.er2 >/dev/null; then
  1802          $2=yes
  1803        fi
  1804      else
  1805        $2=yes
  1806      fi
  1807    fi
  1808    $RM -r conftest*
  1809    LDFLAGS="$save_LDFLAGS"
  1810 ])
  1811 
  1812 if test x"[$]$2" = xyes; then
  1813     m4_if([$4], , :, [$4])
  1814 else
  1815     m4_if([$5], , :, [$5])
  1816 fi
  1817 ])# _LT_LINKER_OPTION
  1818 
  1819 # Old name:
  1820 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1821 dnl aclocal-1.4 backwards compatibility:
  1822 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1823 
  1824 
  1825 # LT_CMD_MAX_LEN
  1826 #---------------
  1827 AC_DEFUN([LT_CMD_MAX_LEN],
  1828 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1829 # find the maximum length of command line arguments
  1830 AC_MSG_CHECKING([the maximum length of command line arguments])
  1831 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1832   i=0
  1833   teststring="ABCD"
  1834 
  1835   case $build_os in
  1836   msdosdjgpp*)
  1837     # On DJGPP, this test can blow up pretty badly due to problems in libc
  1838     # (any single argument exceeding 2000 bytes causes a buffer overrun
  1839     # during glob expansion).  Even if it were fixed, the result of this
  1840     # check would be larger than it should be.
  1841     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
  1842     ;;
  1843 
  1844   gnu*)
  1845     # Under GNU Hurd, this test is not required because there is
  1846     # no limit to the length of command line arguments.
  1847     # Libtool will interpret -1 as no limit whatsoever
  1848     lt_cv_sys_max_cmd_len=-1;
  1849     ;;
  1850 
  1851   cygwin* | mingw* | cegcc*)
  1852     # On Win9x/ME, this test blows up -- it succeeds, but takes
  1853     # about 5 minutes as the teststring grows exponentially.
  1854     # Worse, since 9x/ME are not pre-emptively multitasking,
  1855     # you end up with a "frozen" computer, even though with patience
  1856     # the test eventually succeeds (with a max line length of 256k).
  1857     # Instead, let's just punt: use the minimum linelength reported by
  1858     # all of the supported platforms: 8192 (on NT/2K/XP).
  1859     lt_cv_sys_max_cmd_len=8192;
  1860     ;;
  1861 
  1862   beos*)
  1863     # On BeOS, this test takes a really really long time.
  1864     # So we just punt and use a minimum line length of 8192.
  1865     lt_cv_sys_max_cmd_len=8192;
  1866     ;;
  1867 
  1868   amigaos*)
  1869     # On AmigaOS with pdksh, this test takes hours, literally.
  1870     # So we just punt and use a minimum line length of 8192.
  1871     lt_cv_sys_max_cmd_len=8192;
  1872     ;;
  1873 
  1874   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  1875     # This has been around since 386BSD, at least.  Likely further.
  1876     if test -x /sbin/sysctl; then
  1877       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1878     elif test -x /usr/sbin/sysctl; then
  1879       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1880     else
  1881       lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
  1882     fi
  1883     # And add a safety zone
  1884     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1885     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1886     ;;
  1887 
  1888   interix*)
  1889     # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1890     lt_cv_sys_max_cmd_len=196608
  1891     ;;
  1892 
  1893   osf*)
  1894     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1895     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1896     # nice to cause kernel panics so lets avoid the loop below.
  1897     # First set a reasonable default.
  1898     lt_cv_sys_max_cmd_len=16384
  1899     #
  1900     if test -x /sbin/sysconfig; then
  1901       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1902         *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1903       esac
  1904     fi
  1905     ;;
  1906   sco3.2v5*)
  1907     lt_cv_sys_max_cmd_len=102400
  1908     ;;
  1909   sysv5* | sco5v6* | sysv4.2uw2*)
  1910     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1911     if test -n "$kargmax"; then
  1912       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
  1913     else
  1914       lt_cv_sys_max_cmd_len=32768
  1915     fi
  1916     ;;
  1917   *)
  1918     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1919     if test -n "$lt_cv_sys_max_cmd_len"; then
  1920       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1921       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1922     else
  1923       # Make teststring a little bigger before we do anything with it.
  1924       # a 1K string should be a reasonable start.
  1925       for i in 1 2 3 4 5 6 7 8 ; do
  1926         teststring=$teststring$teststring
  1927       done
  1928       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1929       # If test is not a shell built-in, we'll probably end up computing a
  1930       # maximum length that is only half of the actual maximum length, but
  1931       # we can't tell.
  1932       while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
  1933 	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
  1934 	      test $i != 17 # 1/2 MB should be enough
  1935       do
  1936         i=`expr $i + 1`
  1937         teststring=$teststring$teststring
  1938       done
  1939       # Only check the string length outside the loop.
  1940       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1941       teststring=
  1942       # Add a significant safety factor because C++ compilers can tack on
  1943       # massive amounts of additional arguments before passing them to the
  1944       # linker.  It appears as though 1/2 is a usable value.
  1945       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1946     fi
  1947     ;;
  1948   esac
  1949 ])
  1950 if test -n $lt_cv_sys_max_cmd_len ; then
  1951   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1952 else
  1953   AC_MSG_RESULT(none)
  1954 fi
  1955 max_cmd_len=$lt_cv_sys_max_cmd_len
  1956 _LT_DECL([], [max_cmd_len], [0],
  1957     [What is the maximum length of a command?])
  1958 ])# LT_CMD_MAX_LEN
  1959 
  1960 # Old name:
  1961 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1962 dnl aclocal-1.4 backwards compatibility:
  1963 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1964 
  1965 
  1966 # _LT_HEADER_DLFCN
  1967 # ----------------
  1968 m4_defun([_LT_HEADER_DLFCN],
  1969 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1970 ])# _LT_HEADER_DLFCN
  1971 
  1972 
  1973 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1974 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1975 # ----------------------------------------------------------------
  1976 m4_defun([_LT_TRY_DLOPEN_SELF],
  1977 [m4_require([_LT_HEADER_DLFCN])dnl
  1978 if test "$cross_compiling" = yes; then :
  1979   [$4]
  1980 else
  1981   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1982   lt_status=$lt_dlunknown
  1983   cat > conftest.$ac_ext <<_LT_EOF
  1984 [#line __oline__ "configure"
  1985 #include "confdefs.h"
  1986 
  1987 #if HAVE_DLFCN_H
  1988 #include <dlfcn.h>
  1989 #endif
  1990 
  1991 #include <stdio.h>
  1992 
  1993 #ifdef RTLD_GLOBAL
  1994 #  define LT_DLGLOBAL		RTLD_GLOBAL
  1995 #else
  1996 #  ifdef DL_GLOBAL
  1997 #    define LT_DLGLOBAL		DL_GLOBAL
  1998 #  else
  1999 #    define LT_DLGLOBAL		0
  2000 #  endif
  2001 #endif
  2002 
  2003 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  2004    find out it does not work in some platform. */
  2005 #ifndef LT_DLLAZY_OR_NOW
  2006 #  ifdef RTLD_LAZY
  2007 #    define LT_DLLAZY_OR_NOW		RTLD_LAZY
  2008 #  else
  2009 #    ifdef DL_LAZY
  2010 #      define LT_DLLAZY_OR_NOW		DL_LAZY
  2011 #    else
  2012 #      ifdef RTLD_NOW
  2013 #        define LT_DLLAZY_OR_NOW	RTLD_NOW
  2014 #      else
  2015 #        ifdef DL_NOW
  2016 #          define LT_DLLAZY_OR_NOW	DL_NOW
  2017 #        else
  2018 #          define LT_DLLAZY_OR_NOW	0
  2019 #        endif
  2020 #      endif
  2021 #    endif
  2022 #  endif
  2023 #endif
  2024 
  2025 void fnord() { int i=42;}
  2026 int main ()
  2027 {
  2028   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  2029   int status = $lt_dlunknown;
  2030 
  2031   if (self)
  2032     {
  2033       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
  2034       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  2035       /* dlclose (self); */
  2036     }
  2037   else
  2038     puts (dlerror ());
  2039 
  2040   return status;
  2041 }]
  2042 _LT_EOF
  2043   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  2044     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  2045     lt_status=$?
  2046     case x$lt_status in
  2047       x$lt_dlno_uscore) $1 ;;
  2048       x$lt_dlneed_uscore) $2 ;;
  2049       x$lt_dlunknown|x*) $3 ;;
  2050     esac
  2051   else :
  2052     # compilation failed
  2053     $3
  2054   fi
  2055 fi
  2056 rm -fr conftest*
  2057 ])# _LT_TRY_DLOPEN_SELF
  2058 
  2059 
  2060 # LT_SYS_DLOPEN_SELF
  2061 # ------------------
  2062 AC_DEFUN([LT_SYS_DLOPEN_SELF],
  2063 [m4_require([_LT_HEADER_DLFCN])dnl
  2064 if test "x$enable_dlopen" != xyes; then
  2065   enable_dlopen=unknown
  2066   enable_dlopen_self=unknown
  2067   enable_dlopen_self_static=unknown
  2068 else
  2069   lt_cv_dlopen=no
  2070   lt_cv_dlopen_libs=
  2071 
  2072   case $host_os in
  2073   beos*)
  2074     lt_cv_dlopen="load_add_on"
  2075     lt_cv_dlopen_libs=
  2076     lt_cv_dlopen_self=yes
  2077     ;;
  2078 
  2079   mingw* | pw32* | cegcc*)
  2080     lt_cv_dlopen="LoadLibrary"
  2081     lt_cv_dlopen_libs=
  2082     ;;
  2083 
  2084   cygwin*)
  2085     lt_cv_dlopen="dlopen"
  2086     lt_cv_dlopen_libs=
  2087     ;;
  2088 
  2089   darwin*)
  2090   # if libdl is installed we need to link against it
  2091     AC_CHECK_LIB([dl], [dlopen],
  2092 		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  2093     lt_cv_dlopen="dyld"
  2094     lt_cv_dlopen_libs=
  2095     lt_cv_dlopen_self=yes
  2096     ])
  2097     ;;
  2098 
  2099   *)
  2100     AC_CHECK_FUNC([shl_load],
  2101 	  [lt_cv_dlopen="shl_load"],
  2102       [AC_CHECK_LIB([dld], [shl_load],
  2103 	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  2104 	[AC_CHECK_FUNC([dlopen],
  2105 	      [lt_cv_dlopen="dlopen"],
  2106 	  [AC_CHECK_LIB([dl], [dlopen],
  2107 		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  2108 	    [AC_CHECK_LIB([svld], [dlopen],
  2109 		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  2110 	      [AC_CHECK_LIB([dld], [dld_link],
  2111 		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  2112 	      ])
  2113 	    ])
  2114 	  ])
  2115 	])
  2116       ])
  2117     ;;
  2118   esac
  2119 
  2120   if test "x$lt_cv_dlopen" != xno; then
  2121     enable_dlopen=yes
  2122   else
  2123     enable_dlopen=no
  2124   fi
  2125 
  2126   case $lt_cv_dlopen in
  2127   dlopen)
  2128     save_CPPFLAGS="$CPPFLAGS"
  2129     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  2130 
  2131     save_LDFLAGS="$LDFLAGS"
  2132     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  2133 
  2134     save_LIBS="$LIBS"
  2135     LIBS="$lt_cv_dlopen_libs $LIBS"
  2136 
  2137     AC_CACHE_CHECK([whether a program can dlopen itself],
  2138 	  lt_cv_dlopen_self, [dnl
  2139 	  _LT_TRY_DLOPEN_SELF(
  2140 	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  2141 	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  2142     ])
  2143 
  2144     if test "x$lt_cv_dlopen_self" = xyes; then
  2145       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  2146       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  2147 	  lt_cv_dlopen_self_static, [dnl
  2148 	  _LT_TRY_DLOPEN_SELF(
  2149 	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  2150 	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
  2151       ])
  2152     fi
  2153 
  2154     CPPFLAGS="$save_CPPFLAGS"
  2155     LDFLAGS="$save_LDFLAGS"
  2156     LIBS="$save_LIBS"
  2157     ;;
  2158   esac
  2159 
  2160   case $lt_cv_dlopen_self in
  2161   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  2162   *) enable_dlopen_self=unknown ;;
  2163   esac
  2164 
  2165   case $lt_cv_dlopen_self_static in
  2166   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  2167   *) enable_dlopen_self_static=unknown ;;
  2168   esac
  2169 fi
  2170 _LT_DECL([dlopen_support], [enable_dlopen], [0],
  2171 	 [Whether dlopen is supported])
  2172 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  2173 	 [Whether dlopen of programs is supported])
  2174 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  2175 	 [Whether dlopen of statically linked programs is supported])
  2176 ])# LT_SYS_DLOPEN_SELF
  2177 
  2178 # Old name:
  2179 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  2180 dnl aclocal-1.4 backwards compatibility:
  2181 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  2182 
  2183 
  2184 # _LT_COMPILER_C_O([TAGNAME])
  2185 # ---------------------------
  2186 # Check to see if options -c and -o are simultaneously supported by compiler.
  2187 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  2188 m4_defun([_LT_COMPILER_C_O],
  2189 [m4_require([_LT_DECL_SED])dnl
  2190 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2191 m4_require([_LT_TAG_COMPILER])dnl
  2192 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  2193   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  2194   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  2195    $RM -r conftest 2>/dev/null
  2196    mkdir conftest
  2197    cd conftest
  2198    mkdir out
  2199    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  2200 
  2201    lt_compiler_flag="-o out/conftest2.$ac_objext"
  2202    # Insert the option either (1) after the last *FLAGS variable, or
  2203    # (2) before a word containing "conftest.", or (3) at the end.
  2204    # Note that $ac_compile itself does not contain backslashes and begins
  2205    # with a dollar sign (not a hyphen), so the echo should work correctly.
  2206    lt_compile=`echo "$ac_compile" | $SED \
  2207    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  2208    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  2209    -e 's:$: $lt_compiler_flag:'`
  2210    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  2211    (eval "$lt_compile" 2>out/conftest.err)
  2212    ac_status=$?
  2213    cat out/conftest.err >&AS_MESSAGE_LOG_FD
  2214    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  2215    if (exit $ac_status) && test -s out/conftest2.$ac_objext
  2216    then
  2217      # The compiler can only warn and ignore the option if not recognized
  2218      # So say no if there are warnings
  2219      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  2220      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  2221      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  2222        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  2223      fi
  2224    fi
  2225    chmod u+w . 2>&AS_MESSAGE_LOG_FD
  2226    $RM conftest*
  2227    # SGI C++ compiler will create directory out/ii_files/ for
  2228    # template instantiation
  2229    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  2230    $RM out/* && rmdir out
  2231    cd ..
  2232    $RM -r conftest
  2233    $RM conftest*
  2234 ])
  2235 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  2236 	[Does compiler simultaneously support -c and -o options?])
  2237 ])# _LT_COMPILER_C_O
  2238 
  2239 
  2240 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  2241 # ----------------------------------
  2242 # Check to see if we can do hard links to lock some files if needed
  2243 m4_defun([_LT_COMPILER_FILE_LOCKS],
  2244 [m4_require([_LT_ENABLE_LOCK])dnl
  2245 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2246 _LT_COMPILER_C_O([$1])
  2247 
  2248 hard_links="nottested"
  2249 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  2250   # do not overwrite the value of need_locks provided by the user
  2251   AC_MSG_CHECKING([if we can lock with hard links])
  2252   hard_links=yes
  2253   $RM conftest*
  2254   ln conftest.a conftest.b 2>/dev/null && hard_links=no
  2255   touch conftest.a
  2256   ln conftest.a conftest.b 2>&5 || hard_links=no
  2257   ln conftest.a conftest.b 2>/dev/null && hard_links=no
  2258   AC_MSG_RESULT([$hard_links])
  2259   if test "$hard_links" = no; then
  2260     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  2261     need_locks=warn
  2262   fi
  2263 else
  2264   need_locks=no
  2265 fi
  2266 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  2267 ])# _LT_COMPILER_FILE_LOCKS
  2268 
  2269 
  2270 # _LT_CHECK_OBJDIR
  2271 # ----------------
  2272 m4_defun([_LT_CHECK_OBJDIR],
  2273 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  2274 [rm -f .libs 2>/dev/null
  2275 mkdir .libs 2>/dev/null
  2276 if test -d .libs; then
  2277   lt_cv_objdir=.libs
  2278 else
  2279   # MS-DOS does not allow filenames that begin with a dot.
  2280   lt_cv_objdir=_libs
  2281 fi
  2282 rmdir .libs 2>/dev/null])
  2283 objdir=$lt_cv_objdir
  2284 _LT_DECL([], [objdir], [0],
  2285          [The name of the directory that contains temporary libtool files])dnl
  2286 m4_pattern_allow([LT_OBJDIR])dnl
  2287 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  2288   [Define to the sub-directory in which libtool stores uninstalled libraries.])
  2289 ])# _LT_CHECK_OBJDIR
  2290 
  2291 
  2292 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  2293 # --------------------------------------
  2294 # Check hardcoding attributes.
  2295 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  2296 [AC_MSG_CHECKING([how to hardcode library paths into programs])
  2297 _LT_TAGVAR(hardcode_action, $1)=
  2298 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  2299    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  2300    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  2301 
  2302   # We can hardcode non-existent directories.
  2303   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  2304      # If the only mechanism to avoid hardcoding is shlibpath_var, we
  2305      # have to relink, otherwise we might link with an installed library
  2306      # when we should be linking with a yet-to-be-installed one
  2307      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  2308      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  2309     # Linking always hardcodes the temporary library directory.
  2310     _LT_TAGVAR(hardcode_action, $1)=relink
  2311   else
  2312     # We can link without hardcoding, and we can hardcode nonexisting dirs.
  2313     _LT_TAGVAR(hardcode_action, $1)=immediate
  2314   fi
  2315 else
  2316   # We cannot hardcode anything, or else we can only hardcode existing
  2317   # directories.
  2318   _LT_TAGVAR(hardcode_action, $1)=unsupported
  2319 fi
  2320 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  2321 
  2322 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  2323    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  2324   # Fast installation is not supported
  2325   enable_fast_install=no
  2326 elif test "$shlibpath_overrides_runpath" = yes ||
  2327      test "$enable_shared" = no; then
  2328   # Fast installation is not necessary
  2329   enable_fast_install=needless
  2330 fi
  2331 _LT_TAGDECL([], [hardcode_action], [0],
  2332     [How to hardcode a shared library path into an executable])
  2333 ])# _LT_LINKER_HARDCODE_LIBPATH
  2334 
  2335 
  2336 # _LT_CMD_STRIPLIB
  2337 # ----------------
  2338 m4_defun([_LT_CMD_STRIPLIB],
  2339 [m4_require([_LT_DECL_EGREP])
  2340 striplib=
  2341 old_striplib=
  2342 AC_MSG_CHECKING([whether stripping libraries is possible])
  2343 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  2344   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  2345   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  2346   AC_MSG_RESULT([yes])
  2347 else
  2348 # FIXME - insert some real tests, host_os isn't really good enough
  2349   case $host_os in
  2350   darwin*)
  2351     if test -n "$STRIP" ; then
  2352       striplib="$STRIP -x"
  2353       old_striplib="$STRIP -S"
  2354       AC_MSG_RESULT([yes])
  2355     else
  2356       AC_MSG_RESULT([no])
  2357     fi
  2358     ;;
  2359   *)
  2360     AC_MSG_RESULT([no])
  2361     ;;
  2362   esac
  2363 fi
  2364 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  2365 _LT_DECL([], [striplib], [1])
  2366 ])# _LT_CMD_STRIPLIB
  2367 
  2368 
  2369 # _LT_SYS_DYNAMIC_LINKER([TAG])
  2370 # -----------------------------
  2371 # PORTME Fill in your ld.so characteristics
  2372 m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2373 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2374 m4_require([_LT_DECL_EGREP])dnl
  2375 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2376 m4_require([_LT_DECL_OBJDUMP])dnl
  2377 m4_require([_LT_DECL_SED])dnl
  2378 AC_MSG_CHECKING([dynamic linker characteristics])
  2379 m4_if([$1],
  2380 	[], [
  2381 if test "$GCC" = yes; then
  2382   case $host_os in
  2383     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  2384     *) lt_awk_arg="/^libraries:/" ;;
  2385   esac
  2386   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  2387   if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
  2388     # if the path contains ";" then we assume it to be the separator
  2389     # otherwise default to the standard path separator (i.e. ":") - it is
  2390     # assumed that no part of a normal pathname contains ";" but that should
  2391     # okay in the real world where ";" in dirpaths is itself problematic.
  2392     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
  2393   else
  2394     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
  2395   fi
  2396   # Ok, now we have the path, separated by spaces, we can step through it
  2397   # and add multilib dir if necessary.
  2398   lt_tmp_lt_search_path_spec=
  2399   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2400   for lt_sys_path in $lt_search_path_spec; do
  2401     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  2402       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  2403     else
  2404       test -d "$lt_sys_path" && \
  2405 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2406     fi
  2407   done
  2408   lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
  2409 BEGIN {RS=" "; FS="/|\n";} {
  2410   lt_foo="";
  2411   lt_count=0;
  2412   for (lt_i = NF; lt_i > 0; lt_i--) {
  2413     if ($lt_i != "" && $lt_i != ".") {
  2414       if ($lt_i == "..") {
  2415         lt_count++;
  2416       } else {
  2417         if (lt_count == 0) {
  2418           lt_foo="/" $lt_i lt_foo;
  2419         } else {
  2420           lt_count--;
  2421         }
  2422       }
  2423     }
  2424   }
  2425   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2426   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2427 }'`
  2428   sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
  2429 else
  2430   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2431 fi])
  2432 library_names_spec=
  2433 libname_spec='lib$name'
  2434 soname_spec=
  2435 shrext_cmds=".so"
  2436 postinstall_cmds=
  2437 postuninstall_cmds=
  2438 finish_cmds=
  2439 finish_eval=
  2440 shlibpath_var=
  2441 shlibpath_overrides_runpath=unknown
  2442 version_type=none
  2443 dynamic_linker="$host_os ld.so"
  2444 sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2445 need_lib_prefix=unknown
  2446 hardcode_into_libs=no
  2447 
  2448 # when you set need_version to no, make sure it does not cause -set_version
  2449 # flags to be left without arguments
  2450 need_version=unknown
  2451 
  2452 case $host_os in
  2453 aix3*)
  2454   version_type=linux
  2455   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  2456   shlibpath_var=LIBPATH
  2457 
  2458   # AIX 3 has no versioning support, so we append a major version to the name.
  2459   soname_spec='${libname}${release}${shared_ext}$major'
  2460   ;;
  2461 
  2462 aix[[4-9]]*)
  2463   version_type=linux
  2464   need_lib_prefix=no
  2465   need_version=no
  2466   hardcode_into_libs=yes
  2467   if test "$host_cpu" = ia64; then
  2468     # AIX 5 supports IA64
  2469     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2470     shlibpath_var=LD_LIBRARY_PATH
  2471   else
  2472     # With GCC up to 2.95.x, collect2 would create an import file
  2473     # for dependence libraries.  The import file would start with
  2474     # the line `#! .'.  This would cause the generated library to
  2475     # depend on `.', always an invalid library.  This was fixed in
  2476     # development snapshots of GCC prior to 3.0.
  2477     case $host_os in
  2478       aix4 | aix4.[[01]] | aix4.[[01]].*)
  2479       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2480 	   echo ' yes '
  2481 	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2482 	:
  2483       else
  2484 	can_build_shared=no
  2485       fi
  2486       ;;
  2487     esac
  2488     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2489     # soname into executable. Probably we can add versioning support to
  2490     # collect2, so additional links can be useful in future.
  2491     if test "$aix_use_runtimelinking" = yes; then
  2492       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2493       # instead of lib<name>.a to let people know that these are not
  2494       # typical AIX shared libraries.
  2495       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2496     else
  2497       # We preserve .a as extension for shared libraries through AIX4.2
  2498       # and later when we are not doing run time linking.
  2499       library_names_spec='${libname}${release}.a $libname.a'
  2500       soname_spec='${libname}${release}${shared_ext}$major'
  2501     fi
  2502     shlibpath_var=LIBPATH
  2503   fi
  2504   ;;
  2505 
  2506 amigaos*)
  2507   case $host_cpu in
  2508   powerpc)
  2509     # Since July 2007 AmigaOS4 officially supports .so libraries.
  2510     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2511     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2512     ;;
  2513   m68k)
  2514     library_names_spec='$libname.ixlibrary $libname.a'
  2515     # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2516     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'
  2517     ;;
  2518   esac
  2519   ;;
  2520 
  2521 beos*)
  2522   library_names_spec='${libname}${shared_ext}'
  2523   dynamic_linker="$host_os ld.so"
  2524   shlibpath_var=LIBRARY_PATH
  2525   ;;
  2526 
  2527 bsdi[[45]]*)
  2528   version_type=linux
  2529   need_version=no
  2530   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2531   soname_spec='${libname}${release}${shared_ext}$major'
  2532   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2533   shlibpath_var=LD_LIBRARY_PATH
  2534   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2535   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2536   # the default ld.so.conf also contains /usr/contrib/lib and
  2537   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2538   # libtool to hard-code these into programs
  2539   ;;
  2540 
  2541 cygwin* | mingw* | pw32* | cegcc*)
  2542   version_type=windows
  2543   shrext_cmds=".dll"
  2544   need_version=no
  2545   need_lib_prefix=no
  2546 
  2547   case $GCC,$host_os in
  2548   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
  2549     library_names_spec='$libname.dll.a'
  2550     # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2551     postinstall_cmds='base_file=`basename \${file}`~
  2552       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2553       dldir=$destdir/`dirname \$dlpath`~
  2554       test -d \$dldir || mkdir -p \$dldir~
  2555       $install_prog $dir/$dlname \$dldir/$dlname~
  2556       chmod a+x \$dldir/$dlname~
  2557       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2558         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2559       fi'
  2560     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2561       dlpath=$dir/\$dldll~
  2562        $RM \$dlpath'
  2563     shlibpath_overrides_runpath=yes
  2564 
  2565     case $host_os in
  2566     cygwin*)
  2567       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2568       #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2569       soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
  2570       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  2571       ;;
  2572     mingw* | cegcc*)
  2573       # MinGW DLLs use traditional 'lib' prefix
  2574       #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2575       soname_spec='`echo ${libname} | $SED -e 's/^lib//'`${shared_ext}'
  2576       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  2577       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2578         # It is most probably a Windows format PATH printed by
  2579         # mingw gcc, but we are running on Cygwin. Gcc prints its search
  2580         # path with ; separators, and with drive letters. We can handle the
  2581         # drive letters (cygwin fileutils understands them), so leave them,
  2582         # especially as we might pass files found there to a mingw objdump,
  2583         # which wouldn't understand a cygwinified path. Ahh.
  2584         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2585       else
  2586         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
  2587       fi
  2588       ;;
  2589     pw32*)
  2590       # pw32 DLLs use 'pw' prefix rather than 'lib'
  2591       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2592       ;;
  2593     esac
  2594     ;;
  2595 
  2596   *)
  2597     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2598     ;;
  2599   esac
  2600   dynamic_linker='Win32 ld.exe'
  2601   # FIXME: first we should search . and the directory the executable is in
  2602   shlibpath_var=PATH
  2603   ;;
  2604 
  2605 darwin* | rhapsody*)
  2606   dynamic_linker="$host_os dyld"
  2607   version_type=darwin
  2608   need_lib_prefix=no
  2609   need_version=no
  2610   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2611   soname_spec='${libname}${release}${major}$shared_ext'
  2612   shlibpath_overrides_runpath=yes
  2613   shlibpath_var=DYLD_LIBRARY_PATH
  2614   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2615 m4_if([$1], [],[
  2616   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2617   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2618   ;;
  2619 
  2620 dgux*)
  2621   version_type=linux
  2622   need_lib_prefix=no
  2623   need_version=no
  2624   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2625   soname_spec='${libname}${release}${shared_ext}$major'
  2626   shlibpath_var=LD_LIBRARY_PATH
  2627   ;;
  2628 
  2629 freebsd1*)
  2630   dynamic_linker=no
  2631   ;;
  2632 
  2633 freebsd* | dragonfly*)
  2634   # DragonFly does not have aout.  When/if they implement a new
  2635   # versioning mechanism, adjust this.
  2636   if test -x /usr/bin/objformat; then
  2637     objformat=`/usr/bin/objformat`
  2638   else
  2639     case $host_os in
  2640     freebsd[[123]]*) objformat=aout ;;
  2641     *) objformat=elf ;;
  2642     esac
  2643   fi
  2644   version_type=freebsd-$objformat
  2645   case $version_type in
  2646     freebsd-elf*)
  2647       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2648       need_version=no
  2649       need_lib_prefix=no
  2650       ;;
  2651     freebsd-*)
  2652       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2653       need_version=yes
  2654       ;;
  2655   esac
  2656   shlibpath_var=LD_LIBRARY_PATH
  2657   case $host_os in
  2658   freebsd2*)
  2659     shlibpath_overrides_runpath=yes
  2660     ;;
  2661   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2662     shlibpath_overrides_runpath=yes
  2663     hardcode_into_libs=yes
  2664     ;;
  2665   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2666   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2667     shlibpath_overrides_runpath=no
  2668     hardcode_into_libs=yes
  2669     ;;
  2670   *) # from 4.6 on, and DragonFly
  2671     shlibpath_overrides_runpath=yes
  2672     hardcode_into_libs=yes
  2673     ;;
  2674   esac
  2675   ;;
  2676 
  2677 gnu*)
  2678   version_type=linux
  2679   need_lib_prefix=no
  2680   need_version=no
  2681   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2682   soname_spec='${libname}${release}${shared_ext}$major'
  2683   shlibpath_var=LD_LIBRARY_PATH
  2684   hardcode_into_libs=yes
  2685   ;;
  2686 
  2687 hpux9* | hpux10* | hpux11*)
  2688   # Give a soname corresponding to the major version so that dld.sl refuses to
  2689   # link against other versions.
  2690   version_type=sunos
  2691   need_lib_prefix=no
  2692   need_version=no
  2693   case $host_cpu in
  2694   ia64*)
  2695     shrext_cmds='.so'
  2696     hardcode_into_libs=yes
  2697     dynamic_linker="$host_os dld.so"
  2698     shlibpath_var=LD_LIBRARY_PATH
  2699     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2700     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2701     soname_spec='${libname}${release}${shared_ext}$major'
  2702     if test "X$HPUX_IA64_MODE" = X32; then
  2703       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2704     else
  2705       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2706     fi
  2707     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2708     ;;
  2709   hppa*64*)
  2710     shrext_cmds='.sl'
  2711     hardcode_into_libs=yes
  2712     dynamic_linker="$host_os dld.sl"
  2713     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2714     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2715     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2716     soname_spec='${libname}${release}${shared_ext}$major'
  2717     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2718     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2719     ;;
  2720   *)
  2721     shrext_cmds='.sl'
  2722     dynamic_linker="$host_os dld.sl"
  2723     shlibpath_var=SHLIB_PATH
  2724     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2725     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2726     soname_spec='${libname}${release}${shared_ext}$major'
  2727     ;;
  2728   esac
  2729   # HP-UX runs *really* slowly unless shared libraries are mode 555.
  2730   postinstall_cmds='chmod 555 $lib'
  2731   ;;
  2732 
  2733 interix[[3-9]]*)
  2734   version_type=linux
  2735   need_lib_prefix=no
  2736   need_version=no
  2737   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2738   soname_spec='${libname}${release}${shared_ext}$major'
  2739   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2740   shlibpath_var=LD_LIBRARY_PATH
  2741   shlibpath_overrides_runpath=no
  2742   hardcode_into_libs=yes
  2743   ;;
  2744 
  2745 irix5* | irix6* | nonstopux*)
  2746   case $host_os in
  2747     nonstopux*) version_type=nonstopux ;;
  2748     *)
  2749 	if test "$lt_cv_prog_gnu_ld" = yes; then
  2750 		version_type=linux
  2751 	else
  2752 		version_type=irix
  2753 	fi ;;
  2754   esac
  2755   need_lib_prefix=no
  2756   need_version=no
  2757   soname_spec='${libname}${release}${shared_ext}$major'
  2758   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2759   case $host_os in
  2760   irix5* | nonstopux*)
  2761     libsuff= shlibsuff=
  2762     ;;
  2763   *)
  2764     case $LD in # libtool.m4 will add one of these switches to LD
  2765     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2766       libsuff= shlibsuff= libmagic=32-bit;;
  2767     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2768       libsuff=32 shlibsuff=N32 libmagic=N32;;
  2769     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2770       libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2771     *) libsuff= shlibsuff= libmagic=never-match;;
  2772     esac
  2773     ;;
  2774   esac
  2775   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2776   shlibpath_overrides_runpath=no
  2777   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2778   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2779   hardcode_into_libs=yes
  2780   ;;
  2781 
  2782 # No shared lib support for Linux oldld, aout, or coff.
  2783 linux*oldld* | linux*aout* | linux*coff*)
  2784   dynamic_linker=no
  2785   ;;
  2786 
  2787 # This must be Linux ELF.
  2788 linux* | k*bsd*-gnu)
  2789   version_type=linux
  2790   need_lib_prefix=no
  2791   need_version=no
  2792   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2793   soname_spec='${libname}${release}${shared_ext}$major'
  2794   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2795   shlibpath_var=LD_LIBRARY_PATH
  2796   shlibpath_overrides_runpath=no
  2797   # Some binutils ld are patched to set DT_RUNPATH
  2798   save_LDFLAGS=$LDFLAGS
  2799   save_libdir=$libdir
  2800   eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2801        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2802   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2803     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2804        [shlibpath_overrides_runpath=yes])])
  2805   LDFLAGS=$save_LDFLAGS
  2806   libdir=$save_libdir
  2807 
  2808   # This implies no fast_install, which is unacceptable.
  2809   # Some rework will be needed to allow for fast_install
  2810   # before this can be enabled.
  2811   hardcode_into_libs=yes
  2812 
  2813   # Append ld.so.conf contents to the search path
  2814   if test -f /etc/ld.so.conf; then
  2815     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
  2816     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2817   fi
  2818 
  2819   # We used to test for /lib/ld.so.1 and disable shared libraries on
  2820   # powerpc, because MkLinux only supported shared libraries with the
  2821   # GNU dynamic linker.  Since this was broken with cross compilers,
  2822   # most powerpc-linux boxes support dynamic linking these days and
  2823   # people can always --disable-shared, the test was removed, and we
  2824   # assume the GNU/Linux dynamic linker is in use.
  2825   dynamic_linker='GNU/Linux ld.so'
  2826   ;;
  2827 
  2828 netbsd*)
  2829   version_type=sunos
  2830   need_lib_prefix=no
  2831   need_version=no
  2832   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2833     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2834     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2835     dynamic_linker='NetBSD (a.out) ld.so'
  2836   else
  2837     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2838     soname_spec='${libname}${release}${shared_ext}$major'
  2839     dynamic_linker='NetBSD ld.elf_so'
  2840   fi
  2841   shlibpath_var=LD_LIBRARY_PATH
  2842   shlibpath_overrides_runpath=yes
  2843   hardcode_into_libs=yes
  2844   ;;
  2845 
  2846 newsos6)
  2847   version_type=linux
  2848   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2849   shlibpath_var=LD_LIBRARY_PATH
  2850   shlibpath_overrides_runpath=yes
  2851   ;;
  2852 
  2853 *nto* | *qnx*)
  2854   version_type=qnx
  2855   need_lib_prefix=no
  2856   need_version=no
  2857   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2858   soname_spec='${libname}${release}${shared_ext}$major'
  2859   shlibpath_var=LD_LIBRARY_PATH
  2860   shlibpath_overrides_runpath=no
  2861   hardcode_into_libs=yes
  2862   dynamic_linker='ldqnx.so'
  2863   ;;
  2864 
  2865 openbsd*)
  2866   version_type=sunos
  2867   sys_lib_dlsearch_path_spec="/usr/lib"
  2868   need_lib_prefix=no
  2869   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2870   case $host_os in
  2871     openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
  2872     *)				need_version=no  ;;
  2873   esac
  2874   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2875   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2876   shlibpath_var=LD_LIBRARY_PATH
  2877   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2878     case $host_os in
  2879       openbsd2.[[89]] | openbsd2.[[89]].*)
  2880 	shlibpath_overrides_runpath=no
  2881 	;;
  2882       *)
  2883 	shlibpath_overrides_runpath=yes
  2884 	;;
  2885       esac
  2886   else
  2887     shlibpath_overrides_runpath=yes
  2888   fi
  2889   ;;
  2890 
  2891 os2*)
  2892   libname_spec='$name'
  2893   shrext_cmds=".dll"
  2894   need_lib_prefix=no
  2895   library_names_spec='$libname${shared_ext} $libname.a'
  2896   dynamic_linker='OS/2 ld.exe'
  2897   shlibpath_var=LIBPATH
  2898   ;;
  2899 
  2900 osf3* | osf4* | osf5*)
  2901   version_type=osf
  2902   need_lib_prefix=no
  2903   need_version=no
  2904   soname_spec='${libname}${release}${shared_ext}$major'
  2905   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2906   shlibpath_var=LD_LIBRARY_PATH
  2907   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2908   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2909   ;;
  2910 
  2911 rdos*)
  2912   dynamic_linker=no
  2913   ;;
  2914 
  2915 solaris*)
  2916   version_type=linux
  2917   need_lib_prefix=no
  2918   need_version=no
  2919   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2920   soname_spec='${libname}${release}${shared_ext}$major'
  2921   shlibpath_var=LD_LIBRARY_PATH
  2922   shlibpath_overrides_runpath=yes
  2923   hardcode_into_libs=yes
  2924   # ldd complains unless libraries are executable
  2925   postinstall_cmds='chmod +x $lib'
  2926   ;;
  2927 
  2928 sunos4*)
  2929   version_type=sunos
  2930   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2931   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2932   shlibpath_var=LD_LIBRARY_PATH
  2933   shlibpath_overrides_runpath=yes
  2934   if test "$with_gnu_ld" = yes; then
  2935     need_lib_prefix=no
  2936   fi
  2937   need_version=yes
  2938   ;;
  2939 
  2940 sysv4 | sysv4.3*)
  2941   version_type=linux
  2942   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2943   soname_spec='${libname}${release}${shared_ext}$major'
  2944   shlibpath_var=LD_LIBRARY_PATH
  2945   case $host_vendor in
  2946     sni)
  2947       shlibpath_overrides_runpath=no
  2948       need_lib_prefix=no
  2949       runpath_var=LD_RUN_PATH
  2950       ;;
  2951     siemens)
  2952       need_lib_prefix=no
  2953       ;;
  2954     motorola)
  2955       need_lib_prefix=no
  2956       need_version=no
  2957       shlibpath_overrides_runpath=no
  2958       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2959       ;;
  2960   esac
  2961   ;;
  2962 
  2963 sysv4*MP*)
  2964   if test -d /usr/nec ;then
  2965     version_type=linux
  2966     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2967     soname_spec='$libname${shared_ext}.$major'
  2968     shlibpath_var=LD_LIBRARY_PATH
  2969   fi
  2970   ;;
  2971 
  2972 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2973   version_type=freebsd-elf
  2974   need_lib_prefix=no
  2975   need_version=no
  2976   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2977   soname_spec='${libname}${release}${shared_ext}$major'
  2978   shlibpath_var=LD_LIBRARY_PATH
  2979   shlibpath_overrides_runpath=yes
  2980   hardcode_into_libs=yes
  2981   if test "$with_gnu_ld" = yes; then
  2982     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2983   else
  2984     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2985     case $host_os in
  2986       sco3.2v5*)
  2987         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2988 	;;
  2989     esac
  2990   fi
  2991   sys_lib_dlsearch_path_spec='/usr/lib'
  2992   ;;
  2993 
  2994 tpf*)
  2995   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
  2996   version_type=linux
  2997   need_lib_prefix=no
  2998   need_version=no
  2999   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3000   shlibpath_var=LD_LIBRARY_PATH
  3001   shlibpath_overrides_runpath=no
  3002   hardcode_into_libs=yes
  3003   ;;
  3004 
  3005 uts4*)
  3006   version_type=linux
  3007   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3008   soname_spec='${libname}${release}${shared_ext}$major'
  3009   shlibpath_var=LD_LIBRARY_PATH
  3010   ;;
  3011 
  3012 *)
  3013   dynamic_linker=no
  3014   ;;
  3015 esac
  3016 AC_MSG_RESULT([$dynamic_linker])
  3017 test "$dynamic_linker" = no && can_build_shared=no
  3018 
  3019 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  3020 if test "$GCC" = yes; then
  3021   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  3022 fi
  3023 
  3024 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  3025   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  3026 fi
  3027 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  3028   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  3029 fi
  3030 
  3031 _LT_DECL([], [variables_saved_for_relink], [1],
  3032     [Variables whose values should be saved in libtool wrapper scripts and
  3033     restored at link time])
  3034 _LT_DECL([], [need_lib_prefix], [0],
  3035     [Do we need the "lib" prefix for modules?])
  3036 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  3037 _LT_DECL([], [version_type], [0], [Library versioning type])
  3038 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
  3039 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  3040 _LT_DECL([], [shlibpath_overrides_runpath], [0],
  3041     [Is shlibpath searched before the hard-coded library search path?])
  3042 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  3043 _LT_DECL([], [library_names_spec], [1],
  3044     [[List of archive names.  First name is the real one, the rest are links.
  3045     The last name is the one that the linker finds with -lNAME]])
  3046 _LT_DECL([], [soname_spec], [1],
  3047     [[The coded name of the library, if different from the real name]])
  3048 _LT_DECL([], [postinstall_cmds], [2],
  3049     [Command to use after installation of a shared archive])
  3050 _LT_DECL([], [postuninstall_cmds], [2],
  3051     [Command to use after uninstallation of a shared archive])
  3052 _LT_DECL([], [finish_cmds], [2],
  3053     [Commands used to finish a libtool library installation in a directory])
  3054 _LT_DECL([], [finish_eval], [1],
  3055     [[As "finish_cmds", except a single script fragment to be evaled but
  3056     not shown]])
  3057 _LT_DECL([], [hardcode_into_libs], [0],
  3058     [Whether we should hardcode library paths into libraries])
  3059 _LT_DECL([], [sys_lib_search_path_spec], [2],
  3060     [Compile-time system search path for libraries])
  3061 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  3062     [Run-time system search path for libraries])
  3063 ])# _LT_SYS_DYNAMIC_LINKER
  3064 
  3065 
  3066 # _LT_PATH_TOOL_PREFIX(TOOL)
  3067 # --------------------------
  3068 # find a file program which can recognize shared library
  3069 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  3070 [m4_require([_LT_DECL_EGREP])dnl
  3071 AC_MSG_CHECKING([for $1])
  3072 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  3073 [case $MAGIC_CMD in
  3074 [[\\/*] |  ?:[\\/]*])
  3075   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  3076   ;;
  3077 *)
  3078   lt_save_MAGIC_CMD="$MAGIC_CMD"
  3079   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3080 dnl $ac_dummy forces splitting on constant user-supplied paths.
  3081 dnl POSIX.2 word splitting is done only on the output of word expansions,
  3082 dnl not every word.  This closes a longstanding sh security hole.
  3083   ac_dummy="m4_if([$2], , $PATH, [$2])"
  3084   for ac_dir in $ac_dummy; do
  3085     IFS="$lt_save_ifs"
  3086     test -z "$ac_dir" && ac_dir=.
  3087     if test -f $ac_dir/$1; then
  3088       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  3089       if test -n "$file_magic_test_file"; then
  3090 	case $deplibs_check_method in
  3091 	"file_magic "*)
  3092 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  3093 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3094 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  3095 	    $EGREP "$file_magic_regex" > /dev/null; then
  3096 	    :
  3097 	  else
  3098 	    cat <<_LT_EOF 1>&2
  3099 
  3100 *** Warning: the command libtool uses to detect shared libraries,
  3101 *** $file_magic_cmd, produces output that libtool cannot recognize.
  3102 *** The result is that libtool may fail to recognize shared libraries
  3103 *** as such.  This will affect the creation of libtool libraries that
  3104 *** depend on shared libraries, but programs linked with such libtool
  3105 *** libraries will work regardless of this problem.  Nevertheless, you
  3106 *** may want to report the problem to your system manager and/or to
  3107 *** bug-libtool@gnu.org
  3108 
  3109 _LT_EOF
  3110 	  fi ;;
  3111 	esac
  3112       fi
  3113       break
  3114     fi
  3115   done
  3116   IFS="$lt_save_ifs"
  3117   MAGIC_CMD="$lt_save_MAGIC_CMD"
  3118   ;;
  3119 esac])
  3120 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3121 if test -n "$MAGIC_CMD"; then
  3122   AC_MSG_RESULT($MAGIC_CMD)
  3123 else
  3124   AC_MSG_RESULT(no)
  3125 fi
  3126 _LT_DECL([], [MAGIC_CMD], [0],
  3127 	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  3128 ])# _LT_PATH_TOOL_PREFIX
  3129 
  3130 # Old name:
  3131 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  3132 dnl aclocal-1.4 backwards compatibility:
  3133 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  3134 
  3135 
  3136 # _LT_PATH_MAGIC
  3137 # --------------
  3138 # find a file program which can recognize a shared library
  3139 m4_defun([_LT_PATH_MAGIC],
  3140 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  3141 if test -z "$lt_cv_path_MAGIC_CMD"; then
  3142   if test -n "$ac_tool_prefix"; then
  3143     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  3144   else
  3145     MAGIC_CMD=:
  3146   fi
  3147 fi
  3148 ])# _LT_PATH_MAGIC
  3149 
  3150 
  3151 # LT_PATH_LD
  3152 # ----------
  3153 # find the pathname to the GNU or non-GNU linker
  3154 AC_DEFUN([LT_PATH_LD],
  3155 [AC_REQUIRE([AC_PROG_CC])dnl
  3156 AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3157 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3158 m4_require([_LT_DECL_SED])dnl
  3159 m4_require([_LT_DECL_EGREP])dnl
  3160 
  3161 AC_ARG_WITH([gnu-ld],
  3162     [AS_HELP_STRING([--with-gnu-ld],
  3163 	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
  3164     [test "$withval" = no || with_gnu_ld=yes],
  3165     [with_gnu_ld=no])dnl
  3166 
  3167 ac_prog=ld
  3168 if test "$GCC" = yes; then
  3169   # Check if gcc -print-prog-name=ld gives a path.
  3170   AC_MSG_CHECKING([for ld used by $CC])
  3171   case $host in
  3172   *-*-mingw*)
  3173     # gcc leaves a trailing carriage return which upsets mingw
  3174     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  3175   *)
  3176     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  3177   esac
  3178   case $ac_prog in
  3179     # Accept absolute paths.
  3180     [[\\/]]* | ?:[[\\/]]*)
  3181       re_direlt='/[[^/]][[^/]]*/\.\./'
  3182       # Canonicalize the pathname of ld
  3183       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  3184       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  3185 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  3186       done
  3187       test -z "$LD" && LD="$ac_prog"
  3188       ;;
  3189   "")
  3190     # If it fails, then pretend we aren't using GCC.
  3191     ac_prog=ld
  3192     ;;
  3193   *)
  3194     # If it is relative, then search for the first ld in PATH.
  3195     with_gnu_ld=unknown
  3196     ;;
  3197   esac
  3198 elif test "$with_gnu_ld" = yes; then
  3199   AC_MSG_CHECKING([for GNU ld])
  3200 else
  3201   AC_MSG_CHECKING([for non-GNU ld])
  3202 fi
  3203 AC_CACHE_VAL(lt_cv_path_LD,
  3204 [if test -z "$LD"; then
  3205   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3206   for ac_dir in $PATH; do
  3207     IFS="$lt_save_ifs"
  3208     test -z "$ac_dir" && ac_dir=.
  3209     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  3210       lt_cv_path_LD="$ac_dir/$ac_prog"
  3211       # Check to see if the program is GNU ld.  I'd rather use --version,
  3212       # but apparently some variants of GNU ld only accept -v.
  3213       # Break only if it was the GNU/non-GNU ld that we prefer.
  3214       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  3215       *GNU* | *'with BFD'*)
  3216 	test "$with_gnu_ld" != no && break
  3217 	;;
  3218       *)
  3219 	test "$with_gnu_ld" != yes && break
  3220 	;;
  3221       esac
  3222     fi
  3223   done
  3224   IFS="$lt_save_ifs"
  3225 else
  3226   lt_cv_path_LD="$LD" # Let the user override the test with a path.
  3227 fi])
  3228 LD="$lt_cv_path_LD"
  3229 if test -n "$LD"; then
  3230   AC_MSG_RESULT($LD)
  3231 else
  3232   AC_MSG_RESULT(no)
  3233 fi
  3234 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3235 _LT_PATH_LD_GNU
  3236 AC_SUBST([LD])
  3237 
  3238 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3239 ])# LT_PATH_LD
  3240 
  3241 # Old names:
  3242 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3243 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3244 dnl aclocal-1.4 backwards compatibility:
  3245 dnl AC_DEFUN([AM_PROG_LD], [])
  3246 dnl AC_DEFUN([AC_PROG_LD], [])
  3247 
  3248 
  3249 # _LT_PATH_LD_GNU
  3250 #- --------------
  3251 m4_defun([_LT_PATH_LD_GNU],
  3252 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3253 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3254 case `$LD -v 2>&1 </dev/null` in
  3255 *GNU* | *'with BFD'*)
  3256   lt_cv_prog_gnu_ld=yes
  3257   ;;
  3258 *)
  3259   lt_cv_prog_gnu_ld=no
  3260   ;;
  3261 esac])
  3262 with_gnu_ld=$lt_cv_prog_gnu_ld
  3263 ])# _LT_PATH_LD_GNU
  3264 
  3265 
  3266 # _LT_CMD_RELOAD
  3267 # --------------
  3268 # find reload flag for linker
  3269 #   -- PORTME Some linkers may need a different reload flag.
  3270 m4_defun([_LT_CMD_RELOAD],
  3271 [AC_CACHE_CHECK([for $LD option to reload object files],
  3272   lt_cv_ld_reload_flag,
  3273   [lt_cv_ld_reload_flag='-r'])
  3274 reload_flag=$lt_cv_ld_reload_flag
  3275 case $reload_flag in
  3276 "" | " "*) ;;
  3277 *) reload_flag=" $reload_flag" ;;
  3278 esac
  3279 reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3280 case $host_os in
  3281   darwin*)
  3282     if test "$GCC" = yes; then
  3283       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  3284     else
  3285       reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3286     fi
  3287     ;;
  3288 esac
  3289 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3290 _LT_DECL([], [reload_cmds], [2])dnl
  3291 ])# _LT_CMD_RELOAD
  3292 
  3293 
  3294 # _LT_CHECK_MAGIC_METHOD
  3295 # ----------------------
  3296 # how to check for library dependencies
  3297 #  -- PORTME fill in with the dynamic library characteristics
  3298 m4_defun([_LT_CHECK_MAGIC_METHOD],
  3299 [m4_require([_LT_DECL_EGREP])
  3300 m4_require([_LT_DECL_OBJDUMP])
  3301 AC_CACHE_CHECK([how to recognize dependent libraries],
  3302 lt_cv_deplibs_check_method,
  3303 [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3304 lt_cv_file_magic_test_file=
  3305 lt_cv_deplibs_check_method='unknown'
  3306 # Need to set the preceding variable on all platforms that support
  3307 # interlibrary dependencies.
  3308 # 'none' -- dependencies not supported.
  3309 # `unknown' -- same as none, but documents that we really don't know.
  3310 # 'pass_all' -- all dependencies passed with no checks.
  3311 # 'test_compile' -- check by making test program.
  3312 # 'file_magic [[regex]]' -- check by looking for files in library path
  3313 # which responds to the $file_magic_cmd with a given extended regex.
  3314 # If you have `file' or equivalent on your system and you're not sure
  3315 # whether `pass_all' will *always* work, you probably want this one.
  3316 
  3317 case $host_os in
  3318 aix[[4-9]]*)
  3319   lt_cv_deplibs_check_method=pass_all
  3320   ;;
  3321 
  3322 beos*)
  3323   lt_cv_deplibs_check_method=pass_all
  3324   ;;
  3325 
  3326 bsdi[[45]]*)
  3327   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3328   lt_cv_file_magic_cmd='/usr/bin/file -L'
  3329   lt_cv_file_magic_test_file=/shlib/libc.so
  3330   ;;
  3331 
  3332 cygwin*)
  3333   # func_win32_libid is a shell function defined in ltmain.sh
  3334   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3335   lt_cv_deplibs_check_method=pass_all
  3336   lt_cv_file_magic_cmd='func_win32_libid'
  3337   ;;
  3338 
  3339 mingw* | pw32*)
  3340   # Base MSYS/MinGW do not provide the 'file' command needed by
  3341   # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3342   # unless we find 'file', for example because we are cross-compiling.
  3343   if ( file / ) >/dev/null 2>&1; then
  3344     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3345     lt_cv_file_magic_cmd='func_win32_libid'
  3346   else
  3347     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  3348     lt_cv_file_magic_cmd='$OBJDUMP -f'
  3349   fi
  3350   lt_cv_deplibs_check_method=pass_all
  3351   ;;
  3352 
  3353 cegcc)
  3354   # use the weaker test based on 'objdump'. See mingw*.
  3355   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3356   lt_cv_file_magic_cmd='$OBJDUMP -f'
  3357   ;;
  3358 
  3359 darwin* | rhapsody*)
  3360   lt_cv_deplibs_check_method=pass_all
  3361   ;;
  3362 
  3363 freebsd* | dragonfly*)
  3364   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3365     case $host_cpu in
  3366     i*86 )
  3367       # Not sure whether the presence of OpenBSD here was a mistake.
  3368       # Let's accept both of them until this is cleared up.
  3369       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3370       lt_cv_file_magic_cmd=/usr/bin/file
  3371       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3372       ;;
  3373     esac
  3374   else
  3375     lt_cv_deplibs_check_method=pass_all
  3376   fi
  3377   ;;
  3378 
  3379 gnu*)
  3380   lt_cv_deplibs_check_method=pass_all
  3381   ;;
  3382 
  3383 hpux10.20* | hpux11*)
  3384   lt_cv_file_magic_cmd=/usr/bin/file
  3385   case $host_cpu in
  3386   ia64*)
  3387     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3388     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3389     ;;
  3390   hppa*64*)
  3391     [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]']
  3392     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3393     ;;
  3394   *)
  3395     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  3396     lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3397     ;;
  3398   esac
  3399   ;;
  3400 
  3401 interix[[3-9]]*)
  3402   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3403   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3404   ;;
  3405 
  3406 irix5* | irix6* | nonstopux*)
  3407   case $LD in
  3408   *-32|*"-32 ") libmagic=32-bit;;
  3409   *-n32|*"-n32 ") libmagic=N32;;
  3410   *-64|*"-64 ") libmagic=64-bit;;
  3411   *) libmagic=never-match;;
  3412   esac
  3413   lt_cv_deplibs_check_method=pass_all
  3414   ;;
  3415 
  3416 # This must be Linux ELF.
  3417 linux* | k*bsd*-gnu)
  3418   lt_cv_deplibs_check_method=pass_all
  3419   ;;
  3420 
  3421 netbsd*)
  3422   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3423     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3424   else
  3425     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3426   fi
  3427   ;;
  3428 
  3429 newos6*)
  3430   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3431   lt_cv_file_magic_cmd=/usr/bin/file
  3432   lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3433   ;;
  3434 
  3435 *nto* | *qnx*)
  3436   lt_cv_deplibs_check_method=pass_all
  3437   ;;
  3438 
  3439 openbsd*)
  3440   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3441     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3442   else
  3443     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3444   fi
  3445   ;;
  3446 
  3447 osf3* | osf4* | osf5*)
  3448   lt_cv_deplibs_check_method=pass_all
  3449   ;;
  3450 
  3451 rdos*)
  3452   lt_cv_deplibs_check_method=pass_all
  3453   ;;
  3454 
  3455 solaris*)
  3456   lt_cv_deplibs_check_method=pass_all
  3457   ;;
  3458 
  3459 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3460   lt_cv_deplibs_check_method=pass_all
  3461   ;;
  3462 
  3463 sysv4 | sysv4.3*)
  3464   case $host_vendor in
  3465   motorola)
  3466     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]]'
  3467     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3468     ;;
  3469   ncr)
  3470     lt_cv_deplibs_check_method=pass_all
  3471     ;;
  3472   sequent)
  3473     lt_cv_file_magic_cmd='/bin/file'
  3474     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3475     ;;
  3476   sni)
  3477     lt_cv_file_magic_cmd='/bin/file'
  3478     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3479     lt_cv_file_magic_test_file=/lib/libc.so
  3480     ;;
  3481   siemens)
  3482     lt_cv_deplibs_check_method=pass_all
  3483     ;;
  3484   pc)
  3485     lt_cv_deplibs_check_method=pass_all
  3486     ;;
  3487   esac
  3488   ;;
  3489 
  3490 tpf*)
  3491   lt_cv_deplibs_check_method=pass_all
  3492   ;;
  3493 esac
  3494 ])
  3495 file_magic_cmd=$lt_cv_file_magic_cmd
  3496 deplibs_check_method=$lt_cv_deplibs_check_method
  3497 test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3498 
  3499 _LT_DECL([], [deplibs_check_method], [1],
  3500     [Method to check whether dependent libraries are shared objects])
  3501 _LT_DECL([], [file_magic_cmd], [1],
  3502     [Command to use when deplibs_check_method == "file_magic"])
  3503 ])# _LT_CHECK_MAGIC_METHOD
  3504 
  3505 
  3506 # LT_PATH_NM
  3507 # ----------
  3508 # find the pathname to a BSD- or MS-compatible name lister
  3509 AC_DEFUN([LT_PATH_NM],
  3510 [AC_REQUIRE([AC_PROG_CC])dnl
  3511 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3512 [if test -n "$NM"; then
  3513   # Let the user override the test.
  3514   lt_cv_path_NM="$NM"
  3515 else
  3516   lt_nm_to_check="${ac_tool_prefix}nm"
  3517   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3518     lt_nm_to_check="$lt_nm_to_check nm"
  3519   fi
  3520   for lt_tmp_nm in $lt_nm_to_check; do
  3521     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3522     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3523       IFS="$lt_save_ifs"
  3524       test -z "$ac_dir" && ac_dir=.
  3525       tmp_nm="$ac_dir/$lt_tmp_nm"
  3526       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3527 	# Check to see if the nm accepts a BSD-compat flag.
  3528 	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3529 	#   nm: unknown option "B" ignored
  3530 	# Tru64's nm complains that /dev/null is an invalid object file
  3531 	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3532 	*/dev/null* | *'Invalid file or object type'*)
  3533 	  lt_cv_path_NM="$tmp_nm -B"
  3534 	  break
  3535 	  ;;
  3536 	*)
  3537 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3538 	  */dev/null*)
  3539 	    lt_cv_path_NM="$tmp_nm -p"
  3540 	    break
  3541 	    ;;
  3542 	  *)
  3543 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3544 	    continue # so that we can try to find one that supports BSD flags
  3545 	    ;;
  3546 	  esac
  3547 	  ;;
  3548 	esac
  3549       fi
  3550     done
  3551     IFS="$lt_save_ifs"
  3552   done
  3553   : ${lt_cv_path_NM=no}
  3554 fi])
  3555 if test "$lt_cv_path_NM" != "no"; then
  3556   NM="$lt_cv_path_NM"
  3557 else
  3558   # Didn't find any BSD compatible name lister, look for dumpbin.
  3559   AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
  3560   AC_SUBST([DUMPBIN])
  3561   if test "$DUMPBIN" != ":"; then
  3562     NM="$DUMPBIN"
  3563   fi
  3564 fi
  3565 test -z "$NM" && NM=nm
  3566 AC_SUBST([NM])
  3567 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3568 
  3569 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3570   [lt_cv_nm_interface="BSD nm"
  3571   echo "int some_variable = 0;" > conftest.$ac_ext
  3572   (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3573   (eval "$ac_compile" 2>conftest.err)
  3574   cat conftest.err >&AS_MESSAGE_LOG_FD
  3575   (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3576   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3577   cat conftest.err >&AS_MESSAGE_LOG_FD
  3578   (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
  3579   cat conftest.out >&AS_MESSAGE_LOG_FD
  3580   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3581     lt_cv_nm_interface="MS dumpbin"
  3582   fi
  3583   rm -f conftest*])
  3584 ])# LT_PATH_NM
  3585 
  3586 # Old names:
  3587 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3588 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3589 dnl aclocal-1.4 backwards compatibility:
  3590 dnl AC_DEFUN([AM_PROG_NM], [])
  3591 dnl AC_DEFUN([AC_PROG_NM], [])
  3592 
  3593 
  3594 # LT_LIB_M
  3595 # --------
  3596 # check for math library
  3597 AC_DEFUN([LT_LIB_M],
  3598 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3599 LIBM=
  3600 case $host in
  3601 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  3602   # These system don't have libm, or don't need it
  3603   ;;
  3604 *-ncr-sysv4.3*)
  3605   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3606   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3607   ;;
  3608 *)
  3609   AC_CHECK_LIB(m, cos, LIBM="-lm")
  3610   ;;
  3611 esac
  3612 AC_SUBST([LIBM])
  3613 ])# LT_LIB_M
  3614 
  3615 # Old name:
  3616 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3617 dnl aclocal-1.4 backwards compatibility:
  3618 dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3619 
  3620 
  3621 # _LT_COMPILER_NO_RTTI([TAGNAME])
  3622 # -------------------------------
  3623 m4_defun([_LT_COMPILER_NO_RTTI],
  3624 [m4_require([_LT_TAG_COMPILER])dnl
  3625 
  3626 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3627 
  3628 if test "$GCC" = yes; then
  3629   _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  3630 
  3631   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3632     lt_cv_prog_compiler_rtti_exceptions,
  3633     [-fno-rtti -fno-exceptions], [],
  3634     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3635 fi
  3636 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3637 	[Compiler flag to turn off builtin functions])
  3638 ])# _LT_COMPILER_NO_RTTI
  3639 
  3640 
  3641 # _LT_CMD_GLOBAL_SYMBOLS
  3642 # ----------------------
  3643 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3644 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3645 AC_REQUIRE([AC_PROG_CC])dnl
  3646 AC_REQUIRE([LT_PATH_NM])dnl
  3647 AC_REQUIRE([LT_PATH_LD])dnl
  3648 m4_require([_LT_DECL_SED])dnl
  3649 m4_require([_LT_DECL_EGREP])dnl
  3650 m4_require([_LT_TAG_COMPILER])dnl
  3651 
  3652 # Check for command to grab the raw symbol name followed by C symbol from nm.
  3653 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3654 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3655 [
  3656 # These are sane defaults that work on at least a few old systems.
  3657 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
  3658 
  3659 # Character class describing NM global symbol codes.
  3660 symcode='[[BCDEGRST]]'
  3661 
  3662 # Regexp to match symbols that can be accessed directly from C.
  3663 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3664 
  3665 # Define system-specific variables.
  3666 case $host_os in
  3667 aix*)
  3668   symcode='[[BCDT]]'
  3669   ;;
  3670 cygwin* | mingw* | pw32* | cegcc*)
  3671   symcode='[[ABCDGISTW]]'
  3672   ;;
  3673 hpux*)
  3674   if test "$host_cpu" = ia64; then
  3675     symcode='[[ABCDEGRST]]'
  3676   fi
  3677   ;;
  3678 irix* | nonstopux*)
  3679   symcode='[[BCDEGRST]]'
  3680   ;;
  3681 osf*)
  3682   symcode='[[BCDEGQRST]]'
  3683   ;;
  3684 solaris*)
  3685   symcode='[[BDRT]]'
  3686   ;;
  3687 sco3.2v5*)
  3688   symcode='[[DT]]'
  3689   ;;
  3690 sysv4.2uw2*)
  3691   symcode='[[DT]]'
  3692   ;;
  3693 sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3694   symcode='[[ABDT]]'
  3695   ;;
  3696 sysv4)
  3697   symcode='[[DFNSTU]]'
  3698   ;;
  3699 esac
  3700 
  3701 # If we're using GNU nm, then use its standard symbol codes.
  3702 case `$NM -V 2>&1` in
  3703 *GNU* | *'with BFD'*)
  3704   symcode='[[ABCDGIRSTW]]' ;;
  3705 esac
  3706 
  3707 # Transform an extracted symbol line into a proper C declaration.
  3708 # Some systems (esp. on ia64) link data and code symbols differently,
  3709 # so use this general approach.
  3710 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3711 
  3712 # Transform an extracted symbol line into symbol name and symbol address
  3713 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
  3714 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
  3715 
  3716 # Handle CRLF in mingw tool chain
  3717 opt_cr=
  3718 case $build_os in
  3719 mingw*)
  3720   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3721   ;;
  3722 esac
  3723 
  3724 # Try without a prefix underscore, then with it.
  3725 for ac_symprfx in "" "_"; do
  3726 
  3727   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3728   symxfrm="\\1 $ac_symprfx\\2 \\2"
  3729 
  3730   # Write the raw and C identifiers.
  3731   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3732     # Fake it for dumpbin and say T for any non-static function
  3733     # and D for any global variable.
  3734     # Also find C++ and __fastcall symbols from MSVC++,
  3735     # which start with @ or ?.
  3736     lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3737 "     {last_section=section; section=\$ 3};"\
  3738 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3739 "     \$ 0!~/External *\|/{next};"\
  3740 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3741 "     {if(hide[section]) next};"\
  3742 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3743 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3744 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3745 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3746 "     ' prfx=^$ac_symprfx]"
  3747   else
  3748     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3749   fi
  3750 
  3751   # Check to see that the pipe works correctly.
  3752   pipe_works=no
  3753 
  3754   rm -f conftest*
  3755   cat > conftest.$ac_ext <<_LT_EOF
  3756 #ifdef __cplusplus
  3757 extern "C" {
  3758 #endif
  3759 char nm_test_var;
  3760 void nm_test_func(void);
  3761 void nm_test_func(void){}
  3762 #ifdef __cplusplus
  3763 }
  3764 #endif
  3765 int main(){nm_test_var='a';nm_test_func();return(0);}
  3766 _LT_EOF
  3767 
  3768   if AC_TRY_EVAL(ac_compile); then
  3769     # Now try to grab the symbols.
  3770     nlist=conftest.nm
  3771     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  3772       # Try sorting and uniquifying the output.
  3773       if sort "$nlist" | uniq > "$nlist"T; then
  3774 	mv -f "$nlist"T "$nlist"
  3775       else
  3776 	rm -f "$nlist"T
  3777       fi
  3778 
  3779       # Make sure that we snagged all the symbols we need.
  3780       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3781 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3782 	  cat <<_LT_EOF > conftest.$ac_ext
  3783 #ifdef __cplusplus
  3784 extern "C" {
  3785 #endif
  3786 
  3787 _LT_EOF
  3788 	  # Now generate the symbol file.
  3789 	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3790 
  3791 	  cat <<_LT_EOF >> conftest.$ac_ext
  3792 
  3793 /* The mapping between symbol names and symbols.  */
  3794 const struct {
  3795   const char *name;
  3796   void       *address;
  3797 }
  3798 lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3799 {
  3800   { "@PROGRAM@", (void *) 0 },
  3801 _LT_EOF
  3802 	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3803 	  cat <<\_LT_EOF >> conftest.$ac_ext
  3804   {0, (void *) 0}
  3805 };
  3806 
  3807 /* This works around a problem in FreeBSD linker */
  3808 #ifdef FREEBSD_WORKAROUND
  3809 static const void *lt_preloaded_setup() {
  3810   return lt__PROGRAM__LTX_preloaded_symbols;
  3811 }
  3812 #endif
  3813 
  3814 #ifdef __cplusplus
  3815 }
  3816 #endif
  3817 _LT_EOF
  3818 	  # Now try linking the two files.
  3819 	  mv conftest.$ac_objext conftstm.$ac_objext
  3820 	  lt_save_LIBS="$LIBS"
  3821 	  lt_save_CFLAGS="$CFLAGS"
  3822 	  LIBS="conftstm.$ac_objext"
  3823 	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3824 	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3825 	    pipe_works=yes
  3826 	  fi
  3827 	  LIBS="$lt_save_LIBS"
  3828 	  CFLAGS="$lt_save_CFLAGS"
  3829 	else
  3830 	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3831 	fi
  3832       else
  3833 	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3834       fi
  3835     else
  3836       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3837     fi
  3838   else
  3839     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3840     cat conftest.$ac_ext >&5
  3841   fi
  3842   rm -rf conftest* conftst*
  3843 
  3844   # Do not use the global_symbol_pipe unless it works.
  3845   if test "$pipe_works" = yes; then
  3846     break
  3847   else
  3848     lt_cv_sys_global_symbol_pipe=
  3849   fi
  3850 done
  3851 ])
  3852 if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3853   lt_cv_sys_global_symbol_to_cdecl=
  3854 fi
  3855 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3856   AC_MSG_RESULT(failed)
  3857 else
  3858   AC_MSG_RESULT(ok)
  3859 fi
  3860 
  3861 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3862     [Take the output of nm and produce a listing of raw symbols and C names])
  3863 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3864     [Transform the output of nm in a proper C declaration])
  3865 _LT_DECL([global_symbol_to_c_name_address],
  3866     [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3867     [Transform the output of nm in a C name address pair])
  3868 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3869     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3870     [Transform the output of nm in a C name address pair when lib prefix is needed])
  3871 ]) # _LT_CMD_GLOBAL_SYMBOLS
  3872 
  3873 
  3874 # _LT_COMPILER_PIC([TAGNAME])
  3875 # ---------------------------
  3876 m4_defun([_LT_COMPILER_PIC],
  3877 [m4_require([_LT_TAG_COMPILER])dnl
  3878 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3879 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3880 _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3881 
  3882 AC_MSG_CHECKING([for $compiler option to produce PIC])
  3883 m4_if([$1], [CXX], [
  3884   # C++ specific cases for pic, static, wl, etc.
  3885   if test "$GXX" = yes; then
  3886     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3887     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3888 
  3889     case $host_os in
  3890     aix*)
  3891       # All AIX code is PIC.
  3892       if test "$host_cpu" = ia64; then
  3893 	# AIX 5 now supports IA64 processor
  3894 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3895       fi
  3896       ;;
  3897 
  3898     amigaos*)
  3899       case $host_cpu in
  3900       powerpc)
  3901             # see comment about AmigaOS4 .so support
  3902             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3903         ;;
  3904       m68k)
  3905             # FIXME: we need at least 68020 code to build shared libraries, but
  3906             # adding the `-m68020' flag to GCC prevents building anything better,
  3907             # like `-m68040'.
  3908             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3909         ;;
  3910       esac
  3911       ;;
  3912 
  3913     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3914       # PIC is the default for these OSes.
  3915       ;;
  3916     mingw* | cygwin* | os2* | pw32* | cegcc*)
  3917       # This hack is so that the source file can tell whether it is being
  3918       # built for inclusion in a dll (and should export symbols for example).
  3919       # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3920       # (--disable-auto-import) libraries
  3921       m4_if([$1], [GCJ], [],
  3922 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3923       ;;
  3924     darwin* | rhapsody*)
  3925       # PIC is the default on this platform
  3926       # Common symbols not allowed in MH_DYLIB files
  3927       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3928       ;;
  3929     *djgpp*)
  3930       # DJGPP does not support shared libraries at all
  3931       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3932       ;;
  3933     interix[[3-9]]*)
  3934       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3935       # Instead, we relocate shared libraries at runtime.
  3936       ;;
  3937     sysv4*MP*)
  3938       if test -d /usr/nec; then
  3939 	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3940       fi
  3941       ;;
  3942     hpux*)
  3943       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3944       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
  3945       # sets the default TLS model and affects inlining.
  3946       case $host_cpu in
  3947       hppa*64*)
  3948 	;;
  3949       *)
  3950 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3951 	;;
  3952       esac
  3953       ;;
  3954     *qnx* | *nto*)
  3955       # QNX uses GNU C++, but need to define -shared option too, otherwise
  3956       # it will coredump.
  3957       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3958       ;;
  3959     *)
  3960       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3961       ;;
  3962     esac
  3963   else
  3964     case $host_os in
  3965       aix[[4-9]]*)
  3966 	# All AIX code is PIC.
  3967 	if test "$host_cpu" = ia64; then
  3968 	  # AIX 5 now supports IA64 processor
  3969 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3970 	else
  3971 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3972 	fi
  3973 	;;
  3974       chorus*)
  3975 	case $cc_basename in
  3976 	cxch68*)
  3977 	  # Green Hills C++ Compiler
  3978 	  # _LT_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"
  3979 	  ;;
  3980 	esac
  3981 	;;
  3982       dgux*)
  3983 	case $cc_basename in
  3984 	  ec++*)
  3985 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3986 	    ;;
  3987 	  ghcx*)
  3988 	    # Green Hills C++ Compiler
  3989 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3990 	    ;;
  3991 	  *)
  3992 	    ;;
  3993 	esac
  3994 	;;
  3995       freebsd* | dragonfly*)
  3996 	# FreeBSD uses GNU C++
  3997 	;;
  3998       hpux9* | hpux10* | hpux11*)
  3999 	case $cc_basename in
  4000 	  CC*)
  4001 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4002 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4003 	    if test "$host_cpu" != ia64; then
  4004 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4005 	    fi
  4006 	    ;;
  4007 	  aCC*)
  4008 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4009 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4010 	    case $host_cpu in
  4011 	    hppa*64*|ia64*)
  4012 	      # +Z the default
  4013 	      ;;
  4014 	    *)
  4015 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4016 	      ;;
  4017 	    esac
  4018 	    ;;
  4019 	  *)
  4020 	    ;;
  4021 	esac
  4022 	;;
  4023       interix*)
  4024 	# This is c89, which is MS Visual C++ (no shared libs)
  4025 	# Anyone wants to do a port?
  4026 	;;
  4027       irix5* | irix6* | nonstopux*)
  4028 	case $cc_basename in
  4029 	  CC*)
  4030 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4031 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4032 	    # CC pic flag -KPIC is the default.
  4033 	    ;;
  4034 	  *)
  4035 	    ;;
  4036 	esac
  4037 	;;
  4038       linux* | k*bsd*-gnu)
  4039 	case $cc_basename in
  4040 	  KCC*)
  4041 	    # KAI C++ Compiler
  4042 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4043 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4044 	    ;;
  4045 	  ecpc* )
  4046 	    # old Intel C++ for x86_64 which still supported -KPIC.
  4047 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4048 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4049 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4050 	    ;;
  4051 	  icpc* )
  4052 	    # Intel C++, used to be incompatible with GCC.
  4053 	    # ICC 10 doesn't accept -KPIC any more.
  4054 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4055 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4056 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4057 	    ;;
  4058 	  pgCC* | pgcpp*)
  4059 	    # Portland Group C++ compiler
  4060 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4061 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4062 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4063 	    ;;
  4064 	  cxx*)
  4065 	    # Compaq C++
  4066 	    # Make sure the PIC flag is empty.  It appears that all Alpha
  4067 	    # Linux and Compaq Tru64 Unix objects are PIC.
  4068 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4069 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4070 	    ;;
  4071 	  xlc* | xlC*)
  4072 	    # IBM XL 8.0 on PPC
  4073 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4074 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4075 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4076 	    ;;
  4077 	  *)
  4078 	    case `$CC -V 2>&1 | sed 5q` in
  4079 	    *Sun\ C*)
  4080 	      # Sun C++ 5.9
  4081 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4082 	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4083 	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4084 	      ;;
  4085 	    esac
  4086 	    ;;
  4087 	esac
  4088 	;;
  4089       lynxos*)
  4090 	;;
  4091       m88k*)
  4092 	;;
  4093       mvs*)
  4094 	case $cc_basename in
  4095 	  cxx*)
  4096 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4097 	    ;;
  4098 	  *)
  4099 	    ;;
  4100 	esac
  4101 	;;
  4102       netbsd*)
  4103 	;;
  4104       *qnx* | *nto*)
  4105         # QNX uses GNU C++, but need to define -shared option too, otherwise
  4106         # it will coredump.
  4107         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4108         ;;
  4109       osf3* | osf4* | osf5*)
  4110 	case $cc_basename in
  4111 	  KCC*)
  4112 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4113 	    ;;
  4114 	  RCC*)
  4115 	    # Rational C++ 2.4.1
  4116 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4117 	    ;;
  4118 	  cxx*)
  4119 	    # Digital/Compaq C++
  4120 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4121 	    # Make sure the PIC flag is empty.  It appears that all Alpha
  4122 	    # Linux and Compaq Tru64 Unix objects are PIC.
  4123 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4124 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4125 	    ;;
  4126 	  *)
  4127 	    ;;
  4128 	esac
  4129 	;;
  4130       psos*)
  4131 	;;
  4132       solaris*)
  4133 	case $cc_basename in
  4134 	  CC*)
  4135 	    # Sun C++ 4.2, 5.x and Centerline C++
  4136 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4137 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4138 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4139 	    ;;
  4140 	  gcx*)
  4141 	    # Green Hills C++ Compiler
  4142 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4143 	    ;;
  4144 	  *)
  4145 	    ;;
  4146 	esac
  4147 	;;
  4148       sunos4*)
  4149 	case $cc_basename in
  4150 	  CC*)
  4151 	    # Sun C++ 4.x
  4152 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4153 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4154 	    ;;
  4155 	  lcc*)
  4156 	    # Lucid
  4157 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4158 	    ;;
  4159 	  *)
  4160 	    ;;
  4161 	esac
  4162 	;;
  4163       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4164 	case $cc_basename in
  4165 	  CC*)
  4166 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4167 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4168 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4169 	    ;;
  4170 	esac
  4171 	;;
  4172       tandem*)
  4173 	case $cc_basename in
  4174 	  NCC*)
  4175 	    # NonStop-UX NCC 3.20
  4176 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4177 	    ;;
  4178 	  *)
  4179 	    ;;
  4180 	esac
  4181 	;;
  4182       vxworks*)
  4183 	;;
  4184       *)
  4185 	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4186 	;;
  4187     esac
  4188   fi
  4189 ],
  4190 [
  4191   if test "$GCC" = yes; then
  4192     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4193     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4194 
  4195     case $host_os in
  4196       aix*)
  4197       # All AIX code is PIC.
  4198       if test "$host_cpu" = ia64; then
  4199 	# AIX 5 now supports IA64 processor
  4200 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4201       fi
  4202       ;;
  4203 
  4204     amigaos*)
  4205       case $host_cpu in
  4206       powerpc)
  4207             # see comment about AmigaOS4 .so support
  4208             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4209         ;;
  4210       m68k)
  4211             # FIXME: we need at least 68020 code to build shared libraries, but
  4212             # adding the `-m68020' flag to GCC prevents building anything better,
  4213             # like `-m68040'.
  4214             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4215         ;;
  4216       esac
  4217       ;;
  4218 
  4219     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4220       # PIC is the default for these OSes.
  4221       ;;
  4222 
  4223     mingw* | cygwin* | pw32* | os2* | cegcc*)
  4224       # This hack is so that the source file can tell whether it is being
  4225       # built for inclusion in a dll (and should export symbols for example).
  4226       # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4227       # (--disable-auto-import) libraries
  4228       m4_if([$1], [GCJ], [],
  4229 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4230       ;;
  4231 
  4232     darwin* | rhapsody*)
  4233       # PIC is the default on this platform
  4234       # Common symbols not allowed in MH_DYLIB files
  4235       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4236       ;;
  4237 
  4238     hpux*)
  4239       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4240       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
  4241       # sets the default TLS model and affects inlining.
  4242       case $host_cpu in
  4243       hppa*64*)
  4244 	# +Z the default
  4245 	;;
  4246       *)
  4247 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4248 	;;
  4249       esac
  4250       ;;
  4251 
  4252     interix[[3-9]]*)
  4253       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4254       # Instead, we relocate shared libraries at runtime.
  4255       ;;
  4256 
  4257     msdosdjgpp*)
  4258       # Just because we use GCC doesn't mean we suddenly get shared libraries
  4259       # on systems that don't support them.
  4260       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4261       enable_shared=no
  4262       ;;
  4263 
  4264     *nto* | *qnx*)
  4265       # QNX uses GNU C++, but need to define -shared option too, otherwise
  4266       # it will coredump.
  4267       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4268       ;;
  4269 
  4270     sysv4*MP*)
  4271       if test -d /usr/nec; then
  4272 	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4273       fi
  4274       ;;
  4275 
  4276     *)
  4277       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4278       ;;
  4279     esac
  4280   else
  4281     # PORTME Check for flag to pass linker flags through the system compiler.
  4282     case $host_os in
  4283     aix*)
  4284       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4285       if test "$host_cpu" = ia64; then
  4286 	# AIX 5 now supports IA64 processor
  4287 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4288       else
  4289 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4290       fi
  4291       ;;
  4292 
  4293     mingw* | cygwin* | pw32* | os2* | cegcc*)
  4294       # This hack is so that the source file can tell whether it is being
  4295       # built for inclusion in a dll (and should export symbols for example).
  4296       m4_if([$1], [GCJ], [],
  4297 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4298       ;;
  4299 
  4300     hpux9* | hpux10* | hpux11*)
  4301       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4302       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4303       # not for PA HP-UX.
  4304       case $host_cpu in
  4305       hppa*64*|ia64*)
  4306 	# +Z the default
  4307 	;;
  4308       *)
  4309 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4310 	;;
  4311       esac
  4312       # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4313       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4314       ;;
  4315 
  4316     irix5* | irix6* | nonstopux*)
  4317       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4318       # PIC (with -KPIC) is the default.
  4319       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4320       ;;
  4321 
  4322     linux* | k*bsd*-gnu)
  4323       case $cc_basename in
  4324       # old Intel for x86_64 which still supported -KPIC.
  4325       ecc*)
  4326 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4327 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4328 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4329         ;;
  4330       # icc used to be incompatible with GCC.
  4331       # ICC 10 doesn't accept -KPIC any more.
  4332       icc* | ifort*)
  4333 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4334 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4335 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4336         ;;
  4337       # Lahey Fortran 8.1.
  4338       lf95*)
  4339 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4340 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4341 	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4342 	;;
  4343       pgcc* | pgf77* | pgf90* | pgf95*)
  4344         # Portland Group compilers (*not* the Pentium gcc compiler,
  4345 	# which looks to be a dead project)
  4346 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4347 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4348 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4349         ;;
  4350       ccc*)
  4351         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4352         # All Alpha code is PIC.
  4353         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4354         ;;
  4355       xl*)
  4356 	# IBM XL C 8.0/Fortran 10.1 on PPC
  4357 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4358 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4359 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4360 	;;
  4361       *)
  4362 	case `$CC -V 2>&1 | sed 5q` in
  4363 	*Sun\ C*)
  4364 	  # Sun C 5.9
  4365 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4366 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4367 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4368 	  ;;
  4369 	*Sun\ F*)
  4370 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4371 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4372 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4373 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4374 	  ;;
  4375 	esac
  4376 	;;
  4377       esac
  4378       ;;
  4379 
  4380     newsos6)
  4381       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4382       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4383       ;;
  4384 
  4385     *nto* | *qnx*)
  4386       # QNX uses GNU C++, but need to define -shared option too, otherwise
  4387       # it will coredump.
  4388       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4389       ;;
  4390 
  4391     osf3* | osf4* | osf5*)
  4392       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4393       # All OSF/1 code is PIC.
  4394       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4395       ;;
  4396 
  4397     rdos*)
  4398       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4399       ;;
  4400 
  4401     solaris*)
  4402       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4403       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4404       case $cc_basename in
  4405       f77* | f90* | f95*)
  4406 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4407       *)
  4408 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4409       esac
  4410       ;;
  4411 
  4412     sunos4*)
  4413       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4414       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4415       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4416       ;;
  4417 
  4418     sysv4 | sysv4.2uw2* | sysv4.3*)
  4419       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4420       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4421       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4422       ;;
  4423 
  4424     sysv4*MP*)
  4425       if test -d /usr/nec ;then
  4426 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4427 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4428       fi
  4429       ;;
  4430 
  4431     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4432       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4433       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4434       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4435       ;;
  4436 
  4437     unicos*)
  4438       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4439       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4440       ;;
  4441 
  4442     uts4*)
  4443       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4444       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4445       ;;
  4446 
  4447     *)
  4448       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4449       ;;
  4450     esac
  4451   fi
  4452 ])
  4453 case $host_os in
  4454   # For platforms which do not support PIC, -DPIC is meaningless:
  4455   *djgpp*)
  4456     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4457     ;;
  4458   *)
  4459     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4460     ;;
  4461 esac
  4462 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4463 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4464 	[How to pass a linker flag through the compiler])
  4465 
  4466 #
  4467 # Check to make sure the PIC flag actually works.
  4468 #
  4469 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4470   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4471     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4472     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4473     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4474      "" | " "*) ;;
  4475      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4476      esac],
  4477     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4478      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4479 fi
  4480 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4481 	[Additional compiler flags for building library objects])
  4482 
  4483 #
  4484 # Check to make sure the static flag actually works.
  4485 #
  4486 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4487 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4488   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4489   $lt_tmp_static_flag,
  4490   [],
  4491   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4492 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4493 	[Compiler flag to prevent dynamic linking])
  4494 ])# _LT_COMPILER_PIC
  4495 
  4496 
  4497 # _LT_LINKER_SHLIBS([TAGNAME])
  4498 # ----------------------------
  4499 # See if the linker supports building shared libraries.
  4500 m4_defun([_LT_LINKER_SHLIBS],
  4501 [AC_REQUIRE([LT_PATH_LD])dnl
  4502 AC_REQUIRE([LT_PATH_NM])dnl
  4503 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4504 m4_require([_LT_DECL_EGREP])dnl
  4505 m4_require([_LT_DECL_SED])dnl
  4506 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4507 m4_require([_LT_TAG_COMPILER])dnl
  4508 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4509 m4_if([$1], [CXX], [
  4510   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4511   case $host_os in
  4512   aix[[4-9]]*)
  4513     # If we're using GNU nm, then we don't want the "-C" option.
  4514     # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4515     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4516       _LT_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'
  4517     else
  4518       _LT_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'
  4519     fi
  4520     ;;
  4521   pw32*)
  4522     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4523   ;;
  4524   cygwin* | mingw* | cegcc*)
  4525     _LT_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'
  4526   ;;
  4527   *)
  4528     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4529   ;;
  4530   esac
  4531   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4532 ], [
  4533   runpath_var=
  4534   _LT_TAGVAR(allow_undefined_flag, $1)=
  4535   _LT_TAGVAR(always_export_symbols, $1)=no
  4536   _LT_TAGVAR(archive_cmds, $1)=
  4537   _LT_TAGVAR(archive_expsym_cmds, $1)=
  4538   _LT_TAGVAR(compiler_needs_object, $1)=no
  4539   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4540   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4541   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4542   _LT_TAGVAR(hardcode_automatic, $1)=no
  4543   _LT_TAGVAR(hardcode_direct, $1)=no
  4544   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4545   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4546   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  4547   _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4548   _LT_TAGVAR(hardcode_minus_L, $1)=no
  4549   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4550   _LT_TAGVAR(inherit_rpath, $1)=no
  4551   _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4552   _LT_TAGVAR(module_cmds, $1)=
  4553   _LT_TAGVAR(module_expsym_cmds, $1)=
  4554   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4555   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4556   _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4557   _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4558   # include_expsyms should be a list of space-separated symbols to be *always*
  4559   # included in the symbol list
  4560   _LT_TAGVAR(include_expsyms, $1)=
  4561   # exclude_expsyms can be an extended regexp of symbols to exclude
  4562   # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4563   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4564   # as well as any symbol that contains `d'.
  4565   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4566   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4567   # platforms (ab)use it in PIC code, but their linkers get confused if
  4568   # the symbol is explicitly referenced.  Since portable code cannot
  4569   # rely on this symbol name, it's probably fine to never include it in
  4570   # preloaded symbol tables.
  4571   # Exclude shared library initialization/finalization symbols.
  4572 dnl Note also adjust exclude_expsyms for C++ above.
  4573   extract_expsyms_cmds=
  4574 
  4575   case $host_os in
  4576   cygwin* | mingw* | pw32* | cegcc*)
  4577     # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4578     # When not using gcc, we currently assume that we are using
  4579     # Microsoft Visual C++.
  4580     if test "$GCC" != yes; then
  4581       with_gnu_ld=no
  4582     fi
  4583     ;;
  4584   interix*)
  4585     # we just hope/assume this is gcc and not c89 (= MSVC++)
  4586     with_gnu_ld=yes
  4587     ;;
  4588   openbsd*)
  4589     with_gnu_ld=no
  4590     ;;
  4591   esac
  4592 
  4593   _LT_TAGVAR(ld_shlibs, $1)=yes
  4594   if test "$with_gnu_ld" = yes; then
  4595     # If archive_cmds runs LD, not CC, wlarc should be empty
  4596     wlarc='${wl}'
  4597 
  4598     # Set some defaults for GNU ld with shared library support. These
  4599     # are reset later if shared libraries are not supported. Putting them
  4600     # here allows them to be overridden if necessary.
  4601     runpath_var=LD_RUN_PATH
  4602     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4603     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4604     # ancient GNU ld didn't support --whole-archive et. al.
  4605     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4606       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4607     else
  4608       _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4609     fi
  4610     supports_anon_versioning=no
  4611     case `$LD -v 2>&1` in
  4612       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4613       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4614       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4615       *\ 2.11.*) ;; # other 2.11 versions
  4616       *) supports_anon_versioning=yes ;;
  4617     esac
  4618 
  4619     # See if GNU ld supports shared libraries.
  4620     case $host_os in
  4621     aix[[3-9]]*)
  4622       # On AIX/PPC, the GNU linker is very broken
  4623       if test "$host_cpu" != ia64; then
  4624 	_LT_TAGVAR(ld_shlibs, $1)=no
  4625 	cat <<_LT_EOF 1>&2
  4626 
  4627 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  4628 *** to be unable to reliably create shared libraries on AIX.
  4629 *** Therefore, libtool is disabling shared libraries support.  If you
  4630 *** really care for shared libraries, you may want to modify your PATH
  4631 *** so that a non-GNU linker is found, and then restart.
  4632 
  4633 _LT_EOF
  4634       fi
  4635       ;;
  4636 
  4637     amigaos*)
  4638       case $host_cpu in
  4639       powerpc)
  4640             # see comment about AmigaOS4 .so support
  4641             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4642             _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4643         ;;
  4644       m68k)
  4645             _LT_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)'
  4646             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4647             _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4648         ;;
  4649       esac
  4650       ;;
  4651 
  4652     beos*)
  4653       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4654 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4655 	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4656 	# support --undefined.  This deserves some investigation.  FIXME
  4657 	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4658       else
  4659 	_LT_TAGVAR(ld_shlibs, $1)=no
  4660       fi
  4661       ;;
  4662 
  4663     cygwin* | mingw* | pw32* | cegcc*)
  4664       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4665       # as there is no search path for DLLs.
  4666       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4667       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4668       _LT_TAGVAR(always_export_symbols, $1)=no
  4669       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4670       _LT_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'
  4671 
  4672       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4673         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4674 	# If the export-symbols file already is a .def file (1st line
  4675 	# is EXPORTS), use it as is; otherwise, prepend...
  4676 	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4677 	  cp $export_symbols $output_objdir/$soname.def;
  4678 	else
  4679 	  echo EXPORTS > $output_objdir/$soname.def;
  4680 	  cat $export_symbols >> $output_objdir/$soname.def;
  4681 	fi~
  4682 	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4683       else
  4684 	_LT_TAGVAR(ld_shlibs, $1)=no
  4685       fi
  4686       ;;
  4687 
  4688     interix[[3-9]]*)
  4689       _LT_TAGVAR(hardcode_direct, $1)=no
  4690       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4691       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4692       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4693       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4694       # Instead, shared libraries are loaded at an image base (0x10000000 by
  4695       # default) and relocated if they conflict, which is a slow very memory
  4696       # consuming and fragmenting process.  To avoid this, we pick a random,
  4697       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4698       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
  4699       _LT_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'
  4700       _LT_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'
  4701       ;;
  4702 
  4703     gnu* | linux* | tpf* | k*bsd*-gnu)
  4704       tmp_diet=no
  4705       if test "$host_os" = linux-dietlibc; then
  4706 	case $cc_basename in
  4707 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
  4708 	esac
  4709       fi
  4710       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4711 	 && test "$tmp_diet" = no
  4712       then
  4713 	tmp_addflag=
  4714 	tmp_sharedflag='-shared'
  4715 	case $cc_basename,$host_cpu in
  4716         pgcc*)				# Portland Group C compiler
  4717 	  _LT_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'
  4718 	  tmp_addflag=' $pic_flag'
  4719 	  ;;
  4720 	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
  4721 	  _LT_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'
  4722 	  tmp_addflag=' $pic_flag -Mnomain' ;;
  4723 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
  4724 	  tmp_addflag=' -i_dynamic' ;;
  4725 	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
  4726 	  tmp_addflag=' -i_dynamic -nofor_main' ;;
  4727 	ifc* | ifort*)			# Intel Fortran compiler
  4728 	  tmp_addflag=' -nofor_main' ;;
  4729 	lf95*)				# Lahey Fortran 8.1
  4730 	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4731 	  tmp_sharedflag='--shared' ;;
  4732 	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
  4733 	  tmp_sharedflag='-qmkshrobj'
  4734 	  tmp_addflag= ;;
  4735 	esac
  4736 	case `$CC -V 2>&1 | sed 5q` in
  4737 	*Sun\ C*)			# Sun C 5.9
  4738 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  4739 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
  4740 	  tmp_sharedflag='-G' ;;
  4741 	*Sun\ F*)			# Sun Fortran 8.3
  4742 	  tmp_sharedflag='-G' ;;
  4743 	esac
  4744 	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4745 
  4746         if test "x$supports_anon_versioning" = xyes; then
  4747           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4748 	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4749 	    echo "local: *; };" >> $output_objdir/$libname.ver~
  4750 	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4751         fi
  4752 
  4753 	case $cc_basename in
  4754 	xlf*)
  4755 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4756 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4757 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4758 	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  4759 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
  4760 	  if test "x$supports_anon_versioning" = xyes; then
  4761 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4762 	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4763 	      echo "local: *; };" >> $output_objdir/$libname.ver~
  4764 	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4765 	  fi
  4766 	  ;;
  4767 	esac
  4768       else
  4769         _LT_TAGVAR(ld_shlibs, $1)=no
  4770       fi
  4771       ;;
  4772 
  4773     netbsd*)
  4774       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4775 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4776 	wlarc=
  4777       else
  4778 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4779 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4780       fi
  4781       ;;
  4782 
  4783     solaris*)
  4784       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4785 	_LT_TAGVAR(ld_shlibs, $1)=no
  4786 	cat <<_LT_EOF 1>&2
  4787 
  4788 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4789 *** create shared libraries on Solaris systems.  Therefore, libtool
  4790 *** is disabling shared libraries support.  We urge you to upgrade GNU
  4791 *** binutils to release 2.9.1 or newer.  Another option is to modify
  4792 *** your PATH or compiler configuration so that the native linker is
  4793 *** used, and then restart.
  4794 
  4795 _LT_EOF
  4796       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4797 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4798 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4799       else
  4800 	_LT_TAGVAR(ld_shlibs, $1)=no
  4801       fi
  4802       ;;
  4803 
  4804     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4805       case `$LD -v 2>&1` in
  4806         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4807 	_LT_TAGVAR(ld_shlibs, $1)=no
  4808 	cat <<_LT_EOF 1>&2
  4809 
  4810 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4811 *** reliably create shared libraries on SCO systems.  Therefore, libtool
  4812 *** is disabling shared libraries support.  We urge you to upgrade GNU
  4813 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
  4814 *** your PATH or compiler configuration so that the native linker is
  4815 *** used, and then restart.
  4816 
  4817 _LT_EOF
  4818 	;;
  4819 	*)
  4820 	  # For security reasons, it is highly recommended that you always
  4821 	  # use absolute paths for naming shared libraries, and exclude the
  4822 	  # DT_RUNPATH tag from executables and libraries.  But doing so
  4823 	  # requires that you compile everything twice, which is a pain.
  4824 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4825 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4826 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4827 	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4828 	  else
  4829 	    _LT_TAGVAR(ld_shlibs, $1)=no
  4830 	  fi
  4831 	;;
  4832       esac
  4833       ;;
  4834 
  4835     sunos4*)
  4836       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4837       wlarc=
  4838       _LT_TAGVAR(hardcode_direct, $1)=yes
  4839       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4840       ;;
  4841 
  4842     *)
  4843       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4844 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4845 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4846       else
  4847 	_LT_TAGVAR(ld_shlibs, $1)=no
  4848       fi
  4849       ;;
  4850     esac
  4851 
  4852     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4853       runpath_var=
  4854       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4855       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4856       _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4857     fi
  4858   else
  4859     # PORTME fill in a description of your system's linker (not GNU ld)
  4860     case $host_os in
  4861     aix3*)
  4862       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4863       _LT_TAGVAR(always_export_symbols, $1)=yes
  4864       _LT_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'
  4865       # Note: this linker hardcodes the directories in LIBPATH if there
  4866       # are no directories specified by -L.
  4867       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4868       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4869 	# Neither direct hardcoding nor static linking is supported with a
  4870 	# broken collect2.
  4871 	_LT_TAGVAR(hardcode_direct, $1)=unsupported
  4872       fi
  4873       ;;
  4874 
  4875     aix[[4-9]]*)
  4876       if test "$host_cpu" = ia64; then
  4877 	# On IA64, the linker does run time linking by default, so we don't
  4878 	# have to do anything special.
  4879 	aix_use_runtimelinking=no
  4880 	exp_sym_flag='-Bexport'
  4881 	no_entry_flag=""
  4882       else
  4883 	# If we're using GNU nm, then we don't want the "-C" option.
  4884 	# -C means demangle to AIX nm, but means don't demangle with GNU nm
  4885 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4886 	  _LT_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'
  4887 	else
  4888 	  _LT_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'
  4889 	fi
  4890 	aix_use_runtimelinking=no
  4891 
  4892 	# Test if we are trying to use run time linking or normal
  4893 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4894 	# need to do runtime linking.
  4895 	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4896 	  for ld_flag in $LDFLAGS; do
  4897 	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4898 	    aix_use_runtimelinking=yes
  4899 	    break
  4900 	  fi
  4901 	  done
  4902 	  ;;
  4903 	esac
  4904 
  4905 	exp_sym_flag='-bexport'
  4906 	no_entry_flag='-bnoentry'
  4907       fi
  4908 
  4909       # When large executables or shared objects are built, AIX ld can
  4910       # have problems creating the table of contents.  If linking a library
  4911       # or program results in "error TOC overflow" add -mminimal-toc to
  4912       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
  4913       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4914 
  4915       _LT_TAGVAR(archive_cmds, $1)=''
  4916       _LT_TAGVAR(hardcode_direct, $1)=yes
  4917       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4918       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4919       _LT_TAGVAR(link_all_deplibs, $1)=yes
  4920       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4921 
  4922       if test "$GCC" = yes; then
  4923 	case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4924 	# We only want to do this on AIX 4.2 and lower, the check
  4925 	# below for broken collect2 doesn't work under 4.3+
  4926 	  collect2name=`${CC} -print-prog-name=collect2`
  4927 	  if test -f "$collect2name" &&
  4928 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4929 	  then
  4930 	  # We have reworked collect2
  4931 	  :
  4932 	  else
  4933 	  # We have old collect2
  4934 	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4935 	  # It fails to find uninstalled libraries when the uninstalled
  4936 	  # path is not listed in the libpath.  Setting hardcode_minus_L
  4937 	  # to unsupported forces relinking
  4938 	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4939 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4940 	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4941 	  fi
  4942 	  ;;
  4943 	esac
  4944 	shared_flag='-shared'
  4945 	if test "$aix_use_runtimelinking" = yes; then
  4946 	  shared_flag="$shared_flag "'${wl}-G'
  4947 	fi
  4948       else
  4949 	# not using gcc
  4950 	if test "$host_cpu" = ia64; then
  4951 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4952 	# chokes on -Wl,-G. The following line is correct:
  4953 	  shared_flag='-G'
  4954 	else
  4955 	  if test "$aix_use_runtimelinking" = yes; then
  4956 	    shared_flag='${wl}-G'
  4957 	  else
  4958 	    shared_flag='${wl}-bM:SRE'
  4959 	  fi
  4960 	fi
  4961       fi
  4962 
  4963       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4964       # It seems that -bexpall does not export symbols beginning with
  4965       # underscore (_), so it is better to generate a list of symbols to export.
  4966       _LT_TAGVAR(always_export_symbols, $1)=yes
  4967       if test "$aix_use_runtimelinking" = yes; then
  4968 	# Warning - without using the other runtime loading flags (-brtl),
  4969 	# -berok will link without error, but may produce a broken library.
  4970 	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4971         # Determine the default libpath from the value encoded in an
  4972         # empty executable.
  4973         _LT_SYS_MODULE_PATH_AIX
  4974         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4975         _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  4976       else
  4977 	if test "$host_cpu" = ia64; then
  4978 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4979 	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4980 	  _LT_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"
  4981 	else
  4982 	 # Determine the default libpath from the value encoded in an
  4983 	 # empty executable.
  4984 	 _LT_SYS_MODULE_PATH_AIX
  4985 	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4986 	  # Warning - without using the other run time loading flags,
  4987 	  # -berok will link without error, but may produce a broken library.
  4988 	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4989 	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4990 	  # Exported symbols can be pulled into shared objects from archives
  4991 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4992 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4993 	  # This is similar to how AIX traditionally builds its shared libraries.
  4994 	  _LT_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'
  4995 	fi
  4996       fi
  4997       ;;
  4998 
  4999     amigaos*)
  5000       case $host_cpu in
  5001       powerpc)
  5002             # see comment about AmigaOS4 .so support
  5003             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5004             _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5005         ;;
  5006       m68k)
  5007             _LT_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)'
  5008             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5009             _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5010         ;;
  5011       esac
  5012       ;;
  5013 
  5014     bsdi[[45]]*)
  5015       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5016       ;;
  5017 
  5018     cygwin* | mingw* | pw32* | cegcc*)
  5019       # When not using gcc, we currently assume that we are using
  5020       # Microsoft Visual C++.
  5021       # hardcode_libdir_flag_spec is actually meaningless, as there is
  5022       # no search path for DLLs.
  5023       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5024       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5025       # Tell ltmain to make .lib files, not .a files.
  5026       libext=lib
  5027       # Tell ltmain to make .dll files, not .so files.
  5028       shrext_cmds=".dll"
  5029       # FIXME: Setting linknames here is a bad hack.
  5030       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  5031       # The linker will automatically build a .lib file if we build a DLL.
  5032       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5033       # FIXME: Should let the user specify the lib program.
  5034       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5035       _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
  5036       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5037       ;;
  5038 
  5039     darwin* | rhapsody*)
  5040       _LT_DARWIN_LINKER_FEATURES($1)
  5041       ;;
  5042 
  5043     dgux*)
  5044       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5045       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5046       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5047       ;;
  5048 
  5049     freebsd1*)
  5050       _LT_TAGVAR(ld_shlibs, $1)=no
  5051       ;;
  5052 
  5053     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5054     # support.  Future versions do this automatically, but an explicit c++rt0.o
  5055     # does not break anything, and helps significantly (at the cost of a little
  5056     # extra space).
  5057     freebsd2.2*)
  5058       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5059       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5060       _LT_TAGVAR(hardcode_direct, $1)=yes
  5061       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5062       ;;
  5063 
  5064     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5065     freebsd2*)
  5066       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5067       _LT_TAGVAR(hardcode_direct, $1)=yes
  5068       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5069       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5070       ;;
  5071 
  5072     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5073     freebsd* | dragonfly*)
  5074       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  5075       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5076       _LT_TAGVAR(hardcode_direct, $1)=yes
  5077       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5078       ;;
  5079 
  5080     hpux9*)
  5081       if test "$GCC" = yes; then
  5082 	_LT_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'
  5083       else
  5084 	_LT_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'
  5085       fi
  5086       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5087       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5088       _LT_TAGVAR(hardcode_direct, $1)=yes
  5089 
  5090       # hardcode_minus_L: Not really in the search PATH,
  5091       # but as the default location of the library.
  5092       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5093       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5094       ;;
  5095 
  5096     hpux10*)
  5097       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  5098 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5099       else
  5100 	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5101       fi
  5102       if test "$with_gnu_ld" = no; then
  5103 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5104 	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  5105 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5106 	_LT_TAGVAR(hardcode_direct, $1)=yes
  5107 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5108 	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5109 	# hardcode_minus_L: Not really in the search PATH,
  5110 	# but as the default location of the library.
  5111 	_LT_TAGVAR(hardcode_minus_L, $1)=yes
  5112       fi
  5113       ;;
  5114 
  5115     hpux11*)
  5116       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  5117 	case $host_cpu in
  5118 	hppa*64*)
  5119 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5120 	  ;;
  5121 	ia64*)
  5122 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5123 	  ;;
  5124 	*)
  5125 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5126 	  ;;
  5127 	esac
  5128       else
  5129 	case $host_cpu in
  5130 	hppa*64*)
  5131 	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5132 	  ;;
  5133 	ia64*)
  5134 	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5135 	  ;;
  5136 	*)
  5137 	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5138 	  ;;
  5139 	esac
  5140       fi
  5141       if test "$with_gnu_ld" = no; then
  5142 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5143 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5144 
  5145 	case $host_cpu in
  5146 	hppa*64*|ia64*)
  5147 	  _LT_TAGVAR(hardcode_direct, $1)=no
  5148 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5149 	  ;;
  5150 	*)
  5151 	  _LT_TAGVAR(hardcode_direct, $1)=yes
  5152 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5153 	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5154 
  5155 	  # hardcode_minus_L: Not really in the search PATH,
  5156 	  # but as the default location of the library.
  5157 	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5158 	  ;;
  5159 	esac
  5160       fi
  5161       ;;
  5162 
  5163     irix5* | irix6* | nonstopux*)
  5164       if test "$GCC" = yes; then
  5165 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5166 	# Try to use the -exported_symbol ld option, if it does not
  5167 	# work, assume that -exports_file does not work either and
  5168 	# implicitly export all symbols.
  5169         save_LDFLAGS="$LDFLAGS"
  5170         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  5171         AC_LINK_IFELSE(int foo(void) {},
  5172           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
  5173         )
  5174         LDFLAGS="$save_LDFLAGS"
  5175       else
  5176 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  5177 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
  5178       fi
  5179       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5180       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5181       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5182       _LT_TAGVAR(inherit_rpath, $1)=yes
  5183       _LT_TAGVAR(link_all_deplibs, $1)=yes
  5184       ;;
  5185 
  5186     netbsd*)
  5187       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5188 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
  5189       else
  5190 	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
  5191       fi
  5192       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5193       _LT_TAGVAR(hardcode_direct, $1)=yes
  5194       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5195       ;;
  5196 
  5197     newsos6)
  5198       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5199       _LT_TAGVAR(hardcode_direct, $1)=yes
  5200       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5201       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5202       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5203       ;;
  5204 
  5205     *nto* | *qnx*)
  5206       ;;
  5207 
  5208     openbsd*)
  5209       if test -f /usr/libexec/ld.so; then
  5210 	_LT_TAGVAR(hardcode_direct, $1)=yes
  5211 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5212 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5213 	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5214 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5215 	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  5216 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5217 	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5218 	else
  5219 	  case $host_os in
  5220 	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  5221 	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5222 	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5223 	     ;;
  5224 	   *)
  5225 	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5226 	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5227 	     ;;
  5228 	  esac
  5229 	fi
  5230       else
  5231 	_LT_TAGVAR(ld_shlibs, $1)=no
  5232       fi
  5233       ;;
  5234 
  5235     os2*)
  5236       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5237       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5238       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5239       _LT_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'
  5240       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  5241       ;;
  5242 
  5243     osf3*)
  5244       if test "$GCC" = yes; then
  5245 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5246 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5247       else
  5248 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5249 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  5250       fi
  5251       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5252       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5253       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5254       ;;
  5255 
  5256     osf4* | osf5*)	# as osf3* with the addition of -msym flag
  5257       if test "$GCC" = yes; then
  5258 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5259 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5260 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5261       else
  5262 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5263 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  5264 	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
  5265 	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
  5266 
  5267 	# Both c and cxx compiler support -rpath directly
  5268 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5269       fi
  5270       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5271       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5272       ;;
  5273 
  5274     solaris*)
  5275       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5276       if test "$GCC" = yes; then
  5277 	wlarc='${wl}'
  5278 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5279 	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5280 	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5281       else
  5282 	case `$CC -V 2>&1` in
  5283 	*"Compilers 5.0"*)
  5284 	  wlarc=''
  5285 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5286 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5287 	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5288 	  ;;
  5289 	*)
  5290 	  wlarc='${wl}'
  5291 	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5292 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5293 	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5294 	  ;;
  5295 	esac
  5296       fi
  5297       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5298       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5299       case $host_os in
  5300       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5301       *)
  5302 	# The compiler driver will combine and reorder linker options,
  5303 	# but understands `-z linker_flag'.  GCC discards it without `$wl',
  5304 	# but is careful enough not to reorder.
  5305 	# Supported since Solaris 2.6 (maybe 2.5.1?)
  5306 	if test "$GCC" = yes; then
  5307 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  5308 	else
  5309 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5310 	fi
  5311 	;;
  5312       esac
  5313       _LT_TAGVAR(link_all_deplibs, $1)=yes
  5314       ;;
  5315 
  5316     sunos4*)
  5317       if test "x$host_vendor" = xsequent; then
  5318 	# Use $CC to link under sequent, because it throws in some extra .o
  5319 	# files that make .init and .fini sections work.
  5320 	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5321       else
  5322 	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5323       fi
  5324       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5325       _LT_TAGVAR(hardcode_direct, $1)=yes
  5326       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5327       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5328       ;;
  5329 
  5330     sysv4)
  5331       case $host_vendor in
  5332 	sni)
  5333 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5334 	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5335 	;;
  5336 	siemens)
  5337 	  ## LD is ld it makes a PLAMLIB
  5338 	  ## CC just makes a GrossModule.
  5339 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5340 	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5341 	  _LT_TAGVAR(hardcode_direct, $1)=no
  5342         ;;
  5343 	motorola)
  5344 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5345 	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5346 	;;
  5347       esac
  5348       runpath_var='LD_RUN_PATH'
  5349       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5350       ;;
  5351 
  5352     sysv4.3*)
  5353       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5354       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5355       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5356       ;;
  5357 
  5358     sysv4*MP*)
  5359       if test -d /usr/nec; then
  5360 	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5361 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5362 	runpath_var=LD_RUN_PATH
  5363 	hardcode_runpath_var=yes
  5364 	_LT_TAGVAR(ld_shlibs, $1)=yes
  5365       fi
  5366       ;;
  5367 
  5368     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5369       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5370       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5371       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5372       runpath_var='LD_RUN_PATH'
  5373 
  5374       if test "$GCC" = yes; then
  5375 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5376 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5377       else
  5378 	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5379 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5380       fi
  5381       ;;
  5382 
  5383     sysv5* | sco3.2v5* | sco5v6*)
  5384       # Note: We can NOT use -z defs as we might desire, because we do not
  5385       # link with -lc, and that would cause any symbols used from libc to
  5386       # always be unresolved, which means just about no library would
  5387       # ever link correctly.  If we're not using GNU ld we use -z text
  5388       # though, which does catch some bad symbols but isn't as heavy-handed
  5389       # as -z defs.
  5390       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5391       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5392       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5393       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5394       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5395       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5396       _LT_TAGVAR(link_all_deplibs, $1)=yes
  5397       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5398       runpath_var='LD_RUN_PATH'
  5399 
  5400       if test "$GCC" = yes; then
  5401 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5402 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5403       else
  5404 	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5405 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5406       fi
  5407       ;;
  5408 
  5409     uts4*)
  5410       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5411       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5412       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5413       ;;
  5414 
  5415     *)
  5416       _LT_TAGVAR(ld_shlibs, $1)=no
  5417       ;;
  5418     esac
  5419 
  5420     if test x$host_vendor = xsni; then
  5421       case $host in
  5422       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5423 	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5424 	;;
  5425       esac
  5426     fi
  5427   fi
  5428 ])
  5429 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5430 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5431 
  5432 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5433 
  5434 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5435 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5436 _LT_DECL([], [extract_expsyms_cmds], [2],
  5437     [The commands to extract the exported symbol list from a shared archive])
  5438 
  5439 #
  5440 # Do we need to explicitly link libc?
  5441 #
  5442 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5443 x|xyes)
  5444   # Assume -lc should be added
  5445   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5446 
  5447   if test "$enable_shared" = yes && test "$GCC" = yes; then
  5448     case $_LT_TAGVAR(archive_cmds, $1) in
  5449     *'~'*)
  5450       # FIXME: we may have to deal with multi-command sequences.
  5451       ;;
  5452     '$CC '*)
  5453       # Test whether the compiler implicitly links with -lc since on some
  5454       # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5455       # to ld, don't add -lc before -lgcc.
  5456       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  5457       $RM conftest*
  5458       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5459 
  5460       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5461         soname=conftest
  5462         lib=conftest
  5463         libobjs=conftest.$ac_objext
  5464         deplibs=
  5465         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5466 	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5467         compiler_flags=-v
  5468         linker_flags=-v
  5469         verstring=
  5470         output_objdir=.
  5471         libname=conftest
  5472         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5473         _LT_TAGVAR(allow_undefined_flag, $1)=
  5474         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5475         then
  5476 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5477         else
  5478 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5479         fi
  5480         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5481       else
  5482         cat conftest.err 1>&5
  5483       fi
  5484       $RM conftest*
  5485       AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
  5486       ;;
  5487     esac
  5488   fi
  5489   ;;
  5490 esac
  5491 
  5492 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5493     [Whether or not to add -lc for building shared libraries])
  5494 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5495     [enable_shared_with_static_runtimes], [0],
  5496     [Whether or not to disallow shared libs when runtime libs are static])
  5497 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5498     [Compiler flag to allow reflexive dlopens])
  5499 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5500     [Compiler flag to generate shared objects directly from archives])
  5501 _LT_TAGDECL([], [compiler_needs_object], [1],
  5502     [Whether the compiler copes with passing no objects directly])
  5503 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5504     [Create an old-style archive from a shared archive])
  5505 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5506     [Create a temporary old-style archive to link instead of a shared archive])
  5507 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5508 _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5509 _LT_TAGDECL([], [module_cmds], [2],
  5510     [Commands used to build a loadable module if different from building
  5511     a shared archive.])
  5512 _LT_TAGDECL([], [module_expsym_cmds], [2])
  5513 _LT_TAGDECL([], [with_gnu_ld], [1],
  5514     [Whether we are building with GNU ld or not])
  5515 _LT_TAGDECL([], [allow_undefined_flag], [1],
  5516     [Flag that allows shared libraries with undefined symbols to be built])
  5517 _LT_TAGDECL([], [no_undefined_flag], [1],
  5518     [Flag that enforces no undefined symbols])
  5519 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5520     [Flag to hardcode $libdir into a binary during linking.
  5521     This must work even if $libdir does not exist])
  5522 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
  5523     [[If ld is used when linking, flag to hardcode $libdir into a binary
  5524     during linking.  This must work even if $libdir does not exist]])
  5525 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5526     [Whether we need a single "-rpath" flag with a separated argument])
  5527 _LT_TAGDECL([], [hardcode_direct], [0],
  5528     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5529     DIR into the resulting binary])
  5530 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5531     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5532     DIR into the resulting binary and the resulting library dependency is
  5533     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5534     library is relocated])
  5535 _LT_TAGDECL([], [hardcode_minus_L], [0],
  5536     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5537     into the resulting binary])
  5538 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5539     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5540     into the resulting binary])
  5541 _LT_TAGDECL([], [hardcode_automatic], [0],
  5542     [Set to "yes" if building a shared library automatically hardcodes DIR
  5543     into the library and all subsequent libraries and executables linked
  5544     against it])
  5545 _LT_TAGDECL([], [inherit_rpath], [0],
  5546     [Set to yes if linker adds runtime paths of dependent libraries
  5547     to runtime path list])
  5548 _LT_TAGDECL([], [link_all_deplibs], [0],
  5549     [Whether libtool must link a program against all its dependency libraries])
  5550 _LT_TAGDECL([], [fix_srcfile_path], [1],
  5551     [Fix the shell variable $srcfile for the compiler])
  5552 _LT_TAGDECL([], [always_export_symbols], [0],
  5553     [Set to "yes" if exported symbols are required])
  5554 _LT_TAGDECL([], [export_symbols_cmds], [2],
  5555     [The commands to list exported symbols])
  5556 _LT_TAGDECL([], [exclude_expsyms], [1],
  5557     [Symbols that should not be listed in the preloaded symbols])
  5558 _LT_TAGDECL([], [include_expsyms], [1],
  5559     [Symbols that must always be exported])
  5560 _LT_TAGDECL([], [prelink_cmds], [2],
  5561     [Commands necessary for linking programs (against libraries) with templates])
  5562 _LT_TAGDECL([], [file_list_spec], [1],
  5563     [Specify filename containing input files])
  5564 dnl FIXME: Not yet implemented
  5565 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5566 dnl    [Compiler flag to generate thread safe objects])
  5567 ])# _LT_LINKER_SHLIBS
  5568 
  5569 
  5570 # _LT_LANG_C_CONFIG([TAG])
  5571 # ------------------------
  5572 # Ensure that the configuration variables for a C compiler are suitably
  5573 # defined.  These variables are subsequently used by _LT_CONFIG to write
  5574 # the compiler configuration to `libtool'.
  5575 m4_defun([_LT_LANG_C_CONFIG],
  5576 [m4_require([_LT_DECL_EGREP])dnl
  5577 lt_save_CC="$CC"
  5578 AC_LANG_PUSH(C)
  5579 
  5580 # Source file extension for C test sources.
  5581 ac_ext=c
  5582 
  5583 # Object file extension for compiled C test sources.
  5584 objext=o
  5585 _LT_TAGVAR(objext, $1)=$objext
  5586 
  5587 # Code to be used in simple compile tests
  5588 lt_simple_compile_test_code="int some_variable = 0;"
  5589 
  5590 # Code to be used in simple link tests
  5591 lt_simple_link_test_code='int main(){return(0);}'
  5592 
  5593 _LT_TAG_COMPILER
  5594 # Save the default compiler, since it gets overwritten when the other
  5595 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5596 compiler_DEFAULT=$CC
  5597 
  5598 # save warnings/boilerplate of simple test code
  5599 _LT_COMPILER_BOILERPLATE
  5600 _LT_LINKER_BOILERPLATE
  5601 
  5602 ## CAVEAT EMPTOR:
  5603 ## There is no encapsulation within the following macros, do not change
  5604 ## the running order or otherwise move them around unless you know exactly
  5605 ## what you are doing...
  5606 if test -n "$compiler"; then
  5607   _LT_COMPILER_NO_RTTI($1)
  5608   _LT_COMPILER_PIC($1)
  5609   _LT_COMPILER_C_O($1)
  5610   _LT_COMPILER_FILE_LOCKS($1)
  5611   _LT_LINKER_SHLIBS($1)
  5612   _LT_SYS_DYNAMIC_LINKER($1)
  5613   _LT_LINKER_HARDCODE_LIBPATH($1)
  5614   LT_SYS_DLOPEN_SELF
  5615   _LT_CMD_STRIPLIB
  5616 
  5617   # Report which library types will actually be built
  5618   AC_MSG_CHECKING([if libtool supports shared libraries])
  5619   AC_MSG_RESULT([$can_build_shared])
  5620 
  5621   AC_MSG_CHECKING([whether to build shared libraries])
  5622   test "$can_build_shared" = "no" && enable_shared=no
  5623 
  5624   # On AIX, shared libraries and static libraries use the same namespace, and
  5625   # are all built from PIC.
  5626   case $host_os in
  5627   aix3*)
  5628     test "$enable_shared" = yes && enable_static=no
  5629     if test -n "$RANLIB"; then
  5630       archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5631       postinstall_cmds='$RANLIB $lib'
  5632     fi
  5633     ;;
  5634 
  5635   aix[[4-9]]*)
  5636     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5637       test "$enable_shared" = yes && enable_static=no
  5638     fi
  5639     ;;
  5640   esac
  5641   AC_MSG_RESULT([$enable_shared])
  5642 
  5643   AC_MSG_CHECKING([whether to build static libraries])
  5644   # Make sure either enable_shared or enable_static is yes.
  5645   test "$enable_shared" = yes || enable_static=yes
  5646   AC_MSG_RESULT([$enable_static])
  5647 
  5648   _LT_CONFIG($1)
  5649 fi
  5650 AC_LANG_POP
  5651 CC="$lt_save_CC"
  5652 ])# _LT_LANG_C_CONFIG
  5653 
  5654 
  5655 # _LT_PROG_CXX
  5656 # ------------
  5657 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
  5658 # compiler, we have our own version here.
  5659 m4_defun([_LT_PROG_CXX],
  5660 [
  5661 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
  5662 AC_PROG_CXX
  5663 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5664     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5665     (test "X$CXX" != "Xg++"))) ; then
  5666   AC_PROG_CXXCPP
  5667 else
  5668   _lt_caught_CXX_error=yes
  5669 fi
  5670 popdef([AC_MSG_ERROR])
  5671 ])# _LT_PROG_CXX
  5672 
  5673 dnl aclocal-1.4 backwards compatibility:
  5674 dnl AC_DEFUN([_LT_PROG_CXX], [])
  5675 
  5676 
  5677 # _LT_LANG_CXX_CONFIG([TAG])
  5678 # --------------------------
  5679 # Ensure that the configuration variables for a C++ compiler are suitably
  5680 # defined.  These variables are subsequently used by _LT_CONFIG to write
  5681 # the compiler configuration to `libtool'.
  5682 m4_defun([_LT_LANG_CXX_CONFIG],
  5683 [AC_REQUIRE([_LT_PROG_CXX])dnl
  5684 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5685 m4_require([_LT_DECL_EGREP])dnl
  5686 
  5687 AC_LANG_PUSH(C++)
  5688 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5689 _LT_TAGVAR(allow_undefined_flag, $1)=
  5690 _LT_TAGVAR(always_export_symbols, $1)=no
  5691 _LT_TAGVAR(archive_expsym_cmds, $1)=
  5692 _LT_TAGVAR(compiler_needs_object, $1)=no
  5693 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5694 _LT_TAGVAR(hardcode_direct, $1)=no
  5695 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5696 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5697 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  5698 _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5699 _LT_TAGVAR(hardcode_minus_L, $1)=no
  5700 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5701 _LT_TAGVAR(hardcode_automatic, $1)=no
  5702 _LT_TAGVAR(inherit_rpath, $1)=no
  5703 _LT_TAGVAR(module_cmds, $1)=
  5704 _LT_TAGVAR(module_expsym_cmds, $1)=
  5705 _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5706 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5707 _LT_TAGVAR(no_undefined_flag, $1)=
  5708 _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5709 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5710 
  5711 # Source file extension for C++ test sources.
  5712 ac_ext=cpp
  5713 
  5714 # Object file extension for compiled C++ test sources.
  5715 objext=o
  5716 _LT_TAGVAR(objext, $1)=$objext
  5717 
  5718 # No sense in running all these tests if we already determined that
  5719 # the CXX compiler isn't working.  Some variables (like enable_shared)
  5720 # are currently assumed to apply to all compilers on this platform,
  5721 # and will be corrupted by setting them based on a non-working compiler.
  5722 if test "$_lt_caught_CXX_error" != yes; then
  5723   # Code to be used in simple compile tests
  5724   lt_simple_compile_test_code="int some_variable = 0;"
  5725 
  5726   # Code to be used in simple link tests
  5727   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5728 
  5729   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5730   _LT_TAG_COMPILER
  5731 
  5732   # save warnings/boilerplate of simple test code
  5733   _LT_COMPILER_BOILERPLATE
  5734   _LT_LINKER_BOILERPLATE
  5735 
  5736   # Allow CC to be a program name with arguments.
  5737   lt_save_CC=$CC
  5738   lt_save_LD=$LD
  5739   lt_save_GCC=$GCC
  5740   GCC=$GXX
  5741   lt_save_with_gnu_ld=$with_gnu_ld
  5742   lt_save_path_LD=$lt_cv_path_LD
  5743   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5744     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5745   else
  5746     $as_unset lt_cv_prog_gnu_ld
  5747   fi
  5748   if test -n "${lt_cv_path_LDCXX+set}"; then
  5749     lt_cv_path_LD=$lt_cv_path_LDCXX
  5750   else
  5751     $as_unset lt_cv_path_LD
  5752   fi
  5753   test -z "${LDCXX+set}" || LD=$LDCXX
  5754   CC=${CXX-"c++"}
  5755   compiler=$CC
  5756   _LT_TAGVAR(compiler, $1)=$CC
  5757   _LT_CC_BASENAME([$compiler])
  5758 
  5759   if test -n "$compiler"; then
  5760     # We don't want -fno-exception when compiling C++ code, so set the
  5761     # no_builtin_flag separately
  5762     if test "$GXX" = yes; then
  5763       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5764     else
  5765       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5766     fi
  5767 
  5768     if test "$GXX" = yes; then
  5769       # Set up default GNU C++ configuration
  5770 
  5771       LT_PATH_LD
  5772 
  5773       # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5774       # archiving commands below assume that GNU ld is being used.
  5775       if test "$with_gnu_ld" = yes; then
  5776         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5777         _LT_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'
  5778 
  5779         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5780         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5781 
  5782         # If archive_cmds runs LD, not CC, wlarc should be empty
  5783         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5784         #     investigate it a little bit more. (MM)
  5785         wlarc='${wl}'
  5786 
  5787         # ancient GNU ld didn't support --whole-archive et. al.
  5788         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5789 	  $GREP 'no-whole-archive' > /dev/null; then
  5790           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5791         else
  5792           _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5793         fi
  5794       else
  5795         with_gnu_ld=no
  5796         wlarc=
  5797 
  5798         # A generic and very simple default shared library creation
  5799         # command for GNU C++ for the case where it uses the native
  5800         # linker, instead of GNU ld.  If possible, this setting should
  5801         # overridden to take advantage of the native linker features on
  5802         # the platform it is being used on.
  5803         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5804       fi
  5805 
  5806       # Commands to make compiler produce verbose output that lists
  5807       # what "hidden" libraries, object files and flags are used when
  5808       # linking a shared library.
  5809       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
  5810 
  5811     else
  5812       GXX=no
  5813       with_gnu_ld=no
  5814       wlarc=
  5815     fi
  5816 
  5817     # PORTME: fill in a description of your system's C++ link characteristics
  5818     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5819     _LT_TAGVAR(ld_shlibs, $1)=yes
  5820     case $host_os in
  5821       aix3*)
  5822         # FIXME: insert proper C++ library support
  5823         _LT_TAGVAR(ld_shlibs, $1)=no
  5824         ;;
  5825       aix[[4-9]]*)
  5826         if test "$host_cpu" = ia64; then
  5827           # On IA64, the linker does run time linking by default, so we don't
  5828           # have to do anything special.
  5829           aix_use_runtimelinking=no
  5830           exp_sym_flag='-Bexport'
  5831           no_entry_flag=""
  5832         else
  5833           aix_use_runtimelinking=no
  5834 
  5835           # Test if we are trying to use run time linking or normal
  5836           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5837           # need to do runtime linking.
  5838           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5839 	    for ld_flag in $LDFLAGS; do
  5840 	      case $ld_flag in
  5841 	      *-brtl*)
  5842 	        aix_use_runtimelinking=yes
  5843 	        break
  5844 	        ;;
  5845 	      esac
  5846 	    done
  5847 	    ;;
  5848           esac
  5849 
  5850           exp_sym_flag='-bexport'
  5851           no_entry_flag='-bnoentry'
  5852         fi
  5853 
  5854         # When large executables or shared objects are built, AIX ld can
  5855         # have problems creating the table of contents.  If linking a library
  5856         # or program results in "error TOC overflow" add -mminimal-toc to
  5857         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
  5858         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5859 
  5860         _LT_TAGVAR(archive_cmds, $1)=''
  5861         _LT_TAGVAR(hardcode_direct, $1)=yes
  5862         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5863         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5864         _LT_TAGVAR(link_all_deplibs, $1)=yes
  5865         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5866 
  5867         if test "$GXX" = yes; then
  5868           case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5869           # We only want to do this on AIX 4.2 and lower, the check
  5870           # below for broken collect2 doesn't work under 4.3+
  5871 	  collect2name=`${CC} -print-prog-name=collect2`
  5872 	  if test -f "$collect2name" &&
  5873 	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5874 	  then
  5875 	    # We have reworked collect2
  5876 	    :
  5877 	  else
  5878 	    # We have old collect2
  5879 	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5880 	    # It fails to find uninstalled libraries when the uninstalled
  5881 	    # path is not listed in the libpath.  Setting hardcode_minus_L
  5882 	    # to unsupported forces relinking
  5883 	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5884 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5885 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5886 	  fi
  5887           esac
  5888           shared_flag='-shared'
  5889 	  if test "$aix_use_runtimelinking" = yes; then
  5890 	    shared_flag="$shared_flag "'${wl}-G'
  5891 	  fi
  5892         else
  5893           # not using gcc
  5894           if test "$host_cpu" = ia64; then
  5895 	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5896 	  # chokes on -Wl,-G. The following line is correct:
  5897 	  shared_flag='-G'
  5898           else
  5899 	    if test "$aix_use_runtimelinking" = yes; then
  5900 	      shared_flag='${wl}-G'
  5901 	    else
  5902 	      shared_flag='${wl}-bM:SRE'
  5903 	    fi
  5904           fi
  5905         fi
  5906 
  5907         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5908         # It seems that -bexpall does not export symbols beginning with
  5909         # underscore (_), so it is better to generate a list of symbols to
  5910 	# export.
  5911         _LT_TAGVAR(always_export_symbols, $1)=yes
  5912         if test "$aix_use_runtimelinking" = yes; then
  5913           # Warning - without using the other runtime loading flags (-brtl),
  5914           # -berok will link without error, but may produce a broken library.
  5915           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5916           # Determine the default libpath from the value encoded in an empty
  5917           # executable.
  5918           _LT_SYS_MODULE_PATH_AIX
  5919           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5920 
  5921           _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5922         else
  5923           if test "$host_cpu" = ia64; then
  5924 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5925 	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5926 	    _LT_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"
  5927           else
  5928 	    # Determine the default libpath from the value encoded in an
  5929 	    # empty executable.
  5930 	    _LT_SYS_MODULE_PATH_AIX
  5931 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5932 	    # Warning - without using the other run time loading flags,
  5933 	    # -berok will link without error, but may produce a broken library.
  5934 	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5935 	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5936 	    # Exported symbols can be pulled into shared objects from archives
  5937 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5938 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5939 	    # This is similar to how AIX traditionally builds its shared
  5940 	    # libraries.
  5941 	    _LT_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'
  5942           fi
  5943         fi
  5944         ;;
  5945 
  5946       beos*)
  5947 	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5948 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5949 	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5950 	  # support --undefined.  This deserves some investigation.  FIXME
  5951 	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5952 	else
  5953 	  _LT_TAGVAR(ld_shlibs, $1)=no
  5954 	fi
  5955 	;;
  5956 
  5957       chorus*)
  5958         case $cc_basename in
  5959           *)
  5960 	  # FIXME: insert proper C++ library support
  5961 	  _LT_TAGVAR(ld_shlibs, $1)=no
  5962 	  ;;
  5963         esac
  5964         ;;
  5965 
  5966       cygwin* | mingw* | pw32* | cegcc*)
  5967         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5968         # as there is no search path for DLLs.
  5969         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5970         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5971         _LT_TAGVAR(always_export_symbols, $1)=no
  5972         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5973 
  5974         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5975           _LT_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'
  5976           # If the export-symbols file already is a .def file (1st line
  5977           # is EXPORTS), use it as is; otherwise, prepend...
  5978           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5979 	    cp $export_symbols $output_objdir/$soname.def;
  5980           else
  5981 	    echo EXPORTS > $output_objdir/$soname.def;
  5982 	    cat $export_symbols >> $output_objdir/$soname.def;
  5983           fi~
  5984           $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'
  5985         else
  5986           _LT_TAGVAR(ld_shlibs, $1)=no
  5987         fi
  5988         ;;
  5989       darwin* | rhapsody*)
  5990         _LT_DARWIN_LINKER_FEATURES($1)
  5991 	;;
  5992 
  5993       dgux*)
  5994         case $cc_basename in
  5995           ec++*)
  5996 	    # FIXME: insert proper C++ library support
  5997 	    _LT_TAGVAR(ld_shlibs, $1)=no
  5998 	    ;;
  5999           ghcx*)
  6000 	    # Green Hills C++ Compiler
  6001 	    # FIXME: insert proper C++ library support
  6002 	    _LT_TAGVAR(ld_shlibs, $1)=no
  6003 	    ;;
  6004           *)
  6005 	    # FIXME: insert proper C++ library support
  6006 	    _LT_TAGVAR(ld_shlibs, $1)=no
  6007 	    ;;
  6008         esac
  6009         ;;
  6010 
  6011       freebsd[[12]]*)
  6012         # C++ shared libraries reported to be fairly broken before
  6013 	# switch to ELF
  6014         _LT_TAGVAR(ld_shlibs, $1)=no
  6015         ;;
  6016 
  6017       freebsd-elf*)
  6018         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6019         ;;
  6020 
  6021       freebsd* | dragonfly*)
  6022         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6023         # conventions
  6024         _LT_TAGVAR(ld_shlibs, $1)=yes
  6025         ;;
  6026 
  6027       gnu*)
  6028         ;;
  6029 
  6030       hpux9*)
  6031         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6032         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6033         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6034         _LT_TAGVAR(hardcode_direct, $1)=yes
  6035         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6036 				             # but as the default
  6037 				             # location of the library.
  6038 
  6039         case $cc_basename in
  6040           CC*)
  6041             # FIXME: insert proper C++ library support
  6042             _LT_TAGVAR(ld_shlibs, $1)=no
  6043             ;;
  6044           aCC*)
  6045             _LT_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'
  6046             # Commands to make compiler produce verbose output that lists
  6047             # what "hidden" libraries, object files and flags are used when
  6048             # linking a shared library.
  6049             #
  6050             # There doesn't appear to be a way to prevent this compiler from
  6051             # explicitly linking system object files so we need to strip them
  6052             # from the output so that they don't get included in the library
  6053             # dependencies.
  6054             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
  6055             ;;
  6056           *)
  6057             if test "$GXX" = yes; then
  6058               _LT_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'
  6059             else
  6060               # FIXME: insert proper C++ library support
  6061               _LT_TAGVAR(ld_shlibs, $1)=no
  6062             fi
  6063             ;;
  6064         esac
  6065         ;;
  6066 
  6067       hpux10*|hpux11*)
  6068         if test $with_gnu_ld = no; then
  6069 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6070 	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6071 
  6072           case $host_cpu in
  6073             hppa*64*|ia64*)
  6074               ;;
  6075             *)
  6076 	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6077               ;;
  6078           esac
  6079         fi
  6080         case $host_cpu in
  6081           hppa*64*|ia64*)
  6082             _LT_TAGVAR(hardcode_direct, $1)=no
  6083             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6084             ;;
  6085           *)
  6086             _LT_TAGVAR(hardcode_direct, $1)=yes
  6087             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6088             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6089 					         # but as the default
  6090 					         # location of the library.
  6091             ;;
  6092         esac
  6093 
  6094         case $cc_basename in
  6095           CC*)
  6096 	    # FIXME: insert proper C++ library support
  6097 	    _LT_TAGVAR(ld_shlibs, $1)=no
  6098 	    ;;
  6099           aCC*)
  6100 	    case $host_cpu in
  6101 	      hppa*64*)
  6102 	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6103 	        ;;
  6104 	      ia64*)
  6105 	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6106 	        ;;
  6107 	      *)
  6108 	        _LT_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'
  6109 	        ;;
  6110 	    esac
  6111 	    # Commands to make compiler produce verbose output that lists
  6112 	    # what "hidden" libraries, object files and flags are used when
  6113 	    # linking a shared library.
  6114 	    #
  6115 	    # There doesn't appear to be a way to prevent this compiler from
  6116 	    # explicitly linking system object files so we need to strip them
  6117 	    # from the output so that they don't get included in the library
  6118 	    # dependencies.
  6119 	    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 "X$list" | $Xsed'
  6120 	    ;;
  6121           *)
  6122 	    if test "$GXX" = yes; then
  6123 	      if test $with_gnu_ld = no; then
  6124 	        case $host_cpu in
  6125 	          hppa*64*)
  6126 	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6127 	            ;;
  6128 	          ia64*)
  6129 	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6130 	            ;;
  6131 	          *)
  6132 	            _LT_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'
  6133 	            ;;
  6134 	        esac
  6135 	      fi
  6136 	    else
  6137 	      # FIXME: insert proper C++ library support
  6138 	      _LT_TAGVAR(ld_shlibs, $1)=no
  6139 	    fi
  6140 	    ;;
  6141         esac
  6142         ;;
  6143 
  6144       interix[[3-9]]*)
  6145 	_LT_TAGVAR(hardcode_direct, $1)=no
  6146 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6147 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6148 	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6149 	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6150 	# Instead, shared libraries are loaded at an image base (0x10000000 by
  6151 	# default) and relocated if they conflict, which is a slow very memory
  6152 	# consuming and fragmenting process.  To avoid this, we pick a random,
  6153 	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6154 	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
  6155 	_LT_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'
  6156 	_LT_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'
  6157 	;;
  6158       irix5* | irix6*)
  6159         case $cc_basename in
  6160           CC*)
  6161 	    # SGI C++
  6162 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  6163 
  6164 	    # Archives containing C++ object files must be created using
  6165 	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
  6166 	    # necessary to make sure instantiated templates are included
  6167 	    # in the archive.
  6168 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6169 	    ;;
  6170           *)
  6171 	    if test "$GXX" = yes; then
  6172 	      if test "$with_gnu_ld" = no; then
  6173 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6174 	      else
  6175 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
  6176 	      fi
  6177 	    fi
  6178 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
  6179 	    ;;
  6180         esac
  6181         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6182         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6183         _LT_TAGVAR(inherit_rpath, $1)=yes
  6184         ;;
  6185 
  6186       linux* | k*bsd*-gnu)
  6187         case $cc_basename in
  6188           KCC*)
  6189 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
  6190 
  6191 	    # KCC will only create a shared library if the output file
  6192 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6193 	    # to its proper name (with version) after linking.
  6194 	    _LT_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'
  6195 	    _LT_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'
  6196 	    # Commands to make compiler produce verbose output that lists
  6197 	    # what "hidden" libraries, object files and flags are used when
  6198 	    # linking a shared library.
  6199 	    #
  6200 	    # There doesn't appear to be a way to prevent this compiler from
  6201 	    # explicitly linking system object files so we need to strip them
  6202 	    # from the output so that they don't get included in the library
  6203 	    # dependencies.
  6204 	    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 "X$list" | $Xsed'
  6205 
  6206 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6207 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6208 
  6209 	    # Archives containing C++ object files must be created using
  6210 	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6211 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6212 	    ;;
  6213 	  icpc* | ecpc* )
  6214 	    # Intel C++
  6215 	    with_gnu_ld=yes
  6216 	    # version 8.0 and above of icpc choke on multiply defined symbols
  6217 	    # if we add $predep_objects and $postdep_objects, however 7.1 and
  6218 	    # earlier do not add the objects themselves.
  6219 	    case `$CC -V 2>&1` in
  6220 	      *"Version 7."*)
  6221 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6222 		_LT_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'
  6223 		;;
  6224 	      *)  # Version 8.0 or newer
  6225 	        tmp_idyn=
  6226 	        case $host_cpu in
  6227 		  ia64*) tmp_idyn=' -i_dynamic';;
  6228 		esac
  6229 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6230 		_LT_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'
  6231 		;;
  6232 	    esac
  6233 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6234 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6235 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6236 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  6237 	    ;;
  6238           pgCC* | pgcpp*)
  6239             # Portland Group C++ compiler
  6240 	    case `$CC -V` in
  6241 	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
  6242 	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6243 		rm -rf $tpldir~
  6244 		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6245 		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
  6246 	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6247 		rm -rf $tpldir~
  6248 		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6249 		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
  6250 		$RANLIB $oldlib'
  6251 	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6252 		rm -rf $tpldir~
  6253 		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6254 		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  6255 	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6256 		rm -rf $tpldir~
  6257 		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6258 		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
  6259 	      ;;
  6260 	    *) # Version 6 will use weak symbols
  6261 	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  6262 	      _LT_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'
  6263 	      ;;
  6264 	    esac
  6265 
  6266 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  6267 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6268 	    _LT_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'
  6269             ;;
  6270 	  cxx*)
  6271 	    # Compaq C++
  6272 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6273 	    _LT_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'
  6274 
  6275 	    runpath_var=LD_RUN_PATH
  6276 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6277 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6278 
  6279 	    # Commands to make compiler produce verbose output that lists
  6280 	    # what "hidden" libraries, object files and flags are used when
  6281 	    # linking a shared library.
  6282 	    #
  6283 	    # There doesn't appear to be a way to prevent this compiler from
  6284 	    # explicitly linking system object files so we need to strip them
  6285 	    # from the output so that they don't get included in the library
  6286 	    # dependencies.
  6287 	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
  6288 	    ;;
  6289 	  xl*)
  6290 	    # IBM XL 8.0 on PPC, with GNU ld
  6291 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6292 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6293 	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6294 	    if test "x$supports_anon_versioning" = xyes; then
  6295 	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6296 		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6297 		echo "local: *; };" >> $output_objdir/$libname.ver~
  6298 		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  6299 	    fi
  6300 	    ;;
  6301 	  *)
  6302 	    case `$CC -V 2>&1 | sed 5q` in
  6303 	    *Sun\ C*)
  6304 	      # Sun C++ 5.9
  6305 	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6306 	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6307 	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
  6308 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6309 	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
  6310 	      _LT_TAGVAR(compiler_needs_object, $1)=yes
  6311 
  6312 	      # Not sure whether something based on
  6313 	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6314 	      # would be better.
  6315 	      output_verbose_link_cmd='echo'
  6316 
  6317 	      # Archives containing C++ object files must be created using
  6318 	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
  6319 	      # necessary to make sure instantiated templates are included
  6320 	      # in the archive.
  6321 	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6322 	      ;;
  6323 	    esac
  6324 	    ;;
  6325 	esac
  6326 	;;
  6327 
  6328       lynxos*)
  6329         # FIXME: insert proper C++ library support
  6330 	_LT_TAGVAR(ld_shlibs, $1)=no
  6331 	;;
  6332 
  6333       m88k*)
  6334         # FIXME: insert proper C++ library support
  6335         _LT_TAGVAR(ld_shlibs, $1)=no
  6336 	;;
  6337 
  6338       mvs*)
  6339         case $cc_basename in
  6340           cxx*)
  6341 	    # FIXME: insert proper C++ library support
  6342 	    _LT_TAGVAR(ld_shlibs, $1)=no
  6343 	    ;;
  6344 	  *)
  6345 	    # FIXME: insert proper C++ library support
  6346 	    _LT_TAGVAR(ld_shlibs, $1)=no
  6347 	    ;;
  6348 	esac
  6349 	;;
  6350 
  6351       netbsd*)
  6352         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6353 	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6354 	  wlarc=
  6355 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6356 	  _LT_TAGVAR(hardcode_direct, $1)=yes
  6357 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6358 	fi
  6359 	# Workaround some broken pre-1.5 toolchains
  6360 	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6361 	;;
  6362 
  6363       *nto* | *qnx*)
  6364         _LT_TAGVAR(ld_shlibs, $1)=yes
  6365 	;;
  6366 
  6367       openbsd2*)
  6368         # C++ shared libraries are fairly broken
  6369 	_LT_TAGVAR(ld_shlibs, $1)=no
  6370 	;;
  6371 
  6372       openbsd*)
  6373 	if test -f /usr/libexec/ld.so; then
  6374 	  _LT_TAGVAR(hardcode_direct, $1)=yes
  6375 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6376 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6377 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6378 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6379 	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6380 	    _LT_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'
  6381 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6382 	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6383 	  fi
  6384 	  output_verbose_link_cmd=echo
  6385 	else
  6386 	  _LT_TAGVAR(ld_shlibs, $1)=no
  6387 	fi
  6388 	;;
  6389 
  6390       osf3* | osf4* | osf5*)
  6391         case $cc_basename in
  6392           KCC*)
  6393 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
  6394 
  6395 	    # KCC will only create a shared library if the output file
  6396 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6397 	    # to its proper name (with version) after linking.
  6398 	    _LT_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'
  6399 
  6400 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6401 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6402 
  6403 	    # Archives containing C++ object files must be created using
  6404 	    # the KAI C++ compiler.
  6405 	    case $host in
  6406 	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6407 	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6408 	    esac
  6409 	    ;;
  6410           RCC*)
  6411 	    # Rational C++ 2.4.1
  6412 	    # FIXME: insert proper C++ library support
  6413 	    _LT_TAGVAR(ld_shlibs, $1)=no
  6414 	    ;;
  6415           cxx*)
  6416 	    case $host in
  6417 	      osf3*)
  6418 	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6419 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  6420 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6421 		;;
  6422 	      *)
  6423 	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6424 	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
  6425 	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6426 	          echo "-hidden">> $lib.exp~
  6427 	          $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
  6428 	          $RM $lib.exp'