aclocal.m4
author David Ludwig <dludwig@pobox.com>
Wed, 17 Oct 2012 21:43:20 -0400
changeset 8316 88f011703f39
parent 6492 0732954fa8ef
child 6593 f20b511e05a6
permissions -rw-r--r--
Got a bare-bones version of SDL compiling for Windows RT. Dummy drivers are used in some places. Very little Windows-specific code (from the Win32 version of SDL) is used.
     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 m4_if([$1], [],[
  3066       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  3067       ;;
  3068     mingw* | cegcc*)
  3069       # MinGW DLLs use traditional 'lib' prefix
  3070       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  3071       ;;
  3072     pw32*)
  3073       # pw32 DLLs use 'pw' prefix rather than 'lib'
  3074       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  3075       ;;
  3076     esac
  3077     dynamic_linker='Win32 ld.exe'
  3078     ;;
  3079 
  3080   *,cl*)
  3081     # Native MSVC
  3082     libname_spec='$name'
  3083     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  3084     library_names_spec='${libname}.dll.lib'
  3085 
  3086     case $build_os in
  3087     mingw*)
  3088       sys_lib_search_path_spec=
  3089       lt_save_ifs=$IFS
  3090       IFS=';'
  3091       for lt_path in $LIB
  3092       do
  3093         IFS=$lt_save_ifs
  3094         # Let DOS variable expansion print the short 8.3 style file name.
  3095         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  3096         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  3097       done
  3098       IFS=$lt_save_ifs
  3099       # Convert to MSYS style.
  3100       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  3101       ;;
  3102     cygwin*)
  3103       # Convert to unix form, then to dos form, then back to unix form
  3104       # but this time dos style (no spaces!) so that the unix form looks
  3105       # like /cygdrive/c/PROGRA~1:/cygdr...
  3106       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  3107       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  3108       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  3109       ;;
  3110     *)
  3111       sys_lib_search_path_spec="$LIB"
  3112       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  3113         # It is most probably a Windows format PATH.
  3114         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  3115       else
  3116         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  3117       fi
  3118       # FIXME: find the short name or the path components, as spaces are
  3119       # common. (e.g. "Program Files" -> "PROGRA~1")
  3120       ;;
  3121     esac
  3122 
  3123     # DLL is installed to $(libdir)/../bin by postinstall_cmds
  3124     postinstall_cmds='base_file=`basename \${file}`~
  3125       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  3126       dldir=$destdir/`dirname \$dlpath`~
  3127       test -d \$dldir || mkdir -p \$dldir~
  3128       $install_prog $dir/$dlname \$dldir/$dlname'
  3129     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  3130       dlpath=$dir/\$dldll~
  3131        $RM \$dlpath'
  3132     shlibpath_overrides_runpath=yes
  3133     dynamic_linker='Win32 link.exe'
  3134     ;;
  3135 
  3136   *)
  3137     # Assume MSVC wrapper
  3138     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  3139     dynamic_linker='Win32 ld.exe'
  3140     ;;
  3141   esac
  3142   # FIXME: first we should search . and the directory the executable is in
  3143   shlibpath_var=PATH
  3144   ;;
  3145 
  3146 darwin* | rhapsody*)
  3147   dynamic_linker="$host_os dyld"
  3148   version_type=darwin
  3149   need_lib_prefix=no
  3150   need_version=no
  3151   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  3152   soname_spec='${libname}${release}${major}$shared_ext'
  3153   shlibpath_overrides_runpath=yes
  3154   shlibpath_var=DYLD_LIBRARY_PATH
  3155   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  3156 m4_if([$1], [],[
  3157   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  3158   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  3159   ;;
  3160 
  3161 dgux*)
  3162   version_type=linux # correct to gnu/linux during the next big refactor
  3163   need_lib_prefix=no
  3164   need_version=no
  3165   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  3166   soname_spec='${libname}${release}${shared_ext}$major'
  3167   shlibpath_var=LD_LIBRARY_PATH
  3168   ;;
  3169 
  3170 freebsd* | dragonfly*)
  3171   # DragonFly does not have aout.  When/if they implement a new
  3172   # versioning mechanism, adjust this.
  3173   if test -x /usr/bin/objformat; then
  3174     objformat=`/usr/bin/objformat`
  3175   else
  3176     case $host_os in
  3177     freebsd[[23]].*) objformat=aout ;;
  3178     *) objformat=elf ;;
  3179     esac
  3180   fi
  3181   version_type=freebsd-$objformat
  3182   case $version_type in
  3183     freebsd-elf*)
  3184       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  3185       need_version=no
  3186       need_lib_prefix=no
  3187       ;;
  3188     freebsd-*)
  3189       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  3190       need_version=yes
  3191       ;;
  3192   esac
  3193   shlibpath_var=LD_LIBRARY_PATH
  3194   case $host_os in
  3195   freebsd2.*)
  3196     shlibpath_overrides_runpath=yes
  3197     ;;
  3198   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  3199     shlibpath_overrides_runpath=yes
  3200     hardcode_into_libs=yes
  3201     ;;
  3202   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  3203   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  3204     shlibpath_overrides_runpath=no
  3205     hardcode_into_libs=yes
  3206     ;;
  3207   *) # from 4.6 on, and DragonFly
  3208     shlibpath_overrides_runpath=yes
  3209     hardcode_into_libs=yes
  3210     ;;
  3211   esac
  3212   ;;
  3213 
  3214 gnu*)
  3215   version_type=linux # correct to gnu/linux during the next big refactor
  3216   need_lib_prefix=no
  3217   need_version=no
  3218   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  3219   soname_spec='${libname}${release}${shared_ext}$major'
  3220   shlibpath_var=LD_LIBRARY_PATH
  3221   shlibpath_overrides_runpath=no
  3222   hardcode_into_libs=yes
  3223   ;;
  3224 
  3225 haiku*)
  3226   version_type=linux # correct to gnu/linux during the next big refactor
  3227   need_lib_prefix=no
  3228   need_version=no
  3229   dynamic_linker="$host_os runtime_loader"
  3230   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  3231   soname_spec='${libname}${release}${shared_ext}$major'
  3232   shlibpath_var=LIBRARY_PATH
  3233   shlibpath_overrides_runpath=yes
  3234   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  3235   hardcode_into_libs=yes
  3236   ;;
  3237 
  3238 hpux9* | hpux10* | hpux11*)
  3239   # Give a soname corresponding to the major version so that dld.sl refuses to
  3240   # link against other versions.
  3241   version_type=sunos
  3242   need_lib_prefix=no
  3243   need_version=no
  3244   case $host_cpu in
  3245   ia64*)
  3246     shrext_cmds='.so'
  3247     hardcode_into_libs=yes
  3248     dynamic_linker="$host_os dld.so"
  3249     shlibpath_var=LD_LIBRARY_PATH
  3250     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  3251     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3252     soname_spec='${libname}${release}${shared_ext}$major'
  3253     if test "X$HPUX_IA64_MODE" = X32; then
  3254       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  3255     else
  3256       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  3257     fi
  3258     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  3259     ;;
  3260   hppa*64*)
  3261     shrext_cmds='.sl'
  3262     hardcode_into_libs=yes
  3263     dynamic_linker="$host_os dld.sl"
  3264     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  3265     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  3266     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3267     soname_spec='${libname}${release}${shared_ext}$major'
  3268     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  3269     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  3270     ;;
  3271   *)
  3272     shrext_cmds='.sl'
  3273     dynamic_linker="$host_os dld.sl"
  3274     shlibpath_var=SHLIB_PATH
  3275     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  3276     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3277     soname_spec='${libname}${release}${shared_ext}$major'
  3278     ;;
  3279   esac
  3280   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  3281   postinstall_cmds='chmod 555 $lib'
  3282   # or fails outright, so override atomically:
  3283   install_override_mode=555
  3284   ;;
  3285 
  3286 interix[[3-9]]*)
  3287   version_type=linux # correct to gnu/linux during the next big refactor
  3288   need_lib_prefix=no
  3289   need_version=no
  3290   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  3291   soname_spec='${libname}${release}${shared_ext}$major'
  3292   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  3293   shlibpath_var=LD_LIBRARY_PATH
  3294   shlibpath_overrides_runpath=no
  3295   hardcode_into_libs=yes
  3296   ;;
  3297 
  3298 irix5* | irix6* | nonstopux*)
  3299   case $host_os in
  3300     nonstopux*) version_type=nonstopux ;;
  3301     *)
  3302 	if test "$lt_cv_prog_gnu_ld" = yes; then
  3303 		version_type=linux # correct to gnu/linux during the next big refactor
  3304 	else
  3305 		version_type=irix
  3306 	fi ;;
  3307   esac
  3308   need_lib_prefix=no
  3309   need_version=no
  3310   soname_spec='${libname}${release}${shared_ext}$major'
  3311   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  3312   case $host_os in
  3313   irix5* | nonstopux*)
  3314     libsuff= shlibsuff=
  3315     ;;
  3316   *)
  3317     case $LD in # libtool.m4 will add one of these switches to LD
  3318     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  3319       libsuff= shlibsuff= libmagic=32-bit;;
  3320     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  3321       libsuff=32 shlibsuff=N32 libmagic=N32;;
  3322     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  3323       libsuff=64 shlibsuff=64 libmagic=64-bit;;
  3324     *) libsuff= shlibsuff= libmagic=never-match;;
  3325     esac
  3326     ;;
  3327   esac
  3328   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  3329   shlibpath_overrides_runpath=no
  3330   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  3331   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  3332   hardcode_into_libs=yes
  3333   ;;
  3334 
  3335 # No shared lib support for Linux oldld, aout, or coff.
  3336 linux*oldld* | linux*aout* | linux*coff*)
  3337   dynamic_linker=no
  3338   ;;
  3339 
  3340 # This must be glibc/ELF.
  3341 linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3342   version_type=linux # correct to gnu/linux during the next big refactor
  3343   need_lib_prefix=no
  3344   need_version=no
  3345   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3346   soname_spec='${libname}${release}${shared_ext}$major'
  3347   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  3348   shlibpath_var=LD_LIBRARY_PATH
  3349   shlibpath_overrides_runpath=no
  3350 
  3351   # Some binutils ld are patched to set DT_RUNPATH
  3352   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  3353     [lt_cv_shlibpath_overrides_runpath=no
  3354     save_LDFLAGS=$LDFLAGS
  3355     save_libdir=$libdir
  3356     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  3357 	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  3358     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  3359       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  3360 	 [lt_cv_shlibpath_overrides_runpath=yes])])
  3361     LDFLAGS=$save_LDFLAGS
  3362     libdir=$save_libdir
  3363     ])
  3364   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  3365 
  3366   # This implies no fast_install, which is unacceptable.
  3367   # Some rework will be needed to allow for fast_install
  3368   # before this can be enabled.
  3369   hardcode_into_libs=yes
  3370 
  3371   # Append ld.so.conf contents to the search path
  3372   if test -f /etc/ld.so.conf; then
  3373     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' ' '`
  3374     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  3375   fi
  3376 
  3377   # We used to test for /lib/ld.so.1 and disable shared libraries on
  3378   # powerpc, because MkLinux only supported shared libraries with the
  3379   # GNU dynamic linker.  Since this was broken with cross compilers,
  3380   # most powerpc-linux boxes support dynamic linking these days and
  3381   # people can always --disable-shared, the test was removed, and we
  3382   # assume the GNU/Linux dynamic linker is in use.
  3383   dynamic_linker='GNU/Linux ld.so'
  3384   ;;
  3385 
  3386 netbsd*)
  3387   version_type=sunos
  3388   need_lib_prefix=no
  3389   need_version=no
  3390   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  3391     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3392     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3393     dynamic_linker='NetBSD (a.out) ld.so'
  3394   else
  3395     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  3396     soname_spec='${libname}${release}${shared_ext}$major'
  3397     dynamic_linker='NetBSD ld.elf_so'
  3398   fi
  3399   shlibpath_var=LD_LIBRARY_PATH
  3400   shlibpath_overrides_runpath=yes
  3401   hardcode_into_libs=yes
  3402   ;;
  3403 
  3404 newsos6)
  3405   version_type=linux # correct to gnu/linux during the next big refactor
  3406   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3407   shlibpath_var=LD_LIBRARY_PATH
  3408   shlibpath_overrides_runpath=yes
  3409   ;;
  3410 
  3411 *nto* | *qnx*)
  3412   version_type=qnx
  3413   need_lib_prefix=no
  3414   need_version=no
  3415   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3416   soname_spec='${libname}${release}${shared_ext}$major'
  3417   shlibpath_var=LD_LIBRARY_PATH
  3418   shlibpath_overrides_runpath=no
  3419   hardcode_into_libs=yes
  3420   dynamic_linker='ldqnx.so'
  3421   ;;
  3422 
  3423 openbsd*)
  3424   version_type=sunos
  3425   sys_lib_dlsearch_path_spec="/usr/lib"
  3426   need_lib_prefix=no
  3427   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  3428   case $host_os in
  3429     openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
  3430     *)				need_version=no  ;;
  3431   esac
  3432   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3433   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3434   shlibpath_var=LD_LIBRARY_PATH
  3435   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3436     case $host_os in
  3437       openbsd2.[[89]] | openbsd2.[[89]].*)
  3438 	shlibpath_overrides_runpath=no
  3439 	;;
  3440       *)
  3441 	shlibpath_overrides_runpath=yes
  3442 	;;
  3443       esac
  3444   else
  3445     shlibpath_overrides_runpath=yes
  3446   fi
  3447   ;;
  3448 
  3449 os2*)
  3450   libname_spec='$name'
  3451   shrext_cmds=".dll"
  3452   need_lib_prefix=no
  3453   library_names_spec='$libname${shared_ext} $libname.a'
  3454   dynamic_linker='OS/2 ld.exe'
  3455   shlibpath_var=LIBPATH
  3456   ;;
  3457 
  3458 osf3* | osf4* | osf5*)
  3459   version_type=osf
  3460   need_lib_prefix=no
  3461   need_version=no
  3462   soname_spec='${libname}${release}${shared_ext}$major'
  3463   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3464   shlibpath_var=LD_LIBRARY_PATH
  3465   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  3466   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  3467   ;;
  3468 
  3469 rdos*)
  3470   dynamic_linker=no
  3471   ;;
  3472 
  3473 solaris*)
  3474   version_type=linux # correct to gnu/linux during the next big refactor
  3475   need_lib_prefix=no
  3476   need_version=no
  3477   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3478   soname_spec='${libname}${release}${shared_ext}$major'
  3479   shlibpath_var=LD_LIBRARY_PATH
  3480   shlibpath_overrides_runpath=yes
  3481   hardcode_into_libs=yes
  3482   # ldd complains unless libraries are executable
  3483   postinstall_cmds='chmod +x $lib'
  3484   ;;
  3485 
  3486 sunos4*)
  3487   version_type=sunos
  3488   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3489   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  3490   shlibpath_var=LD_LIBRARY_PATH
  3491   shlibpath_overrides_runpath=yes
  3492   if test "$with_gnu_ld" = yes; then
  3493     need_lib_prefix=no
  3494   fi
  3495   need_version=yes
  3496   ;;
  3497 
  3498 sysv4 | sysv4.3*)
  3499   version_type=linux # correct to gnu/linux during the next big refactor
  3500   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3501   soname_spec='${libname}${release}${shared_ext}$major'
  3502   shlibpath_var=LD_LIBRARY_PATH
  3503   case $host_vendor in
  3504     sni)
  3505       shlibpath_overrides_runpath=no
  3506       need_lib_prefix=no
  3507       runpath_var=LD_RUN_PATH
  3508       ;;
  3509     siemens)
  3510       need_lib_prefix=no
  3511       ;;
  3512     motorola)
  3513       need_lib_prefix=no
  3514       need_version=no
  3515       shlibpath_overrides_runpath=no
  3516       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  3517       ;;
  3518   esac
  3519   ;;
  3520 
  3521 sysv4*MP*)
  3522   if test -d /usr/nec ;then
  3523     version_type=linux # correct to gnu/linux during the next big refactor
  3524     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  3525     soname_spec='$libname${shared_ext}.$major'
  3526     shlibpath_var=LD_LIBRARY_PATH
  3527   fi
  3528   ;;
  3529 
  3530 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3531   version_type=freebsd-elf
  3532   need_lib_prefix=no
  3533   need_version=no
  3534   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  3535   soname_spec='${libname}${release}${shared_ext}$major'
  3536   shlibpath_var=LD_LIBRARY_PATH
  3537   shlibpath_overrides_runpath=yes
  3538   hardcode_into_libs=yes
  3539   if test "$with_gnu_ld" = yes; then
  3540     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  3541   else
  3542     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  3543     case $host_os in
  3544       sco3.2v5*)
  3545         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  3546 	;;
  3547     esac
  3548   fi
  3549   sys_lib_dlsearch_path_spec='/usr/lib'
  3550   ;;
  3551 
  3552 tpf*)
  3553   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
  3554   version_type=linux # correct to gnu/linux during the next big refactor
  3555   need_lib_prefix=no
  3556   need_version=no
  3557   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3558   shlibpath_var=LD_LIBRARY_PATH
  3559   shlibpath_overrides_runpath=no
  3560   hardcode_into_libs=yes
  3561   ;;
  3562 
  3563 uts4*)
  3564   version_type=linux # correct to gnu/linux during the next big refactor
  3565   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3566   soname_spec='${libname}${release}${shared_ext}$major'
  3567   shlibpath_var=LD_LIBRARY_PATH
  3568   ;;
  3569 
  3570 *)
  3571   dynamic_linker=no
  3572   ;;
  3573 esac
  3574 AC_MSG_RESULT([$dynamic_linker])
  3575 test "$dynamic_linker" = no && can_build_shared=no
  3576 
  3577 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  3578 if test "$GCC" = yes; then
  3579   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  3580 fi
  3581 
  3582 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  3583   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  3584 fi
  3585 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  3586   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  3587 fi
  3588 
  3589 _LT_DECL([], [variables_saved_for_relink], [1],
  3590     [Variables whose values should be saved in libtool wrapper scripts and
  3591     restored at link time])
  3592 _LT_DECL([], [need_lib_prefix], [0],
  3593     [Do we need the "lib" prefix for modules?])
  3594 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  3595 _LT_DECL([], [version_type], [0], [Library versioning type])
  3596 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
  3597 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  3598 _LT_DECL([], [shlibpath_overrides_runpath], [0],
  3599     [Is shlibpath searched before the hard-coded library search path?])
  3600 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  3601 _LT_DECL([], [library_names_spec], [1],
  3602     [[List of archive names.  First name is the real one, the rest are links.
  3603     The last name is the one that the linker finds with -lNAME]])
  3604 _LT_DECL([], [soname_spec], [1],
  3605     [[The coded name of the library, if different from the real name]])
  3606 _LT_DECL([], [install_override_mode], [1],
  3607     [Permission mode override for installation of shared libraries])
  3608 _LT_DECL([], [postinstall_cmds], [2],
  3609     [Command to use after installation of a shared archive])
  3610 _LT_DECL([], [postuninstall_cmds], [2],
  3611     [Command to use after uninstallation of a shared archive])
  3612 _LT_DECL([], [finish_cmds], [2],
  3613     [Commands used to finish a libtool library installation in a directory])
  3614 _LT_DECL([], [finish_eval], [1],
  3615     [[As "finish_cmds", except a single script fragment to be evaled but
  3616     not shown]])
  3617 _LT_DECL([], [hardcode_into_libs], [0],
  3618     [Whether we should hardcode library paths into libraries])
  3619 _LT_DECL([], [sys_lib_search_path_spec], [2],
  3620     [Compile-time system search path for libraries])
  3621 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  3622     [Run-time system search path for libraries])
  3623 ])# _LT_SYS_DYNAMIC_LINKER
  3624 
  3625 
  3626 # _LT_PATH_TOOL_PREFIX(TOOL)
  3627 # --------------------------
  3628 # find a file program which can recognize shared library
  3629 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  3630 [m4_require([_LT_DECL_EGREP])dnl
  3631 AC_MSG_CHECKING([for $1])
  3632 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  3633 [case $MAGIC_CMD in
  3634 [[\\/*] |  ?:[\\/]*])
  3635   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  3636   ;;
  3637 *)
  3638   lt_save_MAGIC_CMD="$MAGIC_CMD"
  3639   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3640 dnl $ac_dummy forces splitting on constant user-supplied paths.
  3641 dnl POSIX.2 word splitting is done only on the output of word expansions,
  3642 dnl not every word.  This closes a longstanding sh security hole.
  3643   ac_dummy="m4_if([$2], , $PATH, [$2])"
  3644   for ac_dir in $ac_dummy; do
  3645     IFS="$lt_save_ifs"
  3646     test -z "$ac_dir" && ac_dir=.
  3647     if test -f $ac_dir/$1; then
  3648       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  3649       if test -n "$file_magic_test_file"; then
  3650 	case $deplibs_check_method in
  3651 	"file_magic "*)
  3652 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  3653 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3654 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  3655 	    $EGREP "$file_magic_regex" > /dev/null; then
  3656 	    :
  3657 	  else
  3658 	    cat <<_LT_EOF 1>&2
  3659 
  3660 *** Warning: the command libtool uses to detect shared libraries,
  3661 *** $file_magic_cmd, produces output that libtool cannot recognize.
  3662 *** The result is that libtool may fail to recognize shared libraries
  3663 *** as such.  This will affect the creation of libtool libraries that
  3664 *** depend on shared libraries, but programs linked with such libtool
  3665 *** libraries will work regardless of this problem.  Nevertheless, you
  3666 *** may want to report the problem to your system manager and/or to
  3667 *** bug-libtool@gnu.org
  3668 
  3669 _LT_EOF
  3670 	  fi ;;
  3671 	esac
  3672       fi
  3673       break
  3674     fi
  3675   done
  3676   IFS="$lt_save_ifs"
  3677   MAGIC_CMD="$lt_save_MAGIC_CMD"
  3678   ;;
  3679 esac])
  3680 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3681 if test -n "$MAGIC_CMD"; then
  3682   AC_MSG_RESULT($MAGIC_CMD)
  3683 else
  3684   AC_MSG_RESULT(no)
  3685 fi
  3686 _LT_DECL([], [MAGIC_CMD], [0],
  3687 	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  3688 ])# _LT_PATH_TOOL_PREFIX
  3689 
  3690 # Old name:
  3691 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  3692 dnl aclocal-1.4 backwards compatibility:
  3693 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  3694 
  3695 
  3696 # _LT_PATH_MAGIC
  3697 # --------------
  3698 # find a file program which can recognize a shared library
  3699 m4_defun([_LT_PATH_MAGIC],
  3700 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  3701 if test -z "$lt_cv_path_MAGIC_CMD"; then
  3702   if test -n "$ac_tool_prefix"; then
  3703     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  3704   else
  3705     MAGIC_CMD=:
  3706   fi
  3707 fi
  3708 ])# _LT_PATH_MAGIC
  3709 
  3710 
  3711 # LT_PATH_LD
  3712 # ----------
  3713 # find the pathname to the GNU or non-GNU linker
  3714 AC_DEFUN([LT_PATH_LD],
  3715 [AC_REQUIRE([AC_PROG_CC])dnl
  3716 AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3717 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3718 m4_require([_LT_DECL_SED])dnl
  3719 m4_require([_LT_DECL_EGREP])dnl
  3720 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  3721 
  3722 AC_ARG_WITH([gnu-ld],
  3723     [AS_HELP_STRING([--with-gnu-ld],
  3724 	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
  3725     [test "$withval" = no || with_gnu_ld=yes],
  3726     [with_gnu_ld=no])dnl
  3727 
  3728 ac_prog=ld
  3729 if test "$GCC" = yes; then
  3730   # Check if gcc -print-prog-name=ld gives a path.
  3731   AC_MSG_CHECKING([for ld used by $CC])
  3732   case $host in
  3733   *-*-mingw*)
  3734     # gcc leaves a trailing carriage return which upsets mingw
  3735     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  3736   *)
  3737     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  3738   esac
  3739   case $ac_prog in
  3740     # Accept absolute paths.
  3741     [[\\/]]* | ?:[[\\/]]*)
  3742       re_direlt='/[[^/]][[^/]]*/\.\./'
  3743       # Canonicalize the pathname of ld
  3744       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  3745       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  3746 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  3747       done
  3748       test -z "$LD" && LD="$ac_prog"
  3749       ;;
  3750   "")
  3751     # If it fails, then pretend we aren't using GCC.
  3752     ac_prog=ld
  3753     ;;
  3754   *)
  3755     # If it is relative, then search for the first ld in PATH.
  3756     with_gnu_ld=unknown
  3757     ;;
  3758   esac
  3759 elif test "$with_gnu_ld" = yes; then
  3760   AC_MSG_CHECKING([for GNU ld])
  3761 else
  3762   AC_MSG_CHECKING([for non-GNU ld])
  3763 fi
  3764 AC_CACHE_VAL(lt_cv_path_LD,
  3765 [if test -z "$LD"; then
  3766   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3767   for ac_dir in $PATH; do
  3768     IFS="$lt_save_ifs"
  3769     test -z "$ac_dir" && ac_dir=.
  3770     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  3771       lt_cv_path_LD="$ac_dir/$ac_prog"
  3772       # Check to see if the program is GNU ld.  I'd rather use --version,
  3773       # but apparently some variants of GNU ld only accept -v.
  3774       # Break only if it was the GNU/non-GNU ld that we prefer.
  3775       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  3776       *GNU* | *'with BFD'*)
  3777 	test "$with_gnu_ld" != no && break
  3778 	;;
  3779       *)
  3780 	test "$with_gnu_ld" != yes && break
  3781 	;;
  3782       esac
  3783     fi
  3784   done
  3785   IFS="$lt_save_ifs"
  3786 else
  3787   lt_cv_path_LD="$LD" # Let the user override the test with a path.
  3788 fi])
  3789 LD="$lt_cv_path_LD"
  3790 if test -n "$LD"; then
  3791   AC_MSG_RESULT($LD)
  3792 else
  3793   AC_MSG_RESULT(no)
  3794 fi
  3795 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3796 _LT_PATH_LD_GNU
  3797 AC_SUBST([LD])
  3798 
  3799 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3800 ])# LT_PATH_LD
  3801 
  3802 # Old names:
  3803 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3804 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3805 dnl aclocal-1.4 backwards compatibility:
  3806 dnl AC_DEFUN([AM_PROG_LD], [])
  3807 dnl AC_DEFUN([AC_PROG_LD], [])
  3808 
  3809 
  3810 # _LT_PATH_LD_GNU
  3811 #- --------------
  3812 m4_defun([_LT_PATH_LD_GNU],
  3813 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3814 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3815 case `$LD -v 2>&1 </dev/null` in
  3816 *GNU* | *'with BFD'*)
  3817   lt_cv_prog_gnu_ld=yes
  3818   ;;
  3819 *)
  3820   lt_cv_prog_gnu_ld=no
  3821   ;;
  3822 esac])
  3823 with_gnu_ld=$lt_cv_prog_gnu_ld
  3824 ])# _LT_PATH_LD_GNU
  3825 
  3826 
  3827 # _LT_CMD_RELOAD
  3828 # --------------
  3829 # find reload flag for linker
  3830 #   -- PORTME Some linkers may need a different reload flag.
  3831 m4_defun([_LT_CMD_RELOAD],
  3832 [AC_CACHE_CHECK([for $LD option to reload object files],
  3833   lt_cv_ld_reload_flag,
  3834   [lt_cv_ld_reload_flag='-r'])
  3835 reload_flag=$lt_cv_ld_reload_flag
  3836 case $reload_flag in
  3837 "" | " "*) ;;
  3838 *) reload_flag=" $reload_flag" ;;
  3839 esac
  3840 reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3841 case $host_os in
  3842   cygwin* | mingw* | pw32* | cegcc*)
  3843     if test "$GCC" != yes; then
  3844       reload_cmds=false
  3845     fi
  3846     ;;
  3847   darwin*)
  3848     if test "$GCC" = yes; then
  3849       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  3850     else
  3851       reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3852     fi
  3853     ;;
  3854 esac
  3855 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3856 _LT_TAGDECL([], [reload_cmds], [2])dnl
  3857 ])# _LT_CMD_RELOAD
  3858 
  3859 
  3860 # _LT_CHECK_MAGIC_METHOD
  3861 # ----------------------
  3862 # how to check for library dependencies
  3863 #  -- PORTME fill in with the dynamic library characteristics
  3864 m4_defun([_LT_CHECK_MAGIC_METHOD],
  3865 [m4_require([_LT_DECL_EGREP])
  3866 m4_require([_LT_DECL_OBJDUMP])
  3867 AC_CACHE_CHECK([how to recognize dependent libraries],
  3868 lt_cv_deplibs_check_method,
  3869 [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3870 lt_cv_file_magic_test_file=
  3871 lt_cv_deplibs_check_method='unknown'
  3872 # Need to set the preceding variable on all platforms that support
  3873 # interlibrary dependencies.
  3874 # 'none' -- dependencies not supported.
  3875 # `unknown' -- same as none, but documents that we really don't know.
  3876 # 'pass_all' -- all dependencies passed with no checks.
  3877 # 'test_compile' -- check by making test program.
  3878 # 'file_magic [[regex]]' -- check by looking for files in library path
  3879 # which responds to the $file_magic_cmd with a given extended regex.
  3880 # If you have `file' or equivalent on your system and you're not sure
  3881 # whether `pass_all' will *always* work, you probably want this one.
  3882 
  3883 case $host_os in
  3884 aix[[4-9]]*)
  3885   lt_cv_deplibs_check_method=pass_all
  3886   ;;
  3887 
  3888 beos*)
  3889   lt_cv_deplibs_check_method=pass_all
  3890   ;;
  3891 
  3892 bsdi[[45]]*)
  3893   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3894   lt_cv_file_magic_cmd='/usr/bin/file -L'
  3895   lt_cv_file_magic_test_file=/shlib/libc.so
  3896   ;;
  3897 
  3898 cygwin*)
  3899   # func_win32_libid is a shell function defined in ltmain.sh
  3900   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3901   lt_cv_file_magic_cmd='func_win32_libid'
  3902   lt_cv_deplibs_check_method=pass_all
  3903   ;;
  3904 
  3905 mingw* | pw32*)
  3906   # Base MSYS/MinGW do not provide the 'file' command needed by
  3907   # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3908   # unless we find 'file', for example because we are cross-compiling.
  3909   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  3910   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  3911     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3912     lt_cv_file_magic_cmd='func_win32_libid'
  3913   else
  3914     # Keep this pattern in sync with the one in func_win32_libid.
  3915     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  3916     lt_cv_file_magic_cmd='$OBJDUMP -f'
  3917   fi
  3918   lt_cv_deplibs_check_method=pass_all
  3919   ;;
  3920 
  3921 cegcc*)
  3922   # use the weaker test based on 'objdump'. See mingw*.
  3923   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3924   lt_cv_file_magic_cmd='$OBJDUMP -f'
  3925   ;;
  3926 
  3927 darwin* | rhapsody*)
  3928   lt_cv_deplibs_check_method=pass_all
  3929   ;;
  3930 
  3931 freebsd* | dragonfly*)
  3932   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3933     case $host_cpu in
  3934     i*86 )
  3935       # Not sure whether the presence of OpenBSD here was a mistake.
  3936       # Let's accept both of them until this is cleared up.
  3937       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3938       lt_cv_file_magic_cmd=/usr/bin/file
  3939       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3940       ;;
  3941     esac
  3942   else
  3943     lt_cv_deplibs_check_method=pass_all
  3944   fi
  3945   ;;
  3946 
  3947 gnu*)
  3948   lt_cv_deplibs_check_method=pass_all
  3949   ;;
  3950 
  3951 haiku*)
  3952   lt_cv_deplibs_check_method=pass_all
  3953   ;;
  3954 
  3955 hpux10.20* | hpux11*)
  3956   lt_cv_file_magic_cmd=/usr/bin/file
  3957   case $host_cpu in
  3958   ia64*)
  3959     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3960     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3961     ;;
  3962   hppa*64*)
  3963     [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]']
  3964     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3965     ;;
  3966   *)
  3967     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3968     lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3969     ;;
  3970   esac
  3971   ;;
  3972 
  3973 interix[[3-9]]*)
  3974   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3975   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3976   ;;
  3977 
  3978 irix5* | irix6* | nonstopux*)
  3979   case $LD in
  3980   *-32|*"-32 ") libmagic=32-bit;;
  3981   *-n32|*"-n32 ") libmagic=N32;;
  3982   *-64|*"-64 ") libmagic=64-bit;;
  3983   *) libmagic=never-match;;
  3984   esac
  3985   lt_cv_deplibs_check_method=pass_all
  3986   ;;
  3987 
  3988 # This must be glibc/ELF.
  3989 linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3990   lt_cv_deplibs_check_method=pass_all
  3991   ;;
  3992 
  3993 netbsd*)
  3994   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3995     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3996   else
  3997     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3998   fi
  3999   ;;
  4000 
  4001 newos6*)
  4002   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  4003   lt_cv_file_magic_cmd=/usr/bin/file
  4004   lt_cv_file_magic_test_file=/usr/lib/libnls.so
  4005   ;;
  4006 
  4007 *nto* | *qnx*)
  4008   lt_cv_deplibs_check_method=pass_all
  4009   ;;
  4010 
  4011 openbsd*)
  4012   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4013     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  4014   else
  4015     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  4016   fi
  4017   ;;
  4018 
  4019 osf3* | osf4* | osf5*)
  4020   lt_cv_deplibs_check_method=pass_all
  4021   ;;
  4022 
  4023 rdos*)
  4024   lt_cv_deplibs_check_method=pass_all
  4025   ;;
  4026 
  4027 solaris*)
  4028   lt_cv_deplibs_check_method=pass_all
  4029   ;;
  4030 
  4031 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  4032   lt_cv_deplibs_check_method=pass_all
  4033   ;;
  4034 
  4035 sysv4 | sysv4.3*)
  4036   case $host_vendor in
  4037   motorola)
  4038     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]]'
  4039     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  4040     ;;
  4041   ncr)
  4042     lt_cv_deplibs_check_method=pass_all
  4043     ;;
  4044   sequent)
  4045     lt_cv_file_magic_cmd='/bin/file'
  4046     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  4047     ;;
  4048   sni)
  4049     lt_cv_file_magic_cmd='/bin/file'
  4050     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  4051     lt_cv_file_magic_test_file=/lib/libc.so
  4052     ;;
  4053   siemens)
  4054     lt_cv_deplibs_check_method=pass_all
  4055     ;;
  4056   pc)
  4057     lt_cv_deplibs_check_method=pass_all
  4058     ;;
  4059   esac
  4060   ;;
  4061 
  4062 tpf*)
  4063   lt_cv_deplibs_check_method=pass_all
  4064   ;;
  4065 esac
  4066 ])
  4067 
  4068 file_magic_glob=
  4069 want_nocaseglob=no
  4070 if test "$build" = "$host"; then
  4071   case $host_os in
  4072   mingw* | pw32*)
  4073     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  4074       want_nocaseglob=yes
  4075     else
  4076       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  4077     fi
  4078     ;;
  4079   esac
  4080 fi
  4081 
  4082 file_magic_cmd=$lt_cv_file_magic_cmd
  4083 deplibs_check_method=$lt_cv_deplibs_check_method
  4084 test -z "$deplibs_check_method" && deplibs_check_method=unknown
  4085 
  4086 _LT_DECL([], [deplibs_check_method], [1],
  4087     [Method to check whether dependent libraries are shared objects])
  4088 _LT_DECL([], [file_magic_cmd], [1],
  4089     [Command to use when deplibs_check_method = "file_magic"])
  4090 _LT_DECL([], [file_magic_glob], [1],
  4091     [How to find potential files when deplibs_check_method = "file_magic"])
  4092 _LT_DECL([], [want_nocaseglob], [1],
  4093     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  4094 ])# _LT_CHECK_MAGIC_METHOD
  4095 
  4096 
  4097 # LT_PATH_NM
  4098 # ----------
  4099 # find the pathname to a BSD- or MS-compatible name lister
  4100 AC_DEFUN([LT_PATH_NM],
  4101 [AC_REQUIRE([AC_PROG_CC])dnl
  4102 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  4103 [if test -n "$NM"; then
  4104   # Let the user override the test.
  4105   lt_cv_path_NM="$NM"
  4106 else
  4107   lt_nm_to_check="${ac_tool_prefix}nm"
  4108   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  4109     lt_nm_to_check="$lt_nm_to_check nm"
  4110   fi
  4111   for lt_tmp_nm in $lt_nm_to_check; do
  4112     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4113     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  4114       IFS="$lt_save_ifs"
  4115       test -z "$ac_dir" && ac_dir=.
  4116       tmp_nm="$ac_dir/$lt_tmp_nm"
  4117       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  4118 	# Check to see if the nm accepts a BSD-compat flag.
  4119 	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
  4120 	#   nm: unknown option "B" ignored
  4121 	# Tru64's nm complains that /dev/null is an invalid object file
  4122 	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  4123 	*/dev/null* | *'Invalid file or object type'*)
  4124 	  lt_cv_path_NM="$tmp_nm -B"
  4125 	  break
  4126 	  ;;
  4127 	*)
  4128 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  4129 	  */dev/null*)
  4130 	    lt_cv_path_NM="$tmp_nm -p"
  4131 	    break
  4132 	    ;;
  4133 	  *)
  4134 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  4135 	    continue # so that we can try to find one that supports BSD flags
  4136 	    ;;
  4137 	  esac
  4138 	  ;;
  4139 	esac
  4140       fi
  4141     done
  4142     IFS="$lt_save_ifs"
  4143   done
  4144   : ${lt_cv_path_NM=no}
  4145 fi])
  4146 if test "$lt_cv_path_NM" != "no"; then
  4147   NM="$lt_cv_path_NM"
  4148 else
  4149   # Didn't find any BSD compatible name lister, look for dumpbin.
  4150   if test -n "$DUMPBIN"; then :
  4151     # Let the user override the test.
  4152   else
  4153     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  4154     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  4155     *COFF*)
  4156       DUMPBIN="$DUMPBIN -symbols"
  4157       ;;
  4158     *)
  4159       DUMPBIN=:
  4160       ;;
  4161     esac
  4162   fi
  4163   AC_SUBST([DUMPBIN])
  4164   if test "$DUMPBIN" != ":"; then
  4165     NM="$DUMPBIN"
  4166   fi
  4167 fi
  4168 test -z "$NM" && NM=nm
  4169 AC_SUBST([NM])
  4170 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  4171 
  4172 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  4173   [lt_cv_nm_interface="BSD nm"
  4174   echo "int some_variable = 0;" > conftest.$ac_ext
  4175   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  4176   (eval "$ac_compile" 2>conftest.err)
  4177   cat conftest.err >&AS_MESSAGE_LOG_FD
  4178   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  4179   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  4180   cat conftest.err >&AS_MESSAGE_LOG_FD
  4181   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  4182   cat conftest.out >&AS_MESSAGE_LOG_FD
  4183   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  4184     lt_cv_nm_interface="MS dumpbin"
  4185   fi
  4186   rm -f conftest*])
  4187 ])# LT_PATH_NM
  4188 
  4189 # Old names:
  4190 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  4191 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  4192 dnl aclocal-1.4 backwards compatibility:
  4193 dnl AC_DEFUN([AM_PROG_NM], [])
  4194 dnl AC_DEFUN([AC_PROG_NM], [])
  4195 
  4196 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  4197 # --------------------------------
  4198 # how to determine the name of the shared library
  4199 # associated with a specific link library.
  4200 #  -- PORTME fill in with the dynamic library characteristics
  4201 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  4202 [m4_require([_LT_DECL_EGREP])
  4203 m4_require([_LT_DECL_OBJDUMP])
  4204 m4_require([_LT_DECL_DLLTOOL])
  4205 AC_CACHE_CHECK([how to associate runtime and link libraries],
  4206 lt_cv_sharedlib_from_linklib_cmd,
  4207 [lt_cv_sharedlib_from_linklib_cmd='unknown'
  4208 
  4209 case $host_os in
  4210 cygwin* | mingw* | pw32* | cegcc*)
  4211   # two different shell functions defined in ltmain.sh
  4212   # decide which to use based on capabilities of $DLLTOOL
  4213   case `$DLLTOOL --help 2>&1` in
  4214   *--identify-strict*)
  4215     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  4216     ;;
  4217   *)
  4218     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  4219     ;;
  4220   esac
  4221   ;;
  4222 *)
  4223   # fallback: assume linklib IS sharedlib
  4224   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  4225   ;;
  4226 esac
  4227 ])
  4228 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  4229 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  4230 
  4231 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  4232     [Command to associate shared and link libraries])
  4233 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  4234 
  4235 
  4236 # _LT_PATH_MANIFEST_TOOL
  4237 # ----------------------
  4238 # locate the manifest tool
  4239 m4_defun([_LT_PATH_MANIFEST_TOOL],
  4240 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  4241 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  4242 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  4243   [lt_cv_path_mainfest_tool=no
  4244   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  4245   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  4246   cat conftest.err >&AS_MESSAGE_LOG_FD
  4247   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  4248     lt_cv_path_mainfest_tool=yes
  4249   fi
  4250   rm -f conftest*])
  4251 if test "x$lt_cv_path_mainfest_tool" != xyes; then
  4252   MANIFEST_TOOL=:
  4253 fi
  4254 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  4255 ])# _LT_PATH_MANIFEST_TOOL
  4256 
  4257 
  4258 # LT_LIB_M
  4259 # --------
  4260 # check for math library
  4261 AC_DEFUN([LT_LIB_M],
  4262 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4263 LIBM=
  4264 case $host in
  4265 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  4266   # These system don't have libm, or don't need it
  4267   ;;
  4268 *-ncr-sysv4.3*)
  4269   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  4270   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  4271   ;;
  4272 *)
  4273   AC_CHECK_LIB(m, cos, LIBM="-lm")
  4274   ;;
  4275 esac
  4276 AC_SUBST([LIBM])
  4277 ])# LT_LIB_M
  4278 
  4279 # Old name:
  4280 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  4281 dnl aclocal-1.4 backwards compatibility:
  4282 dnl AC_DEFUN([AC_CHECK_LIBM], [])
  4283 
  4284 
  4285 # _LT_COMPILER_NO_RTTI([TAGNAME])
  4286 # -------------------------------
  4287 m4_defun([_LT_COMPILER_NO_RTTI],
  4288 [m4_require([_LT_TAG_COMPILER])dnl
  4289 
  4290 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  4291 
  4292 if test "$GCC" = yes; then
  4293   case $cc_basename in
  4294   nvcc*)
  4295     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  4296   *)
  4297     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  4298   esac
  4299 
  4300   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  4301     lt_cv_prog_compiler_rtti_exceptions,
  4302     [-fno-rtti -fno-exceptions], [],
  4303     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  4304 fi
  4305 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  4306 	[Compiler flag to turn off builtin functions])
  4307 ])# _LT_COMPILER_NO_RTTI
  4308 
  4309 
  4310 # _LT_CMD_GLOBAL_SYMBOLS
  4311 # ----------------------
  4312 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  4313 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4314 AC_REQUIRE([AC_PROG_CC])dnl
  4315 AC_REQUIRE([AC_PROG_AWK])dnl
  4316 AC_REQUIRE([LT_PATH_NM])dnl
  4317 AC_REQUIRE([LT_PATH_LD])dnl
  4318 m4_require([_LT_DECL_SED])dnl
  4319 m4_require([_LT_DECL_EGREP])dnl
  4320 m4_require([_LT_TAG_COMPILER])dnl
  4321 
  4322 # Check for command to grab the raw symbol name followed by C symbol from nm.
  4323 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  4324 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  4325 [
  4326 # These are sane defaults that work on at least a few old systems.
  4327 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
  4328 
  4329 # Character class describing NM global symbol codes.
  4330 symcode='[[BCDEGRST]]'
  4331 
  4332 # Regexp to match symbols that can be accessed directly from C.
  4333 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  4334 
  4335 # Define system-specific variables.
  4336 case $host_os in
  4337 aix*)
  4338   symcode='[[BCDT]]'
  4339   ;;
  4340 cygwin* | mingw* | pw32* | cegcc*)
  4341   symcode='[[ABCDGISTW]]'
  4342   ;;
  4343 hpux*)
  4344   if test "$host_cpu" = ia64; then
  4345     symcode='[[ABCDEGRST]]'
  4346   fi
  4347   ;;
  4348 irix* | nonstopux*)
  4349   symcode='[[BCDEGRST]]'
  4350   ;;
  4351 osf*)
  4352   symcode='[[BCDEGQRST]]'
  4353   ;;
  4354 solaris*)
  4355   symcode='[[BDRT]]'
  4356   ;;
  4357 sco3.2v5*)
  4358   symcode='[[DT]]'
  4359   ;;
  4360 sysv4.2uw2*)
  4361   symcode='[[DT]]'
  4362   ;;
  4363 sysv5* | sco5v6* | unixware* | OpenUNIX*)
  4364   symcode='[[ABDT]]'
  4365   ;;
  4366 sysv4)
  4367   symcode='[[DFNSTU]]'
  4368   ;;
  4369 esac
  4370 
  4371 # If we're using GNU nm, then use its standard symbol codes.
  4372 case `$NM -V 2>&1` in
  4373 *GNU* | *'with BFD'*)
  4374   symcode='[[ABCDGIRSTW]]' ;;
  4375 esac
  4376 
  4377 # Transform an extracted symbol line into a proper C declaration.
  4378 # Some systems (esp. on ia64) link data and code symbols differently,
  4379 # so use this general approach.
  4380 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  4381 
  4382 # Transform an extracted symbol line into symbol name and symbol address
  4383 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
  4384 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'"
  4385 
  4386 # Handle CRLF in mingw tool chain
  4387 opt_cr=
  4388 case $build_os in
  4389 mingw*)
  4390   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  4391   ;;
  4392 esac
  4393 
  4394 # Try without a prefix underscore, then with it.
  4395 for ac_symprfx in "" "_"; do
  4396 
  4397   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  4398   symxfrm="\\1 $ac_symprfx\\2 \\2"
  4399 
  4400   # Write the raw and C identifiers.
  4401   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  4402     # Fake it for dumpbin and say T for any non-static function
  4403     # and D for any global variable.
  4404     # Also find C++ and __fastcall symbols from MSVC++,
  4405     # which start with @ or ?.
  4406     lt_cv_sys_global_symbol_pipe="$AWK ['"\
  4407 "     {last_section=section; section=\$ 3};"\
  4408 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  4409 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  4410 "     \$ 0!~/External *\|/{next};"\
  4411 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  4412 "     {if(hide[section]) next};"\
  4413 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  4414 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  4415 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
  4416 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  4417 "     ' prfx=^$ac_symprfx]"
  4418   else
  4419     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  4420   fi
  4421   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  4422 
  4423   # Check to see that the pipe works correctly.
  4424   pipe_works=no
  4425 
  4426   rm -f conftest*
  4427   cat > conftest.$ac_ext <<_LT_EOF
  4428 #ifdef __cplusplus
  4429 extern "C" {
  4430 #endif
  4431 char nm_test_var;
  4432 void nm_test_func(void);
  4433 void nm_test_func(void){}
  4434 #ifdef __cplusplus
  4435 }
  4436 #endif
  4437 int main(){nm_test_var='a';nm_test_func();return(0);}
  4438 _LT_EOF
  4439 
  4440   if AC_TRY_EVAL(ac_compile); then
  4441     # Now try to grab the symbols.
  4442     nlist=conftest.nm
  4443     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  4444       # Try sorting and uniquifying the output.
  4445       if sort "$nlist" | uniq > "$nlist"T; then
  4446 	mv -f "$nlist"T "$nlist"
  4447       else
  4448 	rm -f "$nlist"T
  4449       fi
  4450 
  4451       # Make sure that we snagged all the symbols we need.
  4452       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  4453 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  4454 	  cat <<_LT_EOF > conftest.$ac_ext
  4455 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
  4456 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  4457 /* DATA imports from DLLs on WIN32 con't be const, because runtime
  4458    relocations are performed -- see ld's documentation on pseudo-relocs.  */
  4459 # define LT@&t@_DLSYM_CONST
  4460 #elif defined(__osf__)
  4461 /* This system does not cope well with relocations in const data.  */
  4462 # define LT@&t@_DLSYM_CONST
  4463 #else
  4464 # define LT@&t@_DLSYM_CONST const
  4465 #endif
  4466 
  4467 #ifdef __cplusplus
  4468 extern "C" {
  4469 #endif
  4470 
  4471 _LT_EOF
  4472 	  # Now generate the symbol file.
  4473 	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  4474 
  4475 	  cat <<_LT_EOF >> conftest.$ac_ext
  4476 
  4477 /* The mapping between symbol names and symbols.  */
  4478 LT@&t@_DLSYM_CONST struct {
  4479   const char *name;
  4480   void       *address;
  4481 }
  4482 lt__PROGRAM__LTX_preloaded_symbols[[]] =
  4483 {
  4484   { "@PROGRAM@", (void *) 0 },
  4485 _LT_EOF
  4486 	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  4487 	  cat <<\_LT_EOF >> conftest.$ac_ext
  4488   {0, (void *) 0}
  4489 };
  4490 
  4491 /* This works around a problem in FreeBSD linker */
  4492 #ifdef FREEBSD_WORKAROUND
  4493 static const void *lt_preloaded_setup() {
  4494   return lt__PROGRAM__LTX_preloaded_symbols;
  4495 }
  4496 #endif
  4497 
  4498 #ifdef __cplusplus
  4499 }
  4500 #endif
  4501 _LT_EOF
  4502 	  # Now try linking the two files.
  4503 	  mv conftest.$ac_objext conftstm.$ac_objext
  4504 	  lt_globsym_save_LIBS=$LIBS
  4505 	  lt_globsym_save_CFLAGS=$CFLAGS
  4506 	  LIBS="conftstm.$ac_objext"
  4507 	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  4508 	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  4509 	    pipe_works=yes
  4510 	  fi
  4511 	  LIBS=$lt_globsym_save_LIBS
  4512 	  CFLAGS=$lt_globsym_save_CFLAGS
  4513 	else
  4514 	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  4515 	fi
  4516       else
  4517 	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  4518       fi
  4519     else
  4520       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  4521     fi
  4522   else
  4523     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  4524     cat conftest.$ac_ext >&5
  4525   fi
  4526   rm -rf conftest* conftst*
  4527 
  4528   # Do not use the global_symbol_pipe unless it works.
  4529   if test "$pipe_works" = yes; then
  4530     break
  4531   else
  4532     lt_cv_sys_global_symbol_pipe=
  4533   fi
  4534 done
  4535 ])
  4536 if test -z "$lt_cv_sys_global_symbol_pipe"; then
  4537   lt_cv_sys_global_symbol_to_cdecl=
  4538 fi
  4539 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  4540   AC_MSG_RESULT(failed)
  4541 else
  4542   AC_MSG_RESULT(ok)
  4543 fi
  4544 
  4545 # Response file support.
  4546 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  4547   nm_file_list_spec='@'
  4548 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  4549   nm_file_list_spec='@'
  4550 fi
  4551 
  4552 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  4553     [Take the output of nm and produce a listing of raw symbols and C names])
  4554 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  4555     [Transform the output of nm in a proper C declaration])
  4556 _LT_DECL([global_symbol_to_c_name_address],
  4557     [lt_cv_sys_global_symbol_to_c_name_address], [1],
  4558     [Transform the output of nm in a C name address pair])
  4559 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  4560     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  4561     [Transform the output of nm in a C name address pair when lib prefix is needed])
  4562 _LT_DECL([], [nm_file_list_spec], [1],
  4563     [Specify filename containing input files for $NM])
  4564 ]) # _LT_CMD_GLOBAL_SYMBOLS
  4565 
  4566 
  4567 # _LT_COMPILER_PIC([TAGNAME])
  4568 # ---------------------------
  4569 m4_defun([_LT_COMPILER_PIC],
  4570 [m4_require([_LT_TAG_COMPILER])dnl
  4571 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  4572 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4573 _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4574 
  4575 m4_if([$1], [CXX], [
  4576   # C++ specific cases for pic, static, wl, etc.
  4577   if test "$GXX" = yes; then
  4578     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4579     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4580 
  4581     case $host_os in
  4582     aix*)
  4583       # All AIX code is PIC.
  4584       if test "$host_cpu" = ia64; then
  4585 	# AIX 5 now supports IA64 processor
  4586 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4587       fi
  4588       ;;
  4589 
  4590     amigaos*)
  4591       case $host_cpu in
  4592       powerpc)
  4593             # see comment about AmigaOS4 .so support
  4594             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4595         ;;
  4596       m68k)
  4597             # FIXME: we need at least 68020 code to build shared libraries, but
  4598             # adding the `-m68020' flag to GCC prevents building anything better,
  4599             # like `-m68040'.
  4600             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4601         ;;
  4602       esac
  4603       ;;
  4604 
  4605     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4606       # PIC is the default for these OSes.
  4607       ;;
  4608     mingw* | cygwin* | os2* | pw32* | cegcc*)
  4609       # This hack is so that the source file can tell whether it is being
  4610       # built for inclusion in a dll (and should export symbols for example).
  4611       # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4612       # (--disable-auto-import) libraries
  4613       m4_if([$1], [GCJ], [],
  4614 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4615       ;;
  4616     darwin* | rhapsody*)
  4617       # PIC is the default on this platform
  4618       # Common symbols not allowed in MH_DYLIB files
  4619       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4620       ;;
  4621     *djgpp*)
  4622       # DJGPP does not support shared libraries at all
  4623       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4624       ;;
  4625     haiku*)
  4626       # PIC is the default for Haiku.
  4627       # The "-static" flag exists, but is broken.
  4628       _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4629       ;;
  4630     interix[[3-9]]*)
  4631       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4632       # Instead, we relocate shared libraries at runtime.
  4633       ;;
  4634     sysv4*MP*)
  4635       if test -d /usr/nec; then
  4636 	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4637       fi
  4638       ;;
  4639     hpux*)
  4640       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4641       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
  4642       # sets the default TLS model and affects inlining.
  4643       case $host_cpu in
  4644       hppa*64*)
  4645 	;;
  4646       *)
  4647 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4648 	;;
  4649       esac
  4650       ;;
  4651     *qnx* | *nto*)
  4652       # QNX uses GNU C++, but need to define -shared option too, otherwise
  4653       # it will coredump.
  4654       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4655       ;;
  4656     *)
  4657       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4658       ;;
  4659     esac
  4660   else
  4661     case $host_os in
  4662       aix[[4-9]]*)
  4663 	# All AIX code is PIC.
  4664 	if test "$host_cpu" = ia64; then
  4665 	  # AIX 5 now supports IA64 processor
  4666 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4667 	else
  4668 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4669 	fi
  4670 	;;
  4671       chorus*)
  4672 	case $cc_basename in
  4673 	cxch68*)
  4674 	  # Green Hills C++ Compiler
  4675 	  # _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"
  4676 	  ;;
  4677 	esac
  4678 	;;
  4679       mingw* | cygwin* | os2* | pw32* | cegcc*)
  4680 	# This hack is so that the source file can tell whether it is being
  4681 	# built for inclusion in a dll (and should export symbols for example).
  4682 	m4_if([$1], [GCJ], [],
  4683 	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4684 	;;
  4685       dgux*)
  4686 	case $cc_basename in
  4687 	  ec++*)
  4688 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4689 	    ;;
  4690 	  ghcx*)
  4691 	    # Green Hills C++ Compiler
  4692 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4693 	    ;;
  4694 	  *)
  4695 	    ;;
  4696 	esac
  4697 	;;
  4698       freebsd* | dragonfly*)
  4699 	# FreeBSD uses GNU C++
  4700 	;;
  4701       hpux9* | hpux10* | hpux11*)
  4702 	case $cc_basename in
  4703 	  CC*)
  4704 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4705 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4706 	    if test "$host_cpu" != ia64; then
  4707 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4708 	    fi
  4709 	    ;;
  4710 	  aCC*)
  4711 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4712 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4713 	    case $host_cpu in
  4714 	    hppa*64*|ia64*)
  4715 	      # +Z the default
  4716 	      ;;
  4717 	    *)
  4718 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4719 	      ;;
  4720 	    esac
  4721 	    ;;
  4722 	  *)
  4723 	    ;;
  4724 	esac
  4725 	;;
  4726       interix*)
  4727 	# This is c89, which is MS Visual C++ (no shared libs)
  4728 	# Anyone wants to do a port?
  4729 	;;
  4730       irix5* | irix6* | nonstopux*)
  4731 	case $cc_basename in
  4732 	  CC*)
  4733 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4734 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4735 	    # CC pic flag -KPIC is the default.
  4736 	    ;;
  4737 	  *)
  4738 	    ;;
  4739 	esac
  4740 	;;
  4741       linux* | k*bsd*-gnu | kopensolaris*-gnu)
  4742 	case $cc_basename in
  4743 	  KCC*)
  4744 	    # KAI C++ Compiler
  4745 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4746 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4747 	    ;;
  4748 	  ecpc* )
  4749 	    # old Intel C++ for x86_64 which still supported -KPIC.
  4750 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4751 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4752 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4753 	    ;;
  4754 	  icpc* )
  4755 	    # Intel C++, used to be incompatible with GCC.
  4756 	    # ICC 10 doesn't accept -KPIC any more.
  4757 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4758 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4759 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4760 	    ;;
  4761 	  pgCC* | pgcpp*)
  4762 	    # Portland Group C++ compiler
  4763 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4764 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4765 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4766 	    ;;
  4767 	  cxx*)
  4768 	    # Compaq C++
  4769 	    # Make sure the PIC flag is empty.  It appears that all Alpha
  4770 	    # Linux and Compaq Tru64 Unix objects are PIC.
  4771 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4772 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4773 	    ;;
  4774 	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  4775 	    # IBM XL 8.0, 9.0 on PPC and BlueGene
  4776 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4777 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4778 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4779 	    ;;
  4780 	  *)
  4781 	    case `$CC -V 2>&1 | sed 5q` in
  4782 	    *Sun\ C*)
  4783 	      # Sun C++ 5.9
  4784 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4785 	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4786 	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4787 	      ;;
  4788 	    esac
  4789 	    ;;
  4790 	esac
  4791 	;;
  4792       lynxos*)
  4793 	;;
  4794       m88k*)
  4795 	;;
  4796       mvs*)
  4797 	case $cc_basename in
  4798 	  cxx*)
  4799 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4800 	    ;;
  4801 	  *)
  4802 	    ;;
  4803 	esac
  4804 	;;
  4805       netbsd*)
  4806 	;;
  4807       *qnx* | *nto*)
  4808         # QNX uses GNU C++, but need to define -shared option too, otherwise
  4809         # it will coredump.
  4810         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4811         ;;
  4812       osf3* | osf4* | osf5*)
  4813 	case $cc_basename in
  4814 	  KCC*)
  4815 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4816 	    ;;
  4817 	  RCC*)
  4818 	    # Rational C++ 2.4.1
  4819 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4820 	    ;;
  4821 	  cxx*)
  4822 	    # Digital/Compaq C++
  4823 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4824 	    # Make sure the PIC flag is empty.  It appears that all Alpha
  4825 	    # Linux and Compaq Tru64 Unix objects are PIC.
  4826 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4827 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4828 	    ;;
  4829 	  *)
  4830 	    ;;
  4831 	esac
  4832 	;;
  4833       psos*)
  4834 	;;
  4835       solaris*)
  4836 	case $cc_basename in
  4837 	  CC* | sunCC*)
  4838 	    # Sun C++ 4.2, 5.x and Centerline C++
  4839 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4840 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4841 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4842 	    ;;
  4843 	  gcx*)
  4844 	    # Green Hills C++ Compiler
  4845 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4846 	    ;;
  4847 	  *)
  4848 	    ;;
  4849 	esac
  4850 	;;
  4851       sunos4*)
  4852 	case $cc_basename in
  4853 	  CC*)
  4854 	    # Sun C++ 4.x
  4855 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4856 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4857 	    ;;
  4858 	  lcc*)
  4859 	    # Lucid
  4860 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4861 	    ;;
  4862 	  *)
  4863 	    ;;
  4864 	esac
  4865 	;;
  4866       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4867 	case $cc_basename in
  4868 	  CC*)
  4869 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4870 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4871 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4872 	    ;;
  4873 	esac
  4874 	;;
  4875       tandem*)
  4876 	case $cc_basename in
  4877 	  NCC*)
  4878 	    # NonStop-UX NCC 3.20
  4879 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4880 	    ;;
  4881 	  *)
  4882 	    ;;
  4883 	esac
  4884 	;;
  4885       vxworks*)
  4886 	;;
  4887       *)
  4888 	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4889 	;;
  4890     esac
  4891   fi
  4892 ],
  4893 [
  4894   if test "$GCC" = yes; then
  4895     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4896     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4897 
  4898     case $host_os in
  4899       aix*)
  4900       # All AIX code is PIC.
  4901       if test "$host_cpu" = ia64; then
  4902 	# AIX 5 now supports IA64 processor
  4903 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4904       fi
  4905       ;;
  4906 
  4907     amigaos*)
  4908       case $host_cpu in
  4909       powerpc)
  4910             # see comment about AmigaOS4 .so support
  4911             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4912         ;;
  4913       m68k)
  4914             # FIXME: we need at least 68020 code to build shared libraries, but
  4915             # adding the `-m68020' flag to GCC prevents building anything better,
  4916             # like `-m68040'.
  4917             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4918         ;;
  4919       esac
  4920       ;;
  4921 
  4922     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4923       # PIC is the default for these OSes.
  4924       ;;
  4925 
  4926     mingw* | cygwin* | pw32* | os2* | cegcc*)
  4927       # This hack is so that the source file can tell whether it is being
  4928       # built for inclusion in a dll (and should export symbols for example).
  4929       # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4930       # (--disable-auto-import) libraries
  4931       m4_if([$1], [GCJ], [],
  4932 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4933       ;;
  4934 
  4935     darwin* | rhapsody*)
  4936       # PIC is the default on this platform
  4937       # Common symbols not allowed in MH_DYLIB files
  4938       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4939       ;;
  4940 
  4941     haiku*)
  4942       # PIC is the default for Haiku.
  4943       # The "-static" flag exists, but is broken.
  4944       _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4945       ;;
  4946 
  4947     hpux*)
  4948       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4949       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
  4950       # sets the default TLS model and affects inlining.
  4951       case $host_cpu in
  4952       hppa*64*)
  4953 	# +Z the default
  4954 	;;
  4955       *)
  4956 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4957 	;;
  4958       esac
  4959       ;;
  4960 
  4961     interix[[3-9]]*)
  4962       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4963       # Instead, we relocate shared libraries at runtime.
  4964       ;;
  4965 
  4966     msdosdjgpp*)
  4967       # Just because we use GCC doesn't mean we suddenly get shared libraries
  4968       # on systems that don't support them.
  4969       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4970       enable_shared=no
  4971       ;;
  4972 
  4973     *nto* | *qnx*)
  4974       # QNX uses GNU C++, but need to define -shared option too, otherwise
  4975       # it will coredump.
  4976       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4977       ;;
  4978 
  4979     sysv4*MP*)
  4980       if test -d /usr/nec; then
  4981 	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4982       fi
  4983       ;;
  4984 
  4985     *)
  4986       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4987       ;;
  4988     esac
  4989 
  4990     case $cc_basename in
  4991     nvcc*) # Cuda Compiler Driver 2.2
  4992       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4993       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4994         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4995       fi
  4996       ;;
  4997     esac
  4998   else
  4999     # PORTME Check for flag to pass linker flags through the system compiler.
  5000     case $host_os in
  5001     aix*)
  5002       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5003       if test "$host_cpu" = ia64; then
  5004 	# AIX 5 now supports IA64 processor
  5005 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5006       else
  5007 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  5008       fi
  5009       ;;
  5010 
  5011     mingw* | cygwin* | pw32* | os2* | cegcc*)
  5012       # This hack is so that the source file can tell whether it is being
  5013       # built for inclusion in a dll (and should export symbols for example).
  5014       m4_if([$1], [GCJ], [],
  5015 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  5016       ;;
  5017 
  5018     hpux9* | hpux10* | hpux11*)
  5019       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5020       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  5021       # not for PA HP-UX.
  5022       case $host_cpu in
  5023       hppa*64*|ia64*)
  5024 	# +Z the default
  5025 	;;
  5026       *)
  5027 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5028 	;;
  5029       esac
  5030       # Is there a better lt_prog_compiler_static that works with the bundled CC?
  5031       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  5032       ;;
  5033 
  5034     irix5* | irix6* | nonstopux*)
  5035       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5036       # PIC (with -KPIC) is the default.
  5037       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5038       ;;
  5039 
  5040     linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5041       case $cc_basename in
  5042       # old Intel for x86_64 which still supported -KPIC.
  5043       ecc*)
  5044 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5045 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5046 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5047         ;;
  5048       # icc used to be incompatible with GCC.
  5049       # ICC 10 doesn't accept -KPIC any more.
  5050       icc* | ifort*)
  5051 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5052 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5053 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5054         ;;
  5055       # Lahey Fortran 8.1.
  5056       lf95*)
  5057 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5058 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  5059 	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  5060 	;;
  5061       nagfor*)
  5062 	# NAG Fortran compiler
  5063 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  5064 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5065 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5066 	;;
  5067       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  5068         # Portland Group compilers (*not* the Pentium gcc compiler,
  5069 	# which looks to be a dead project)
  5070 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5071 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  5072 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5073         ;;
  5074       ccc*)
  5075         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5076         # All Alpha code is PIC.
  5077         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5078         ;;
  5079       xl* | bgxl* | bgf* | mpixl*)
  5080 	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  5081 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5082 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  5083 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  5084 	;;
  5085       *)
  5086 	case `$CC -V 2>&1 | sed 5q` in
  5087 	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  5088 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
  5089 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5090 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5091 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  5092 	  ;;
  5093 	*Sun\ F* | *Sun*Fortran*)
  5094 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5095 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5096 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5097 	  ;;
  5098 	*Sun\ C*)
  5099 	  # Sun C 5.9
  5100 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5101 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5102 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5103 	  ;;
  5104         *Intel*\ [[CF]]*Compiler*)
  5105 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5106 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5107 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5108 	  ;;
  5109 	*Portland\ Group*)
  5110 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5111 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  5112 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5113 	  ;;
  5114 	esac
  5115 	;;
  5116       esac
  5117       ;;
  5118 
  5119     newsos6)
  5120       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5121       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5122       ;;
  5123 
  5124     *nto* | *qnx*)
  5125       # QNX uses GNU C++, but need to define -shared option too, otherwise
  5126       # it will coredump.
  5127       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  5128       ;;
  5129 
  5130     osf3* | osf4* | osf5*)
  5131       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5132       # All OSF/1 code is PIC.
  5133       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5134       ;;
  5135 
  5136     rdos*)
  5137       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5138       ;;
  5139 
  5140     solaris*)
  5141       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5142       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5143       case $cc_basename in
  5144       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  5145 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  5146       *)
  5147 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  5148       esac
  5149       ;;
  5150 
  5151     sunos4*)
  5152       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5153       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5154       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5155       ;;
  5156 
  5157     sysv4 | sysv4.2uw2* | sysv4.3*)
  5158       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5159       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5160       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5161       ;;
  5162 
  5163     sysv4*MP*)
  5164       if test -d /usr/nec ;then
  5165 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  5166 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5167       fi
  5168       ;;
  5169 
  5170     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  5171       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5172       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5173       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5174       ;;
  5175 
  5176     unicos*)
  5177       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5178       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5179       ;;
  5180 
  5181     uts4*)
  5182       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5183       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5184       ;;
  5185 
  5186     *)
  5187       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5188       ;;
  5189     esac
  5190   fi
  5191 ])
  5192 case $host_os in
  5193   # For platforms which do not support PIC, -DPIC is meaningless:
  5194   *djgpp*)
  5195     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5196     ;;
  5197   *)
  5198     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  5199     ;;
  5200 esac
  5201 
  5202 AC_CACHE_CHECK([for $compiler option to produce PIC],
  5203   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  5204   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  5205 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  5206 
  5207 #
  5208 # Check to make sure the PIC flag actually works.
  5209 #
  5210 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  5211   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  5212     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  5213     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  5214     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  5215      "" | " "*) ;;
  5216      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  5217      esac],
  5218     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  5219      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  5220 fi
  5221 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  5222 	[Additional compiler flags for building library objects])
  5223 
  5224 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  5225 	[How to pass a linker flag through the compiler])
  5226 #
  5227 # Check to make sure the static flag actually works.
  5228 #
  5229 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  5230 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  5231   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  5232   $lt_tmp_static_flag,
  5233   [],
  5234   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  5235 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  5236 	[Compiler flag to prevent dynamic linking])
  5237 ])# _LT_COMPILER_PIC
  5238 
  5239 
  5240 # _LT_LINKER_SHLIBS([TAGNAME])
  5241 # ----------------------------
  5242 # See if the linker supports building shared libraries.
  5243 m4_defun([_LT_LINKER_SHLIBS],
  5244 [AC_REQUIRE([LT_PATH_LD])dnl
  5245 AC_REQUIRE([LT_PATH_NM])dnl
  5246 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5247 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5248 m4_require([_LT_DECL_EGREP])dnl
  5249 m4_require([_LT_DECL_SED])dnl
  5250 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  5251 m4_require([_LT_TAG_COMPILER])dnl
  5252 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5253 m4_if([$1], [CXX], [
  5254   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5255   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  5256   case $host_os in
  5257   aix[[4-9]]*)
  5258     # If we're using GNU nm, then we don't want the "-C" option.
  5259     # -C means demangle to AIX nm, but means don't demangle with GNU nm
  5260     # Also, AIX nm treats weak defined symbols like other global defined
  5261     # symbols, whereas GNU nm marks them as "W".
  5262     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  5263       _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'
  5264     else
  5265       _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'
  5266     fi
  5267     ;;
  5268   pw32*)
  5269     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  5270     ;;
  5271   cygwin* | mingw* | cegcc*)
  5272     case $cc_basename in
  5273     cl*)
  5274       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5275       ;;
  5276     *)
  5277       _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'
  5278       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  5279       ;;
  5280     esac
  5281     ;;
  5282   *)
  5283     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5284     ;;
  5285   esac
  5286 ], [
  5287   runpath_var=
  5288   _LT_TAGVAR(allow_undefined_flag, $1)=
  5289   _LT_TAGVAR(always_export_symbols, $1)=no
  5290   _LT_TAGVAR(archive_cmds, $1)=
  5291   _LT_TAGVAR(archive_expsym_cmds, $1)=
  5292   _LT_TAGVAR(compiler_needs_object, $1)=no
  5293   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5294   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5295   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5296   _LT_TAGVAR(hardcode_automatic, $1)=no
  5297   _LT_TAGVAR(hardcode_direct, $1)=no
  5298   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5299   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5300   _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5301   _LT_TAGVAR(hardcode_minus_L, $1)=no
  5302   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5303   _LT_TAGVAR(inherit_rpath, $1)=no
  5304   _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5305   _LT_TAGVAR(module_cmds, $1)=
  5306   _LT_TAGVAR(module_expsym_cmds, $1)=
  5307   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  5308   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  5309   _LT_TAGVAR(thread_safe_flag_spec, $1)=
  5310   _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5311   # include_expsyms should be a list of space-separated symbols to be *always*
  5312   # included in the symbol list
  5313   _LT_TAGVAR(include_expsyms, $1)=
  5314   # exclude_expsyms can be an extended regexp of symbols to exclude
  5315   # it will be wrapped by ` (' and `)$', so one must not match beginning or
  5316   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  5317   # as well as any symbol that contains `d'.
  5318   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  5319   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  5320   # platforms (ab)use it in PIC code, but their linkers get confused if
  5321   # the symbol is explicitly referenced.  Since portable code cannot
  5322   # rely on this symbol name, it's probably fine to never include it in
  5323   # preloaded symbol tables.
  5324   # Exclude shared library initialization/finalization symbols.
  5325 dnl Note also adjust exclude_expsyms for C++ above.
  5326   extract_expsyms_cmds=
  5327 
  5328   case $host_os in
  5329   cygwin* | mingw* | pw32* | cegcc*)
  5330     # FIXME: the MSVC++ port hasn't been tested in a loooong time
  5331     # When not using gcc, we currently assume that we are using
  5332     # Microsoft Visual C++.
  5333     if test "$GCC" != yes; then
  5334       with_gnu_ld=no
  5335     fi
  5336     ;;
  5337   interix*)
  5338     # we just hope/assume this is gcc and not c89 (= MSVC++)
  5339     with_gnu_ld=yes
  5340     ;;
  5341   openbsd*)
  5342     with_gnu_ld=no
  5343     ;;
  5344   esac
  5345 
  5346   _LT_TAGVAR(ld_shlibs, $1)=yes
  5347 
  5348   # On some targets, GNU ld is compatible enough with the native linker
  5349   # that we're better off using the native interface for both.
  5350   lt_use_gnu_ld_interface=no
  5351   if test "$with_gnu_ld" = yes; then
  5352     case $host_os in
  5353       aix*)
  5354 	# The AIX port of GNU ld has always aspired to compatibility
  5355 	# with the native linker.  However, as the warning in the GNU ld
  5356 	# block says, versions before 2.19.5* couldn't really create working
  5357 	# shared libraries, regardless of the interface used.
  5358 	case `$LD -v 2>&1` in
  5359 	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  5360 	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  5361 	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  5362 	  *)
  5363 	    lt_use_gnu_ld_interface=yes
  5364 	    ;;
  5365 	esac
  5366 	;;
  5367       *)
  5368 	lt_use_gnu_ld_interface=yes
  5369 	;;
  5370     esac
  5371   fi
  5372 
  5373   if test "$lt_use_gnu_ld_interface" = yes; then
  5374     # If archive_cmds runs LD, not CC, wlarc should be empty
  5375     wlarc='${wl}'
  5376 
  5377     # Set some defaults for GNU ld with shared library support. These
  5378     # are reset later if shared libraries are not supported. Putting them
  5379     # here allows them to be overridden if necessary.
  5380     runpath_var=LD_RUN_PATH
  5381     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5382     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5383     # ancient GNU ld didn't support --whole-archive et. al.
  5384     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  5385       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5386     else
  5387       _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5388     fi
  5389     supports_anon_versioning=no
  5390     case `$LD -v 2>&1` in
  5391       *GNU\ gold*) supports_anon_versioning=yes ;;
  5392       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  5393       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  5394       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  5395       *\ 2.11.*) ;; # other 2.11 versions
  5396       *) supports_anon_versioning=yes ;;
  5397     esac
  5398 
  5399     # See if GNU ld supports shared libraries.
  5400     case $host_os in
  5401     aix[[3-9]]*)
  5402       # On AIX/PPC, the GNU linker is very broken
  5403       if test "$host_cpu" != ia64; then
  5404 	_LT_TAGVAR(ld_shlibs, $1)=no
  5405 	cat <<_LT_EOF 1>&2
  5406 
  5407 *** Warning: the GNU linker, at least up to release 2.19, is reported
  5408 *** to be unable to reliably create shared libraries on AIX.
  5409 *** Therefore, libtool is disabling shared libraries support.  If you
  5410 *** really care for shared libraries, you may want to install binutils
  5411 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  5412 *** You will then need to restart the configuration process.
  5413 
  5414 _LT_EOF
  5415       fi
  5416       ;;
  5417 
  5418     amigaos*)
  5419       case $host_cpu in
  5420       powerpc)
  5421             # see comment about AmigaOS4 .so support
  5422             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5423             _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5424         ;;
  5425       m68k)
  5426             _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)'
  5427             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5428             _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5429         ;;
  5430       esac
  5431       ;;
  5432 
  5433     beos*)
  5434       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5435 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5436 	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5437 	# support --undefined.  This deserves some investigation.  FIXME
  5438 	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5439       else
  5440 	_LT_TAGVAR(ld_shlibs, $1)=no
  5441       fi
  5442       ;;
  5443 
  5444     cygwin* | mingw* | pw32* | cegcc*)
  5445       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5446       # as there is no search path for DLLs.
  5447       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5448       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5449       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5450       _LT_TAGVAR(always_export_symbols, $1)=no
  5451       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5452       _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'
  5453       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  5454 
  5455       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5456         _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'
  5457 	# If the export-symbols file already is a .def file (1st line
  5458 	# is EXPORTS), use it as is; otherwise, prepend...
  5459 	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5460 	  cp $export_symbols $output_objdir/$soname.def;
  5461 	else
  5462 	  echo EXPORTS > $output_objdir/$soname.def;
  5463 	  cat $export_symbols >> $output_objdir/$soname.def;
  5464 	fi~
  5465 	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5466       else
  5467 	_LT_TAGVAR(ld_shlibs, $1)=no
  5468       fi
  5469       ;;
  5470 
  5471     haiku*)
  5472       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5473       _LT_TAGVAR(link_all_deplibs, $1)=yes
  5474       ;;
  5475 
  5476     interix[[3-9]]*)
  5477       _LT_TAGVAR(hardcode_direct, $1)=no
  5478       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5479       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5480       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5481       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5482       # Instead, shared libraries are loaded at an image base (0x10000000 by
  5483       # default) and relocated if they conflict, which is a slow very memory
  5484       # consuming and fragmenting process.  To avoid this, we pick a random,
  5485       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5486       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
  5487       _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'
  5488       _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'
  5489       ;;
  5490 
  5491     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  5492       tmp_diet=no
  5493       if test "$host_os" = linux-dietlibc; then
  5494 	case $cc_basename in
  5495 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
  5496 	esac
  5497       fi
  5498       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  5499 	 && test "$tmp_diet" = no
  5500       then
  5501 	tmp_addflag=' $pic_flag'
  5502 	tmp_sharedflag='-shared'
  5503 	case $cc_basename,$host_cpu in
  5504         pgcc*)				# Portland Group C compiler
  5505 	  _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'
  5506 	  tmp_addflag=' $pic_flag'
  5507 	  ;;
  5508 	pgf77* | pgf90* | pgf95* | pgfortran*)
  5509 					# Portland Group f77 and f90 compilers
  5510 	  _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'
  5511 	  tmp_addflag=' $pic_flag -Mnomain' ;;
  5512 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
  5513 	  tmp_addflag=' -i_dynamic' ;;
  5514 	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
  5515 	  tmp_addflag=' -i_dynamic -nofor_main' ;;
  5516 	ifc* | ifort*)			# Intel Fortran compiler
  5517 	  tmp_addflag=' -nofor_main' ;;
  5518 	lf95*)				# Lahey Fortran 8.1
  5519 	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5520 	  tmp_sharedflag='--shared' ;;
  5521 	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  5522 	  tmp_sharedflag='-qmkshrobj'
  5523 	  tmp_addflag= ;;
  5524 	nvcc*)	# Cuda Compiler Driver 2.2
  5525 	  _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'
  5526 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
  5527 	  ;;
  5528 	esac
  5529 	case `$CC -V 2>&1 | sed 5q` in
  5530 	*Sun\ C*)			# Sun C 5.9
  5531 	  _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'
  5532 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
  5533 	  tmp_sharedflag='-G' ;;
  5534 	*Sun\ F*)			# Sun Fortran 8.3
  5535 	  tmp_sharedflag='-G' ;;
  5536 	esac
  5537 	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5538 
  5539         if test "x$supports_anon_versioning" = xyes; then
  5540           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5541 	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5542 	    echo "local: *; };" >> $output_objdir/$libname.ver~
  5543 	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5544         fi
  5545 
  5546 	case $cc_basename in
  5547 	xlf* | bgf* | bgxlf* | mpixlf*)
  5548 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  5549 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  5550 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5551 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  5552 	  if test "x$supports_anon_versioning" = xyes; then
  5553 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5554 	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5555 	      echo "local: *; };" >> $output_objdir/$libname.ver~
  5556 	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  5557 	  fi
  5558 	  ;;
  5559 	esac
  5560       else
  5561         _LT_TAGVAR(ld_shlibs, $1)=no
  5562       fi
  5563       ;;
  5564 
  5565     netbsd*)
  5566       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5567 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  5568 	wlarc=
  5569       else
  5570 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5571 	_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'
  5572       fi
  5573       ;;
  5574 
  5575     solaris*)
  5576       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  5577 	_LT_TAGVAR(ld_shlibs, $1)=no
  5578 	cat <<_LT_EOF 1>&2
  5579 
  5580 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  5581 *** create shared libraries on Solaris systems.  Therefore, libtool
  5582 *** is disabling shared libraries support.  We urge you to upgrade GNU
  5583 *** binutils to release 2.9.1 or newer.  Another option is to modify
  5584 *** your PATH or compiler configuration so that the native linker is
  5585 *** used, and then restart.
  5586 
  5587 _LT_EOF
  5588       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5589 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5590 	_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'
  5591       else
  5592 	_LT_TAGVAR(ld_shlibs, $1)=no
  5593       fi
  5594       ;;
  5595 
  5596     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  5597       case `$LD -v 2>&1` in
  5598         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  5599 	_LT_TAGVAR(ld_shlibs, $1)=no
  5600 	cat <<_LT_EOF 1>&2
  5601 
  5602 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  5603 *** reliably create shared libraries on SCO systems.  Therefore, libtool
  5604 *** is disabling shared libraries support.  We urge you to upgrade GNU
  5605 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
  5606 *** your PATH or compiler configuration so that the native linker is
  5607 *** used, and then restart.
  5608 
  5609 _LT_EOF
  5610 	;;
  5611 	*)
  5612 	  # For security reasons, it is highly recommended that you always
  5613 	  # use absolute paths for naming shared libraries, and exclude the
  5614 	  # DT_RUNPATH tag from executables and libraries.  But doing so
  5615 	  # requires that you compile everything twice, which is a pain.
  5616 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5617 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5618 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5619 	    _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'
  5620 	  else
  5621 	    _LT_TAGVAR(ld_shlibs, $1)=no
  5622 	  fi
  5623 	;;
  5624       esac
  5625       ;;
  5626 
  5627     sunos4*)
  5628       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5629       wlarc=
  5630       _LT_TAGVAR(hardcode_direct, $1)=yes
  5631       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5632       ;;
  5633 
  5634     *)
  5635       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5636 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5637 	_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'
  5638       else
  5639 	_LT_TAGVAR(ld_shlibs, $1)=no
  5640       fi
  5641       ;;
  5642     esac
  5643 
  5644     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  5645       runpath_var=
  5646       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5647       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5648       _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5649     fi
  5650   else
  5651     # PORTME fill in a description of your system's linker (not GNU ld)
  5652     case $host_os in
  5653     aix3*)
  5654       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5655       _LT_TAGVAR(always_export_symbols, $1)=yes
  5656       _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'
  5657       # Note: this linker hardcodes the directories in LIBPATH if there
  5658       # are no directories specified by -L.
  5659       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5660       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  5661 	# Neither direct hardcoding nor static linking is supported with a
  5662 	# broken collect2.
  5663 	_LT_TAGVAR(hardcode_direct, $1)=unsupported
  5664       fi
  5665       ;;
  5666 
  5667     aix[[4-9]]*)
  5668       if test "$host_cpu" = ia64; then
  5669 	# On IA64, the linker does run time linking by default, so we don't
  5670 	# have to do anything special.
  5671 	aix_use_runtimelinking=no
  5672 	exp_sym_flag='-Bexport'
  5673 	no_entry_flag=""
  5674       else
  5675 	# If we're using GNU nm, then we don't want the "-C" option.
  5676 	# -C means demangle to AIX nm, but means don't demangle with GNU nm
  5677 	# Also, AIX nm treats weak defined symbols like other global
  5678 	# defined symbols, whereas GNU nm marks them as "W".
  5679 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  5680 	  _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'
  5681 	else
  5682 	  _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'
  5683 	fi
  5684 	aix_use_runtimelinking=no
  5685 
  5686 	# Test if we are trying to use run time linking or normal
  5687 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5688 	# need to do runtime linking.
  5689 	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5690 	  for ld_flag in $LDFLAGS; do
  5691 	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  5692 	    aix_use_runtimelinking=yes
  5693 	    break
  5694 	  fi
  5695 	  done
  5696 	  ;;
  5697 	esac
  5698 
  5699 	exp_sym_flag='-bexport'
  5700 	no_entry_flag='-bnoentry'
  5701       fi
  5702 
  5703       # When large executables or shared objects are built, AIX ld can
  5704       # have problems creating the table of contents.  If linking a library
  5705       # or program results in "error TOC overflow" add -mminimal-toc to
  5706       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
  5707       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5708 
  5709       _LT_TAGVAR(archive_cmds, $1)=''
  5710       _LT_TAGVAR(hardcode_direct, $1)=yes
  5711       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5712       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5713       _LT_TAGVAR(link_all_deplibs, $1)=yes
  5714       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5715 
  5716       if test "$GCC" = yes; then
  5717 	case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5718 	# We only want to do this on AIX 4.2 and lower, the check
  5719 	# below for broken collect2 doesn't work under 4.3+
  5720 	  collect2name=`${CC} -print-prog-name=collect2`
  5721 	  if test -f "$collect2name" &&
  5722 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5723 	  then
  5724 	  # We have reworked collect2
  5725 	  :
  5726 	  else
  5727 	  # We have old collect2
  5728 	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5729 	  # It fails to find uninstalled libraries when the uninstalled
  5730 	  # path is not listed in the libpath.  Setting hardcode_minus_L
  5731 	  # to unsupported forces relinking
  5732 	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5733 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5734 	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5735 	  fi
  5736 	  ;;
  5737 	esac
  5738 	shared_flag='-shared'
  5739 	if test "$aix_use_runtimelinking" = yes; then
  5740 	  shared_flag="$shared_flag "'${wl}-G'
  5741 	fi
  5742       else
  5743 	# not using gcc
  5744 	if test "$host_cpu" = ia64; then
  5745 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5746 	# chokes on -Wl,-G. The following line is correct:
  5747 	  shared_flag='-G'
  5748 	else
  5749 	  if test "$aix_use_runtimelinking" = yes; then
  5750 	    shared_flag='${wl}-G'
  5751 	  else
  5752 	    shared_flag='${wl}-bM:SRE'
  5753 	  fi
  5754 	fi
  5755       fi
  5756 
  5757       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5758       # It seems that -bexpall does not export symbols beginning with
  5759       # underscore (_), so it is better to generate a list of symbols to export.
  5760       _LT_TAGVAR(always_export_symbols, $1)=yes
  5761       if test "$aix_use_runtimelinking" = yes; then
  5762 	# Warning - without using the other runtime loading flags (-brtl),
  5763 	# -berok will link without error, but may produce a broken library.
  5764 	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5765         # Determine the default libpath from the value encoded in an
  5766         # empty executable.
  5767         _LT_SYS_MODULE_PATH_AIX([$1])
  5768         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5769         _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"
  5770       else
  5771 	if test "$host_cpu" = ia64; then
  5772 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5773 	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5774 	  _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"
  5775 	else
  5776 	 # Determine the default libpath from the value encoded in an
  5777 	 # empty executable.
  5778 	 _LT_SYS_MODULE_PATH_AIX([$1])
  5779 	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5780 	  # Warning - without using the other run time loading flags,
  5781 	  # -berok will link without error, but may produce a broken library.
  5782 	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5783 	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5784 	  if test "$with_gnu_ld" = yes; then
  5785 	    # We only use this code for GNU lds that support --whole-archive.
  5786 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5787 	  else
  5788 	    # Exported symbols can be pulled into shared objects from archives
  5789 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5790 	  fi
  5791 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5792 	  # This is similar to how AIX traditionally builds its shared libraries.
  5793 	  _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'
  5794 	fi
  5795       fi
  5796       ;;
  5797 
  5798     amigaos*)
  5799       case $host_cpu in
  5800       powerpc)
  5801             # see comment about AmigaOS4 .so support
  5802             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5803             _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5804         ;;
  5805       m68k)
  5806             _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)'
  5807             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5808             _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5809         ;;
  5810       esac
  5811       ;;
  5812 
  5813     bsdi[[45]]*)
  5814       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5815       ;;
  5816 
  5817     cygwin* | mingw* | pw32* | cegcc*)
  5818       # When not using gcc, we currently assume that we are using
  5819       # Microsoft Visual C++.
  5820       # hardcode_libdir_flag_spec is actually meaningless, as there is
  5821       # no search path for DLLs.
  5822       case $cc_basename in
  5823       cl*)
  5824 	# Native MSVC
  5825 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5826 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5827 	_LT_TAGVAR(always_export_symbols, $1)=yes
  5828 	_LT_TAGVAR(file_list_spec, $1)='@'
  5829 	# Tell ltmain to make .lib files, not .a files.
  5830 	libext=lib
  5831 	# Tell ltmain to make .dll files, not .so files.
  5832 	shrext_cmds=".dll"
  5833 	# FIXME: Setting linknames here is a bad hack.
  5834 	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5835 	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5836 	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5837 	  else
  5838 	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5839 	  fi~
  5840 	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5841 	  linknames='
  5842 	# The linker will not automatically build a static lib if we build a DLL.
  5843 	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5844 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5845 	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5846 	_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'
  5847 	# Don't use ranlib
  5848 	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5849 	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5850 	  lt_tool_outputfile="@TOOL_OUTPUT@"~
  5851 	  case $lt_outputfile in
  5852 	    *.exe|*.EXE) ;;
  5853 	    *)
  5854 	      lt_outputfile="$lt_outputfile.exe"
  5855 	      lt_tool_outputfile="$lt_tool_outputfile.exe"
  5856 	      ;;
  5857 	  esac~
  5858 	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5859 	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5860 	    $RM "$lt_outputfile.manifest";
  5861 	  fi'
  5862 	;;
  5863       *)
  5864 	# Assume MSVC wrapper
  5865 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5866 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5867 	# Tell ltmain to make .lib files, not .a files.
  5868 	libext=lib
  5869 	# Tell ltmain to make .dll files, not .so files.
  5870 	shrext_cmds=".dll"
  5871 	# FIXME: Setting linknames here is a bad hack.
  5872 	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5873 	# The linker will automatically build a .lib file if we build a DLL.
  5874 	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5875 	# FIXME: Should let the user specify the lib program.
  5876 	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5877 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5878 	;;
  5879       esac
  5880       ;;
  5881 
  5882     darwin* | rhapsody*)
  5883       _LT_DARWIN_LINKER_FEATURES($1)
  5884       ;;
  5885 
  5886     dgux*)
  5887       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5888       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5889       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5890       ;;
  5891 
  5892     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5893     # support.  Future versions do this automatically, but an explicit c++rt0.o
  5894     # does not break anything, and helps significantly (at the cost of a little
  5895     # extra space).
  5896     freebsd2.2*)
  5897       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5898       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5899       _LT_TAGVAR(hardcode_direct, $1)=yes
  5900       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5901       ;;
  5902 
  5903     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5904     freebsd2.*)
  5905       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5906       _LT_TAGVAR(hardcode_direct, $1)=yes
  5907       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5908       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5909       ;;
  5910 
  5911     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5912     freebsd* | dragonfly*)
  5913       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5914       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5915       _LT_TAGVAR(hardcode_direct, $1)=yes
  5916       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5917       ;;
  5918 
  5919     hpux9*)
  5920       if test "$GCC" = yes; then
  5921 	_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'
  5922       else
  5923 	_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'
  5924       fi
  5925       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5926       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5927       _LT_TAGVAR(hardcode_direct, $1)=yes
  5928 
  5929       # hardcode_minus_L: Not really in the search PATH,
  5930       # but as the default location of the library.
  5931       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5932       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5933       ;;
  5934 
  5935     hpux10*)
  5936       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  5937 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5938       else
  5939 	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5940       fi
  5941       if test "$with_gnu_ld" = no; then
  5942 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5943 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5944 	_LT_TAGVAR(hardcode_direct, $1)=yes
  5945 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5946 	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5947 	# hardcode_minus_L: Not really in the search PATH,
  5948 	# but as the default location of the library.
  5949 	_LT_TAGVAR(hardcode_minus_L, $1)=yes
  5950       fi
  5951       ;;
  5952 
  5953     hpux11*)
  5954       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  5955 	case $host_cpu in
  5956 	hppa*64*)
  5957 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5958 	  ;;
  5959 	ia64*)
  5960 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5961 	  ;;
  5962 	*)
  5963 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5964 	  ;;
  5965 	esac
  5966       else
  5967 	case $host_cpu in
  5968 	hppa*64*)
  5969 	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5970 	  ;;
  5971 	ia64*)
  5972 	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5973 	  ;;
  5974 	*)
  5975 	m4_if($1, [], [
  5976 	  # Older versions of the 11.00 compiler do not understand -b yet
  5977 	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5978 	  _LT_LINKER_OPTION([if $CC understands -b],
  5979 	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5980 	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5981 	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5982 	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5983 	  ;;
  5984 	esac
  5985       fi
  5986       if test "$with_gnu_ld" = no; then
  5987 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5988 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5989 
  5990 	case $host_cpu in
  5991 	hppa*64*|ia64*)
  5992 	  _LT_TAGVAR(hardcode_direct, $1)=no
  5993 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5994 	  ;;
  5995 	*)
  5996 	  _LT_TAGVAR(hardcode_direct, $1)=yes
  5997 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5998 	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5999 
  6000 	  # hardcode_minus_L: Not really in the search PATH,
  6001 	  # but as the default location of the library.
  6002 	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6003 	  ;;
  6004 	esac
  6005       fi
  6006       ;;
  6007 
  6008     irix5* | irix6* | nonstopux*)
  6009       if test "$GCC" = yes; then
  6010 	_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'
  6011 	# Try to use the -exported_symbol ld option, if it does not
  6012 	# work, assume that -exports_file does not work either and
  6013 	# implicitly export all symbols.
  6014 	# This should be the same for all languages, so no per-tag cache variable.
  6015 	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  6016 	  [lt_cv_irix_exported_symbol],
  6017 	  [save_LDFLAGS="$LDFLAGS"
  6018 	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  6019 	   AC_LINK_IFELSE(
  6020 	     [AC_LANG_SOURCE(
  6021 	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  6022 			      [C++], [[int foo (void) { return 0; }]],
  6023 			      [Fortran 77], [[
  6024       subroutine foo
  6025       end]],
  6026 			      [Fortran], [[
  6027       subroutine foo
  6028       end]])])],
  6029 	      [lt_cv_irix_exported_symbol=yes],
  6030 	      [lt_cv_irix_exported_symbol=no])
  6031            LDFLAGS="$save_LDFLAGS"])
  6032 	if test "$lt_cv_irix_exported_symbol" = yes; then
  6033           _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'
  6034 	fi
  6035       else
  6036 	_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'
  6037 	_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'
  6038       fi
  6039       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  6040       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6041       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6042       _LT_TAGVAR(inherit_rpath, $1)=yes
  6043       _LT_TAGVAR(link_all_deplibs, $1)=yes
  6044       ;;
  6045 
  6046     netbsd*)
  6047       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6048 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
  6049       else
  6050 	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
  6051       fi
  6052       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6053       _LT_TAGVAR(hardcode_direct, $1)=yes
  6054       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6055       ;;
  6056 
  6057     newsos6)
  6058       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6059       _LT_TAGVAR(hardcode_direct, $1)=yes
  6060       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6061       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6062       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6063       ;;
  6064 
  6065     *nto* | *qnx*)
  6066       ;;
  6067 
  6068     openbsd*)
  6069       if test -f /usr/libexec/ld.so; then
  6070 	_LT_TAGVAR(hardcode_direct, $1)=yes
  6071 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6072 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6073 	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6074 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6075 	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  6076 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6077 	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6078 	else
  6079 	  case $host_os in
  6080 	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  6081 	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  6082 	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6083 	     ;;
  6084 	   *)
  6085 	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6086 	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6087 	     ;;
  6088 	  esac
  6089 	fi
  6090       else
  6091 	_LT_TAGVAR(ld_shlibs, $1)=no
  6092       fi
  6093       ;;
  6094 
  6095     os2*)
  6096       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6097       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6098       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6099       _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'
  6100       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  6101       ;;
  6102 
  6103     osf3*)
  6104       if test "$GCC" = yes; then
  6105 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6106 	_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'
  6107       else
  6108 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6109 	_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'
  6110       fi
  6111       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  6112       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6113       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6114       ;;
  6115 
  6116     osf4* | osf5*)	# as osf3* with the addition of -msym flag
  6117       if test "$GCC" = yes; then
  6118 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6119 	_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'
  6120 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6121       else
  6122 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6123 	_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'
  6124 	_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~
  6125 	$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'
  6126 
  6127 	# Both c and cxx compiler support -rpath directly
  6128 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6129       fi
  6130       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  6131       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6132       ;;
  6133 
  6134     solaris*)
  6135       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  6136       if test "$GCC" = yes; then
  6137 	wlarc='${wl}'
  6138 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6139 	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6140 	  $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'
  6141       else
  6142 	case `$CC -V 2>&1` in
  6143 	*"Compilers 5.0"*)
  6144 	  wlarc=''
  6145 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6146 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6147 	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  6148 	  ;;
  6149 	*)
  6150 	  wlarc='${wl}'
  6151 	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  6152 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6153 	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  6154 	  ;;
  6155 	esac
  6156       fi
  6157       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6158       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6159       case $host_os in
  6160       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6161       *)
  6162 	# The compiler driver will combine and reorder linker options,
  6163 	# but understands `-z linker_flag'.  GCC discards it without `$wl',
  6164 	# but is careful enough not to reorder.
  6165 	# Supported since Solaris 2.6 (maybe 2.5.1?)
  6166 	if test "$GCC" = yes; then
  6167 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6168 	else
  6169 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6170 	fi
  6171 	;;
  6172       esac
  6173       _LT_TAGVAR(link_all_deplibs, $1)=yes
  6174       ;;
  6175 
  6176     sunos4*)
  6177       if test "x$host_vendor" = xsequent; then
  6178 	# Use $CC to link under sequent, because it throws in some extra .o
  6179 	# files that make .init and .fini sections work.
  6180 	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  6181       else
  6182 	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  6183       fi
  6184       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6185       _LT_TAGVAR(hardcode_direct, $1)=yes
  6186       _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6187       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6188       ;;
  6189 
  6190     sysv4)
  6191       case $host_vendor in
  6192 	sni)
  6193 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6194 	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  6195 	;;
  6196 	siemens)
  6197 	  ## LD is ld it makes a PLAMLIB
  6198 	  ## CC just makes a GrossModule.
  6199 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  6200 	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  6201 	  _LT_TAGVAR(hardcode_direct, $1)=no
  6202         ;;
  6203 	motorola)
  6204 	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6205 	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  6206 	;;
  6207       esac
  6208       runpath_var='LD_RUN_PATH'
  6209       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6210       ;;
  6211 
  6212     sysv4.3*)
  6213       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6214       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6215       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  6216       ;;
  6217 
  6218     sysv4*MP*)
  6219       if test -d /usr/nec; then
  6220 	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6221 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6222 	runpath_var=LD_RUN_PATH
  6223 	hardcode_runpath_var=yes
  6224 	_LT_TAGVAR(ld_shlibs, $1)=yes
  6225       fi
  6226       ;;
  6227 
  6228     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6229       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6230       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6231       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6232       runpath_var='LD_RUN_PATH'
  6233 
  6234       if test "$GCC" = yes; then
  6235 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6236 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6237       else
  6238 	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6239 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6240       fi
  6241       ;;
  6242 
  6243     sysv5* | sco3.2v5* | sco5v6*)
  6244       # Note: We can NOT use -z defs as we might desire, because we do not
  6245       # link with -lc, and that would cause any symbols used from libc to
  6246       # always be unresolved, which means just about no library would
  6247       # ever link correctly.  If we're not using GNU ld we use -z text
  6248       # though, which does catch some bad symbols but isn't as heavy-handed
  6249       # as -z defs.
  6250       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6251       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6252       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6253       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6254       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6255       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6256       _LT_TAGVAR(link_all_deplibs, $1)=yes
  6257       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6258       runpath_var='LD_RUN_PATH'
  6259 
  6260       if test "$GCC" = yes; then
  6261 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6262 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6263       else
  6264 	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6265 	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6266       fi
  6267       ;;
  6268 
  6269     uts4*)
  6270       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6271       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6272       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6273       ;;
  6274 
  6275     *)
  6276       _LT_TAGVAR(ld_shlibs, $1)=no
  6277       ;;
  6278     esac
  6279 
  6280     if test x$host_vendor = xsni; then
  6281       case $host in
  6282       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  6283 	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  6284 	;;
  6285       esac
  6286     fi
  6287   fi
  6288 ])
  6289 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6290 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6291 
  6292 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  6293 
  6294 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  6295 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  6296 _LT_DECL([], [extract_expsyms_cmds], [2],
  6297     [The commands to extract the exported symbol list from a shared archive])
  6298 
  6299 #
  6300 # Do we need to explicitly link libc?
  6301 #
  6302 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  6303 x|xyes)
  6304   # Assume -lc should be added
  6305   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6306 
  6307   if test "$enable_shared" = yes && test "$GCC" = yes; then
  6308     case $_LT_TAGVAR(archive_cmds, $1) in
  6309     *'~'*)
  6310       # FIXME: we may have to deal with multi-command sequences.
  6311       ;;
  6312     '$CC '*)
  6313       # Test whether the compiler implicitly links with -lc since on some
  6314       # systems, -lgcc has to come before -lc. If gcc already passes -lc
  6315       # to ld, don't add -lc before -lgcc.
  6316       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  6317 	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  6318 	[$RM conftest*
  6319 	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  6320 
  6321 	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  6322 	  soname=conftest
  6323 	  lib=conftest
  6324 	  libobjs=conftest.$ac_objext
  6325 	  deplibs=
  6326 	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  6327 	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  6328 	  compiler_flags=-v
  6329 	  linker_flags=-v
  6330 	  verstring=
  6331 	  output_objdir=.
  6332 	  libname=conftest
  6333 	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  6334 	  _LT_TAGVAR(allow_undefined_flag, $1)=
  6335 	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  6336 	  then
  6337 	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6338 	  else
  6339 	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6340 	  fi
  6341 	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  6342 	else
  6343 	  cat conftest.err 1>&5
  6344 	fi
  6345 	$RM conftest*
  6346 	])
  6347       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  6348       ;;
  6349     esac
  6350   fi
  6351   ;;
  6352 esac
  6353 
  6354 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  6355     [Whether or not to add -lc for building shared libraries])
  6356 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  6357     [enable_shared_with_static_runtimes], [0],
  6358     [Whether or not to disallow shared libs when runtime libs are static])
  6359 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  6360     [Compiler flag to allow reflexive dlopens])
  6361 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  6362     [Compiler flag to generate shared objects directly from archives])
  6363 _LT_TAGDECL([], [compiler_needs_object], [1],
  6364     [Whether the compiler copes with passing no objects directly])
  6365 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  6366     [Create an old-style archive from a shared archive])
  6367 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  6368     [Create a temporary old-style archive to link instead of a shared archive])
  6369 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  6370 _LT_TAGDECL([], [archive_expsym_cmds], [2])
  6371 _LT_TAGDECL([], [module_cmds], [2],
  6372     [Commands used to build a loadable module if different from building
  6373     a shared archive.])
  6374 _LT_TAGDECL([], [module_expsym_cmds], [2])
  6375 _LT_TAGDECL([], [with_gnu_ld], [1],
  6376     [Whether we are building with GNU ld or not])
  6377 _LT_TAGDECL([], [allow_undefined_flag], [1],
  6378     [Flag that allows shared libraries with undefined symbols to be built])
  6379 _LT_TAGDECL([], [no_undefined_flag], [1],
  6380     [Flag that enforces no undefined symbols])
  6381 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  6382     [Flag to hardcode $libdir into a binary during linking.
  6383     This must work even if $libdir does not exist])
  6384 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  6385     [Whether we need a single "-rpath" flag with a separated argument])
  6386 _LT_TAGDECL([], [hardcode_direct], [0],
  6387     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  6388     DIR into the resulting binary])
  6389 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  6390     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  6391     DIR into the resulting binary and the resulting library dependency is
  6392     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  6393     library is relocated])
  6394 _LT_TAGDECL([], [hardcode_minus_L], [0],
  6395     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  6396     into the resulting binary])
  6397 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  6398     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  6399     into the resulting binary])
  6400 _LT_TAGDECL([], [hardcode_automatic], [0],
  6401     [Set to "yes" if building a shared library automatically hardcodes DIR
  6402     into the library and all subsequent libraries and executables linked
  6403     against it])
  6404 _LT_TAGDECL([], [inherit_rpath], [0],
  6405     [Set to yes if linker adds runtime paths of dependent libraries
  6406     to runtime path list])
  6407 _LT_TAGDECL([], [link_all_deplibs], [0],
  6408     [Whether libtool must link a program against all its dependency libraries])
  6409 _LT_TAGDECL([], [always_export_symbols], [0],
  6410     [Set to "yes" if exported symbols are required])
  6411 _LT_TAGDECL([], [export_symbols_cmds], [2],
  6412     [The commands to list exported symbols])
  6413 _LT_TAGDECL([], [exclude_expsyms], [1],
  6414     [Symbols that should not be listed in the preloaded symbols])
  6415 _LT_TAGDECL([], [include_expsyms], [1],
  6416     [Symbols that must always be exported])
  6417 _LT_TAGDECL([], [prelink_cmds], [2],
  6418     [Commands necessary for linking programs (against libraries) with templates])
  6419 _LT_TAGDECL([], [postlink_cmds], [2],
  6420     [Commands necessary for finishing linking programs])
  6421 _LT_TAGDECL([], [file_list_spec], [1],
  6422     [Specify filename containing input files])
  6423 dnl FIXME: Not yet implemented
  6424 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  6425 dnl    [Compiler flag to generate thread safe objects])
  6426 ])# _LT_LINKER_SHLIBS
  6427 
  6428 
  6429 # _LT_LANG_C_CONFIG([TAG])
  6430 # ------------------------
  6431 # Ensure that the configuration variables for a C compiler are suitably
  6432 # defined.  These variables are subsequently used by _LT_CONFIG to write
  6433 # the compiler configuration to `libtool'.
  6434 m4_defun([_LT_LANG_C_CONFIG],
  6435 [m4_require([_LT_DECL_EGREP])dnl
  6436 lt_save_CC="$CC"
  6437 AC_LANG_PUSH(C)
  6438 
  6439 # Source file extension for C test sources.
  6440 ac_ext=c
  6441 
  6442 # Object file extension for compiled C test sources.
  6443 objext=o
  6444 _LT_TAGVAR(objext, $1)=$objext
  6445 
  6446 # Code to be used in simple compile tests
  6447 lt_simple_compile_test_code="int some_variable = 0;"
  6448 
  6449 # Code to be used in simple link tests
  6450 lt_simple_link_test_code='int main(){return(0);}'
  6451 
  6452 _LT_TAG_COMPILER
  6453 # Save the default compiler, since it gets overwritten when the other
  6454 # tags are being tested, and _LT_TAGVAR(