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