acinclude.m4
author Sam Lantinga <slouken@libsdl.org>
Sat, 21 Aug 2004 04:20:00 +0000
changeset 939 c7c04f811994
parent 886 05c551e5bc64
child 947 3bb035750537
permissions -rw-r--r--
Date: Tue, 01 Jun 2004 15:27:44 +0300
From: Martin_Storsj
Subject: Update for dynamic loading of ALSA

I sent you a patch a few months ago which enables SDL to load ALSA
dynamically. Now I've finally got time to tweak this yet some more. I've
added code from alsa.m4 (from alsa's dev package) to acinclude.m4, and
made the detection of the alsa library name a bit better. I've also
fixed up the loading versioned symbols with dlvsym, so that it falls
back to dlsym.

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