aclocal.m4
author Sam Lantinga <slouken@libsdl.org>
Thu, 25 Apr 2013 00:26:17 -0700
changeset 7110 2a98852fd58d
parent 6593 f20b511e05a6
permissions -rw-r--r--
Fixed bug 1582 - Allow disabling SDL_VIDEO_DRIVER_WINDOWS

Marcus von Appen

Trying to build SDL 2.x (HG) on Win32 platforms with either VS.NET or MinGW requires one to have the video subsystem and SDL_VIDEO_DRIVER_WINDOWS flag enabled due to the helper window creation routines.

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