aclocal.m4
changeset 5310 a9945ce48999
child 6442 2d3caa191dc4
equal deleted inserted replaced
5309:da080d3247c9 5310:a9945ce48999
       
     1 define(AC_CHECK_DEFINE,[dnl
       
     2   AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1,
       
     3     AC_EGREP_CPP([YES_IS_DEFINED], [
       
     4 #include <$2>
       
     5 #ifdef $1
       
     6 YES_IS_DEFINED
       
     7 #endif
       
     8     ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
       
     9   )
       
    10   if test "$ac_cv_define_$1" = "yes" ; then
       
    11     AC_DEFINE([HAVE_$1],[],[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.2.6a
       
   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 Free Software Foundation, Inc.
       
   704 #   Written by Gordon Matzigkeit, 1996
       
   705 #
       
   706 # This file is free software; the Free Software Foundation gives
       
   707 # unlimited permission to copy and/or distribute it, with or without
       
   708 # modifications, as long as this notice is preserved.
       
   709 
       
   710 m4_define([_LT_COPYING], [dnl
       
   711 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
       
   712 #                 2006, 2007, 2008 Free Software Foundation, Inc.
       
   713 #   Written by Gordon Matzigkeit, 1996
       
   714 #
       
   715 #   This file is part of GNU Libtool.
       
   716 #
       
   717 # GNU Libtool is free software; you can redistribute it and/or
       
   718 # modify it under the terms of the GNU General Public License as
       
   719 # published by the Free Software Foundation; either version 2 of
       
   720 # the License, or (at your option) any later version.
       
   721 #
       
   722 # As a special exception to the GNU General Public License,
       
   723 # if you distribute this file as part of a program or library that
       
   724 # is built using GNU Libtool, you may include this file under the
       
   725 # same distribution terms that you use for the rest of that program.
       
   726 #
       
   727 # GNU Libtool is distributed in the hope that it will be useful,
       
   728 # but WITHOUT ANY WARRANTY; without even the implied warranty of
       
   729 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
   730 # GNU General Public License for more details.
       
   731 #
       
   732 # You should have received a copy of the GNU General Public License
       
   733 # along with GNU Libtool; see the file COPYING.  If not, a copy
       
   734 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
       
   735 # obtained by writing to the Free Software Foundation, Inc.,
       
   736 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       
   737 ])
       
   738 
       
   739 # serial 56 LT_INIT
       
   740 
       
   741 
       
   742 # LT_PREREQ(VERSION)
       
   743 # ------------------
       
   744 # Complain and exit if this libtool version is less that VERSION.
       
   745 m4_defun([LT_PREREQ],
       
   746 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
       
   747        [m4_default([$3],
       
   748 		   [m4_fatal([Libtool version $1 or higher is required],
       
   749 		             63)])],
       
   750        [$2])])
       
   751 
       
   752 
       
   753 # _LT_CHECK_BUILDDIR
       
   754 # ------------------
       
   755 # Complain if the absolute build directory name contains unusual characters
       
   756 m4_defun([_LT_CHECK_BUILDDIR],
       
   757 [case `pwd` in
       
   758   *\ * | *\	*)
       
   759     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
       
   760 esac
       
   761 ])
       
   762 
       
   763 
       
   764 # LT_INIT([OPTIONS])
       
   765 # ------------------
       
   766 AC_DEFUN([LT_INIT],
       
   767 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
       
   768 AC_BEFORE([$0], [LT_LANG])dnl
       
   769 AC_BEFORE([$0], [LT_OUTPUT])dnl
       
   770 AC_BEFORE([$0], [LTDL_INIT])dnl
       
   771 m4_require([_LT_CHECK_BUILDDIR])dnl
       
   772 
       
   773 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
       
   774 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
       
   775 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
       
   776 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
       
   777 dnl unless we require an AC_DEFUNed macro:
       
   778 AC_REQUIRE([LTOPTIONS_VERSION])dnl
       
   779 AC_REQUIRE([LTSUGAR_VERSION])dnl
       
   780 AC_REQUIRE([LTVERSION_VERSION])dnl
       
   781 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
       
   782 m4_require([_LT_PROG_LTMAIN])dnl
       
   783 
       
   784 dnl Parse OPTIONS
       
   785 _LT_SET_OPTIONS([$0], [$1])
       
   786 
       
   787 # This can be used to rebuild libtool when needed
       
   788 LIBTOOL_DEPS="$ltmain"
       
   789 
       
   790 # Always use our own libtool.
       
   791 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
       
   792 AC_SUBST(LIBTOOL)dnl
       
   793 
       
   794 _LT_SETUP
       
   795 
       
   796 # Only expand once:
       
   797 m4_define([LT_INIT])
       
   798 ])# LT_INIT
       
   799 
       
   800 # Old names:
       
   801 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
       
   802 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
       
   803 dnl aclocal-1.4 backwards compatibility:
       
   804 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
       
   805 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
       
   806 
       
   807 
       
   808 # _LT_CC_BASENAME(CC)
       
   809 # -------------------
       
   810 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
       
   811 m4_defun([_LT_CC_BASENAME],
       
   812 [for cc_temp in $1""; do
       
   813   case $cc_temp in
       
   814     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
       
   815     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
       
   816     \-*) ;;
       
   817     *) break;;
       
   818   esac
       
   819 done
       
   820 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
       
   821 ])
       
   822 
       
   823 
       
   824 # _LT_FILEUTILS_DEFAULTS
       
   825 # ----------------------
       
   826 # It is okay to use these file commands and assume they have been set
       
   827 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
       
   828 m4_defun([_LT_FILEUTILS_DEFAULTS],
       
   829 [: ${CP="cp -f"}
       
   830 : ${MV="mv -f"}
       
   831 : ${RM="rm -f"}
       
   832 ])# _LT_FILEUTILS_DEFAULTS
       
   833 
       
   834 
       
   835 # _LT_SETUP
       
   836 # ---------
       
   837 m4_defun([_LT_SETUP],
       
   838 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
       
   839 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
       
   840 _LT_DECL([], [host_alias], [0], [The host system])dnl
       
   841 _LT_DECL([], [host], [0])dnl
       
   842 _LT_DECL([], [host_os], [0])dnl
       
   843 dnl
       
   844 _LT_DECL([], [build_alias], [0], [The build system])dnl
       
   845 _LT_DECL([], [build], [0])dnl
       
   846 _LT_DECL([], [build_os], [0])dnl
       
   847 dnl
       
   848 AC_REQUIRE([AC_PROG_CC])dnl
       
   849 AC_REQUIRE([LT_PATH_LD])dnl
       
   850 AC_REQUIRE([LT_PATH_NM])dnl
       
   851 dnl
       
   852 AC_REQUIRE([AC_PROG_LN_S])dnl
       
   853 test -z "$LN_S" && LN_S="ln -s"
       
   854 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
       
   855 dnl
       
   856 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
       
   857 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
       
   858 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
       
   859 dnl
       
   860 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
       
   861 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
       
   862 m4_require([_LT_CMD_RELOAD])dnl
       
   863 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
       
   864 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
       
   865 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
       
   866 
       
   867 _LT_CONFIG_LIBTOOL_INIT([
       
   868 # See if we are running on zsh, and set the options which allow our
       
   869 # commands through without removal of \ escapes INIT.
       
   870 if test -n "\${ZSH_VERSION+set}" ; then
       
   871    setopt NO_GLOB_SUBST
       
   872 fi
       
   873 ])
       
   874 if test -n "${ZSH_VERSION+set}" ; then
       
   875    setopt NO_GLOB_SUBST
       
   876 fi
       
   877 
       
   878 _LT_CHECK_OBJDIR
       
   879 
       
   880 m4_require([_LT_TAG_COMPILER])dnl
       
   881 _LT_PROG_ECHO_BACKSLASH
       
   882 
       
   883 case $host_os in
       
   884 aix3*)
       
   885   # AIX sometimes has problems with the GCC collect2 program.  For some
       
   886   # reason, if we set the COLLECT_NAMES environment variable, the problems
       
   887   # vanish in a puff of smoke.
       
   888   if test "X${COLLECT_NAMES+set}" != Xset; then
       
   889     COLLECT_NAMES=
       
   890     export COLLECT_NAMES
       
   891   fi
       
   892   ;;
       
   893 esac
       
   894 
       
   895 # Sed substitution that helps us do robust quoting.  It backslashifies
       
   896 # metacharacters that are still active within double-quoted strings.
       
   897 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
       
   898 
       
   899 # Same as above, but do not quote variable references.
       
   900 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
       
   901 
       
   902 # Sed substitution to delay expansion of an escaped shell variable in a
       
   903 # double_quote_subst'ed string.
       
   904 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
       
   905 
       
   906 # Sed substitution to delay expansion of an escaped single quote.
       
   907 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
       
   908 
       
   909 # Sed substitution to avoid accidental globbing in evaled expressions
       
   910 no_glob_subst='s/\*/\\\*/g'
       
   911 
       
   912 # Global variables:
       
   913 ofile=libtool
       
   914 can_build_shared=yes
       
   915 
       
   916 # All known linkers require a `.a' archive for static linking (except MSVC,
       
   917 # which needs '.lib').
       
   918 libext=a
       
   919 
       
   920 with_gnu_ld="$lt_cv_prog_gnu_ld"
       
   921 
       
   922 old_CC="$CC"
       
   923 old_CFLAGS="$CFLAGS"
       
   924 
       
   925 # Set sane defaults for various variables
       
   926 test -z "$CC" && CC=cc
       
   927 test -z "$LTCC" && LTCC=$CC
       
   928 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
       
   929 test -z "$LD" && LD=ld
       
   930 test -z "$ac_objext" && ac_objext=o
       
   931 
       
   932 _LT_CC_BASENAME([$compiler])
       
   933 
       
   934 # Only perform the check for file, if the check method requires it
       
   935 test -z "$MAGIC_CMD" && MAGIC_CMD=file
       
   936 case $deplibs_check_method in
       
   937 file_magic*)
       
   938   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
       
   939     _LT_PATH_MAGIC
       
   940   fi
       
   941   ;;
       
   942 esac
       
   943 
       
   944 # Use C for the default configuration in the libtool script
       
   945 LT_SUPPORTED_TAG([CC])
       
   946 _LT_LANG_C_CONFIG
       
   947 _LT_LANG_DEFAULT_CONFIG
       
   948 _LT_CONFIG_COMMANDS
       
   949 ])# _LT_SETUP
       
   950 
       
   951 
       
   952 # _LT_PROG_LTMAIN
       
   953 # ---------------
       
   954 # Note that this code is called both from `configure', and `config.status'
       
   955 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
       
   956 # `config.status' has no value for ac_aux_dir unless we are using Automake,
       
   957 # so we pass a copy along to make sure it has a sensible value anyway.
       
   958 m4_defun([_LT_PROG_LTMAIN],
       
   959 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
       
   960 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
       
   961 ltmain="$ac_aux_dir/ltmain.sh"
       
   962 ])# _LT_PROG_LTMAIN
       
   963 
       
   964 
       
   965 ## ------------------------------------- ##
       
   966 ## Accumulate code for creating libtool. ##
       
   967 ## ------------------------------------- ##
       
   968 
       
   969 # So that we can recreate a full libtool script including additional
       
   970 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
       
   971 # in macros and then make a single call at the end using the `libtool'
       
   972 # label.
       
   973 
       
   974 
       
   975 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
       
   976 # ----------------------------------------
       
   977 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
       
   978 m4_define([_LT_CONFIG_LIBTOOL_INIT],
       
   979 [m4_ifval([$1],
       
   980           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
       
   981                      [$1
       
   982 ])])])
       
   983 
       
   984 # Initialize.
       
   985 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
       
   986 
       
   987 
       
   988 # _LT_CONFIG_LIBTOOL([COMMANDS])
       
   989 # ------------------------------
       
   990 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
       
   991 m4_define([_LT_CONFIG_LIBTOOL],
       
   992 [m4_ifval([$1],
       
   993           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
       
   994                      [$1
       
   995 ])])])
       
   996 
       
   997 # Initialize.
       
   998 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
       
   999 
       
  1000 
       
  1001 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
       
  1002 # -----------------------------------------------------
       
  1003 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
       
  1004 [_LT_CONFIG_LIBTOOL([$1])
       
  1005 _LT_CONFIG_LIBTOOL_INIT([$2])
       
  1006 ])
       
  1007 
       
  1008 
       
  1009 # _LT_FORMAT_COMMENT([COMMENT])
       
  1010 # -----------------------------
       
  1011 # Add leading comment marks to the start of each line, and a trailing
       
  1012 # full-stop to the whole comment if one is not present already.
       
  1013 m4_define([_LT_FORMAT_COMMENT],
       
  1014 [m4_ifval([$1], [
       
  1015 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
       
  1016               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
       
  1017 )])
       
  1018 
       
  1019 
       
  1020 
       
  1021 ## ------------------------ ##
       
  1022 ## FIXME: Eliminate VARNAME ##
       
  1023 ## ------------------------ ##
       
  1024 
       
  1025 
       
  1026 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
       
  1027 # -------------------------------------------------------------------
       
  1028 # CONFIGNAME is the name given to the value in the libtool script.
       
  1029 # VARNAME is the (base) name used in the configure script.
       
  1030 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
       
  1031 # VARNAME.  Any other value will be used directly.
       
  1032 m4_define([_LT_DECL],
       
  1033 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
       
  1034     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
       
  1035 	[m4_ifval([$1], [$1], [$2])])
       
  1036     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
       
  1037     m4_ifval([$4],
       
  1038 	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
       
  1039     lt_dict_add_subkey([lt_decl_dict], [$2],
       
  1040 	[tagged?], [m4_ifval([$5], [yes], [no])])])
       
  1041 ])
       
  1042 
       
  1043 
       
  1044 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
       
  1045 # --------------------------------------------------------
       
  1046 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
       
  1047 
       
  1048 
       
  1049 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
       
  1050 # ------------------------------------------------
       
  1051 m4_define([lt_decl_tag_varnames],
       
  1052 [_lt_decl_filter([tagged?], [yes], $@)])
       
  1053 
       
  1054 
       
  1055 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
       
  1056 # ---------------------------------------------------------
       
  1057 m4_define([_lt_decl_filter],
       
  1058 [m4_case([$#],
       
  1059   [0], [m4_fatal([$0: too few arguments: $#])],
       
  1060   [1], [m4_fatal([$0: too few arguments: $#: $1])],
       
  1061   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
       
  1062   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
       
  1063   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
       
  1064 ])
       
  1065 
       
  1066 
       
  1067 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
       
  1068 # --------------------------------------------------
       
  1069 m4_define([lt_decl_quote_varnames],
       
  1070 [_lt_decl_filter([value], [1], $@)])
       
  1071 
       
  1072 
       
  1073 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
       
  1074 # ---------------------------------------------------
       
  1075 m4_define([lt_decl_dquote_varnames],
       
  1076 [_lt_decl_filter([value], [2], $@)])
       
  1077 
       
  1078 
       
  1079 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
       
  1080 # ---------------------------------------------------
       
  1081 m4_define([lt_decl_varnames_tagged],
       
  1082 [m4_assert([$# <= 2])dnl
       
  1083 _$0(m4_quote(m4_default([$1], [[, ]])),
       
  1084     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
       
  1085     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
       
  1086 m4_define([_lt_decl_varnames_tagged],
       
  1087 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
       
  1088 
       
  1089 
       
  1090 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
       
  1091 # ------------------------------------------------
       
  1092 m4_define([lt_decl_all_varnames],
       
  1093 [_$0(m4_quote(m4_default([$1], [[, ]])),
       
  1094      m4_if([$2], [],
       
  1095 	   m4_quote(lt_decl_varnames),
       
  1096 	m4_quote(m4_shift($@))))[]dnl
       
  1097 ])
       
  1098 m4_define([_lt_decl_all_varnames],
       
  1099 [lt_join($@, lt_decl_varnames_tagged([$1],
       
  1100 			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
       
  1101 ])
       
  1102 
       
  1103 
       
  1104 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
       
  1105 # ------------------------------------
       
  1106 # Quote a variable value, and forward it to `config.status' so that its
       
  1107 # declaration there will have the same value as in `configure'.  VARNAME
       
  1108 # must have a single quote delimited value for this to work.
       
  1109 m4_define([_LT_CONFIG_STATUS_DECLARE],
       
  1110 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
       
  1111 
       
  1112 
       
  1113 # _LT_CONFIG_STATUS_DECLARATIONS
       
  1114 # ------------------------------
       
  1115 # We delimit libtool config variables with single quotes, so when
       
  1116 # we write them to config.status, we have to be sure to quote all
       
  1117 # embedded single quotes properly.  In configure, this macro expands
       
  1118 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
       
  1119 #
       
  1120 #    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
       
  1121 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
       
  1122 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
       
  1123     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
       
  1124 
       
  1125 
       
  1126 # _LT_LIBTOOL_TAGS
       
  1127 # ----------------
       
  1128 # Output comment and list of tags supported by the script
       
  1129 m4_defun([_LT_LIBTOOL_TAGS],
       
  1130 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
       
  1131 available_tags="_LT_TAGS"dnl
       
  1132 ])
       
  1133 
       
  1134 
       
  1135 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
       
  1136 # -----------------------------------
       
  1137 # Extract the dictionary values for VARNAME (optionally with TAG) and
       
  1138 # expand to a commented shell variable setting:
       
  1139 #
       
  1140 #    # Some comment about what VAR is for.
       
  1141 #    visible_name=$lt_internal_name
       
  1142 m4_define([_LT_LIBTOOL_DECLARE],
       
  1143 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
       
  1144 					   [description])))[]dnl
       
  1145 m4_pushdef([_libtool_name],
       
  1146     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
       
  1147 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
       
  1148     [0], [_libtool_name=[$]$1],
       
  1149     [1], [_libtool_name=$lt_[]$1],
       
  1150     [2], [_libtool_name=$lt_[]$1],
       
  1151     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
       
  1152 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
       
  1153 ])
       
  1154 
       
  1155 
       
  1156 # _LT_LIBTOOL_CONFIG_VARS
       
  1157 # -----------------------
       
  1158 # Produce commented declarations of non-tagged libtool config variables
       
  1159 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
       
  1160 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
       
  1161 # section) are produced by _LT_LIBTOOL_TAG_VARS.
       
  1162 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
       
  1163 [m4_foreach([_lt_var],
       
  1164     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
       
  1165     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
       
  1166 
       
  1167 
       
  1168 # _LT_LIBTOOL_TAG_VARS(TAG)
       
  1169 # -------------------------
       
  1170 m4_define([_LT_LIBTOOL_TAG_VARS],
       
  1171 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
       
  1172     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
       
  1173 
       
  1174 
       
  1175 # _LT_TAGVAR(VARNAME, [TAGNAME])
       
  1176 # ------------------------------
       
  1177 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
       
  1178 
       
  1179 
       
  1180 # _LT_CONFIG_COMMANDS
       
  1181 # -------------------
       
  1182 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
       
  1183 # variables for single and double quote escaping we saved from calls
       
  1184 # to _LT_DECL, we can put quote escaped variables declarations
       
  1185 # into `config.status', and then the shell code to quote escape them in
       
  1186 # for loops in `config.status'.  Finally, any additional code accumulated
       
  1187 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
       
  1188 m4_defun([_LT_CONFIG_COMMANDS],
       
  1189 [AC_PROVIDE_IFELSE([LT_OUTPUT],
       
  1190 	dnl If the libtool generation code has been placed in $CONFIG_LT,
       
  1191 	dnl instead of duplicating it all over again into config.status,
       
  1192 	dnl then we will have config.status run $CONFIG_LT later, so it
       
  1193 	dnl needs to know what name is stored there:
       
  1194         [AC_CONFIG_COMMANDS([libtool],
       
  1195             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
       
  1196     dnl If the libtool generation code is destined for config.status,
       
  1197     dnl expand the accumulated commands and init code now:
       
  1198     [AC_CONFIG_COMMANDS([libtool],
       
  1199         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
       
  1200 ])#_LT_CONFIG_COMMANDS
       
  1201 
       
  1202 
       
  1203 # Initialize.
       
  1204 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
       
  1205 [
       
  1206 
       
  1207 # The HP-UX ksh and POSIX shell print the target directory to stdout
       
  1208 # if CDPATH is set.
       
  1209 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
       
  1210 
       
  1211 sed_quote_subst='$sed_quote_subst'
       
  1212 double_quote_subst='$double_quote_subst'
       
  1213 delay_variable_subst='$delay_variable_subst'
       
  1214 _LT_CONFIG_STATUS_DECLARATIONS
       
  1215 LTCC='$LTCC'
       
  1216 LTCFLAGS='$LTCFLAGS'
       
  1217 compiler='$compiler_DEFAULT'
       
  1218 
       
  1219 # Quote evaled strings.
       
  1220 for var in lt_decl_all_varnames([[ \
       
  1221 ]], lt_decl_quote_varnames); do
       
  1222     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
       
  1223     *[[\\\\\\\`\\"\\\$]]*)
       
  1224       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       
  1225       ;;
       
  1226     *)
       
  1227       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
       
  1228       ;;
       
  1229     esac
       
  1230 done
       
  1231 
       
  1232 # Double-quote double-evaled strings.
       
  1233 for var in lt_decl_all_varnames([[ \
       
  1234 ]], lt_decl_dquote_varnames); do
       
  1235     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
       
  1236     *[[\\\\\\\`\\"\\\$]]*)
       
  1237       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       
  1238       ;;
       
  1239     *)
       
  1240       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
       
  1241       ;;
       
  1242     esac
       
  1243 done
       
  1244 
       
  1245 # Fix-up fallback echo if it was mangled by the above quoting rules.
       
  1246 case \$lt_ECHO in
       
  1247 *'\\\[$]0 --fallback-echo"')dnl "
       
  1248   lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
       
  1249   ;;
       
  1250 esac
       
  1251 
       
  1252 _LT_OUTPUT_LIBTOOL_INIT
       
  1253 ])
       
  1254 
       
  1255 
       
  1256 # LT_OUTPUT
       
  1257 # ---------
       
  1258 # This macro allows early generation of the libtool script (before
       
  1259 # AC_OUTPUT is called), incase it is used in configure for compilation
       
  1260 # tests.
       
  1261 AC_DEFUN([LT_OUTPUT],
       
  1262 [: ${CONFIG_LT=./config.lt}
       
  1263 AC_MSG_NOTICE([creating $CONFIG_LT])
       
  1264 cat >"$CONFIG_LT" <<_LTEOF
       
  1265 #! $SHELL
       
  1266 # Generated by $as_me.
       
  1267 # Run this file to recreate a libtool stub with the current configuration.
       
  1268 
       
  1269 lt_cl_silent=false
       
  1270 SHELL=\${CONFIG_SHELL-$SHELL}
       
  1271 _LTEOF
       
  1272 
       
  1273 cat >>"$CONFIG_LT" <<\_LTEOF
       
  1274 AS_SHELL_SANITIZE
       
  1275 _AS_PREPARE
       
  1276 
       
  1277 exec AS_MESSAGE_FD>&1
       
  1278 exec AS_MESSAGE_LOG_FD>>config.log
       
  1279 {
       
  1280   echo
       
  1281   AS_BOX([Running $as_me.])
       
  1282 } >&AS_MESSAGE_LOG_FD
       
  1283 
       
  1284 lt_cl_help="\
       
  1285 \`$as_me' creates a local libtool stub from the current configuration,
       
  1286 for use in further configure time tests before the real libtool is
       
  1287 generated.
       
  1288 
       
  1289 Usage: $[0] [[OPTIONS]]
       
  1290 
       
  1291   -h, --help      print this help, then exit
       
  1292   -V, --version   print version number, then exit
       
  1293   -q, --quiet     do not print progress messages
       
  1294   -d, --debug     don't remove temporary files
       
  1295 
       
  1296 Report bugs to <bug-libtool@gnu.org>."
       
  1297 
       
  1298 lt_cl_version="\
       
  1299 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
       
  1300 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
       
  1301 configured by $[0], generated by m4_PACKAGE_STRING.
       
  1302 
       
  1303 Copyright (C) 2008 Free Software Foundation, Inc.
       
  1304 This config.lt script is free software; the Free Software Foundation
       
  1305 gives unlimited permision to copy, distribute and modify it."
       
  1306 
       
  1307 while test $[#] != 0
       
  1308 do
       
  1309   case $[1] in
       
  1310     --version | --v* | -V )
       
  1311       echo "$lt_cl_version"; exit 0 ;;
       
  1312     --help | --h* | -h )
       
  1313       echo "$lt_cl_help"; exit 0 ;;
       
  1314     --debug | --d* | -d )
       
  1315       debug=: ;;
       
  1316     --quiet | --q* | --silent | --s* | -q )
       
  1317       lt_cl_silent=: ;;
       
  1318 
       
  1319     -*) AC_MSG_ERROR([unrecognized option: $[1]
       
  1320 Try \`$[0] --help' for more information.]) ;;
       
  1321 
       
  1322     *) AC_MSG_ERROR([unrecognized argument: $[1]
       
  1323 Try \`$[0] --help' for more information.]) ;;
       
  1324   esac
       
  1325   shift
       
  1326 done
       
  1327 
       
  1328 if $lt_cl_silent; then
       
  1329   exec AS_MESSAGE_FD>/dev/null
       
  1330 fi
       
  1331 _LTEOF
       
  1332 
       
  1333 cat >>"$CONFIG_LT" <<_LTEOF
       
  1334 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
       
  1335 _LTEOF
       
  1336 
       
  1337 cat >>"$CONFIG_LT" <<\_LTEOF
       
  1338 AC_MSG_NOTICE([creating $ofile])
       
  1339 _LT_OUTPUT_LIBTOOL_COMMANDS
       
  1340 AS_EXIT(0)
       
  1341 _LTEOF
       
  1342 chmod +x "$CONFIG_LT"
       
  1343 
       
  1344 # configure is writing to config.log, but config.lt does its own redirection,
       
  1345 # appending to config.log, which fails on DOS, as config.log is still kept
       
  1346 # open by configure.  Here we exec the FD to /dev/null, effectively closing
       
  1347 # config.log, so it can be properly (re)opened and appended to by config.lt.
       
  1348 if test "$no_create" != yes; then
       
  1349   lt_cl_success=:
       
  1350   test "$silent" = yes &&
       
  1351     lt_config_lt_args="$lt_config_lt_args --quiet"
       
  1352   exec AS_MESSAGE_LOG_FD>/dev/null
       
  1353   $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
       
  1354   exec AS_MESSAGE_LOG_FD>>config.log
       
  1355   $lt_cl_success || AS_EXIT(1)
       
  1356 fi
       
  1357 ])# LT_OUTPUT
       
  1358 
       
  1359 
       
  1360 # _LT_CONFIG(TAG)
       
  1361 # ---------------
       
  1362 # If TAG is the built-in tag, create an initial libtool script with a
       
  1363 # default configuration from the untagged config vars.  Otherwise add code
       
  1364 # to config.status for appending the configuration named by TAG from the
       
  1365 # matching tagged config vars.
       
  1366 m4_defun([_LT_CONFIG],
       
  1367 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
       
  1368 _LT_CONFIG_SAVE_COMMANDS([
       
  1369   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
       
  1370   m4_if(_LT_TAG, [C], [
       
  1371     # See if we are running on zsh, and set the options which allow our
       
  1372     # commands through without removal of \ escapes.
       
  1373     if test -n "${ZSH_VERSION+set}" ; then
       
  1374       setopt NO_GLOB_SUBST
       
  1375     fi
       
  1376 
       
  1377     cfgfile="${ofile}T"
       
  1378     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
       
  1379     $RM "$cfgfile"
       
  1380 
       
  1381     cat <<_LT_EOF >> "$cfgfile"
       
  1382 #! $SHELL
       
  1383 
       
  1384 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
       
  1385 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
       
  1386 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
       
  1387 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
       
  1388 #
       
  1389 _LT_COPYING
       
  1390 _LT_LIBTOOL_TAGS
       
  1391 
       
  1392 # ### BEGIN LIBTOOL CONFIG
       
  1393 _LT_LIBTOOL_CONFIG_VARS
       
  1394 _LT_LIBTOOL_TAG_VARS
       
  1395 # ### END LIBTOOL CONFIG
       
  1396 
       
  1397 _LT_EOF
       
  1398 
       
  1399   case $host_os in
       
  1400   aix3*)
       
  1401     cat <<\_LT_EOF >> "$cfgfile"
       
  1402 # AIX sometimes has problems with the GCC collect2 program.  For some
       
  1403 # reason, if we set the COLLECT_NAMES environment variable, the problems
       
  1404 # vanish in a puff of smoke.
       
  1405 if test "X${COLLECT_NAMES+set}" != Xset; then
       
  1406   COLLECT_NAMES=
       
  1407   export COLLECT_NAMES
       
  1408 fi
       
  1409 _LT_EOF
       
  1410     ;;
       
  1411   esac
       
  1412 
       
  1413   _LT_PROG_LTMAIN
       
  1414 
       
  1415   # We use sed instead of cat because bash on DJGPP gets confused if
       
  1416   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
       
  1417   # text mode, it properly converts lines to CR/LF.  This bash problem
       
  1418   # is reportedly fixed, but why not run on old versions too?
       
  1419   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
       
  1420     || (rm -f "$cfgfile"; exit 1)
       
  1421 
       
  1422   _LT_PROG_XSI_SHELLFNS
       
  1423 
       
  1424   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
       
  1425     || (rm -f "$cfgfile"; exit 1)
       
  1426 
       
  1427   mv -f "$cfgfile" "$ofile" ||
       
  1428     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
       
  1429   chmod +x "$ofile"
       
  1430 ],
       
  1431 [cat <<_LT_EOF >> "$ofile"
       
  1432 
       
  1433 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
       
  1434 dnl in a comment (ie after a #).
       
  1435 # ### BEGIN LIBTOOL TAG CONFIG: $1
       
  1436 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
       
  1437 # ### END LIBTOOL TAG CONFIG: $1
       
  1438 _LT_EOF
       
  1439 ])dnl /m4_if
       
  1440 ],
       
  1441 [m4_if([$1], [], [
       
  1442     PACKAGE='$PACKAGE'
       
  1443     VERSION='$VERSION'
       
  1444     TIMESTAMP='$TIMESTAMP'
       
  1445     RM='$RM'
       
  1446     ofile='$ofile'], [])
       
  1447 ])dnl /_LT_CONFIG_SAVE_COMMANDS
       
  1448 ])# _LT_CONFIG
       
  1449 
       
  1450 
       
  1451 # LT_SUPPORTED_TAG(TAG)
       
  1452 # ---------------------
       
  1453 # Trace this macro to discover what tags are supported by the libtool
       
  1454 # --tag option, using:
       
  1455 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
       
  1456 AC_DEFUN([LT_SUPPORTED_TAG], [])
       
  1457 
       
  1458 
       
  1459 # C support is built-in for now
       
  1460 m4_define([_LT_LANG_C_enabled], [])
       
  1461 m4_define([_LT_TAGS], [])
       
  1462 
       
  1463 
       
  1464 # LT_LANG(LANG)
       
  1465 # -------------
       
  1466 # Enable libtool support for the given language if not already enabled.
       
  1467 AC_DEFUN([LT_LANG],
       
  1468 [AC_BEFORE([$0], [LT_OUTPUT])dnl
       
  1469 m4_case([$1],
       
  1470   [C],			[_LT_LANG(C)],
       
  1471   [C++],		[_LT_LANG(CXX)],
       
  1472   [Java],		[_LT_LANG(GCJ)],
       
  1473   [Fortran 77],		[_LT_LANG(F77)],
       
  1474   [Fortran],		[_LT_LANG(FC)],
       
  1475   [Windows Resource],	[_LT_LANG(RC)],
       
  1476   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
       
  1477     [_LT_LANG($1)],
       
  1478     [m4_fatal([$0: unsupported language: "$1"])])])dnl
       
  1479 ])# LT_LANG
       
  1480 
       
  1481 
       
  1482 # _LT_LANG(LANGNAME)
       
  1483 # ------------------
       
  1484 m4_defun([_LT_LANG],
       
  1485 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
       
  1486   [LT_SUPPORTED_TAG([$1])dnl
       
  1487   m4_append([_LT_TAGS], [$1 ])dnl
       
  1488   m4_define([_LT_LANG_]$1[_enabled], [])dnl
       
  1489   _LT_LANG_$1_CONFIG($1)])dnl
       
  1490 ])# _LT_LANG
       
  1491 
       
  1492 
       
  1493 # _LT_LANG_DEFAULT_CONFIG
       
  1494 # -----------------------
       
  1495 m4_defun([_LT_LANG_DEFAULT_CONFIG],
       
  1496 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
       
  1497   [LT_LANG(CXX)],
       
  1498   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
       
  1499 
       
  1500 AC_PROVIDE_IFELSE([AC_PROG_F77],
       
  1501   [LT_LANG(F77)],
       
  1502   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
       
  1503 
       
  1504 AC_PROVIDE_IFELSE([AC_PROG_FC],
       
  1505   [LT_LANG(FC)],
       
  1506   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
       
  1507 
       
  1508 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
       
  1509 dnl pulling things in needlessly.
       
  1510 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
       
  1511   [LT_LANG(GCJ)],
       
  1512   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
       
  1513     [LT_LANG(GCJ)],
       
  1514     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
       
  1515       [LT_LANG(GCJ)],
       
  1516       [m4_ifdef([AC_PROG_GCJ],
       
  1517 	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
       
  1518        m4_ifdef([A][M_PROG_GCJ],
       
  1519 	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
       
  1520        m4_ifdef([LT_PROG_GCJ],
       
  1521 	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
       
  1522 
       
  1523 AC_PROVIDE_IFELSE([LT_PROG_RC],
       
  1524   [LT_LANG(RC)],
       
  1525   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
       
  1526 ])# _LT_LANG_DEFAULT_CONFIG
       
  1527 
       
  1528 # Obsolete macros:
       
  1529 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
       
  1530 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
       
  1531 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
       
  1532 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
       
  1533 dnl aclocal-1.4 backwards compatibility:
       
  1534 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
       
  1535 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
       
  1536 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
       
  1537 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
       
  1538 
       
  1539 
       
  1540 # _LT_TAG_COMPILER
       
  1541 # ----------------
       
  1542 m4_defun([_LT_TAG_COMPILER],
       
  1543 [AC_REQUIRE([AC_PROG_CC])dnl
       
  1544 
       
  1545 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
       
  1546 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
       
  1547 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
       
  1548 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
       
  1549 
       
  1550 # If no C compiler was specified, use CC.
       
  1551 LTCC=${LTCC-"$CC"}
       
  1552 
       
  1553 # If no C compiler flags were specified, use CFLAGS.
       
  1554 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
       
  1555 
       
  1556 # Allow CC to be a program name with arguments.
       
  1557 compiler=$CC
       
  1558 ])# _LT_TAG_COMPILER
       
  1559 
       
  1560 
       
  1561 # _LT_COMPILER_BOILERPLATE
       
  1562 # ------------------------
       
  1563 # Check for compiler boilerplate output or warnings with
       
  1564 # the simple compiler test code.
       
  1565 m4_defun([_LT_COMPILER_BOILERPLATE],
       
  1566 [m4_require([_LT_DECL_SED])dnl
       
  1567 ac_outfile=conftest.$ac_objext
       
  1568 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
       
  1569 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
       
  1570 _lt_compiler_boilerplate=`cat conftest.err`
       
  1571 $RM conftest*
       
  1572 ])# _LT_COMPILER_BOILERPLATE
       
  1573 
       
  1574 
       
  1575 # _LT_LINKER_BOILERPLATE
       
  1576 # ----------------------
       
  1577 # Check for linker boilerplate output or warnings with
       
  1578 # the simple link test code.
       
  1579 m4_defun([_LT_LINKER_BOILERPLATE],
       
  1580 [m4_require([_LT_DECL_SED])dnl
       
  1581 ac_outfile=conftest.$ac_objext
       
  1582 echo "$lt_simple_link_test_code" >conftest.$ac_ext
       
  1583 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
       
  1584 _lt_linker_boilerplate=`cat conftest.err`
       
  1585 $RM -r conftest*
       
  1586 ])# _LT_LINKER_BOILERPLATE
       
  1587 
       
  1588 # _LT_REQUIRED_DARWIN_CHECKS
       
  1589 # -------------------------
       
  1590 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
       
  1591   case $host_os in
       
  1592     rhapsody* | darwin*)
       
  1593     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
       
  1594     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
       
  1595     AC_CHECK_TOOL([LIPO], [lipo], [:])
       
  1596     AC_CHECK_TOOL([OTOOL], [otool], [:])
       
  1597     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
       
  1598     _LT_DECL([], [DSYMUTIL], [1],
       
  1599       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
       
  1600     _LT_DECL([], [NMEDIT], [1],
       
  1601       [Tool to change global to local symbols on Mac OS X])
       
  1602     _LT_DECL([], [LIPO], [1],
       
  1603       [Tool to manipulate fat objects and archives on Mac OS X])
       
  1604     _LT_DECL([], [OTOOL], [1],
       
  1605       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
       
  1606     _LT_DECL([], [OTOOL64], [1],
       
  1607       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
       
  1608 
       
  1609     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
       
  1610       [lt_cv_apple_cc_single_mod=no
       
  1611       if test -z "${LT_MULTI_MODULE}"; then
       
  1612 	# By default we will add the -single_module flag. You can override
       
  1613 	# by either setting the environment variable LT_MULTI_MODULE
       
  1614 	# non-empty at configure time, or by adding -multi_module to the
       
  1615 	# link flags.
       
  1616 	rm -rf libconftest.dylib*
       
  1617 	echo "int foo(void){return 1;}" > conftest.c
       
  1618 	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
       
  1619 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
       
  1620 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
       
  1621 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
       
  1622         _lt_result=$?
       
  1623 	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
       
  1624 	  lt_cv_apple_cc_single_mod=yes
       
  1625 	else
       
  1626 	  cat conftest.err >&AS_MESSAGE_LOG_FD
       
  1627 	fi
       
  1628 	rm -rf libconftest.dylib*
       
  1629 	rm -f conftest.*
       
  1630       fi])
       
  1631     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
       
  1632       [lt_cv_ld_exported_symbols_list],
       
  1633       [lt_cv_ld_exported_symbols_list=no
       
  1634       save_LDFLAGS=$LDFLAGS
       
  1635       echo "_main" > conftest.sym
       
  1636       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
       
  1637       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
       
  1638 	[lt_cv_ld_exported_symbols_list=yes],
       
  1639 	[lt_cv_ld_exported_symbols_list=no])
       
  1640 	LDFLAGS="$save_LDFLAGS"
       
  1641     ])
       
  1642     case $host_os in
       
  1643     rhapsody* | darwin1.[[012]])
       
  1644       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
       
  1645     darwin1.*)
       
  1646       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
       
  1647     darwin*) # darwin 5.x on
       
  1648       # if running on 10.5 or later, the deployment target defaults
       
  1649       # to the OS version, if on x86, and 10.4, the deployment
       
  1650       # target defaults to 10.4. Don't you love it?
       
  1651       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
       
  1652 	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
       
  1653 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
       
  1654 	10.[[012]]*)
       
  1655 	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
       
  1656 	10.*)
       
  1657 	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
       
  1658       esac
       
  1659     ;;
       
  1660   esac
       
  1661     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
       
  1662       _lt_dar_single_mod='$single_module'
       
  1663     fi
       
  1664     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
       
  1665       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
       
  1666     else
       
  1667       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
       
  1668     fi
       
  1669     if test "$DSYMUTIL" != ":"; then
       
  1670       _lt_dsymutil='~$DSYMUTIL $lib || :'
       
  1671     else
       
  1672       _lt_dsymutil=
       
  1673     fi
       
  1674     ;;
       
  1675   esac
       
  1676 ])
       
  1677 
       
  1678 
       
  1679 # _LT_DARWIN_LINKER_FEATURES
       
  1680 # --------------------------
       
  1681 # Checks for linker and compiler features on darwin
       
  1682 m4_defun([_LT_DARWIN_LINKER_FEATURES],
       
  1683 [
       
  1684   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
       
  1685   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       
  1686   _LT_TAGVAR(hardcode_direct, $1)=no
       
  1687   _LT_TAGVAR(hardcode_automatic, $1)=yes
       
  1688   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
       
  1689   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
       
  1690   _LT_TAGVAR(link_all_deplibs, $1)=yes
       
  1691   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
       
  1692   case $cc_basename in
       
  1693      ifort*) _lt_dar_can_shared=yes ;;
       
  1694      *) _lt_dar_can_shared=$GCC ;;
       
  1695   esac
       
  1696   if test "$_lt_dar_can_shared" = "yes"; then
       
  1697     output_verbose_link_cmd=echo
       
  1698     _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}"
       
  1699     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
       
  1700     _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}"
       
  1701     _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}"
       
  1702     m4_if([$1], [CXX],
       
  1703 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
       
  1704       _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}"
       
  1705       _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}"
       
  1706     fi
       
  1707 ],[])
       
  1708   else
       
  1709   _LT_TAGVAR(ld_shlibs, $1)=no
       
  1710   fi
       
  1711 ])
       
  1712 
       
  1713 # _LT_SYS_MODULE_PATH_AIX
       
  1714 # -----------------------
       
  1715 # Links a minimal program and checks the executable
       
  1716 # for the system default hardcoded library path. In most cases,
       
  1717 # this is /usr/lib:/lib, but when the MPI compilers are used
       
  1718 # the location of the communication and MPI libs are included too.
       
  1719 # If we don't find anything, use the default library path according
       
  1720 # to the aix ld manual.
       
  1721 m4_defun([_LT_SYS_MODULE_PATH_AIX],
       
  1722 [m4_require([_LT_DECL_SED])dnl
       
  1723 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
       
  1724 lt_aix_libpath_sed='
       
  1725     /Import File Strings/,/^$/ {
       
  1726 	/^0/ {
       
  1727 	    s/^0  *\(.*\)$/\1/
       
  1728 	    p
       
  1729 	}
       
  1730     }'
       
  1731 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
       
  1732 # Check for a 64-bit object if we didn't find anything.
       
  1733 if test -z "$aix_libpath"; then
       
  1734   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
       
  1735 fi],[])
       
  1736 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       
  1737 ])# _LT_SYS_MODULE_PATH_AIX
       
  1738 
       
  1739 
       
  1740 # _LT_SHELL_INIT(ARG)
       
  1741 # -------------------
       
  1742 m4_define([_LT_SHELL_INIT],
       
  1743 [ifdef([AC_DIVERSION_NOTICE],
       
  1744 	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
       
  1745 	 [AC_DIVERT_PUSH(NOTICE)])
       
  1746 $1
       
  1747 AC_DIVERT_POP
       
  1748 ])# _LT_SHELL_INIT
       
  1749 
       
  1750 
       
  1751 # _LT_PROG_ECHO_BACKSLASH
       
  1752 # -----------------------
       
  1753 # Add some code to the start of the generated configure script which
       
  1754 # will find an echo command which doesn't interpret backslashes.
       
  1755 m4_defun([_LT_PROG_ECHO_BACKSLASH],
       
  1756 [_LT_SHELL_INIT([
       
  1757 # Check that we are running under the correct shell.
       
  1758 SHELL=${CONFIG_SHELL-/bin/sh}
       
  1759 
       
  1760 case X$lt_ECHO in
       
  1761 X*--fallback-echo)
       
  1762   # Remove one level of quotation (which was required for Make).
       
  1763   ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
       
  1764   ;;
       
  1765 esac
       
  1766 
       
  1767 ECHO=${lt_ECHO-echo}
       
  1768 if test "X[$]1" = X--no-reexec; then
       
  1769   # Discard the --no-reexec flag, and continue.
       
  1770   shift
       
  1771 elif test "X[$]1" = X--fallback-echo; then
       
  1772   # Avoid inline document here, it may be left over
       
  1773   :
       
  1774 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
       
  1775   # Yippee, $ECHO works!
       
  1776   :
       
  1777 else
       
  1778   # Restart under the correct shell.
       
  1779   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
       
  1780 fi
       
  1781 
       
  1782 if test "X[$]1" = X--fallback-echo; then
       
  1783   # used as fallback echo
       
  1784   shift
       
  1785   cat <<_LT_EOF
       
  1786 [$]*
       
  1787 _LT_EOF
       
  1788   exit 0
       
  1789 fi
       
  1790 
       
  1791 # The HP-UX ksh and POSIX shell print the target directory to stdout
       
  1792 # if CDPATH is set.
       
  1793 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
       
  1794 
       
  1795 if test -z "$lt_ECHO"; then
       
  1796   if test "X${echo_test_string+set}" != Xset; then
       
  1797     # find a string as large as possible, as long as the shell can cope with it
       
  1798     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
       
  1799       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
       
  1800       if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
       
  1801 	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
       
  1802       then
       
  1803         break
       
  1804       fi
       
  1805     done
       
  1806   fi
       
  1807 
       
  1808   if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
       
  1809      echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
       
  1810      test "X$echo_testing_string" = "X$echo_test_string"; then
       
  1811     :
       
  1812   else
       
  1813     # The Solaris, AIX, and Digital Unix default echo programs unquote
       
  1814     # backslashes.  This makes it impossible to quote backslashes using
       
  1815     #   echo "$something" | sed 's/\\/\\\\/g'
       
  1816     #
       
  1817     # So, first we look for a working echo in the user's PATH.
       
  1818 
       
  1819     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
       
  1820     for dir in $PATH /usr/ucb; do
       
  1821       IFS="$lt_save_ifs"
       
  1822       if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
       
  1823          test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
       
  1824          echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
       
  1825          test "X$echo_testing_string" = "X$echo_test_string"; then
       
  1826         ECHO="$dir/echo"
       
  1827         break
       
  1828       fi
       
  1829     done
       
  1830     IFS="$lt_save_ifs"
       
  1831 
       
  1832     if test "X$ECHO" = Xecho; then
       
  1833       # We didn't find a better echo, so look for alternatives.
       
  1834       if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
       
  1835          echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
       
  1836          test "X$echo_testing_string" = "X$echo_test_string"; then
       
  1837         # This shell has a builtin print -r that does the trick.
       
  1838         ECHO='print -r'
       
  1839       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
       
  1840 	   test "X$CONFIG_SHELL" != X/bin/ksh; then
       
  1841         # If we have ksh, try running configure again with it.
       
  1842         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
       
  1843         export ORIGINAL_CONFIG_SHELL
       
  1844         CONFIG_SHELL=/bin/ksh
       
  1845         export CONFIG_SHELL
       
  1846         exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
       
  1847       else
       
  1848         # Try using printf.
       
  1849         ECHO='printf %s\n'
       
  1850         if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
       
  1851 	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
       
  1852 	   test "X$echo_testing_string" = "X$echo_test_string"; then
       
  1853 	  # Cool, printf works
       
  1854 	  :
       
  1855         elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
       
  1856 	     test "X$echo_testing_string" = 'X\t' &&
       
  1857 	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
       
  1858 	     test "X$echo_testing_string" = "X$echo_test_string"; then
       
  1859 	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
       
  1860 	  export CONFIG_SHELL
       
  1861 	  SHELL="$CONFIG_SHELL"
       
  1862 	  export SHELL
       
  1863 	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
       
  1864         elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
       
  1865 	     test "X$echo_testing_string" = 'X\t' &&
       
  1866 	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
       
  1867 	     test "X$echo_testing_string" = "X$echo_test_string"; then
       
  1868 	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
       
  1869         else
       
  1870 	  # maybe with a smaller string...
       
  1871 	  prev=:
       
  1872 
       
  1873 	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
       
  1874 	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
       
  1875 	    then
       
  1876 	      break
       
  1877 	    fi
       
  1878 	    prev="$cmd"
       
  1879 	  done
       
  1880 
       
  1881 	  if test "$prev" != 'sed 50q "[$]0"'; then
       
  1882 	    echo_test_string=`eval $prev`
       
  1883 	    export echo_test_string
       
  1884 	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
       
  1885 	  else
       
  1886 	    # Oops.  We lost completely, so just stick with echo.
       
  1887 	    ECHO=echo
       
  1888 	  fi
       
  1889         fi
       
  1890       fi
       
  1891     fi
       
  1892   fi
       
  1893 fi
       
  1894 
       
  1895 # Copy echo and quote the copy suitably for passing to libtool from
       
  1896 # the Makefile, instead of quoting the original, which is used later.
       
  1897 lt_ECHO=$ECHO
       
  1898 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
       
  1899    lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
       
  1900 fi
       
  1901 
       
  1902 AC_SUBST(lt_ECHO)
       
  1903 ])
       
  1904 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
       
  1905 _LT_DECL([], [ECHO], [1],
       
  1906     [An echo program that does not interpret backslashes])
       
  1907 ])# _LT_PROG_ECHO_BACKSLASH
       
  1908 
       
  1909 
       
  1910 # _LT_ENABLE_LOCK
       
  1911 # ---------------
       
  1912 m4_defun([_LT_ENABLE_LOCK],
       
  1913 [AC_ARG_ENABLE([libtool-lock],
       
  1914   [AS_HELP_STRING([--disable-libtool-lock],
       
  1915     [avoid locking (might break parallel builds)])])
       
  1916 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
       
  1917 
       
  1918 # Some flags need to be propagated to the compiler or linker for good
       
  1919 # libtool support.
       
  1920 case $host in
       
  1921 ia64-*-hpux*)
       
  1922   # Find out which ABI we are using.
       
  1923   echo 'int i;' > conftest.$ac_ext
       
  1924   if AC_TRY_EVAL(ac_compile); then
       
  1925     case `/usr/bin/file conftest.$ac_objext` in
       
  1926       *ELF-32*)
       
  1927 	HPUX_IA64_MODE="32"
       
  1928 	;;
       
  1929       *ELF-64*)
       
  1930 	HPUX_IA64_MODE="64"
       
  1931 	;;
       
  1932     esac
       
  1933   fi
       
  1934   rm -rf conftest*
       
  1935   ;;
       
  1936 *-*-irix6*)
       
  1937   # Find out which ABI we are using.
       
  1938   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
       
  1939   if AC_TRY_EVAL(ac_compile); then
       
  1940     if test "$lt_cv_prog_gnu_ld" = yes; then
       
  1941       case `/usr/bin/file conftest.$ac_objext` in
       
  1942 	*32-bit*)
       
  1943 	  LD="${LD-ld} -melf32bsmip"
       
  1944 	  ;;
       
  1945 	*N32*)
       
  1946 	  LD="${LD-ld} -melf32bmipn32"
       
  1947 	  ;;
       
  1948 	*64-bit*)
       
  1949 	  LD="${LD-ld} -melf64bmip"
       
  1950 	;;
       
  1951       esac
       
  1952     else
       
  1953       case `/usr/bin/file conftest.$ac_objext` in
       
  1954 	*32-bit*)
       
  1955 	  LD="${LD-ld} -32"
       
  1956 	  ;;
       
  1957 	*N32*)
       
  1958 	  LD="${LD-ld} -n32"
       
  1959 	  ;;
       
  1960 	*64-bit*)
       
  1961 	  LD="${LD-ld} -64"
       
  1962 	  ;;
       
  1963       esac
       
  1964     fi
       
  1965   fi
       
  1966   rm -rf conftest*
       
  1967   ;;
       
  1968 
       
  1969 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
       
  1970 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
       
  1971   # Find out which ABI we are using.
       
  1972   echo 'int i;' > conftest.$ac_ext
       
  1973   if AC_TRY_EVAL(ac_compile); then
       
  1974     case `/usr/bin/file conftest.o` in
       
  1975       *32-bit*)
       
  1976 	case $host in
       
  1977 	  x86_64-*kfreebsd*-gnu)
       
  1978 	    LD="${LD-ld} -m elf_i386_fbsd"
       
  1979 	    ;;
       
  1980 	  x86_64-*linux*)
       
  1981 	    LD="${LD-ld} -m elf_i386"
       
  1982 	    ;;
       
  1983 	  ppc64-*linux*|powerpc64-*linux*)
       
  1984 	    LD="${LD-ld} -m elf32ppclinux"
       
  1985 	    ;;
       
  1986 	  s390x-*linux*)
       
  1987 	    LD="${LD-ld} -m elf_s390"
       
  1988 	    ;;
       
  1989 	  sparc64-*linux*)
       
  1990 	    LD="${LD-ld} -m elf32_sparc"
       
  1991 	    ;;
       
  1992 	esac
       
  1993 	;;
       
  1994       *64-bit*)
       
  1995 	case $host in
       
  1996 	  x86_64-*kfreebsd*-gnu)
       
  1997 	    LD="${LD-ld} -m elf_x86_64_fbsd"
       
  1998 	    ;;
       
  1999 	  x86_64-*linux*)
       
  2000 	    LD="${LD-ld} -m elf_x86_64"
       
  2001 	    ;;
       
  2002 	  ppc*-*linux*|powerpc*-*linux*)
       
  2003 	    LD="${LD-ld} -m elf64ppc"
       
  2004 	    ;;
       
  2005 	  s390*-*linux*|s390*-*tpf*)
       
  2006 	    LD="${LD-ld} -m elf64_s390"
       
  2007 	    ;;
       
  2008 	  sparc*-*linux*)
       
  2009 	    LD="${LD-ld} -m elf64_sparc"
       
  2010 	    ;;
       
  2011 	esac
       
  2012 	;;
       
  2013     esac
       
  2014   fi
       
  2015   rm -rf conftest*
       
  2016   ;;
       
  2017 
       
  2018 *-*-sco3.2v5*)
       
  2019   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
       
  2020   SAVE_CFLAGS="$CFLAGS"
       
  2021   CFLAGS="$CFLAGS -belf"
       
  2022   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
       
  2023     [AC_LANG_PUSH(C)
       
  2024      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
       
  2025      AC_LANG_POP])
       
  2026   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
       
  2027     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
       
  2028     CFLAGS="$SAVE_CFLAGS"
       
  2029   fi
       
  2030   ;;
       
  2031 sparc*-*solaris*)
       
  2032   # Find out which ABI we are using.
       
  2033   echo 'int i;' > conftest.$ac_ext
       
  2034   if AC_TRY_EVAL(ac_compile); then
       
  2035     case `/usr/bin/file conftest.o` in
       
  2036     *64-bit*)
       
  2037       case $lt_cv_prog_gnu_ld in
       
  2038       yes*) LD="${LD-ld} -m elf64_sparc" ;;
       
  2039       *)
       
  2040 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
       
  2041 	  LD="${LD-ld} -64"
       
  2042 	fi
       
  2043 	;;
       
  2044       esac
       
  2045       ;;
       
  2046     esac
       
  2047   fi
       
  2048   rm -rf conftest*
       
  2049   ;;
       
  2050 esac
       
  2051 
       
  2052 need_locks="$enable_libtool_lock"
       
  2053 ])# _LT_ENABLE_LOCK
       
  2054 
       
  2055 
       
  2056 # _LT_CMD_OLD_ARCHIVE
       
  2057 # -------------------
       
  2058 m4_defun([_LT_CMD_OLD_ARCHIVE],
       
  2059 [AC_CHECK_TOOL(AR, ar, false)
       
  2060 test -z "$AR" && AR=ar
       
  2061 test -z "$AR_FLAGS" && AR_FLAGS=cru
       
  2062 _LT_DECL([], [AR], [1], [The archiver])
       
  2063 _LT_DECL([], [AR_FLAGS], [1])
       
  2064 
       
  2065 AC_CHECK_TOOL(STRIP, strip, :)
       
  2066 test -z "$STRIP" && STRIP=:
       
  2067 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
       
  2068 
       
  2069 AC_CHECK_TOOL(RANLIB, ranlib, :)
       
  2070 test -z "$RANLIB" && RANLIB=:
       
  2071 _LT_DECL([], [RANLIB], [1],
       
  2072     [Commands used to install an old-style archive])
       
  2073 
       
  2074 # Determine commands to create old-style static archives.
       
  2075 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
       
  2076 old_postinstall_cmds='chmod 644 $oldlib'
       
  2077 old_postuninstall_cmds=
       
  2078 
       
  2079 if test -n "$RANLIB"; then
       
  2080   case $host_os in
       
  2081   openbsd*)
       
  2082     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
       
  2083     ;;
       
  2084   *)
       
  2085     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
       
  2086     ;;
       
  2087   esac
       
  2088   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
       
  2089 fi
       
  2090 _LT_DECL([], [old_postinstall_cmds], [2])
       
  2091 _LT_DECL([], [old_postuninstall_cmds], [2])
       
  2092 _LT_TAGDECL([], [old_archive_cmds], [2],
       
  2093     [Commands used to build an old-style archive])
       
  2094 ])# _LT_CMD_OLD_ARCHIVE
       
  2095 
       
  2096 
       
  2097 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
       
  2098 #		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
       
  2099 # ----------------------------------------------------------------
       
  2100 # Check whether the given compiler option works
       
  2101 AC_DEFUN([_LT_COMPILER_OPTION],
       
  2102 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
       
  2103 m4_require([_LT_DECL_SED])dnl
       
  2104 AC_CACHE_CHECK([$1], [$2],
       
  2105   [$2=no
       
  2106    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
       
  2107    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
       
  2108    lt_compiler_flag="$3"
       
  2109    # Insert the option either (1) after the last *FLAGS variable, or
       
  2110    # (2) before a word containing "conftest.", or (3) at the end.
       
  2111    # Note that $ac_compile itself does not contain backslashes and begins
       
  2112    # with a dollar sign (not a hyphen), so the echo should work correctly.
       
  2113    # The option is referenced via a variable to avoid confusing sed.
       
  2114    lt_compile=`echo "$ac_compile" | $SED \
       
  2115    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
       
  2116    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
       
  2117    -e 's:$: $lt_compiler_flag:'`
       
  2118    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
       
  2119    (eval "$lt_compile" 2>conftest.err)
       
  2120    ac_status=$?
       
  2121    cat conftest.err >&AS_MESSAGE_LOG_FD
       
  2122    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
       
  2123    if (exit $ac_status) && test -s "$ac_outfile"; then
       
  2124      # The compiler can only warn and ignore the option if not recognized
       
  2125      # So say no if there are warnings other than the usual output.
       
  2126      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
       
  2127      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
       
  2128      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
       
  2129        $2=yes
       
  2130      fi
       
  2131    fi
       
  2132    $RM conftest*
       
  2133 ])
       
  2134 
       
  2135 if test x"[$]$2" = xyes; then
       
  2136     m4_if([$5], , :, [$5])
       
  2137 else
       
  2138     m4_if([$6], , :, [$6])
       
  2139 fi
       
  2140 ])# _LT_COMPILER_OPTION
       
  2141 
       
  2142 # Old name:
       
  2143 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
       
  2144 dnl aclocal-1.4 backwards compatibility:
       
  2145 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
       
  2146 
       
  2147 
       
  2148 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
       
  2149 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
       
  2150 # ----------------------------------------------------
       
  2151 # Check whether the given linker option works
       
  2152 AC_DEFUN([_LT_LINKER_OPTION],
       
  2153 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
       
  2154 m4_require([_LT_DECL_SED])dnl
       
  2155 AC_CACHE_CHECK([$1], [$2],
       
  2156   [$2=no
       
  2157    save_LDFLAGS="$LDFLAGS"
       
  2158    LDFLAGS="$LDFLAGS $3"
       
  2159    echo "$lt_simple_link_test_code" > conftest.$ac_ext
       
  2160    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
       
  2161      # The linker can only warn and ignore the option if not recognized
       
  2162      # So say no if there are warnings
       
  2163      if test -s conftest.err; then
       
  2164        # Append any errors to the config.log.
       
  2165        cat conftest.err 1>&AS_MESSAGE_LOG_FD
       
  2166        $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
       
  2167        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
       
  2168        if diff conftest.exp conftest.er2 >/dev/null; then
       
  2169          $2=yes
       
  2170        fi
       
  2171      else
       
  2172        $2=yes
       
  2173      fi
       
  2174    fi
       
  2175    $RM -r conftest*
       
  2176    LDFLAGS="$save_LDFLAGS"
       
  2177 ])
       
  2178 
       
  2179 if test x"[$]$2" = xyes; then
       
  2180     m4_if([$4], , :, [$4])
       
  2181 else
       
  2182     m4_if([$5], , :, [$5])
       
  2183 fi
       
  2184 ])# _LT_LINKER_OPTION
       
  2185 
       
  2186 # Old name:
       
  2187 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
       
  2188 dnl aclocal-1.4 backwards compatibility:
       
  2189 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
       
  2190 
       
  2191 
       
  2192 # LT_CMD_MAX_LEN
       
  2193 #---------------
       
  2194 AC_DEFUN([LT_CMD_MAX_LEN],
       
  2195 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
       
  2196 # find the maximum length of command line arguments
       
  2197 AC_MSG_CHECKING([the maximum length of command line arguments])
       
  2198 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       
  2199   i=0
       
  2200   teststring="ABCD"
       
  2201 
       
  2202   case $build_os in
       
  2203   msdosdjgpp*)
       
  2204     # On DJGPP, this test can blow up pretty badly due to problems in libc
       
  2205     # (any single argument exceeding 2000 bytes causes a buffer overrun
       
  2206     # during glob expansion).  Even if it were fixed, the result of this
       
  2207     # check would be larger than it should be.
       
  2208     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
       
  2209     ;;
       
  2210 
       
  2211   gnu*)
       
  2212     # Under GNU Hurd, this test is not required because there is
       
  2213     # no limit to the length of command line arguments.
       
  2214     # Libtool will interpret -1 as no limit whatsoever
       
  2215     lt_cv_sys_max_cmd_len=-1;
       
  2216     ;;
       
  2217 
       
  2218   cygwin* | mingw* | cegcc*)
       
  2219     # On Win9x/ME, this test blows up -- it succeeds, but takes
       
  2220     # about 5 minutes as the teststring grows exponentially.
       
  2221     # Worse, since 9x/ME are not pre-emptively multitasking,
       
  2222     # you end up with a "frozen" computer, even though with patience
       
  2223     # the test eventually succeeds (with a max line length of 256k).
       
  2224     # Instead, let's just punt: use the minimum linelength reported by
       
  2225     # all of the supported platforms: 8192 (on NT/2K/XP).
       
  2226     lt_cv_sys_max_cmd_len=8192;
       
  2227     ;;
       
  2228 
       
  2229   beos*)
       
  2230     # On BeOS, this test takes a really really long time.
       
  2231     # So we just punt and use a minimum line length of 8192.
       
  2232     lt_cv_sys_max_cmd_len=8192;
       
  2233     ;;
       
  2234 
       
  2235   amigaos*)
       
  2236     # On AmigaOS with pdksh, this test takes hours, literally.
       
  2237     # So we just punt and use a minimum line length of 8192.
       
  2238     lt_cv_sys_max_cmd_len=8192;
       
  2239     ;;
       
  2240 
       
  2241   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
       
  2242     # This has been around since 386BSD, at least.  Likely further.
       
  2243     if test -x /sbin/sysctl; then
       
  2244       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
       
  2245     elif test -x /usr/sbin/sysctl; then
       
  2246       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
       
  2247     else
       
  2248       lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
       
  2249     fi
       
  2250     # And add a safety zone
       
  2251     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       
  2252     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
       
  2253     ;;
       
  2254 
       
  2255   interix*)
       
  2256     # We know the value 262144 and hardcode it with a safety zone (like BSD)
       
  2257     lt_cv_sys_max_cmd_len=196608
       
  2258     ;;
       
  2259 
       
  2260   osf*)
       
  2261     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
       
  2262     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
       
  2263     # nice to cause kernel panics so lets avoid the loop below.
       
  2264     # First set a reasonable default.
       
  2265     lt_cv_sys_max_cmd_len=16384
       
  2266     #
       
  2267     if test -x /sbin/sysconfig; then
       
  2268       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
       
  2269         *1*) lt_cv_sys_max_cmd_len=-1 ;;
       
  2270       esac
       
  2271     fi
       
  2272     ;;
       
  2273   sco3.2v5*)
       
  2274     lt_cv_sys_max_cmd_len=102400
       
  2275     ;;
       
  2276   sysv5* | sco5v6* | sysv4.2uw2*)
       
  2277     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
       
  2278     if test -n "$kargmax"; then
       
  2279       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
       
  2280     else
       
  2281       lt_cv_sys_max_cmd_len=32768
       
  2282     fi
       
  2283     ;;
       
  2284   *)
       
  2285     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
       
  2286     if test -n "$lt_cv_sys_max_cmd_len"; then
       
  2287       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       
  2288       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
       
  2289     else
       
  2290       # Make teststring a little bigger before we do anything with it.
       
  2291       # a 1K string should be a reasonable start.
       
  2292       for i in 1 2 3 4 5 6 7 8 ; do
       
  2293         teststring=$teststring$teststring
       
  2294       done
       
  2295       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       
  2296       # If test is not a shell built-in, we'll probably end up computing a
       
  2297       # maximum length that is only half of the actual maximum length, but
       
  2298       # we can't tell.
       
  2299       while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
       
  2300 	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
       
  2301 	      test $i != 17 # 1/2 MB should be enough
       
  2302       do
       
  2303         i=`expr $i + 1`
       
  2304         teststring=$teststring$teststring
       
  2305       done
       
  2306       # Only check the string length outside the loop.
       
  2307       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
       
  2308       teststring=
       
  2309       # Add a significant safety factor because C++ compilers can tack on
       
  2310       # massive amounts of additional arguments before passing them to the
       
  2311       # linker.  It appears as though 1/2 is a usable value.
       
  2312       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
       
  2313     fi
       
  2314     ;;
       
  2315   esac
       
  2316 ])
       
  2317 if test -n $lt_cv_sys_max_cmd_len ; then
       
  2318   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
       
  2319 else
       
  2320   AC_MSG_RESULT(none)
       
  2321 fi
       
  2322 max_cmd_len=$lt_cv_sys_max_cmd_len
       
  2323 _LT_DECL([], [max_cmd_len], [0],
       
  2324     [What is the maximum length of a command?])
       
  2325 ])# LT_CMD_MAX_LEN
       
  2326 
       
  2327 # Old name:
       
  2328 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
       
  2329 dnl aclocal-1.4 backwards compatibility:
       
  2330 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
       
  2331 
       
  2332 
       
  2333 # _LT_HEADER_DLFCN
       
  2334 # ----------------
       
  2335 m4_defun([_LT_HEADER_DLFCN],
       
  2336 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
       
  2337 ])# _LT_HEADER_DLFCN
       
  2338 
       
  2339 
       
  2340 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
       
  2341 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
       
  2342 # ----------------------------------------------------------------
       
  2343 m4_defun([_LT_TRY_DLOPEN_SELF],
       
  2344 [m4_require([_LT_HEADER_DLFCN])dnl
       
  2345 if test "$cross_compiling" = yes; then :
       
  2346   [$4]
       
  2347 else
       
  2348   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
       
  2349   lt_status=$lt_dlunknown
       
  2350   cat > conftest.$ac_ext <<_LT_EOF
       
  2351 [#line __oline__ "configure"
       
  2352 #include "confdefs.h"
       
  2353 
       
  2354 #if HAVE_DLFCN_H
       
  2355 #include <dlfcn.h>
       
  2356 #endif
       
  2357 
       
  2358 #include <stdio.h>
       
  2359 
       
  2360 #ifdef RTLD_GLOBAL
       
  2361 #  define LT_DLGLOBAL		RTLD_GLOBAL
       
  2362 #else
       
  2363 #  ifdef DL_GLOBAL
       
  2364 #    define LT_DLGLOBAL		DL_GLOBAL
       
  2365 #  else
       
  2366 #    define LT_DLGLOBAL		0
       
  2367 #  endif
       
  2368 #endif
       
  2369 
       
  2370 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
       
  2371    find out it does not work in some platform. */
       
  2372 #ifndef LT_DLLAZY_OR_NOW
       
  2373 #  ifdef RTLD_LAZY
       
  2374 #    define LT_DLLAZY_OR_NOW		RTLD_LAZY
       
  2375 #  else
       
  2376 #    ifdef DL_LAZY
       
  2377 #      define LT_DLLAZY_OR_NOW		DL_LAZY
       
  2378 #    else
       
  2379 #      ifdef RTLD_NOW
       
  2380 #        define LT_DLLAZY_OR_NOW	RTLD_NOW
       
  2381 #      else
       
  2382 #        ifdef DL_NOW
       
  2383 #          define LT_DLLAZY_OR_NOW	DL_NOW
       
  2384 #        else
       
  2385 #          define LT_DLLAZY_OR_NOW	0
       
  2386 #        endif
       
  2387 #      endif
       
  2388 #    endif
       
  2389 #  endif
       
  2390 #endif
       
  2391 
       
  2392 void fnord() { int i=42;}
       
  2393 int main ()
       
  2394 {
       
  2395   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
       
  2396   int status = $lt_dlunknown;
       
  2397 
       
  2398   if (self)
       
  2399     {
       
  2400       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
       
  2401       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
       
  2402       /* dlclose (self); */
       
  2403     }
       
  2404   else
       
  2405     puts (dlerror ());
       
  2406 
       
  2407   return status;
       
  2408 }]
       
  2409 _LT_EOF
       
  2410   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
       
  2411     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
       
  2412     lt_status=$?
       
  2413     case x$lt_status in
       
  2414       x$lt_dlno_uscore) $1 ;;
       
  2415       x$lt_dlneed_uscore) $2 ;;
       
  2416       x$lt_dlunknown|x*) $3 ;;
       
  2417     esac
       
  2418   else :
       
  2419     # compilation failed
       
  2420     $3
       
  2421   fi
       
  2422 fi
       
  2423 rm -fr conftest*
       
  2424 ])# _LT_TRY_DLOPEN_SELF
       
  2425 
       
  2426 
       
  2427 # LT_SYS_DLOPEN_SELF
       
  2428 # ------------------
       
  2429 AC_DEFUN([LT_SYS_DLOPEN_SELF],
       
  2430 [m4_require([_LT_HEADER_DLFCN])dnl
       
  2431 if test "x$enable_dlopen" != xyes; then
       
  2432   enable_dlopen=unknown
       
  2433   enable_dlopen_self=unknown
       
  2434   enable_dlopen_self_static=unknown
       
  2435 else
       
  2436   lt_cv_dlopen=no
       
  2437   lt_cv_dlopen_libs=
       
  2438 
       
  2439   case $host_os in
       
  2440   beos*)
       
  2441     lt_cv_dlopen="load_add_on"
       
  2442     lt_cv_dlopen_libs=
       
  2443     lt_cv_dlopen_self=yes
       
  2444     ;;
       
  2445 
       
  2446   mingw* | pw32* | cegcc*)
       
  2447     lt_cv_dlopen="LoadLibrary"
       
  2448     lt_cv_dlopen_libs=
       
  2449     ;;
       
  2450 
       
  2451   cygwin*)
       
  2452     lt_cv_dlopen="dlopen"
       
  2453     lt_cv_dlopen_libs=
       
  2454     ;;
       
  2455 
       
  2456   darwin*)
       
  2457   # if libdl is installed we need to link against it
       
  2458     AC_CHECK_LIB([dl], [dlopen],
       
  2459 		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
       
  2460     lt_cv_dlopen="dyld"
       
  2461     lt_cv_dlopen_libs=
       
  2462     lt_cv_dlopen_self=yes
       
  2463     ])
       
  2464     ;;
       
  2465 
       
  2466   *)
       
  2467     AC_CHECK_FUNC([shl_load],
       
  2468 	  [lt_cv_dlopen="shl_load"],
       
  2469       [AC_CHECK_LIB([dld], [shl_load],
       
  2470 	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
       
  2471 	[AC_CHECK_FUNC([dlopen],
       
  2472 	      [lt_cv_dlopen="dlopen"],
       
  2473 	  [AC_CHECK_LIB([dl], [dlopen],
       
  2474 		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
       
  2475 	    [AC_CHECK_LIB([svld], [dlopen],
       
  2476 		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
       
  2477 	      [AC_CHECK_LIB([dld], [dld_link],
       
  2478 		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
       
  2479 	      ])
       
  2480 	    ])
       
  2481 	  ])
       
  2482 	])
       
  2483       ])
       
  2484     ;;
       
  2485   esac
       
  2486 
       
  2487   if test "x$lt_cv_dlopen" != xno; then
       
  2488     enable_dlopen=yes
       
  2489   else
       
  2490     enable_dlopen=no
       
  2491   fi
       
  2492 
       
  2493   case $lt_cv_dlopen in
       
  2494   dlopen)
       
  2495     save_CPPFLAGS="$CPPFLAGS"
       
  2496     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
       
  2497 
       
  2498     save_LDFLAGS="$LDFLAGS"
       
  2499     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
       
  2500 
       
  2501     save_LIBS="$LIBS"
       
  2502     LIBS="$lt_cv_dlopen_libs $LIBS"
       
  2503 
       
  2504     AC_CACHE_CHECK([whether a program can dlopen itself],
       
  2505 	  lt_cv_dlopen_self, [dnl
       
  2506 	  _LT_TRY_DLOPEN_SELF(
       
  2507 	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
       
  2508 	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
       
  2509     ])
       
  2510 
       
  2511     if test "x$lt_cv_dlopen_self" = xyes; then
       
  2512       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       
  2513       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
       
  2514 	  lt_cv_dlopen_self_static, [dnl
       
  2515 	  _LT_TRY_DLOPEN_SELF(
       
  2516 	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
       
  2517 	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
       
  2518       ])
       
  2519     fi
       
  2520 
       
  2521     CPPFLAGS="$save_CPPFLAGS"
       
  2522     LDFLAGS="$save_LDFLAGS"
       
  2523     LIBS="$save_LIBS"
       
  2524     ;;
       
  2525   esac
       
  2526 
       
  2527   case $lt_cv_dlopen_self in
       
  2528   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
       
  2529   *) enable_dlopen_self=unknown ;;
       
  2530   esac
       
  2531 
       
  2532   case $lt_cv_dlopen_self_static in
       
  2533   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
       
  2534   *) enable_dlopen_self_static=unknown ;;
       
  2535   esac
       
  2536 fi
       
  2537 _LT_DECL([dlopen_support], [enable_dlopen], [0],
       
  2538 	 [Whether dlopen is supported])
       
  2539 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
       
  2540 	 [Whether dlopen of programs is supported])
       
  2541 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
       
  2542 	 [Whether dlopen of statically linked programs is supported])
       
  2543 ])# LT_SYS_DLOPEN_SELF
       
  2544 
       
  2545 # Old name:
       
  2546 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
       
  2547 dnl aclocal-1.4 backwards compatibility:
       
  2548 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
       
  2549 
       
  2550 
       
  2551 # _LT_COMPILER_C_O([TAGNAME])
       
  2552 # ---------------------------
       
  2553 # Check to see if options -c and -o are simultaneously supported by compiler.
       
  2554 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
       
  2555 m4_defun([_LT_COMPILER_C_O],
       
  2556 [m4_require([_LT_DECL_SED])dnl
       
  2557 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
       
  2558 m4_require([_LT_TAG_COMPILER])dnl
       
  2559 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
       
  2560   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
       
  2561   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
       
  2562    $RM -r conftest 2>/dev/null
       
  2563    mkdir conftest
       
  2564    cd conftest
       
  2565    mkdir out
       
  2566    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
       
  2567 
       
  2568    lt_compiler_flag="-o out/conftest2.$ac_objext"
       
  2569    # Insert the option either (1) after the last *FLAGS variable, or
       
  2570    # (2) before a word containing "conftest.", or (3) at the end.
       
  2571    # Note that $ac_compile itself does not contain backslashes and begins
       
  2572    # with a dollar sign (not a hyphen), so the echo should work correctly.
       
  2573    lt_compile=`echo "$ac_compile" | $SED \
       
  2574    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
       
  2575    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
       
  2576    -e 's:$: $lt_compiler_flag:'`
       
  2577    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
       
  2578    (eval "$lt_compile" 2>out/conftest.err)
       
  2579    ac_status=$?
       
  2580    cat out/conftest.err >&AS_MESSAGE_LOG_FD
       
  2581    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
       
  2582    if (exit $ac_status) && test -s out/conftest2.$ac_objext
       
  2583    then
       
  2584      # The compiler can only warn and ignore the option if not recognized
       
  2585      # So say no if there are warnings
       
  2586      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
       
  2587      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
       
  2588      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
       
  2589        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
       
  2590      fi
       
  2591    fi
       
  2592    chmod u+w . 2>&AS_MESSAGE_LOG_FD
       
  2593    $RM conftest*
       
  2594    # SGI C++ compiler will create directory out/ii_files/ for
       
  2595    # template instantiation
       
  2596    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
       
  2597    $RM out/* && rmdir out
       
  2598    cd ..
       
  2599    $RM -r conftest
       
  2600    $RM conftest*
       
  2601 ])
       
  2602 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
       
  2603 	[Does compiler simultaneously support -c and -o options?])
       
  2604 ])# _LT_COMPILER_C_O
       
  2605 
       
  2606 
       
  2607 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
       
  2608 # ----------------------------------
       
  2609 # Check to see if we can do hard links to lock some files if needed
       
  2610 m4_defun([_LT_COMPILER_FILE_LOCKS],
       
  2611 [m4_require([_LT_ENABLE_LOCK])dnl
       
  2612 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
       
  2613 _LT_COMPILER_C_O([$1])
       
  2614 
       
  2615 hard_links="nottested"
       
  2616 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
       
  2617   # do not overwrite the value of need_locks provided by the user
       
  2618   AC_MSG_CHECKING([if we can lock with hard links])
       
  2619   hard_links=yes
       
  2620   $RM conftest*
       
  2621   ln conftest.a conftest.b 2>/dev/null && hard_links=no
       
  2622   touch conftest.a
       
  2623   ln conftest.a conftest.b 2>&5 || hard_links=no
       
  2624   ln conftest.a conftest.b 2>/dev/null && hard_links=no
       
  2625   AC_MSG_RESULT([$hard_links])
       
  2626   if test "$hard_links" = no; then
       
  2627     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
       
  2628     need_locks=warn
       
  2629   fi
       
  2630 else
       
  2631   need_locks=no
       
  2632 fi
       
  2633 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
       
  2634 ])# _LT_COMPILER_FILE_LOCKS
       
  2635 
       
  2636 
       
  2637 # _LT_CHECK_OBJDIR
       
  2638 # ----------------
       
  2639 m4_defun([_LT_CHECK_OBJDIR],
       
  2640 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
       
  2641 [rm -f .libs 2>/dev/null
       
  2642 mkdir .libs 2>/dev/null
       
  2643 if test -d .libs; then
       
  2644   lt_cv_objdir=.libs
       
  2645 else
       
  2646   # MS-DOS does not allow filenames that begin with a dot.
       
  2647   lt_cv_objdir=_libs
       
  2648 fi
       
  2649 rmdir .libs 2>/dev/null])
       
  2650 objdir=$lt_cv_objdir
       
  2651 _LT_DECL([], [objdir], [0],
       
  2652          [The name of the directory that contains temporary libtool files])dnl
       
  2653 m4_pattern_allow([LT_OBJDIR])dnl
       
  2654 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
       
  2655   [Define to the sub-directory in which libtool stores uninstalled libraries.])
       
  2656 ])# _LT_CHECK_OBJDIR
       
  2657 
       
  2658 
       
  2659 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
       
  2660 # --------------------------------------
       
  2661 # Check hardcoding attributes.
       
  2662 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
       
  2663 [AC_MSG_CHECKING([how to hardcode library paths into programs])
       
  2664 _LT_TAGVAR(hardcode_action, $1)=
       
  2665 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
       
  2666    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
       
  2667    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
       
  2668 
       
  2669   # We can hardcode non-existent directories.
       
  2670   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
       
  2671      # If the only mechanism to avoid hardcoding is shlibpath_var, we
       
  2672      # have to relink, otherwise we might link with an installed library
       
  2673      # when we should be linking with a yet-to-be-installed one
       
  2674      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
       
  2675      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
       
  2676     # Linking always hardcodes the temporary library directory.
       
  2677     _LT_TAGVAR(hardcode_action, $1)=relink
       
  2678   else
       
  2679     # We can link without hardcoding, and we can hardcode nonexisting dirs.
       
  2680     _LT_TAGVAR(hardcode_action, $1)=immediate
       
  2681   fi
       
  2682 else
       
  2683   # We cannot hardcode anything, or else we can only hardcode existing
       
  2684   # directories.
       
  2685   _LT_TAGVAR(hardcode_action, $1)=unsupported
       
  2686 fi
       
  2687 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
       
  2688 
       
  2689 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
       
  2690    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
       
  2691   # Fast installation is not supported
       
  2692   enable_fast_install=no
       
  2693 elif test "$shlibpath_overrides_runpath" = yes ||
       
  2694      test "$enable_shared" = no; then
       
  2695   # Fast installation is not necessary
       
  2696   enable_fast_install=needless
       
  2697 fi
       
  2698 _LT_TAGDECL([], [hardcode_action], [0],
       
  2699     [How to hardcode a shared library path into an executable])
       
  2700 ])# _LT_LINKER_HARDCODE_LIBPATH
       
  2701 
       
  2702 
       
  2703 # _LT_CMD_STRIPLIB
       
  2704 # ----------------
       
  2705 m4_defun([_LT_CMD_STRIPLIB],
       
  2706 [m4_require([_LT_DECL_EGREP])
       
  2707 striplib=
       
  2708 old_striplib=
       
  2709 AC_MSG_CHECKING([whether stripping libraries is possible])
       
  2710 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
       
  2711   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
       
  2712   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
       
  2713   AC_MSG_RESULT([yes])
       
  2714 else
       
  2715 # FIXME - insert some real tests, host_os isn't really good enough
       
  2716   case $host_os in
       
  2717   darwin*)
       
  2718     if test -n "$STRIP" ; then
       
  2719       striplib="$STRIP -x"
       
  2720       old_striplib="$STRIP -S"
       
  2721       AC_MSG_RESULT([yes])
       
  2722     else
       
  2723       AC_MSG_RESULT([no])
       
  2724     fi
       
  2725     ;;
       
  2726   *)
       
  2727     AC_MSG_RESULT([no])
       
  2728     ;;
       
  2729   esac
       
  2730 fi
       
  2731 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
       
  2732 _LT_DECL([], [striplib], [1])
       
  2733 ])# _LT_CMD_STRIPLIB
       
  2734 
       
  2735 
       
  2736 # _LT_SYS_DYNAMIC_LINKER([TAG])
       
  2737 # -----------------------------
       
  2738 # PORTME Fill in your ld.so characteristics
       
  2739 m4_defun([_LT_SYS_DYNAMIC_LINKER],
       
  2740 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
       
  2741 m4_require([_LT_DECL_EGREP])dnl
       
  2742 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
       
  2743 m4_require([_LT_DECL_OBJDUMP])dnl
       
  2744 m4_require([_LT_DECL_SED])dnl
       
  2745 AC_MSG_CHECKING([dynamic linker characteristics])
       
  2746 m4_if([$1],
       
  2747 	[], [
       
  2748 if test "$GCC" = yes; then
       
  2749   case $host_os in
       
  2750     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
       
  2751     *) lt_awk_arg="/^libraries:/" ;;
       
  2752   esac
       
  2753   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
       
  2754   if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
       
  2755     # if the path contains ";" then we assume it to be the separator
       
  2756     # otherwise default to the standard path separator (i.e. ":") - it is
       
  2757     # assumed that no part of a normal pathname contains ";" but that should
       
  2758     # okay in the real world where ";" in dirpaths is itself problematic.
       
  2759     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
       
  2760   else
       
  2761     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
       
  2762   fi
       
  2763   # Ok, now we have the path, separated by spaces, we can step through it
       
  2764   # and add multilib dir if necessary.
       
  2765   lt_tmp_lt_search_path_spec=
       
  2766   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
       
  2767   for lt_sys_path in $lt_search_path_spec; do
       
  2768     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
       
  2769       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
       
  2770     else
       
  2771       test -d "$lt_sys_path" && \
       
  2772 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
       
  2773     fi
       
  2774   done
       
  2775   lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
       
  2776 BEGIN {RS=" "; FS="/|\n";} {
       
  2777   lt_foo="";
       
  2778   lt_count=0;
       
  2779   for (lt_i = NF; lt_i > 0; lt_i--) {
       
  2780     if ($lt_i != "" && $lt_i != ".") {
       
  2781       if ($lt_i == "..") {
       
  2782         lt_count++;
       
  2783       } else {
       
  2784         if (lt_count == 0) {
       
  2785           lt_foo="/" $lt_i lt_foo;
       
  2786         } else {
       
  2787           lt_count--;
       
  2788         }
       
  2789       }
       
  2790     }
       
  2791   }
       
  2792   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
       
  2793   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
       
  2794 }'`
       
  2795   sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
       
  2796 else
       
  2797   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
       
  2798 fi])
       
  2799 library_names_spec=
       
  2800 libname_spec='lib$name'
       
  2801 soname_spec=
       
  2802 shrext_cmds=".so"
       
  2803 postinstall_cmds=
       
  2804 postuninstall_cmds=
       
  2805 finish_cmds=
       
  2806 finish_eval=
       
  2807 shlibpath_var=
       
  2808 shlibpath_overrides_runpath=unknown
       
  2809 version_type=none
       
  2810 dynamic_linker="$host_os ld.so"
       
  2811 sys_lib_dlsearch_path_spec="/lib /usr/lib"
       
  2812 need_lib_prefix=unknown
       
  2813 hardcode_into_libs=no
       
  2814 
       
  2815 # when you set need_version to no, make sure it does not cause -set_version
       
  2816 # flags to be left without arguments
       
  2817 need_version=unknown
       
  2818 
       
  2819 case $host_os in
       
  2820 aix3*)
       
  2821   version_type=linux
       
  2822   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
       
  2823   shlibpath_var=LIBPATH
       
  2824 
       
  2825   # AIX 3 has no versioning support, so we append a major version to the name.
       
  2826   soname_spec='${libname}${release}${shared_ext}$major'
       
  2827   ;;
       
  2828 
       
  2829 aix[[4-9]]*)
       
  2830   version_type=linux
       
  2831   need_lib_prefix=no
       
  2832   need_version=no
       
  2833   hardcode_into_libs=yes
       
  2834   if test "$host_cpu" = ia64; then
       
  2835     # AIX 5 supports IA64
       
  2836     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
       
  2837     shlibpath_var=LD_LIBRARY_PATH
       
  2838   else
       
  2839     # With GCC up to 2.95.x, collect2 would create an import file
       
  2840     # for dependence libraries.  The import file would start with
       
  2841     # the line `#! .'.  This would cause the generated library to
       
  2842     # depend on `.', always an invalid library.  This was fixed in
       
  2843     # development snapshots of GCC prior to 3.0.
       
  2844     case $host_os in
       
  2845       aix4 | aix4.[[01]] | aix4.[[01]].*)
       
  2846       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
       
  2847 	   echo ' yes '
       
  2848 	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
       
  2849 	:
       
  2850       else
       
  2851 	can_build_shared=no
       
  2852       fi
       
  2853       ;;
       
  2854     esac
       
  2855     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
       
  2856     # soname into executable. Probably we can add versioning support to
       
  2857     # collect2, so additional links can be useful in future.
       
  2858     if test "$aix_use_runtimelinking" = yes; then
       
  2859       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       
  2860       # instead of lib<name>.a to let people know that these are not
       
  2861       # typical AIX shared libraries.
       
  2862       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  2863     else
       
  2864       # We preserve .a as extension for shared libraries through AIX4.2
       
  2865       # and later when we are not doing run time linking.
       
  2866       library_names_spec='${libname}${release}.a $libname.a'
       
  2867       soname_spec='${libname}${release}${shared_ext}$major'
       
  2868     fi
       
  2869     shlibpath_var=LIBPATH
       
  2870   fi
       
  2871   ;;
       
  2872 
       
  2873 amigaos*)
       
  2874   case $host_cpu in
       
  2875   powerpc)
       
  2876     # Since July 2007 AmigaOS4 officially supports .so libraries.
       
  2877     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
       
  2878     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  2879     ;;
       
  2880   m68k)
       
  2881     library_names_spec='$libname.ixlibrary $libname.a'
       
  2882     # Create ${libname}_ixlibrary.a entries in /sys/libs.
       
  2883     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
       
  2884     ;;
       
  2885   esac
       
  2886   ;;
       
  2887 
       
  2888 beos*)
       
  2889   library_names_spec='${libname}${shared_ext}'
       
  2890   dynamic_linker="$host_os ld.so"
       
  2891   shlibpath_var=LIBRARY_PATH
       
  2892   ;;
       
  2893 
       
  2894 bsdi[[45]]*)
       
  2895   version_type=linux
       
  2896   need_version=no
       
  2897   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  2898   soname_spec='${libname}${release}${shared_ext}$major'
       
  2899   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
       
  2900   shlibpath_var=LD_LIBRARY_PATH
       
  2901   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
       
  2902   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
       
  2903   # the default ld.so.conf also contains /usr/contrib/lib and
       
  2904   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
       
  2905   # libtool to hard-code these into programs
       
  2906   ;;
       
  2907 
       
  2908 cygwin* | mingw* | pw32* | cegcc*)
       
  2909   version_type=windows
       
  2910   shrext_cmds=".dll"
       
  2911   need_version=no
       
  2912   need_lib_prefix=no
       
  2913 
       
  2914   case $GCC,$host_os in
       
  2915   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
       
  2916     library_names_spec='$libname.dll.a'
       
  2917     # DLL is installed to $(libdir)/../bin by postinstall_cmds
       
  2918     postinstall_cmds='base_file=`basename \${file}`~
       
  2919       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
       
  2920       dldir=$destdir/`dirname \$dlpath`~
       
  2921       test -d \$dldir || mkdir -p \$dldir~
       
  2922       $install_prog $dir/$dlname \$dldir/$dlname~
       
  2923       chmod a+x \$dldir/$dlname~
       
  2924       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
       
  2925         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
       
  2926       fi'
       
  2927     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       
  2928       dlpath=$dir/\$dldll~
       
  2929        $RM \$dlpath'
       
  2930     shlibpath_overrides_runpath=yes
       
  2931 
       
  2932     case $host_os in
       
  2933     cygwin*)
       
  2934       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
       
  2935       #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       
  2936       soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
       
  2937       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
       
  2938       ;;
       
  2939     mingw* | cegcc*)
       
  2940       # MinGW DLLs use traditional 'lib' prefix
       
  2941       #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       
  2942       soname_spec='`echo ${libname} | $SED -e 's/^lib//'`${shared_ext}'
       
  2943       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
       
  2944       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
       
  2945         # It is most probably a Windows format PATH printed by
       
  2946         # mingw gcc, but we are running on Cygwin. Gcc prints its search
       
  2947         # path with ; separators, and with drive letters. We can handle the
       
  2948         # drive letters (cygwin fileutils understands them), so leave them,
       
  2949         # especially as we might pass files found there to a mingw objdump,
       
  2950         # which wouldn't understand a cygwinified path. Ahh.
       
  2951         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       
  2952       else
       
  2953         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
       
  2954       fi
       
  2955       ;;
       
  2956     pw32*)
       
  2957       # pw32 DLLs use 'pw' prefix rather than 'lib'
       
  2958       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       
  2959       ;;
       
  2960     esac
       
  2961     ;;
       
  2962 
       
  2963   *)
       
  2964     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
       
  2965     ;;
       
  2966   esac
       
  2967   dynamic_linker='Win32 ld.exe'
       
  2968   # FIXME: first we should search . and the directory the executable is in
       
  2969   shlibpath_var=PATH
       
  2970   ;;
       
  2971 
       
  2972 darwin* | rhapsody*)
       
  2973   dynamic_linker="$host_os dyld"
       
  2974   version_type=darwin
       
  2975   need_lib_prefix=no
       
  2976   need_version=no
       
  2977   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
       
  2978   soname_spec='${libname}${release}${major}$shared_ext'
       
  2979   shlibpath_overrides_runpath=yes
       
  2980   shlibpath_var=DYLD_LIBRARY_PATH
       
  2981   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
       
  2982 m4_if([$1], [],[
       
  2983   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
       
  2984   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
       
  2985   ;;
       
  2986 
       
  2987 dgux*)
       
  2988   version_type=linux
       
  2989   need_lib_prefix=no
       
  2990   need_version=no
       
  2991   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
       
  2992   soname_spec='${libname}${release}${shared_ext}$major'
       
  2993   shlibpath_var=LD_LIBRARY_PATH
       
  2994   ;;
       
  2995 
       
  2996 freebsd1*)
       
  2997   dynamic_linker=no
       
  2998   ;;
       
  2999 
       
  3000 freebsd* | dragonfly*)
       
  3001   # DragonFly does not have aout.  When/if they implement a new
       
  3002   # versioning mechanism, adjust this.
       
  3003   if test -x /usr/bin/objformat; then
       
  3004     objformat=`/usr/bin/objformat`
       
  3005   else
       
  3006     case $host_os in
       
  3007     freebsd[[123]]*) objformat=aout ;;
       
  3008     *) objformat=elf ;;
       
  3009     esac
       
  3010   fi
       
  3011   version_type=freebsd-$objformat
       
  3012   case $version_type in
       
  3013     freebsd-elf*)
       
  3014       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
       
  3015       need_version=no
       
  3016       need_lib_prefix=no
       
  3017       ;;
       
  3018     freebsd-*)
       
  3019       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
       
  3020       need_version=yes
       
  3021       ;;
       
  3022   esac
       
  3023   shlibpath_var=LD_LIBRARY_PATH
       
  3024   case $host_os in
       
  3025   freebsd2*)
       
  3026     shlibpath_overrides_runpath=yes
       
  3027     ;;
       
  3028   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
       
  3029     shlibpath_overrides_runpath=yes
       
  3030     hardcode_into_libs=yes
       
  3031     ;;
       
  3032   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
       
  3033   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
       
  3034     shlibpath_overrides_runpath=no
       
  3035     hardcode_into_libs=yes
       
  3036     ;;
       
  3037   *) # from 4.6 on, and DragonFly
       
  3038     shlibpath_overrides_runpath=yes
       
  3039     hardcode_into_libs=yes
       
  3040     ;;
       
  3041   esac
       
  3042   ;;
       
  3043 
       
  3044 gnu*)
       
  3045   version_type=linux
       
  3046   need_lib_prefix=no
       
  3047   need_version=no
       
  3048   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
       
  3049   soname_spec='${libname}${release}${shared_ext}$major'
       
  3050   shlibpath_var=LD_LIBRARY_PATH
       
  3051   hardcode_into_libs=yes
       
  3052   ;;
       
  3053 
       
  3054 hpux9* | hpux10* | hpux11*)
       
  3055   # Give a soname corresponding to the major version so that dld.sl refuses to
       
  3056   # link against other versions.
       
  3057   version_type=sunos
       
  3058   need_lib_prefix=no
       
  3059   need_version=no
       
  3060   case $host_cpu in
       
  3061   ia64*)
       
  3062     shrext_cmds='.so'
       
  3063     hardcode_into_libs=yes
       
  3064     dynamic_linker="$host_os dld.so"
       
  3065     shlibpath_var=LD_LIBRARY_PATH
       
  3066     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
       
  3067     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3068     soname_spec='${libname}${release}${shared_ext}$major'
       
  3069     if test "X$HPUX_IA64_MODE" = X32; then
       
  3070       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
       
  3071     else
       
  3072       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
       
  3073     fi
       
  3074     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
       
  3075     ;;
       
  3076   hppa*64*)
       
  3077     shrext_cmds='.sl'
       
  3078     hardcode_into_libs=yes
       
  3079     dynamic_linker="$host_os dld.sl"
       
  3080     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
       
  3081     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
       
  3082     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3083     soname_spec='${libname}${release}${shared_ext}$major'
       
  3084     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
       
  3085     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
       
  3086     ;;
       
  3087   *)
       
  3088     shrext_cmds='.sl'
       
  3089     dynamic_linker="$host_os dld.sl"
       
  3090     shlibpath_var=SHLIB_PATH
       
  3091     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
       
  3092     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3093     soname_spec='${libname}${release}${shared_ext}$major'
       
  3094     ;;
       
  3095   esac
       
  3096   # HP-UX runs *really* slowly unless shared libraries are mode 555.
       
  3097   postinstall_cmds='chmod 555 $lib'
       
  3098   ;;
       
  3099 
       
  3100 interix[[3-9]]*)
       
  3101   version_type=linux
       
  3102   need_lib_prefix=no
       
  3103   need_version=no
       
  3104   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
       
  3105   soname_spec='${libname}${release}${shared_ext}$major'
       
  3106   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
       
  3107   shlibpath_var=LD_LIBRARY_PATH
       
  3108   shlibpath_overrides_runpath=no
       
  3109   hardcode_into_libs=yes
       
  3110   ;;
       
  3111 
       
  3112 irix5* | irix6* | nonstopux*)
       
  3113   case $host_os in
       
  3114     nonstopux*) version_type=nonstopux ;;
       
  3115     *)
       
  3116 	if test "$lt_cv_prog_gnu_ld" = yes; then
       
  3117 		version_type=linux
       
  3118 	else
       
  3119 		version_type=irix
       
  3120 	fi ;;
       
  3121   esac
       
  3122   need_lib_prefix=no
       
  3123   need_version=no
       
  3124   soname_spec='${libname}${release}${shared_ext}$major'
       
  3125   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
       
  3126   case $host_os in
       
  3127   irix5* | nonstopux*)
       
  3128     libsuff= shlibsuff=
       
  3129     ;;
       
  3130   *)
       
  3131     case $LD in # libtool.m4 will add one of these switches to LD
       
  3132     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
       
  3133       libsuff= shlibsuff= libmagic=32-bit;;
       
  3134     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
       
  3135       libsuff=32 shlibsuff=N32 libmagic=N32;;
       
  3136     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
       
  3137       libsuff=64 shlibsuff=64 libmagic=64-bit;;
       
  3138     *) libsuff= shlibsuff= libmagic=never-match;;
       
  3139     esac
       
  3140     ;;
       
  3141   esac
       
  3142   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
       
  3143   shlibpath_overrides_runpath=no
       
  3144   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
       
  3145   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
       
  3146   hardcode_into_libs=yes
       
  3147   ;;
       
  3148 
       
  3149 # No shared lib support for Linux oldld, aout, or coff.
       
  3150 linux*oldld* | linux*aout* | linux*coff*)
       
  3151   dynamic_linker=no
       
  3152   ;;
       
  3153 
       
  3154 # This must be Linux ELF.
       
  3155 linux* | k*bsd*-gnu)
       
  3156   version_type=linux
       
  3157   need_lib_prefix=no
       
  3158   need_version=no
       
  3159   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3160   soname_spec='${libname}${release}${shared_ext}$major'
       
  3161   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
       
  3162   shlibpath_var=LD_LIBRARY_PATH
       
  3163   shlibpath_overrides_runpath=no
       
  3164   # Some binutils ld are patched to set DT_RUNPATH
       
  3165   save_LDFLAGS=$LDFLAGS
       
  3166   save_libdir=$libdir
       
  3167   eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
       
  3168        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
       
  3169   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
       
  3170     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
       
  3171        [shlibpath_overrides_runpath=yes])])
       
  3172   LDFLAGS=$save_LDFLAGS
       
  3173   libdir=$save_libdir
       
  3174 
       
  3175   # This implies no fast_install, which is unacceptable.
       
  3176   # Some rework will be needed to allow for fast_install
       
  3177   # before this can be enabled.
       
  3178   hardcode_into_libs=yes
       
  3179 
       
  3180   # Append ld.so.conf contents to the search path
       
  3181   if test -f /etc/ld.so.conf; then
       
  3182     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;/^$/d' | tr '\n' ' '`
       
  3183     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
       
  3184   fi
       
  3185 
       
  3186   # We used to test for /lib/ld.so.1 and disable shared libraries on
       
  3187   # powerpc, because MkLinux only supported shared libraries with the
       
  3188   # GNU dynamic linker.  Since this was broken with cross compilers,
       
  3189   # most powerpc-linux boxes support dynamic linking these days and
       
  3190   # people can always --disable-shared, the test was removed, and we
       
  3191   # assume the GNU/Linux dynamic linker is in use.
       
  3192   dynamic_linker='GNU/Linux ld.so'
       
  3193   ;;
       
  3194 
       
  3195 netbsd*)
       
  3196   version_type=sunos
       
  3197   need_lib_prefix=no
       
  3198   need_version=no
       
  3199   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
       
  3200     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
       
  3201     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
       
  3202     dynamic_linker='NetBSD (a.out) ld.so'
       
  3203   else
       
  3204     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
       
  3205     soname_spec='${libname}${release}${shared_ext}$major'
       
  3206     dynamic_linker='NetBSD ld.elf_so'
       
  3207   fi
       
  3208   shlibpath_var=LD_LIBRARY_PATH
       
  3209   shlibpath_overrides_runpath=yes
       
  3210   hardcode_into_libs=yes
       
  3211   ;;
       
  3212 
       
  3213 newsos6)
       
  3214   version_type=linux
       
  3215   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3216   shlibpath_var=LD_LIBRARY_PATH
       
  3217   shlibpath_overrides_runpath=yes
       
  3218   ;;
       
  3219 
       
  3220 *nto* | *qnx*)
       
  3221   version_type=qnx
       
  3222   need_lib_prefix=no
       
  3223   need_version=no
       
  3224   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3225   soname_spec='${libname}${release}${shared_ext}$major'
       
  3226   shlibpath_var=LD_LIBRARY_PATH
       
  3227   shlibpath_overrides_runpath=no
       
  3228   hardcode_into_libs=yes
       
  3229   dynamic_linker='ldqnx.so'
       
  3230   ;;
       
  3231 
       
  3232 openbsd*)
       
  3233   version_type=sunos
       
  3234   sys_lib_dlsearch_path_spec="/usr/lib"
       
  3235   need_lib_prefix=no
       
  3236   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
       
  3237   case $host_os in
       
  3238     openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
       
  3239     *)				need_version=no  ;;
       
  3240   esac
       
  3241   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
       
  3242   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
       
  3243   shlibpath_var=LD_LIBRARY_PATH
       
  3244   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
       
  3245     case $host_os in
       
  3246       openbsd2.[[89]] | openbsd2.[[89]].*)
       
  3247 	shlibpath_overrides_runpath=no
       
  3248 	;;
       
  3249       *)
       
  3250 	shlibpath_overrides_runpath=yes
       
  3251 	;;
       
  3252       esac
       
  3253   else
       
  3254     shlibpath_overrides_runpath=yes
       
  3255   fi
       
  3256   ;;
       
  3257 
       
  3258 os2*)
       
  3259   libname_spec='$name'
       
  3260   shrext_cmds=".dll"
       
  3261   need_lib_prefix=no
       
  3262   library_names_spec='$libname${shared_ext} $libname.a'
       
  3263   dynamic_linker='OS/2 ld.exe'
       
  3264   shlibpath_var=LIBPATH
       
  3265   ;;
       
  3266 
       
  3267 osf3* | osf4* | osf5*)
       
  3268   version_type=osf
       
  3269   need_lib_prefix=no
       
  3270   need_version=no
       
  3271   soname_spec='${libname}${release}${shared_ext}$major'
       
  3272   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3273   shlibpath_var=LD_LIBRARY_PATH
       
  3274   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
       
  3275   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
       
  3276   ;;
       
  3277 
       
  3278 rdos*)
       
  3279   dynamic_linker=no
       
  3280   ;;
       
  3281 
       
  3282 solaris*)
       
  3283   version_type=linux
       
  3284   need_lib_prefix=no
       
  3285   need_version=no
       
  3286   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3287   soname_spec='${libname}${release}${shared_ext}$major'
       
  3288   shlibpath_var=LD_LIBRARY_PATH
       
  3289   shlibpath_overrides_runpath=yes
       
  3290   hardcode_into_libs=yes
       
  3291   # ldd complains unless libraries are executable
       
  3292   postinstall_cmds='chmod +x $lib'
       
  3293   ;;
       
  3294 
       
  3295 sunos4*)
       
  3296   version_type=sunos
       
  3297   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
       
  3298   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
       
  3299   shlibpath_var=LD_LIBRARY_PATH
       
  3300   shlibpath_overrides_runpath=yes
       
  3301   if test "$with_gnu_ld" = yes; then
       
  3302     need_lib_prefix=no
       
  3303   fi
       
  3304   need_version=yes
       
  3305   ;;
       
  3306 
       
  3307 sysv4 | sysv4.3*)
       
  3308   version_type=linux
       
  3309   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3310   soname_spec='${libname}${release}${shared_ext}$major'
       
  3311   shlibpath_var=LD_LIBRARY_PATH
       
  3312   case $host_vendor in
       
  3313     sni)
       
  3314       shlibpath_overrides_runpath=no
       
  3315       need_lib_prefix=no
       
  3316       runpath_var=LD_RUN_PATH
       
  3317       ;;
       
  3318     siemens)
       
  3319       need_lib_prefix=no
       
  3320       ;;
       
  3321     motorola)
       
  3322       need_lib_prefix=no
       
  3323       need_version=no
       
  3324       shlibpath_overrides_runpath=no
       
  3325       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
       
  3326       ;;
       
  3327   esac
       
  3328   ;;
       
  3329 
       
  3330 sysv4*MP*)
       
  3331   if test -d /usr/nec ;then
       
  3332     version_type=linux
       
  3333     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
       
  3334     soname_spec='$libname${shared_ext}.$major'
       
  3335     shlibpath_var=LD_LIBRARY_PATH
       
  3336   fi
       
  3337   ;;
       
  3338 
       
  3339 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
       
  3340   version_type=freebsd-elf
       
  3341   need_lib_prefix=no
       
  3342   need_version=no
       
  3343   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
       
  3344   soname_spec='${libname}${release}${shared_ext}$major'
       
  3345   shlibpath_var=LD_LIBRARY_PATH
       
  3346   shlibpath_overrides_runpath=yes
       
  3347   hardcode_into_libs=yes
       
  3348   if test "$with_gnu_ld" = yes; then
       
  3349     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
       
  3350   else
       
  3351     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
       
  3352     case $host_os in
       
  3353       sco3.2v5*)
       
  3354         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
       
  3355 	;;
       
  3356     esac
       
  3357   fi
       
  3358   sys_lib_dlsearch_path_spec='/usr/lib'
       
  3359   ;;
       
  3360 
       
  3361 tpf*)
       
  3362   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
       
  3363   version_type=linux
       
  3364   need_lib_prefix=no
       
  3365   need_version=no
       
  3366   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3367   shlibpath_var=LD_LIBRARY_PATH
       
  3368   shlibpath_overrides_runpath=no
       
  3369   hardcode_into_libs=yes
       
  3370   ;;
       
  3371 
       
  3372 uts4*)
       
  3373   version_type=linux
       
  3374   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
       
  3375   soname_spec='${libname}${release}${shared_ext}$major'
       
  3376   shlibpath_var=LD_LIBRARY_PATH
       
  3377   ;;
       
  3378 
       
  3379 *)
       
  3380   dynamic_linker=no
       
  3381   ;;
       
  3382 esac
       
  3383 AC_MSG_RESULT([$dynamic_linker])
       
  3384 test "$dynamic_linker" = no && can_build_shared=no
       
  3385 
       
  3386 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
       
  3387 if test "$GCC" = yes; then
       
  3388   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
       
  3389 fi
       
  3390 
       
  3391 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
       
  3392   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
       
  3393 fi
       
  3394 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
       
  3395   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
       
  3396 fi
       
  3397 
       
  3398 _LT_DECL([], [variables_saved_for_relink], [1],
       
  3399     [Variables whose values should be saved in libtool wrapper scripts and
       
  3400     restored at link time])
       
  3401 _LT_DECL([], [need_lib_prefix], [0],
       
  3402     [Do we need the "lib" prefix for modules?])
       
  3403 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
       
  3404 _LT_DECL([], [version_type], [0], [Library versioning type])
       
  3405 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
       
  3406 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
       
  3407 _LT_DECL([], [shlibpath_overrides_runpath], [0],
       
  3408     [Is shlibpath searched before the hard-coded library search path?])
       
  3409 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
       
  3410 _LT_DECL([], [library_names_spec], [1],
       
  3411     [[List of archive names.  First name is the real one, the rest are links.
       
  3412     The last name is the one that the linker finds with -lNAME]])
       
  3413 _LT_DECL([], [soname_spec], [1],
       
  3414     [[The coded name of the library, if different from the real name]])
       
  3415 _LT_DECL([], [postinstall_cmds], [2],
       
  3416     [Command to use after installation of a shared archive])
       
  3417 _LT_DECL([], [postuninstall_cmds], [2],
       
  3418     [Command to use after uninstallation of a shared archive])
       
  3419 _LT_DECL([], [finish_cmds], [2],
       
  3420     [Commands used to finish a libtool library installation in a directory])
       
  3421 _LT_DECL([], [finish_eval], [1],
       
  3422     [[As "finish_cmds", except a single script fragment to be evaled but
       
  3423     not shown]])
       
  3424 _LT_DECL([], [hardcode_into_libs], [0],
       
  3425     [Whether we should hardcode library paths into libraries])
       
  3426 _LT_DECL([], [sys_lib_search_path_spec], [2],
       
  3427     [Compile-time system search path for libraries])
       
  3428 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
       
  3429     [Run-time system search path for libraries])
       
  3430 ])# _LT_SYS_DYNAMIC_LINKER
       
  3431 
       
  3432 
       
  3433 # _LT_PATH_TOOL_PREFIX(TOOL)
       
  3434 # --------------------------
       
  3435 # find a file program which can recognize shared library
       
  3436 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
       
  3437 [m4_require([_LT_DECL_EGREP])dnl
       
  3438 AC_MSG_CHECKING([for $1])
       
  3439 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
       
  3440 [case $MAGIC_CMD in
       
  3441 [[\\/*] |  ?:[\\/]*])
       
  3442   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
       
  3443   ;;
       
  3444 *)
       
  3445   lt_save_MAGIC_CMD="$MAGIC_CMD"
       
  3446   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
       
  3447 dnl $ac_dummy forces splitting on constant user-supplied paths.
       
  3448 dnl POSIX.2 word splitting is done only on the output of word expansions,
       
  3449 dnl not every word.  This closes a longstanding sh security hole.
       
  3450   ac_dummy="m4_if([$2], , $PATH, [$2])"
       
  3451   for ac_dir in $ac_dummy; do
       
  3452     IFS="$lt_save_ifs"
       
  3453     test -z "$ac_dir" && ac_dir=.
       
  3454     if test -f $ac_dir/$1; then
       
  3455       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
       
  3456       if test -n "$file_magic_test_file"; then
       
  3457 	case $deplibs_check_method in
       
  3458 	"file_magic "*)
       
  3459 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
       
  3460 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
       
  3461 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
       
  3462 	    $EGREP "$file_magic_regex" > /dev/null; then
       
  3463 	    :
       
  3464 	  else
       
  3465 	    cat <<_LT_EOF 1>&2
       
  3466 
       
  3467 *** Warning: the command libtool uses to detect shared libraries,
       
  3468 *** $file_magic_cmd, produces output that libtool cannot recognize.
       
  3469 *** The result is that libtool may fail to recognize shared libraries
       
  3470 *** as such.  This will affect the creation of libtool libraries that
       
  3471 *** depend on shared libraries, but programs linked with such libtool
       
  3472 *** libraries will work regardless of this problem.  Nevertheless, you
       
  3473 *** may want to report the problem to your system manager and/or to
       
  3474 *** bug-libtool@gnu.org
       
  3475 
       
  3476 _LT_EOF
       
  3477 	  fi ;;
       
  3478 	esac
       
  3479       fi
       
  3480       break
       
  3481     fi
       
  3482   done
       
  3483   IFS="$lt_save_ifs"
       
  3484   MAGIC_CMD="$lt_save_MAGIC_CMD"
       
  3485   ;;
       
  3486 esac])
       
  3487 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
       
  3488 if test -n "$MAGIC_CMD"; then
       
  3489   AC_MSG_RESULT($MAGIC_CMD)
       
  3490 else
       
  3491   AC_MSG_RESULT(no)
       
  3492 fi
       
  3493 _LT_DECL([], [MAGIC_CMD], [0],
       
  3494 	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
       
  3495 ])# _LT_PATH_TOOL_PREFIX
       
  3496 
       
  3497 # Old name:
       
  3498 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
       
  3499 dnl aclocal-1.4 backwards compatibility:
       
  3500 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
       
  3501 
       
  3502 
       
  3503 # _LT_PATH_MAGIC
       
  3504 # --------------
       
  3505 # find a file program which can recognize a shared library
       
  3506 m4_defun([_LT_PATH_MAGIC],
       
  3507 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
       
  3508 if test -z "$lt_cv_path_MAGIC_CMD"; then
       
  3509   if test -n "$ac_tool_prefix"; then
       
  3510     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
       
  3511   else
       
  3512     MAGIC_CMD=:
       
  3513   fi
       
  3514 fi
       
  3515 ])# _LT_PATH_MAGIC
       
  3516 
       
  3517 
       
  3518 # LT_PATH_LD
       
  3519 # ----------
       
  3520 # find the pathname to the GNU or non-GNU linker
       
  3521 AC_DEFUN([LT_PATH_LD],
       
  3522 [AC_REQUIRE([AC_PROG_CC])dnl
       
  3523 AC_REQUIRE([AC_CANONICAL_HOST])dnl
       
  3524 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
       
  3525 m4_require([_LT_DECL_SED])dnl
       
  3526 m4_require([_LT_DECL_EGREP])dnl
       
  3527 
       
  3528 AC_ARG_WITH([gnu-ld],
       
  3529     [AS_HELP_STRING([--with-gnu-ld],
       
  3530 	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
       
  3531     [test "$withval" = no || with_gnu_ld=yes],
       
  3532     [with_gnu_ld=no])dnl
       
  3533 
       
  3534 ac_prog=ld
       
  3535 if test "$GCC" = yes; then
       
  3536   # Check if gcc -print-prog-name=ld gives a path.
       
  3537   AC_MSG_CHECKING([for ld used by $CC])
       
  3538   case $host in
       
  3539   *-*-mingw*)
       
  3540     # gcc leaves a trailing carriage return which upsets mingw
       
  3541     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
       
  3542   *)
       
  3543     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
       
  3544   esac
       
  3545   case $ac_prog in
       
  3546     # Accept absolute paths.
       
  3547     [[\\/]]* | ?:[[\\/]]*)
       
  3548       re_direlt='/[[^/]][[^/]]*/\.\./'
       
  3549       # Canonicalize the pathname of ld
       
  3550       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
       
  3551       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
       
  3552 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       
  3553       done
       
  3554       test -z "$LD" && LD="$ac_prog"
       
  3555       ;;
       
  3556   "")
       
  3557     # If it fails, then pretend we aren't using GCC.
       
  3558     ac_prog=ld
       
  3559     ;;
       
  3560   *)
       
  3561     # If it is relative, then search for the first ld in PATH.
       
  3562     with_gnu_ld=unknown
       
  3563     ;;
       
  3564   esac
       
  3565 elif test "$with_gnu_ld" = yes; then
       
  3566   AC_MSG_CHECKING([for GNU ld])
       
  3567 else
       
  3568   AC_MSG_CHECKING([for non-GNU ld])
       
  3569 fi
       
  3570 AC_CACHE_VAL(lt_cv_path_LD,
       
  3571 [if test -z "$LD"; then
       
  3572   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
       
  3573   for ac_dir in $PATH; do
       
  3574     IFS="$lt_save_ifs"
       
  3575     test -z "$ac_dir" && ac_dir=.
       
  3576     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       
  3577       lt_cv_path_LD="$ac_dir/$ac_prog"
       
  3578       # Check to see if the program is GNU ld.  I'd rather use --version,
       
  3579       # but apparently some variants of GNU ld only accept -v.
       
  3580       # Break only if it was the GNU/non-GNU ld that we prefer.
       
  3581       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       
  3582       *GNU* | *'with BFD'*)
       
  3583 	test "$with_gnu_ld" != no && break
       
  3584 	;;
       
  3585       *)
       
  3586 	test "$with_gnu_ld" != yes && break
       
  3587 	;;
       
  3588       esac
       
  3589     fi
       
  3590   done
       
  3591   IFS="$lt_save_ifs"
       
  3592 else
       
  3593   lt_cv_path_LD="$LD" # Let the user override the test with a path.
       
  3594 fi])
       
  3595 LD="$lt_cv_path_LD"
       
  3596 if test -n "$LD"; then
       
  3597   AC_MSG_RESULT($LD)
       
  3598 else
       
  3599   AC_MSG_RESULT(no)
       
  3600 fi
       
  3601 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
       
  3602 _LT_PATH_LD_GNU
       
  3603 AC_SUBST([LD])
       
  3604 
       
  3605 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
       
  3606 ])# LT_PATH_LD
       
  3607 
       
  3608 # Old names:
       
  3609 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
       
  3610 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
       
  3611 dnl aclocal-1.4 backwards compatibility:
       
  3612 dnl AC_DEFUN([AM_PROG_LD], [])
       
  3613 dnl AC_DEFUN([AC_PROG_LD], [])
       
  3614 
       
  3615 
       
  3616 # _LT_PATH_LD_GNU
       
  3617 #- --------------
       
  3618 m4_defun([_LT_PATH_LD_GNU],
       
  3619 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
       
  3620 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
       
  3621 case `$LD -v 2>&1 </dev/null` in
       
  3622 *GNU* | *'with BFD'*)
       
  3623   lt_cv_prog_gnu_ld=yes
       
  3624   ;;
       
  3625 *)
       
  3626   lt_cv_prog_gnu_ld=no
       
  3627   ;;
       
  3628 esac])
       
  3629 with_gnu_ld=$lt_cv_prog_gnu_ld
       
  3630 ])# _LT_PATH_LD_GNU
       
  3631 
       
  3632 
       
  3633 # _LT_CMD_RELOAD
       
  3634 # --------------
       
  3635 # find reload flag for linker
       
  3636 #   -- PORTME Some linkers may need a different reload flag.
       
  3637 m4_defun([_LT_CMD_RELOAD],
       
  3638 [AC_CACHE_CHECK([for $LD option to reload object files],
       
  3639   lt_cv_ld_reload_flag,
       
  3640   [lt_cv_ld_reload_flag='-r'])
       
  3641 reload_flag=$lt_cv_ld_reload_flag
       
  3642 case $reload_flag in
       
  3643 "" | " "*) ;;
       
  3644 *) reload_flag=" $reload_flag" ;;
       
  3645 esac
       
  3646 reload_cmds='$LD$reload_flag -o $output$reload_objs'
       
  3647 case $host_os in
       
  3648   darwin*)
       
  3649     if test "$GCC" = yes; then
       
  3650       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
       
  3651     else
       
  3652       reload_cmds='$LD$reload_flag -o $output$reload_objs'
       
  3653     fi
       
  3654     ;;
       
  3655 esac
       
  3656 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
       
  3657 _LT_DECL([], [reload_cmds], [2])dnl
       
  3658 ])# _LT_CMD_RELOAD
       
  3659 
       
  3660 
       
  3661 # _LT_CHECK_MAGIC_METHOD
       
  3662 # ----------------------
       
  3663 # how to check for library dependencies
       
  3664 #  -- PORTME fill in with the dynamic library characteristics
       
  3665 m4_defun([_LT_CHECK_MAGIC_METHOD],
       
  3666 [m4_require([_LT_DECL_EGREP])
       
  3667 m4_require([_LT_DECL_OBJDUMP])
       
  3668 AC_CACHE_CHECK([how to recognize dependent libraries],
       
  3669 lt_cv_deplibs_check_method,
       
  3670 [lt_cv_file_magic_cmd='$MAGIC_CMD'
       
  3671 lt_cv_file_magic_test_file=
       
  3672 lt_cv_deplibs_check_method='unknown'
       
  3673 # Need to set the preceding variable on all platforms that support
       
  3674 # interlibrary dependencies.
       
  3675 # 'none' -- dependencies not supported.
       
  3676 # `unknown' -- same as none, but documents that we really don't know.
       
  3677 # 'pass_all' -- all dependencies passed with no checks.
       
  3678 # 'test_compile' -- check by making test program.
       
  3679 # 'file_magic [[regex]]' -- check by looking for files in library path
       
  3680 # which responds to the $file_magic_cmd with a given extended regex.
       
  3681 # If you have `file' or equivalent on your system and you're not sure
       
  3682 # whether `pass_all' will *always* work, you probably want this one.
       
  3683 
       
  3684 case $host_os in
       
  3685 aix[[4-9]]*)
       
  3686   lt_cv_deplibs_check_method=pass_all
       
  3687   ;;
       
  3688 
       
  3689 beos*)
       
  3690   lt_cv_deplibs_check_method=pass_all
       
  3691   ;;
       
  3692 
       
  3693 bsdi[[45]]*)
       
  3694   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
       
  3695   lt_cv_file_magic_cmd='/usr/bin/file -L'
       
  3696   lt_cv_file_magic_test_file=/shlib/libc.so
       
  3697   ;;
       
  3698 
       
  3699 cygwin*)
       
  3700   # func_win32_libid is a shell function defined in ltmain.sh
       
  3701   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
       
  3702   lt_cv_deplibs_check_method=pass_all
       
  3703   lt_cv_file_magic_cmd='func_win32_libid'
       
  3704   ;;
       
  3705 
       
  3706 mingw* | pw32*)
       
  3707   # Base MSYS/MinGW do not provide the 'file' command needed by
       
  3708   # func_win32_libid shell function, so use a weaker test based on 'objdump',
       
  3709   # unless we find 'file', for example because we are cross-compiling.
       
  3710   if ( file / ) >/dev/null 2>&1; then
       
  3711     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
       
  3712     lt_cv_file_magic_cmd='func_win32_libid'
       
  3713   else
       
  3714     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
       
  3715     lt_cv_file_magic_cmd='$OBJDUMP -f'
       
  3716   fi
       
  3717   lt_cv_deplibs_check_method=pass_all
       
  3718   ;;
       
  3719 
       
  3720 cegcc)
       
  3721   # use the weaker test based on 'objdump'. See mingw*.
       
  3722   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
       
  3723   lt_cv_file_magic_cmd='$OBJDUMP -f'
       
  3724   ;;
       
  3725 
       
  3726 darwin* | rhapsody*)
       
  3727   lt_cv_deplibs_check_method=pass_all
       
  3728   ;;
       
  3729 
       
  3730 freebsd* | dragonfly*)
       
  3731   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
       
  3732     case $host_cpu in
       
  3733     i*86 )
       
  3734       # Not sure whether the presence of OpenBSD here was a mistake.
       
  3735       # Let's accept both of them until this is cleared up.
       
  3736       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
       
  3737       lt_cv_file_magic_cmd=/usr/bin/file
       
  3738       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       
  3739       ;;
       
  3740     esac
       
  3741   else
       
  3742     lt_cv_deplibs_check_method=pass_all
       
  3743   fi
       
  3744   ;;
       
  3745 
       
  3746 gnu*)
       
  3747   lt_cv_deplibs_check_method=pass_all
       
  3748   ;;
       
  3749 
       
  3750 hpux10.20* | hpux11*)
       
  3751   lt_cv_file_magic_cmd=/usr/bin/file
       
  3752   case $host_cpu in
       
  3753   ia64*)
       
  3754     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
       
  3755     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
       
  3756     ;;
       
  3757   hppa*64*)
       
  3758     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
       
  3759     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
       
  3760     ;;
       
  3761   *)
       
  3762     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
       
  3763     lt_cv_file_magic_test_file=/usr/lib/libc.sl
       
  3764     ;;
       
  3765   esac
       
  3766   ;;
       
  3767 
       
  3768 interix[[3-9]]*)
       
  3769   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
       
  3770   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
       
  3771   ;;
       
  3772 
       
  3773 irix5* | irix6* | nonstopux*)
       
  3774   case $LD in
       
  3775   *-32|*"-32 ") libmagic=32-bit;;
       
  3776   *-n32|*"-n32 ") libmagic=N32;;
       
  3777   *-64|*"-64 ") libmagic=64-bit;;
       
  3778   *) libmagic=never-match;;
       
  3779   esac
       
  3780   lt_cv_deplibs_check_method=pass_all
       
  3781   ;;
       
  3782 
       
  3783 # This must be Linux ELF.
       
  3784 linux* | k*bsd*-gnu)
       
  3785   lt_cv_deplibs_check_method=pass_all
       
  3786   ;;
       
  3787 
       
  3788 netbsd*)
       
  3789   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
       
  3790     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
       
  3791   else
       
  3792     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
       
  3793   fi
       
  3794   ;;
       
  3795 
       
  3796 newos6*)
       
  3797   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
       
  3798   lt_cv_file_magic_cmd=/usr/bin/file
       
  3799   lt_cv_file_magic_test_file=/usr/lib/libnls.so
       
  3800   ;;
       
  3801 
       
  3802 *nto* | *qnx*)
       
  3803   lt_cv_deplibs_check_method=pass_all
       
  3804   ;;
       
  3805 
       
  3806 openbsd*)
       
  3807   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
       
  3808     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
       
  3809   else
       
  3810     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
       
  3811   fi
       
  3812   ;;
       
  3813 
       
  3814 osf3* | osf4* | osf5*)
       
  3815   lt_cv_deplibs_check_method=pass_all
       
  3816   ;;
       
  3817 
       
  3818 rdos*)
       
  3819   lt_cv_deplibs_check_method=pass_all
       
  3820   ;;
       
  3821 
       
  3822 solaris*)
       
  3823   lt_cv_deplibs_check_method=pass_all
       
  3824   ;;
       
  3825 
       
  3826 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
       
  3827   lt_cv_deplibs_check_method=pass_all
       
  3828   ;;
       
  3829 
       
  3830 sysv4 | sysv4.3*)
       
  3831   case $host_vendor in
       
  3832   motorola)
       
  3833     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]]'
       
  3834     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
       
  3835     ;;
       
  3836   ncr)
       
  3837     lt_cv_deplibs_check_method=pass_all
       
  3838     ;;
       
  3839   sequent)
       
  3840     lt_cv_file_magic_cmd='/bin/file'
       
  3841     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
       
  3842     ;;
       
  3843   sni)
       
  3844     lt_cv_file_magic_cmd='/bin/file'
       
  3845     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
       
  3846     lt_cv_file_magic_test_file=/lib/libc.so
       
  3847     ;;
       
  3848   siemens)
       
  3849     lt_cv_deplibs_check_method=pass_all
       
  3850     ;;
       
  3851   pc)
       
  3852     lt_cv_deplibs_check_method=pass_all
       
  3853     ;;
       
  3854   esac
       
  3855   ;;
       
  3856 
       
  3857 tpf*)
       
  3858   lt_cv_deplibs_check_method=pass_all
       
  3859   ;;
       
  3860 esac
       
  3861 ])
       
  3862 file_magic_cmd=$lt_cv_file_magic_cmd
       
  3863 deplibs_check_method=$lt_cv_deplibs_check_method
       
  3864 test -z "$deplibs_check_method" && deplibs_check_method=unknown
       
  3865 
       
  3866 _LT_DECL([], [deplibs_check_method], [1],
       
  3867     [Method to check whether dependent libraries are shared objects])
       
  3868 _LT_DECL([], [file_magic_cmd], [1],
       
  3869     [Command to use when deplibs_check_method == "file_magic"])
       
  3870 ])# _LT_CHECK_MAGIC_METHOD
       
  3871 
       
  3872 
       
  3873 # LT_PATH_NM
       
  3874 # ----------
       
  3875 # find the pathname to a BSD- or MS-compatible name lister
       
  3876 AC_DEFUN([LT_PATH_NM],
       
  3877 [AC_REQUIRE([AC_PROG_CC])dnl
       
  3878 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
       
  3879 [if test -n "$NM"; then
       
  3880   # Let the user override the test.
       
  3881   lt_cv_path_NM="$NM"
       
  3882 else
       
  3883   lt_nm_to_check="${ac_tool_prefix}nm"
       
  3884   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
       
  3885     lt_nm_to_check="$lt_nm_to_check nm"
       
  3886   fi
       
  3887   for lt_tmp_nm in $lt_nm_to_check; do
       
  3888     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
       
  3889     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
       
  3890       IFS="$lt_save_ifs"
       
  3891       test -z "$ac_dir" && ac_dir=.
       
  3892       tmp_nm="$ac_dir/$lt_tmp_nm"
       
  3893       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
       
  3894 	# Check to see if the nm accepts a BSD-compat flag.
       
  3895 	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
       
  3896 	#   nm: unknown option "B" ignored
       
  3897 	# Tru64's nm complains that /dev/null is an invalid object file
       
  3898 	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
       
  3899 	*/dev/null* | *'Invalid file or object type'*)
       
  3900 	  lt_cv_path_NM="$tmp_nm -B"
       
  3901 	  break
       
  3902 	  ;;
       
  3903 	*)
       
  3904 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
       
  3905 	  */dev/null*)
       
  3906 	    lt_cv_path_NM="$tmp_nm -p"
       
  3907 	    break
       
  3908 	    ;;
       
  3909 	  *)
       
  3910 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
       
  3911 	    continue # so that we can try to find one that supports BSD flags
       
  3912 	    ;;
       
  3913 	  esac
       
  3914 	  ;;
       
  3915 	esac
       
  3916       fi
       
  3917     done
       
  3918     IFS="$lt_save_ifs"
       
  3919   done
       
  3920   : ${lt_cv_path_NM=no}
       
  3921 fi])
       
  3922 if test "$lt_cv_path_NM" != "no"; then
       
  3923   NM="$lt_cv_path_NM"
       
  3924 else
       
  3925   # Didn't find any BSD compatible name lister, look for dumpbin.
       
  3926   AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
       
  3927   AC_SUBST([DUMPBIN])
       
  3928   if test "$DUMPBIN" != ":"; then
       
  3929     NM="$DUMPBIN"
       
  3930   fi
       
  3931 fi
       
  3932 test -z "$NM" && NM=nm
       
  3933 AC_SUBST([NM])
       
  3934 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
       
  3935 
       
  3936 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
       
  3937   [lt_cv_nm_interface="BSD nm"
       
  3938   echo "int some_variable = 0;" > conftest.$ac_ext
       
  3939   (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
       
  3940   (eval "$ac_compile" 2>conftest.err)
       
  3941   cat conftest.err >&AS_MESSAGE_LOG_FD
       
  3942   (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
       
  3943   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
       
  3944   cat conftest.err >&AS_MESSAGE_LOG_FD
       
  3945   (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
       
  3946   cat conftest.out >&AS_MESSAGE_LOG_FD
       
  3947   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
       
  3948     lt_cv_nm_interface="MS dumpbin"
       
  3949   fi
       
  3950   rm -f conftest*])
       
  3951 ])# LT_PATH_NM
       
  3952 
       
  3953 # Old names:
       
  3954 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
       
  3955 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
       
  3956 dnl aclocal-1.4 backwards compatibility:
       
  3957 dnl AC_DEFUN([AM_PROG_NM], [])
       
  3958 dnl AC_DEFUN([AC_PROG_NM], [])
       
  3959 
       
  3960 
       
  3961 # LT_LIB_M
       
  3962 # --------
       
  3963 # check for math library
       
  3964 AC_DEFUN([LT_LIB_M],
       
  3965 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
       
  3966 LIBM=
       
  3967 case $host in
       
  3968 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
       
  3969   # These system don't have libm, or don't need it
       
  3970   ;;
       
  3971 *-ncr-sysv4.3*)
       
  3972   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
       
  3973   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
       
  3974   ;;
       
  3975 *)
       
  3976   AC_CHECK_LIB(m, cos, LIBM="-lm")
       
  3977   ;;
       
  3978 esac
       
  3979 AC_SUBST([LIBM])
       
  3980 ])# LT_LIB_M
       
  3981 
       
  3982 # Old name:
       
  3983 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
       
  3984 dnl aclocal-1.4 backwards compatibility:
       
  3985 dnl AC_DEFUN([AC_CHECK_LIBM], [])
       
  3986 
       
  3987 
       
  3988 # _LT_COMPILER_NO_RTTI([TAGNAME])
       
  3989 # -------------------------------
       
  3990 m4_defun([_LT_COMPILER_NO_RTTI],
       
  3991 [m4_require([_LT_TAG_COMPILER])dnl
       
  3992 
       
  3993 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
       
  3994 
       
  3995 if test "$GCC" = yes; then
       
  3996   _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
       
  3997 
       
  3998   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
       
  3999     lt_cv_prog_compiler_rtti_exceptions,
       
  4000     [-fno-rtti -fno-exceptions], [],
       
  4001     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
       
  4002 fi
       
  4003 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
       
  4004 	[Compiler flag to turn off builtin functions])
       
  4005 ])# _LT_COMPILER_NO_RTTI
       
  4006 
       
  4007 
       
  4008 # _LT_CMD_GLOBAL_SYMBOLS
       
  4009 # ----------------------
       
  4010 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
       
  4011 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
       
  4012 AC_REQUIRE([AC_PROG_CC])dnl
       
  4013 AC_REQUIRE([LT_PATH_NM])dnl
       
  4014 AC_REQUIRE([LT_PATH_LD])dnl
       
  4015 m4_require([_LT_DECL_SED])dnl
       
  4016 m4_require([_LT_DECL_EGREP])dnl
       
  4017 m4_require([_LT_TAG_COMPILER])dnl
       
  4018 
       
  4019 # Check for command to grab the raw symbol name followed by C symbol from nm.
       
  4020 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
       
  4021 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
       
  4022 [
       
  4023 # These are sane defaults that work on at least a few old systems.
       
  4024 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
       
  4025 
       
  4026 # Character class describing NM global symbol codes.
       
  4027 symcode='[[BCDEGRST]]'
       
  4028 
       
  4029 # Regexp to match symbols that can be accessed directly from C.
       
  4030 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
       
  4031 
       
  4032 # Define system-specific variables.
       
  4033 case $host_os in
       
  4034 aix*)
       
  4035   symcode='[[BCDT]]'
       
  4036   ;;
       
  4037 cygwin* | mingw* | pw32* | cegcc*)
       
  4038   symcode='[[ABCDGISTW]]'
       
  4039   ;;
       
  4040 hpux*)
       
  4041   if test "$host_cpu" = ia64; then
       
  4042     symcode='[[ABCDEGRST]]'
       
  4043   fi
       
  4044   ;;
       
  4045 irix* | nonstopux*)
       
  4046   symcode='[[BCDEGRST]]'
       
  4047   ;;
       
  4048 osf*)
       
  4049   symcode='[[BCDEGQRST]]'
       
  4050   ;;
       
  4051 solaris*)
       
  4052   symcode='[[BDRT]]'
       
  4053   ;;
       
  4054 sco3.2v5*)
       
  4055   symcode='[[DT]]'
       
  4056   ;;
       
  4057 sysv4.2uw2*)
       
  4058   symcode='[[DT]]'
       
  4059   ;;
       
  4060 sysv5* | sco5v6* | unixware* | OpenUNIX*)
       
  4061   symcode='[[ABDT]]'
       
  4062   ;;
       
  4063 sysv4)
       
  4064   symcode='[[DFNSTU]]'
       
  4065   ;;
       
  4066 esac
       
  4067 
       
  4068 # If we're using GNU nm, then use its standard symbol codes.
       
  4069 case `$NM -V 2>&1` in
       
  4070 *GNU* | *'with BFD'*)
       
  4071   symcode='[[ABCDGIRSTW]]' ;;
       
  4072 esac
       
  4073 
       
  4074 # Transform an extracted symbol line into a proper C declaration.
       
  4075 # Some systems (esp. on ia64) link data and code symbols differently,
       
  4076 # so use this general approach.
       
  4077 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
       
  4078 
       
  4079 # Transform an extracted symbol line into symbol name and symbol address
       
  4080 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
       
  4081 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'"
       
  4082 
       
  4083 # Handle CRLF in mingw tool chain
       
  4084 opt_cr=
       
  4085 case $build_os in
       
  4086 mingw*)
       
  4087   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
       
  4088   ;;
       
  4089 esac
       
  4090 
       
  4091 # Try without a prefix underscore, then with it.
       
  4092 for ac_symprfx in "" "_"; do
       
  4093 
       
  4094   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
       
  4095   symxfrm="\\1 $ac_symprfx\\2 \\2"
       
  4096 
       
  4097   # Write the raw and C identifiers.
       
  4098   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
       
  4099     # Fake it for dumpbin and say T for any non-static function
       
  4100     # and D for any global variable.
       
  4101     # Also find C++ and __fastcall symbols from MSVC++,
       
  4102     # which start with @ or ?.
       
  4103     lt_cv_sys_global_symbol_pipe="$AWK ['"\
       
  4104 "     {last_section=section; section=\$ 3};"\
       
  4105 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
       
  4106 "     \$ 0!~/External *\|/{next};"\
       
  4107 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
       
  4108 "     {if(hide[section]) next};"\
       
  4109 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
       
  4110 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
       
  4111 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\