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