Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
  2.  
  3. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  4.  
  5. # This file is free software; the Free Software Foundation
  6. # gives unlimited permission to copy and/or distribute it,
  7. # with or without modifications, as long as this notice is preserved.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  11. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  12. # PARTICULAR PURPOSE.
  13.  
  14. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  15. m4_ifndef([AC_AUTOCONF_VERSION],
  16.   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  17. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  18. [m4_warning([this file was generated for autoconf 2.69.
  19. You have another version of autoconf.  It may work, but is not guaranteed to.
  20. If you have problems, you may need to regenerate the build system entirely.
  21. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  22.  
  23. # Copyright (C) 2002-2013 Free Software Foundation, Inc.
  24. #
  25. # This file is free software; the Free Software Foundation
  26. # gives unlimited permission to copy and/or distribute it,
  27. # with or without modifications, as long as this notice is preserved.
  28.  
  29. # AM_AUTOMAKE_VERSION(VERSION)
  30. # ----------------------------
  31. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  32. # generated from the m4 files accompanying Automake X.Y.
  33. # (This private macro should not be called outside this file.)
  34. AC_DEFUN([AM_AUTOMAKE_VERSION],
  35. [am__api_version='1.14'
  36. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  37. dnl require some minimum version.  Point them to the right macro.
  38. m4_if([$1], [1.14.1], [],
  39.       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  40. ])
  41.  
  42. # _AM_AUTOCONF_VERSION(VERSION)
  43. # -----------------------------
  44. # aclocal traces this macro to find the Autoconf version.
  45. # This is a private macro too.  Using m4_define simplifies
  46. # the logic in aclocal, which can simply ignore this definition.
  47. m4_define([_AM_AUTOCONF_VERSION], [])
  48.  
  49. # AM_SET_CURRENT_AUTOMAKE_VERSION
  50. # -------------------------------
  51. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  52. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  53. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  54. [AM_AUTOMAKE_VERSION([1.14.1])dnl
  55. m4_ifndef([AC_AUTOCONF_VERSION],
  56.   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  57. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  58.  
  59. # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
  60.  
  61. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  62. #
  63. # This file is free software; the Free Software Foundation
  64. # gives unlimited permission to copy and/or distribute it,
  65. # with or without modifications, as long as this notice is preserved.
  66.  
  67. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  68. # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
  69. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  70. #
  71. # Of course, Automake must honor this variable whenever it calls a
  72. # tool from the auxiliary directory.  The problem is that $srcdir (and
  73. # therefore $ac_aux_dir as well) can be either absolute or relative,
  74. # depending on how configure is run.  This is pretty annoying, since
  75. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  76. # source directory, any form will work fine, but in subdirectories a
  77. # relative path needs to be adjusted first.
  78. #
  79. # $ac_aux_dir/missing
  80. #    fails when called from a subdirectory if $ac_aux_dir is relative
  81. # $top_srcdir/$ac_aux_dir/missing
  82. #    fails if $ac_aux_dir is absolute,
  83. #    fails when called from a subdirectory in a VPATH build with
  84. #          a relative $ac_aux_dir
  85. #
  86. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  87. # are both prefixed by $srcdir.  In an in-source build this is usually
  88. # harmless because $srcdir is '.', but things will broke when you
  89. # start a VPATH build or use an absolute $srcdir.
  90. #
  91. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  92. # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
  93. #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  94. # and then we would define $MISSING as
  95. #   MISSING="\${SHELL} $am_aux_dir/missing"
  96. # This will work as long as MISSING is not called from configure, because
  97. # unfortunately $(top_srcdir) has no meaning in configure.
  98. # However there are other variables, like CC, which are often used in
  99. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  100. #
  101. # Another solution, used here, is to always expand $ac_aux_dir to an
  102. # absolute PATH.  The drawback is that using absolute paths prevent a
  103. # configured tree to be moved without reconfiguration.
  104.  
  105. AC_DEFUN([AM_AUX_DIR_EXPAND],
  106. [dnl Rely on autoconf to set up CDPATH properly.
  107. AC_PREREQ([2.50])dnl
  108. # expand $ac_aux_dir to an absolute path
  109. am_aux_dir=`cd $ac_aux_dir && pwd`
  110. ])
  111.  
  112. # AM_CONDITIONAL                                            -*- Autoconf -*-
  113.  
  114. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  115. #
  116. # This file is free software; the Free Software Foundation
  117. # gives unlimited permission to copy and/or distribute it,
  118. # with or without modifications, as long as this notice is preserved.
  119.  
  120. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  121. # -------------------------------------
  122. # Define a conditional.
  123. AC_DEFUN([AM_CONDITIONAL],
  124. [AC_PREREQ([2.52])dnl
  125.  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
  126.        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  127. AC_SUBST([$1_TRUE])dnl
  128. AC_SUBST([$1_FALSE])dnl
  129. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  130. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  131. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  132. if $2; then
  133.   $1_TRUE=
  134.   $1_FALSE='#'
  135. else
  136.   $1_TRUE='#'
  137.   $1_FALSE=
  138. fi
  139. AC_CONFIG_COMMANDS_PRE(
  140. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  141.   AC_MSG_ERROR([[conditional "$1" was never defined.
  142. Usually this means the macro was only invoked conditionally.]])
  143. fi])])
  144.  
  145. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  146. #
  147. # This file is free software; the Free Software Foundation
  148. # gives unlimited permission to copy and/or distribute it,
  149. # with or without modifications, as long as this notice is preserved.
  150.  
  151.  
  152. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  153. # written in clear, in which case automake, when reading aclocal.m4,
  154. # will think it sees a *use*, and therefore will trigger all it's
  155. # C support machinery.  Also note that it means that autoscan, seeing
  156. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  157.  
  158.  
  159. # _AM_DEPENDENCIES(NAME)
  160. # ----------------------
  161. # See how the compiler implements dependency checking.
  162. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  163. # We try a few techniques and use that to set a single cache variable.
  164. #
  165. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  166. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  167. # dependency, and given that the user is not expected to run this macro,
  168. # just rely on AC_PROG_CC.
  169. AC_DEFUN([_AM_DEPENDENCIES],
  170. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  171. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  172. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  173. AC_REQUIRE([AM_DEP_TRACK])dnl
  174.  
  175. m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
  176.       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
  177.       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  178.       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  179.       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
  180.       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
  181.                     [depcc="$$1"   am_compiler_list=])
  182.  
  183. AC_CACHE_CHECK([dependency style of $depcc],
  184.                [am_cv_$1_dependencies_compiler_type],
  185. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  186.   # We make a subdir and do the tests there.  Otherwise we can end up
  187.   # making bogus files that we don't know about and never remove.  For
  188.   # instance it was reported that on HP-UX the gcc test will end up
  189.   # making a dummy file named 'D' -- because '-MD' means "put the output
  190.   # in D".
  191.   rm -rf conftest.dir
  192.   mkdir conftest.dir
  193.   # Copy depcomp to subdir because otherwise we won't find it if we're
  194.   # using a relative directory.
  195.   cp "$am_depcomp" conftest.dir
  196.   cd conftest.dir
  197.   # We will build objects and dependencies in a subdirectory because
  198.   # it helps to detect inapplicable dependency modes.  For instance
  199.   # both Tru64's cc and ICC support -MD to output dependencies as a
  200.   # side effect of compilation, but ICC will put the dependencies in
  201.   # the current directory while Tru64 will put them in the object
  202.   # directory.
  203.   mkdir sub
  204.  
  205.   am_cv_$1_dependencies_compiler_type=none
  206.   if test "$am_compiler_list" = ""; then
  207.      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  208.   fi
  209.   am__universal=false
  210.   m4_case([$1], [CC],
  211.     [case " $depcc " in #(
  212.      *\ -arch\ *\ -arch\ *) am__universal=true ;;
  213.      esac],
  214.     [CXX],
  215.     [case " $depcc " in #(
  216.      *\ -arch\ *\ -arch\ *) am__universal=true ;;
  217.      esac])
  218.  
  219.   for depmode in $am_compiler_list; do
  220.     # Setup a source with many dependencies, because some compilers
  221.     # like to wrap large dependency lists on column 80 (with \), and
  222.     # we should not choose a depcomp mode which is confused by this.
  223.     #
  224.     # We need to recreate these files for each test, as the compiler may
  225.     # overwrite some of them when testing with obscure command lines.
  226.     # This happens at least with the AIX C compiler.
  227.     : > sub/conftest.c
  228.     for i in 1 2 3 4 5 6; do
  229.       echo '#include "conftst'$i'.h"' >> sub/conftest.c
  230.       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  231.       # Solaris 10 /bin/sh.
  232.       echo '/* dummy */' > sub/conftst$i.h
  233.     done
  234.     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  235.  
  236.     # We check with '-c' and '-o' for the sake of the "dashmstdout"
  237.     # mode.  It turns out that the SunPro C++ compiler does not properly
  238.     # handle '-M -o', and we need to detect this.  Also, some Intel
  239.     # versions had trouble with output in subdirs.
  240.     am__obj=sub/conftest.${OBJEXT-o}
  241.     am__minus_obj="-o $am__obj"
  242.     case $depmode in
  243.     gcc)
  244.       # This depmode causes a compiler race in universal mode.
  245.       test "$am__universal" = false || continue
  246.       ;;
  247.     nosideeffect)
  248.       # After this tag, mechanisms are not by side-effect, so they'll
  249.       # only be used when explicitly requested.
  250.       if test "x$enable_dependency_tracking" = xyes; then
  251.         continue
  252.       else
  253.         break
  254.       fi
  255.       ;;
  256.     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  257.       # This compiler won't grok '-c -o', but also, the minuso test has
  258.       # not run yet.  These depmodes are late enough in the game, and
  259.       # so weak that their functioning should not be impacted.
  260.       am__obj=conftest.${OBJEXT-o}
  261.       am__minus_obj=
  262.       ;;
  263.     none) break ;;
  264.     esac
  265.     if depmode=$depmode \
  266.        source=sub/conftest.c object=$am__obj \
  267.        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  268.        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  269.          >/dev/null 2>conftest.err &&
  270.        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  271.        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  272.        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  273.        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  274.       # icc doesn't choke on unknown options, it will just issue warnings
  275.       # or remarks (even with -Werror).  So we grep stderr for any message
  276.       # that says an option was ignored or not supported.
  277.       # When given -MP, icc 7.0 and 7.1 complain thusly:
  278.       #   icc: Command line warning: ignoring option '-M'; no argument required
  279.       # The diagnosis changed in icc 8.0:
  280.       #   icc: Command line remark: option '-MP' not supported
  281.       if (grep 'ignoring option' conftest.err ||
  282.           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  283.         am_cv_$1_dependencies_compiler_type=$depmode
  284.         break
  285.       fi
  286.     fi
  287.   done
  288.  
  289.   cd ..
  290.   rm -rf conftest.dir
  291. else
  292.   am_cv_$1_dependencies_compiler_type=none
  293. fi
  294. ])
  295. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  296. AM_CONDITIONAL([am__fastdep$1], [
  297.   test "x$enable_dependency_tracking" != xno \
  298.   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  299. ])
  300.  
  301.  
  302. # AM_SET_DEPDIR
  303. # -------------
  304. # Choose a directory name for dependency files.
  305. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  306. AC_DEFUN([AM_SET_DEPDIR],
  307. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  308. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  309. ])
  310.  
  311.  
  312. # AM_DEP_TRACK
  313. # ------------
  314. AC_DEFUN([AM_DEP_TRACK],
  315. [AC_ARG_ENABLE([dependency-tracking], [dnl
  316. AS_HELP_STRING(
  317.   [--enable-dependency-tracking],
  318.   [do not reject slow dependency extractors])
  319. AS_HELP_STRING(
  320.   [--disable-dependency-tracking],
  321.   [speeds up one-time build])])
  322. if test "x$enable_dependency_tracking" != xno; then
  323.   am_depcomp="$ac_aux_dir/depcomp"
  324.   AMDEPBACKSLASH='\'
  325.   am__nodep='_no'
  326. fi
  327. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  328. AC_SUBST([AMDEPBACKSLASH])dnl
  329. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  330. AC_SUBST([am__nodep])dnl
  331. _AM_SUBST_NOTMAKE([am__nodep])dnl
  332. ])
  333.  
  334. # Generate code to set up dependency tracking.              -*- Autoconf -*-
  335.  
  336. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  337. #
  338. # This file is free software; the Free Software Foundation
  339. # gives unlimited permission to copy and/or distribute it,
  340. # with or without modifications, as long as this notice is preserved.
  341.  
  342.  
  343. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  344. # ------------------------------
  345. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  346. [{
  347.   # Older Autoconf quotes --file arguments for eval, but not when files
  348.   # are listed without --file.  Let's play safe and only enable the eval
  349.   # if we detect the quoting.
  350.   case $CONFIG_FILES in
  351.   *\'*) eval set x "$CONFIG_FILES" ;;
  352.   *)   set x $CONFIG_FILES ;;
  353.   esac
  354.   shift
  355.   for mf
  356.   do
  357.     # Strip MF so we end up with the name of the file.
  358.     mf=`echo "$mf" | sed -e 's/:.*$//'`
  359.     # Check whether this is an Automake generated Makefile or not.
  360.     # We used to match only the files named 'Makefile.in', but
  361.     # some people rename them; so instead we look at the file content.
  362.     # Grep'ing the first line is not enough: some people post-process
  363.     # each Makefile.in and add a new line on top of each file to say so.
  364.     # Grep'ing the whole file is not good either: AIX grep has a line
  365.     # limit of 2048, but all sed's we know have understand at least 4000.
  366.     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  367.       dirpart=`AS_DIRNAME("$mf")`
  368.     else
  369.       continue
  370.     fi
  371.     # Extract the definition of DEPDIR, am__include, and am__quote
  372.     # from the Makefile without running 'make'.
  373.     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  374.     test -z "$DEPDIR" && continue
  375.     am__include=`sed -n 's/^am__include = //p' < "$mf"`
  376.     test -z "$am__include" && continue
  377.     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  378.     # Find all dependency output files, they are included files with
  379.     # $(DEPDIR) in their names.  We invoke sed twice because it is the
  380.     # simplest approach to changing $(DEPDIR) to its actual value in the
  381.     # expansion.
  382.     for file in `sed -n "
  383.       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  384.          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  385.       # Make sure the directory exists.
  386.       test -f "$dirpart/$file" && continue
  387.       fdir=`AS_DIRNAME(["$file"])`
  388.       AS_MKDIR_P([$dirpart/$fdir])
  389.       # echo "creating $dirpart/$file"
  390.       echo '# dummy' > "$dirpart/$file"
  391.     done
  392.   done
  393. }
  394. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  395.  
  396.  
  397. # AM_OUTPUT_DEPENDENCY_COMMANDS
  398. # -----------------------------
  399. # This macro should only be invoked once -- use via AC_REQUIRE.
  400. #
  401. # This code is only required when automatic dependency tracking
  402. # is enabled.  FIXME.  This creates each '.P' file that we will
  403. # need in order to bootstrap the dependency handling code.
  404. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  405. [AC_CONFIG_COMMANDS([depfiles],
  406.      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  407.      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  408. ])
  409.  
  410. # Do all the work for Automake.                             -*- Autoconf -*-
  411.  
  412. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  413. #
  414. # This file is free software; the Free Software Foundation
  415. # gives unlimited permission to copy and/or distribute it,
  416. # with or without modifications, as long as this notice is preserved.
  417.  
  418. # This macro actually does too much.  Some checks are only needed if
  419. # your package does certain things.  But this isn't really a big deal.
  420.  
  421. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  422. m4_define([AC_PROG_CC],
  423. m4_defn([AC_PROG_CC])
  424. [_AM_PROG_CC_C_O
  425. ])
  426.  
  427. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  428. # AM_INIT_AUTOMAKE([OPTIONS])
  429. # -----------------------------------------------
  430. # The call with PACKAGE and VERSION arguments is the old style
  431. # call (pre autoconf-2.50), which is being phased out.  PACKAGE
  432. # and VERSION should now be passed to AC_INIT and removed from
  433. # the call to AM_INIT_AUTOMAKE.
  434. # We support both call styles for the transition.  After
  435. # the next Automake release, Autoconf can make the AC_INIT
  436. # arguments mandatory, and then we can depend on a new Autoconf
  437. # release and drop the old call support.
  438. AC_DEFUN([AM_INIT_AUTOMAKE],
  439. [AC_PREREQ([2.65])dnl
  440. dnl Autoconf wants to disallow AM_ names.  We explicitly allow
  441. dnl the ones we care about.
  442. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  443. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  444. AC_REQUIRE([AC_PROG_INSTALL])dnl
  445. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  446.   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  447.   # is not polluted with repeated "-I."
  448.   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  449.   # test to see if srcdir already configured
  450.   if test -f $srcdir/config.status; then
  451.     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  452.   fi
  453. fi
  454.  
  455. # test whether we have cygpath
  456. if test -z "$CYGPATH_W"; then
  457.   if (cygpath --version) >/dev/null 2>/dev/null; then
  458.     CYGPATH_W='cygpath -w'
  459.   else
  460.     CYGPATH_W=echo
  461.   fi
  462. fi
  463. AC_SUBST([CYGPATH_W])
  464.  
  465. # Define the identity of the package.
  466. dnl Distinguish between old-style and new-style calls.
  467. m4_ifval([$2],
  468. [AC_DIAGNOSE([obsolete],
  469.              [$0: two- and three-arguments forms are deprecated.])
  470. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  471.  AC_SUBST([PACKAGE], [$1])dnl
  472.  AC_SUBST([VERSION], [$2])],
  473. [_AM_SET_OPTIONS([$1])dnl
  474. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  475. m4_if(
  476.   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  477.   [ok:ok],,
  478.   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  479.  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  480.  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  481.  
  482. _AM_IF_OPTION([no-define],,
  483. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  484.  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  485.  
  486. # Some tools Automake needs.
  487. AC_REQUIRE([AM_SANITY_CHECK])dnl
  488. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  489. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  490. AM_MISSING_PROG([AUTOCONF], [autoconf])
  491. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  492. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  493. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  494. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  495. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  496. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  497. # For better backward compatibility.  To be removed once Automake 1.9.x
  498. # dies out for good.  For more background, see:
  499. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  500. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  501. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  502. # We need awk for the "check" target.  The system "awk" is bad on
  503. # some platforms.
  504. AC_REQUIRE([AC_PROG_AWK])dnl
  505. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  506. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  507. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  508.               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  509.                              [_AM_PROG_TAR([v7])])])
  510. _AM_IF_OPTION([no-dependencies],,
  511. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  512.                   [_AM_DEPENDENCIES([CC])],
  513.                   [m4_define([AC_PROG_CC],
  514.                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  515. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  516.                   [_AM_DEPENDENCIES([CXX])],
  517.                   [m4_define([AC_PROG_CXX],
  518.                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  519. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  520.                   [_AM_DEPENDENCIES([OBJC])],
  521.                   [m4_define([AC_PROG_OBJC],
  522.                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  523. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  524.                   [_AM_DEPENDENCIES([OBJCXX])],
  525.                   [m4_define([AC_PROG_OBJCXX],
  526.                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  527. ])
  528. AC_REQUIRE([AM_SILENT_RULES])dnl
  529. dnl The testsuite driver may need to know about EXEEXT, so add the
  530. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
  531. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  532. AC_CONFIG_COMMANDS_PRE(dnl
  533. [m4_provide_if([_AM_COMPILER_EXEEXT],
  534.   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  535.  
  536. # POSIX will say in a future version that running "rm -f" with no argument
  537. # is OK; and we want to be able to make that assumption in our Makefile
  538. # recipes.  So use an aggressive probe to check that the usage we want is
  539. # actually supported "in the wild" to an acceptable degree.
  540. # See automake bug#10828.
  541. # To make any issue more visible, cause the running configure to be aborted
  542. # by default if the 'rm' program in use doesn't match our expectations; the
  543. # user can still override this though.
  544. if rm -f && rm -fr && rm -rf; then : OK; else
  545.   cat >&2 <<'END'
  546. Oops!
  547.  
  548. Your 'rm' program seems unable to run without file operands specified
  549. on the command line, even when the '-f' option is present.  This is contrary
  550. to the behaviour of most rm programs out there, and not conforming with
  551. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  552.  
  553. Please tell bug-automake@gnu.org about your system, including the value
  554. of your $PATH and any error possibly output before this message.  This
  555. can help us improve future automake versions.
  556.  
  557. END
  558.   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  559.     echo 'Configuration will proceed anyway, since you have set the' >&2
  560.     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  561.     echo >&2
  562.   else
  563.     cat >&2 <<'END'
  564. Aborting the configuration process, to ensure you take notice of the issue.
  565.  
  566. You can download and install GNU coreutils to get an 'rm' implementation
  567. that behaves properly: <http://www.gnu.org/software/coreutils/>.
  568.  
  569. If you want to complete the configuration process using your problematic
  570. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  571. to "yes", and re-run configure.
  572.  
  573. END
  574.     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  575.   fi
  576. fi])
  577.  
  578. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
  579. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  580. dnl mangled by Autoconf and run in a shell conditional statement.
  581. m4_define([_AC_COMPILER_EXEEXT],
  582. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  583.  
  584. # When config.status generates a header, we must update the stamp-h file.
  585. # This file resides in the same directory as the config header
  586. # that is generated.  The stamp files are numbered to have different names.
  587.  
  588. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  589. # loop where config.status creates the headers, so we can generate
  590. # our stamp files there.
  591. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  592. [# Compute $1's index in $config_headers.
  593. _am_arg=$1
  594. _am_stamp_count=1
  595. for _am_header in $config_headers :; do
  596.   case $_am_header in
  597.     $_am_arg | $_am_arg:* )
  598.       break ;;
  599.     * )
  600.       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  601.   esac
  602. done
  603. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  604.  
  605. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  606. #
  607. # This file is free software; the Free Software Foundation
  608. # gives unlimited permission to copy and/or distribute it,
  609. # with or without modifications, as long as this notice is preserved.
  610.  
  611. # AM_PROG_INSTALL_SH
  612. # ------------------
  613. # Define $install_sh.
  614. AC_DEFUN([AM_PROG_INSTALL_SH],
  615. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  616. if test x"${install_sh}" != xset; then
  617.   case $am_aux_dir in
  618.   *\ * | *\     *)
  619.     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  620.   *)
  621.     install_sh="\${SHELL} $am_aux_dir/install-sh"
  622.   esac
  623. fi
  624. AC_SUBST([install_sh])])
  625.  
  626. # Copyright (C) 2003-2013 Free Software Foundation, Inc.
  627. #
  628. # This file is free software; the Free Software Foundation
  629. # gives unlimited permission to copy and/or distribute it,
  630. # with or without modifications, as long as this notice is preserved.
  631.  
  632. # Check whether the underlying file-system supports filenames
  633. # with a leading dot.  For instance MS-DOS doesn't.
  634. AC_DEFUN([AM_SET_LEADING_DOT],
  635. [rm -rf .tst 2>/dev/null
  636. mkdir .tst 2>/dev/null
  637. if test -d .tst; then
  638.   am__leading_dot=.
  639. else
  640.   am__leading_dot=_
  641. fi
  642. rmdir .tst 2>/dev/null
  643. AC_SUBST([am__leading_dot])])
  644.  
  645. # Check to see how 'make' treats includes.                  -*- Autoconf -*-
  646.  
  647. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  648. #
  649. # This file is free software; the Free Software Foundation
  650. # gives unlimited permission to copy and/or distribute it,
  651. # with or without modifications, as long as this notice is preserved.
  652.  
  653. # AM_MAKE_INCLUDE()
  654. # -----------------
  655. # Check to see how make treats includes.
  656. AC_DEFUN([AM_MAKE_INCLUDE],
  657. [am_make=${MAKE-make}
  658. cat > confinc << 'END'
  659. am__doit:
  660.         @echo this is the am__doit target
  661. .PHONY: am__doit
  662. END
  663. # If we don't find an include directive, just comment out the code.
  664. AC_MSG_CHECKING([for style of include used by $am_make])
  665. am__include="#"
  666. am__quote=
  667. _am_result=none
  668. # First try GNU make style include.
  669. echo "include confinc" > confmf
  670. # Ignore all kinds of additional output from 'make'.
  671. case `$am_make -s -f confmf 2> /dev/null` in #(
  672. *the\ am__doit\ target*)
  673.   am__include=include
  674.   am__quote=
  675.   _am_result=GNU
  676.   ;;
  677. esac
  678. # Now try BSD make style include.
  679. if test "$am__include" = "#"; then
  680.    echo '.include "confinc"' > confmf
  681.    case `$am_make -s -f confmf 2> /dev/null` in #(
  682.    *the\ am__doit\ target*)
  683.      am__include=.include
  684.      am__quote="\""
  685.      _am_result=BSD
  686.      ;;
  687.    esac
  688. fi
  689. AC_SUBST([am__include])
  690. AC_SUBST([am__quote])
  691. AC_MSG_RESULT([$_am_result])
  692. rm -f confinc confmf
  693. ])
  694.  
  695. # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
  696.  
  697. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  698. #
  699. # This file is free software; the Free Software Foundation
  700. # gives unlimited permission to copy and/or distribute it,
  701. # with or without modifications, as long as this notice is preserved.
  702.  
  703. # AM_MISSING_PROG(NAME, PROGRAM)
  704. # ------------------------------
  705. AC_DEFUN([AM_MISSING_PROG],
  706. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  707. $1=${$1-"${am_missing_run}$2"}
  708. AC_SUBST($1)])
  709.  
  710. # AM_MISSING_HAS_RUN
  711. # ------------------
  712. # Define MISSING if not defined so far and test if it is modern enough.
  713. # If it is, set am_missing_run to use it, otherwise, to nothing.
  714. AC_DEFUN([AM_MISSING_HAS_RUN],
  715. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  716. AC_REQUIRE_AUX_FILE([missing])dnl
  717. if test x"${MISSING+set}" != xset; then
  718.   case $am_aux_dir in
  719.   *\ * | *\     *)
  720.     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  721.   *)
  722.     MISSING="\${SHELL} $am_aux_dir/missing" ;;
  723.   esac
  724. fi
  725. # Use eval to expand $SHELL
  726. if eval "$MISSING --is-lightweight"; then
  727.   am_missing_run="$MISSING "
  728. else
  729.   am_missing_run=
  730.   AC_MSG_WARN(['missing' script is too old or missing])
  731. fi
  732. ])
  733.  
  734. # Helper functions for option handling.                     -*- Autoconf -*-
  735.  
  736. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  737. #
  738. # This file is free software; the Free Software Foundation
  739. # gives unlimited permission to copy and/or distribute it,
  740. # with or without modifications, as long as this notice is preserved.
  741.  
  742. # _AM_MANGLE_OPTION(NAME)
  743. # -----------------------
  744. AC_DEFUN([_AM_MANGLE_OPTION],
  745. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  746.  
  747. # _AM_SET_OPTION(NAME)
  748. # --------------------
  749. # Set option NAME.  Presently that only means defining a flag for this option.
  750. AC_DEFUN([_AM_SET_OPTION],
  751. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  752.  
  753. # _AM_SET_OPTIONS(OPTIONS)
  754. # ------------------------
  755. # OPTIONS is a space-separated list of Automake options.
  756. AC_DEFUN([_AM_SET_OPTIONS],
  757. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  758.  
  759. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  760. # -------------------------------------------
  761. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  762. AC_DEFUN([_AM_IF_OPTION],
  763. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  764.  
  765. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  766. #
  767. # This file is free software; the Free Software Foundation
  768. # gives unlimited permission to copy and/or distribute it,
  769. # with or without modifications, as long as this notice is preserved.
  770.  
  771. # _AM_PROG_CC_C_O
  772. # ---------------
  773. # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
  774. # to automatically call this.
  775. AC_DEFUN([_AM_PROG_CC_C_O],
  776. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  777. AC_REQUIRE_AUX_FILE([compile])dnl
  778. AC_LANG_PUSH([C])dnl
  779. AC_CACHE_CHECK(
  780.   [whether $CC understands -c and -o together],
  781.   [am_cv_prog_cc_c_o],
  782.   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
  783.   # Make sure it works both with $CC and with simple cc.
  784.   # Following AC_PROG_CC_C_O, we do the test twice because some
  785.   # compilers refuse to overwrite an existing .o file with -o,
  786.   # though they will create one.
  787.   am_cv_prog_cc_c_o=yes
  788.   for am_i in 1 2; do
  789.     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
  790.          && test -f conftest2.$ac_objext; then
  791.       : OK
  792.     else
  793.       am_cv_prog_cc_c_o=no
  794.       break
  795.     fi
  796.   done
  797.   rm -f core conftest*
  798.   unset am_i])
  799. if test "$am_cv_prog_cc_c_o" != yes; then
  800.    # Losing compiler, so override with the script.
  801.    # FIXME: It is wrong to rewrite CC.
  802.    # But if we don't then we get into trouble of one sort or another.
  803.    # A longer-term fix would be to have automake use am__CC in this case,
  804.    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  805.    CC="$am_aux_dir/compile $CC"
  806. fi
  807. AC_LANG_POP([C])])
  808.  
  809. # For backward compatibility.
  810. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
  811.  
  812. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  813. #
  814. # This file is free software; the Free Software Foundation
  815. # gives unlimited permission to copy and/or distribute it,
  816. # with or without modifications, as long as this notice is preserved.
  817.  
  818. # AM_RUN_LOG(COMMAND)
  819. # -------------------
  820. # Run COMMAND, save the exit status in ac_status, and log it.
  821. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
  822. AC_DEFUN([AM_RUN_LOG],
  823. [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
  824.    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
  825.    ac_status=$?
  826.    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  827.    (exit $ac_status); }])
  828.  
  829. # Check to make sure that the build environment is sane.    -*- Autoconf -*-
  830.  
  831. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  832. #
  833. # This file is free software; the Free Software Foundation
  834. # gives unlimited permission to copy and/or distribute it,
  835. # with or without modifications, as long as this notice is preserved.
  836.  
  837. # AM_SANITY_CHECK
  838. # ---------------
  839. AC_DEFUN([AM_SANITY_CHECK],
  840. [AC_MSG_CHECKING([whether build environment is sane])
  841. # Reject unsafe characters in $srcdir or the absolute working directory
  842. # name.  Accept space and tab only in the latter.
  843. am_lf='
  844. '
  845. case `pwd` in
  846.   *[[\\\"\#\$\&\'\`$am_lf]]*)
  847.     AC_MSG_ERROR([unsafe absolute working directory name]);;
  848. esac
  849. case $srcdir in
  850.   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
  851.     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  852. esac
  853.  
  854. # Do 'set' in a subshell so we don't clobber the current shell's
  855. # arguments.  Must try -L first in case configure is actually a
  856. # symlink; some systems play weird games with the mod time of symlinks
  857. # (eg FreeBSD returns the mod time of the symlink's containing
  858. # directory).
  859. if (
  860.    am_has_slept=no
  861.    for am_try in 1 2; do
  862.      echo "timestamp, slept: $am_has_slept" > conftest.file
  863.      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  864.      if test "$[*]" = "X"; then
  865.         # -L didn't work.
  866.         set X `ls -t "$srcdir/configure" conftest.file`
  867.      fi
  868.      if test "$[*]" != "X $srcdir/configure conftest.file" \
  869.         && test "$[*]" != "X conftest.file $srcdir/configure"; then
  870.  
  871.         # If neither matched, then we have a broken ls.  This can happen
  872.         # if, for instance, CONFIG_SHELL is bash and it inherits a
  873.         # broken ls alias from the environment.  This has actually
  874.         # happened.  Such a system could not be considered "sane".
  875.         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
  876.   alias in your environment])
  877.      fi
  878.      if test "$[2]" = conftest.file || test $am_try -eq 2; then
  879.        break
  880.      fi
  881.      # Just in case.
  882.      sleep 1
  883.      am_has_slept=yes
  884.    done
  885.    test "$[2]" = conftest.file
  886.    )
  887. then
  888.    # Ok.
  889.    :
  890. else
  891.    AC_MSG_ERROR([newly created file is older than distributed files!
  892. Check your system clock])
  893. fi
  894. AC_MSG_RESULT([yes])
  895. # If we didn't sleep, we still need to ensure time stamps of config.status and
  896. # generated files are strictly newer.
  897. am_sleep_pid=
  898. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  899.   ( sleep 1 ) &
  900.   am_sleep_pid=$!
  901. fi
  902. AC_CONFIG_COMMANDS_PRE(
  903.   [AC_MSG_CHECKING([that generated files are newer than configure])
  904.    if test -n "$am_sleep_pid"; then
  905.      # Hide warnings about reused PIDs.
  906.      wait $am_sleep_pid 2>/dev/null
  907.    fi
  908.    AC_MSG_RESULT([done])])
  909. rm -f conftest.file
  910. ])
  911.  
  912. # Copyright (C) 2009-2013 Free Software Foundation, Inc.
  913. #
  914. # This file is free software; the Free Software Foundation
  915. # gives unlimited permission to copy and/or distribute it,
  916. # with or without modifications, as long as this notice is preserved.
  917.  
  918. # AM_SILENT_RULES([DEFAULT])
  919. # --------------------------
  920. # Enable less verbose build rules; with the default set to DEFAULT
  921. # ("yes" being less verbose, "no" or empty being verbose).
  922. AC_DEFUN([AM_SILENT_RULES],
  923. [AC_ARG_ENABLE([silent-rules], [dnl
  924. AS_HELP_STRING(
  925.   [--enable-silent-rules],
  926.   [less verbose build output (undo: "make V=1")])
  927. AS_HELP_STRING(
  928.   [--disable-silent-rules],
  929.   [verbose build output (undo: "make V=0")])dnl
  930. ])
  931. case $enable_silent_rules in @%:@ (((
  932.   yes) AM_DEFAULT_VERBOSITY=0;;
  933.    no) AM_DEFAULT_VERBOSITY=1;;
  934.     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  935. esac
  936. dnl
  937. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  938. dnl do not support nested variable expansions.
  939. dnl See automake bug#9928 and bug#10237.
  940. am_make=${MAKE-make}
  941. AC_CACHE_CHECK([whether $am_make supports nested variables],
  942.    [am_cv_make_support_nested_variables],
  943.    [if AS_ECHO([['TRUE=$(BAR$(V))
  944. BAR0=false
  945. BAR1=true
  946. V=1
  947. am__doit:
  948.         @$(TRUE)
  949. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  950.   am_cv_make_support_nested_variables=yes
  951. else
  952.   am_cv_make_support_nested_variables=no
  953. fi])
  954. if test $am_cv_make_support_nested_variables = yes; then
  955.   dnl Using '$V' instead of '$(V)' breaks IRIX make.
  956.   AM_V='$(V)'
  957.   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  958. else
  959.   AM_V=$AM_DEFAULT_VERBOSITY
  960.   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  961. fi
  962. AC_SUBST([AM_V])dnl
  963. AM_SUBST_NOTMAKE([AM_V])dnl
  964. AC_SUBST([AM_DEFAULT_V])dnl
  965. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  966. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  967. AM_BACKSLASH='\'
  968. AC_SUBST([AM_BACKSLASH])dnl
  969. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  970. ])
  971.  
  972. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  973. #
  974. # This file is free software; the Free Software Foundation
  975. # gives unlimited permission to copy and/or distribute it,
  976. # with or without modifications, as long as this notice is preserved.
  977.  
  978. # AM_PROG_INSTALL_STRIP
  979. # ---------------------
  980. # One issue with vendor 'install' (even GNU) is that you can't
  981. # specify the program used to strip binaries.  This is especially
  982. # annoying in cross-compiling environments, where the build's strip
  983. # is unlikely to handle the host's binaries.
  984. # Fortunately install-sh will honor a STRIPPROG variable, so we
  985. # always use install-sh in "make install-strip", and initialize
  986. # STRIPPROG with the value of the STRIP variable (set by the user).
  987. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  988. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  989. # Installed binaries are usually stripped using 'strip' when the user
  990. # run "make install-strip".  However 'strip' might not be the right
  991. # tool to use in cross-compilation environments, therefore Automake
  992. # will honor the 'STRIP' environment variable to overrule this program.
  993. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  994. if test "$cross_compiling" != no; then
  995.   AC_CHECK_TOOL([STRIP], [strip], :)
  996. fi
  997. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  998. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  999.  
  1000. # Copyright (C) 2006-2013 Free Software Foundation, Inc.
  1001. #
  1002. # This file is free software; the Free Software Foundation
  1003. # gives unlimited permission to copy and/or distribute it,
  1004. # with or without modifications, as long as this notice is preserved.
  1005.  
  1006. # _AM_SUBST_NOTMAKE(VARIABLE)
  1007. # ---------------------------
  1008. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  1009. # This macro is traced by Automake.
  1010. AC_DEFUN([_AM_SUBST_NOTMAKE])
  1011.  
  1012. # AM_SUBST_NOTMAKE(VARIABLE)
  1013. # --------------------------
  1014. # Public sister of _AM_SUBST_NOTMAKE.
  1015. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  1016.  
  1017. # Check how to create a tarball.                            -*- Autoconf -*-
  1018.  
  1019. # Copyright (C) 2004-2013 Free Software Foundation, Inc.
  1020. #
  1021. # This file is free software; the Free Software Foundation
  1022. # gives unlimited permission to copy and/or distribute it,
  1023. # with or without modifications, as long as this notice is preserved.
  1024.  
  1025. # _AM_PROG_TAR(FORMAT)
  1026. # --------------------
  1027. # Check how to create a tarball in format FORMAT.
  1028. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  1029. #
  1030. # Substitute a variable $(am__tar) that is a command
  1031. # writing to stdout a FORMAT-tarball containing the directory
  1032. # $tardir.
  1033. #     tardir=directory && $(am__tar) > result.tar
  1034. #
  1035. # Substitute a variable $(am__untar) that extract such
  1036. # a tarball read from stdin.
  1037. #     $(am__untar) < result.tar
  1038. #
  1039. AC_DEFUN([_AM_PROG_TAR],
  1040. [# Always define AMTAR for backward compatibility.  Yes, it's still used
  1041. # in the wild :-(  We should find a proper way to deprecate it ...
  1042. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  1043.  
  1044. # We'll loop over all known methods to create a tar archive until one works.
  1045. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  1046.  
  1047. m4_if([$1], [v7],
  1048.   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  1049.  
  1050.   [m4_case([$1],
  1051.     [ustar],
  1052.      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  1053.       # There is notably a 21 bits limit for the UID and the GID.  In fact,
  1054.       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  1055.       # and bug#13588).
  1056.       am_max_uid=2097151 # 2^21 - 1
  1057.       am_max_gid=$am_max_uid
  1058.       # The $UID and $GID variables are not portable, so we need to resort
  1059.       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
  1060.       # below are definitely unexpected, so allow the users to see them
  1061.       # (that is, avoid stderr redirection).
  1062.       am_uid=`id -u || echo unknown`
  1063.       am_gid=`id -g || echo unknown`
  1064.       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  1065.       if test $am_uid -le $am_max_uid; then
  1066.          AC_MSG_RESULT([yes])
  1067.       else
  1068.          AC_MSG_RESULT([no])
  1069.          _am_tools=none
  1070.       fi
  1071.       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  1072.       if test $am_gid -le $am_max_gid; then
  1073.          AC_MSG_RESULT([yes])
  1074.       else
  1075.         AC_MSG_RESULT([no])
  1076.         _am_tools=none
  1077.       fi],
  1078.  
  1079.   [pax],
  1080.     [],
  1081.  
  1082.   [m4_fatal([Unknown tar format])])
  1083.  
  1084.   AC_MSG_CHECKING([how to create a $1 tar archive])
  1085.  
  1086.   # Go ahead even if we have the value already cached.  We do so because we
  1087.   # need to set the values for the 'am__tar' and 'am__untar' variables.
  1088.   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  1089.  
  1090.   for _am_tool in $_am_tools; do
  1091.     case $_am_tool in
  1092.     gnutar)
  1093.       for _am_tar in tar gnutar gtar; do
  1094.         AM_RUN_LOG([$_am_tar --version]) && break
  1095.       done
  1096.       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  1097.       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  1098.       am__untar="$_am_tar -xf -"
  1099.       ;;
  1100.     plaintar)
  1101.       # Must skip GNU tar: if it does not support --format= it doesn't create
  1102.       # ustar tarball either.
  1103.       (tar --version) >/dev/null 2>&1 && continue
  1104.       am__tar='tar chf - "$$tardir"'
  1105.       am__tar_='tar chf - "$tardir"'
  1106.       am__untar='tar xf -'
  1107.       ;;
  1108.     pax)
  1109.       am__tar='pax -L -x $1 -w "$$tardir"'
  1110.       am__tar_='pax -L -x $1 -w "$tardir"'
  1111.       am__untar='pax -r'
  1112.       ;;
  1113.     cpio)
  1114.       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  1115.       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  1116.       am__untar='cpio -i -H $1 -d'
  1117.       ;;
  1118.     none)
  1119.       am__tar=false
  1120.       am__tar_=false
  1121.       am__untar=false
  1122.       ;;
  1123.     esac
  1124.  
  1125.     # If the value was cached, stop now.  We just wanted to have am__tar
  1126.     # and am__untar set.
  1127.     test -n "${am_cv_prog_tar_$1}" && break
  1128.  
  1129.     # tar/untar a dummy directory, and stop if the command works.
  1130.     rm -rf conftest.dir
  1131.     mkdir conftest.dir
  1132.     echo GrepMe > conftest.dir/file
  1133.     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  1134.     rm -rf conftest.dir
  1135.     if test -s conftest.tar; then
  1136.       AM_RUN_LOG([$am__untar <conftest.tar])
  1137.       AM_RUN_LOG([cat conftest.dir/file])
  1138.       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1139.     fi
  1140.   done
  1141.   rm -rf conftest.dir
  1142.  
  1143.   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1144.   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1145.  
  1146. AC_SUBST([am__tar])
  1147. AC_SUBST([am__untar])
  1148. ]) # _AM_PROG_TAR
  1149.  
  1150. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  1151. #
  1152. #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  1153. #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  1154. #                 Foundation, Inc.
  1155. #   Written by Gordon Matzigkeit, 1996
  1156. #
  1157. # This file is free software; the Free Software Foundation gives
  1158. # unlimited permission to copy and/or distribute it, with or without
  1159. # modifications, as long as this notice is preserved.
  1160.  
  1161. m4_define([_LT_COPYING], [dnl
  1162. #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  1163. #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  1164. #                 Foundation, Inc.
  1165. #   Written by Gordon Matzigkeit, 1996
  1166. #
  1167. #   This file is part of GNU Libtool.
  1168. #
  1169. # GNU Libtool is free software; you can redistribute it and/or
  1170. # modify it under the terms of the GNU General Public License as
  1171. # published by the Free Software Foundation; either version 2 of
  1172. # the License, or (at your option) any later version.
  1173. #
  1174. # As a special exception to the GNU General Public License,
  1175. # if you distribute this file as part of a program or library that
  1176. # is built using GNU Libtool, you may include this file under the
  1177. # same distribution terms that you use for the rest of that program.
  1178. #
  1179. # GNU Libtool is distributed in the hope that it will be useful,
  1180. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  1181. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1182. # GNU General Public License for more details.
  1183. #
  1184. # You should have received a copy of the GNU General Public License
  1185. # along with GNU Libtool; see the file COPYING.  If not, a copy
  1186. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  1187. # obtained by writing to the Free Software Foundation, Inc.,
  1188. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  1189. ])
  1190.  
  1191. # serial 57 LT_INIT
  1192.  
  1193.  
  1194. # LT_PREREQ(VERSION)
  1195. # ------------------
  1196. # Complain and exit if this libtool version is less that VERSION.
  1197. m4_defun([LT_PREREQ],
  1198. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  1199.        [m4_default([$3],
  1200.                    [m4_fatal([Libtool version $1 or higher is required],
  1201.                              63)])],
  1202.        [$2])])
  1203.  
  1204.  
  1205. # _LT_CHECK_BUILDDIR
  1206. # ------------------
  1207. # Complain if the absolute build directory name contains unusual characters
  1208. m4_defun([_LT_CHECK_BUILDDIR],
  1209. [case `pwd` in
  1210.   *\ * | *\     *)
  1211.     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  1212. esac
  1213. ])
  1214.  
  1215.  
  1216. # LT_INIT([OPTIONS])
  1217. # ------------------
  1218. AC_DEFUN([LT_INIT],
  1219. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  1220. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  1221. AC_BEFORE([$0], [LT_LANG])dnl
  1222. AC_BEFORE([$0], [LT_OUTPUT])dnl
  1223. AC_BEFORE([$0], [LTDL_INIT])dnl
  1224. m4_require([_LT_CHECK_BUILDDIR])dnl
  1225.  
  1226. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  1227. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  1228. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  1229. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  1230. dnl unless we require an AC_DEFUNed macro:
  1231. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  1232. AC_REQUIRE([LTSUGAR_VERSION])dnl
  1233. AC_REQUIRE([LTVERSION_VERSION])dnl
  1234. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  1235. m4_require([_LT_PROG_LTMAIN])dnl
  1236.  
  1237. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  1238.  
  1239. dnl Parse OPTIONS
  1240. _LT_SET_OPTIONS([$0], [$1])
  1241.  
  1242. # This can be used to rebuild libtool when needed
  1243. LIBTOOL_DEPS="$ltmain"
  1244.  
  1245. # Always use our own libtool.
  1246. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  1247. AC_SUBST(LIBTOOL)dnl
  1248.  
  1249. _LT_SETUP
  1250.  
  1251. # Only expand once:
  1252. m4_define([LT_INIT])
  1253. ])# LT_INIT
  1254.  
  1255. # Old names:
  1256. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  1257. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  1258. dnl aclocal-1.4 backwards compatibility:
  1259. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  1260. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  1261.  
  1262.  
  1263. # _LT_CC_BASENAME(CC)
  1264. # -------------------
  1265. # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
  1266. m4_defun([_LT_CC_BASENAME],
  1267. [for cc_temp in $1""; do
  1268.   case $cc_temp in
  1269.     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  1270.     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  1271.     \-*) ;;
  1272.     *) break;;
  1273.   esac
  1274. done
  1275. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  1276. ])
  1277.  
  1278.  
  1279. # _LT_FILEUTILS_DEFAULTS
  1280. # ----------------------
  1281. # It is okay to use these file commands and assume they have been set
  1282. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  1283. m4_defun([_LT_FILEUTILS_DEFAULTS],
  1284. [: ${CP="cp -f"}
  1285. : ${MV="mv -f"}
  1286. : ${RM="rm -f"}
  1287. ])# _LT_FILEUTILS_DEFAULTS
  1288.  
  1289.  
  1290. # _LT_SETUP
  1291. # ---------
  1292. m4_defun([_LT_SETUP],
  1293. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1294. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  1295. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  1296. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  1297.  
  1298. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  1299. dnl
  1300. _LT_DECL([], [host_alias], [0], [The host system])dnl
  1301. _LT_DECL([], [host], [0])dnl
  1302. _LT_DECL([], [host_os], [0])dnl
  1303. dnl
  1304. _LT_DECL([], [build_alias], [0], [The build system])dnl
  1305. _LT_DECL([], [build], [0])dnl
  1306. _LT_DECL([], [build_os], [0])dnl
  1307. dnl
  1308. AC_REQUIRE([AC_PROG_CC])dnl
  1309. AC_REQUIRE([LT_PATH_LD])dnl
  1310. AC_REQUIRE([LT_PATH_NM])dnl
  1311. dnl
  1312. AC_REQUIRE([AC_PROG_LN_S])dnl
  1313. test -z "$LN_S" && LN_S="ln -s"
  1314. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  1315. dnl
  1316. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  1317. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  1318. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  1319. dnl
  1320. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1321. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  1322. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  1323. m4_require([_LT_CMD_RELOAD])dnl
  1324. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  1325. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  1326. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  1327. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  1328. m4_require([_LT_WITH_SYSROOT])dnl
  1329.  
  1330. _LT_CONFIG_LIBTOOL_INIT([
  1331. # See if we are running on zsh, and set the options which allow our
  1332. # commands through without removal of \ escapes INIT.
  1333. if test -n "\${ZSH_VERSION+set}" ; then
  1334.    setopt NO_GLOB_SUBST
  1335. fi
  1336. ])
  1337. if test -n "${ZSH_VERSION+set}" ; then
  1338.    setopt NO_GLOB_SUBST
  1339. fi
  1340.  
  1341. _LT_CHECK_OBJDIR
  1342.  
  1343. m4_require([_LT_TAG_COMPILER])dnl
  1344.  
  1345. case $host_os in
  1346. aix3*)
  1347.   # AIX sometimes has problems with the GCC collect2 program.  For some
  1348.   # reason, if we set the COLLECT_NAMES environment variable, the problems
  1349.   # vanish in a puff of smoke.
  1350.   if test "X${COLLECT_NAMES+set}" != Xset; then
  1351.     COLLECT_NAMES=
  1352.     export COLLECT_NAMES
  1353.   fi
  1354.   ;;
  1355. esac
  1356.  
  1357. # Global variables:
  1358. ofile=libtool
  1359. can_build_shared=yes
  1360.  
  1361. # All known linkers require a `.a' archive for static linking (except MSVC,
  1362. # which needs '.lib').
  1363. libext=a
  1364.  
  1365. with_gnu_ld="$lt_cv_prog_gnu_ld"
  1366.  
  1367. old_CC="$CC"
  1368. old_CFLAGS="$CFLAGS"
  1369.  
  1370. # Set sane defaults for various variables
  1371. test -z "$CC" && CC=cc
  1372. test -z "$LTCC" && LTCC=$CC
  1373. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  1374. test -z "$LD" && LD=ld
  1375. test -z "$ac_objext" && ac_objext=o
  1376.  
  1377. _LT_CC_BASENAME([$compiler])
  1378.  
  1379. # Only perform the check for file, if the check method requires it
  1380. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  1381. case $deplibs_check_method in
  1382. file_magic*)
  1383.   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  1384.     _LT_PATH_MAGIC
  1385.   fi
  1386.   ;;
  1387. esac
  1388.  
  1389. # Use C for the default configuration in the libtool script
  1390. LT_SUPPORTED_TAG([CC])
  1391. _LT_LANG_C_CONFIG
  1392. _LT_LANG_DEFAULT_CONFIG
  1393. _LT_CONFIG_COMMANDS
  1394. ])# _LT_SETUP
  1395.  
  1396.  
  1397. # _LT_PREPARE_SED_QUOTE_VARS
  1398. # --------------------------
  1399. # Define a few sed substitution that help us do robust quoting.
  1400. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  1401. [# Backslashify metacharacters that are still active within
  1402. # double-quoted strings.
  1403. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  1404.  
  1405. # Same as above, but do not quote variable references.
  1406. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  1407.  
  1408. # Sed substitution to delay expansion of an escaped shell variable in a
  1409. # double_quote_subst'ed string.
  1410. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  1411.  
  1412. # Sed substitution to delay expansion of an escaped single quote.
  1413. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  1414.  
  1415. # Sed substitution to avoid accidental globbing in evaled expressions
  1416. no_glob_subst='s/\*/\\\*/g'
  1417. ])
  1418.  
  1419. # _LT_PROG_LTMAIN
  1420. # ---------------
  1421. # Note that this code is called both from `configure', and `config.status'
  1422. # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
  1423. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  1424. # so we pass a copy along to make sure it has a sensible value anyway.
  1425. m4_defun([_LT_PROG_LTMAIN],
  1426. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  1427. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  1428. ltmain="$ac_aux_dir/ltmain.sh"
  1429. ])# _LT_PROG_LTMAIN
  1430.  
  1431.  
  1432.  
  1433. # So that we can recreate a full libtool script including additional
  1434. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  1435. # in macros and then make a single call at the end using the `libtool'
  1436. # label.
  1437.  
  1438.  
  1439. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  1440. # ----------------------------------------
  1441. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  1442. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  1443. [m4_ifval([$1],
  1444.           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  1445.                      [$1
  1446. ])])])
  1447.  
  1448. # Initialize.
  1449. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  1450.  
  1451.  
  1452. # _LT_CONFIG_LIBTOOL([COMMANDS])
  1453. # ------------------------------
  1454. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  1455. m4_define([_LT_CONFIG_LIBTOOL],
  1456. [m4_ifval([$1],
  1457.           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  1458.                      [$1
  1459. ])])])
  1460.  
  1461. # Initialize.
  1462. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  1463.  
  1464.  
  1465. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  1466. # -----------------------------------------------------
  1467. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  1468. [_LT_CONFIG_LIBTOOL([$1])
  1469. _LT_CONFIG_LIBTOOL_INIT([$2])
  1470. ])
  1471.  
  1472.  
  1473. # _LT_FORMAT_COMMENT([COMMENT])
  1474. # -----------------------------
  1475. # Add leading comment marks to the start of each line, and a trailing
  1476. # full-stop to the whole comment if one is not present already.
  1477. m4_define([_LT_FORMAT_COMMENT],
  1478. [m4_ifval([$1], [
  1479. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  1480.               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  1481. )])
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  1488. # -------------------------------------------------------------------
  1489. # CONFIGNAME is the name given to the value in the libtool script.
  1490. # VARNAME is the (base) name used in the configure script.
  1491. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  1492. # VARNAME.  Any other value will be used directly.
  1493. m4_define([_LT_DECL],
  1494. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  1495.     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  1496.         [m4_ifval([$1], [$1], [$2])])
  1497.     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  1498.     m4_ifval([$4],
  1499.         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  1500.     lt_dict_add_subkey([lt_decl_dict], [$2],
  1501.         [tagged?], [m4_ifval([$5], [yes], [no])])])
  1502. ])
  1503.  
  1504.  
  1505. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  1506. # --------------------------------------------------------
  1507. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  1508.  
  1509.  
  1510. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  1511. # ------------------------------------------------
  1512. m4_define([lt_decl_tag_varnames],
  1513. [_lt_decl_filter([tagged?], [yes], $@)])
  1514.  
  1515.  
  1516. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  1517. # ---------------------------------------------------------
  1518. m4_define([_lt_decl_filter],
  1519. [m4_case([$#],
  1520.   [0], [m4_fatal([$0: too few arguments: $#])],
  1521.   [1], [m4_fatal([$0: too few arguments: $#: $1])],
  1522.   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  1523.   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  1524.   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  1525. ])
  1526.  
  1527.  
  1528. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  1529. # --------------------------------------------------
  1530. m4_define([lt_decl_quote_varnames],
  1531. [_lt_decl_filter([value], [1], $@)])
  1532.  
  1533.  
  1534. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  1535. # ---------------------------------------------------
  1536. m4_define([lt_decl_dquote_varnames],
  1537. [_lt_decl_filter([value], [2], $@)])
  1538.  
  1539.  
  1540. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  1541. # ---------------------------------------------------
  1542. m4_define([lt_decl_varnames_tagged],
  1543. [m4_assert([$# <= 2])dnl
  1544. _$0(m4_quote(m4_default([$1], [[, ]])),
  1545.     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  1546.     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  1547. m4_define([_lt_decl_varnames_tagged],
  1548. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  1549.  
  1550.  
  1551. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  1552. # ------------------------------------------------
  1553. m4_define([lt_decl_all_varnames],
  1554. [_$0(m4_quote(m4_default([$1], [[, ]])),
  1555.      m4_if([$2], [],
  1556.            m4_quote(lt_decl_varnames),
  1557.         m4_quote(m4_shift($@))))[]dnl
  1558. ])
  1559. m4_define([_lt_decl_all_varnames],
  1560. [lt_join($@, lt_decl_varnames_tagged([$1],
  1561.                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  1562. ])
  1563.  
  1564.  
  1565. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  1566. # ------------------------------------
  1567. # Quote a variable value, and forward it to `config.status' so that its
  1568. # declaration there will have the same value as in `configure'.  VARNAME
  1569. # must have a single quote delimited value for this to work.
  1570. m4_define([_LT_CONFIG_STATUS_DECLARE],
  1571. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  1572.  
  1573.  
  1574. # _LT_CONFIG_STATUS_DECLARATIONS
  1575. # ------------------------------
  1576. # We delimit libtool config variables with single quotes, so when
  1577. # we write them to config.status, we have to be sure to quote all
  1578. # embedded single quotes properly.  In configure, this macro expands
  1579. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  1580. #
  1581. #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  1582. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  1583. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  1584.     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  1585.  
  1586.  
  1587. # _LT_LIBTOOL_TAGS
  1588. # ----------------
  1589. # Output comment and list of tags supported by the script
  1590. m4_defun([_LT_LIBTOOL_TAGS],
  1591. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  1592. available_tags="_LT_TAGS"dnl
  1593. ])
  1594.  
  1595.  
  1596. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  1597. # -----------------------------------
  1598. # Extract the dictionary values for VARNAME (optionally with TAG) and
  1599. # expand to a commented shell variable setting:
  1600. #
  1601. #    # Some comment about what VAR is for.
  1602. #    visible_name=$lt_internal_name
  1603. m4_define([_LT_LIBTOOL_DECLARE],
  1604. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  1605.                                            [description])))[]dnl
  1606. m4_pushdef([_libtool_name],
  1607.     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  1608. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  1609.     [0], [_libtool_name=[$]$1],
  1610.     [1], [_libtool_name=$lt_[]$1],
  1611.     [2], [_libtool_name=$lt_[]$1],
  1612.     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  1613. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  1614. ])
  1615.  
  1616.  
  1617. # _LT_LIBTOOL_CONFIG_VARS
  1618. # -----------------------
  1619. # Produce commented declarations of non-tagged libtool config variables
  1620. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  1621. # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
  1622. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  1623. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  1624. [m4_foreach([_lt_var],
  1625.     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  1626.     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  1627.  
  1628.  
  1629. # _LT_LIBTOOL_TAG_VARS(TAG)
  1630. # -------------------------
  1631. m4_define([_LT_LIBTOOL_TAG_VARS],
  1632. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  1633.     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  1634.  
  1635.  
  1636. # _LT_TAGVAR(VARNAME, [TAGNAME])
  1637. # ------------------------------
  1638. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  1639.  
  1640.  
  1641. # _LT_CONFIG_COMMANDS
  1642. # -------------------
  1643. # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
  1644. # variables for single and double quote escaping we saved from calls
  1645. # to _LT_DECL, we can put quote escaped variables declarations
  1646. # into `config.status', and then the shell code to quote escape them in
  1647. # for loops in `config.status'.  Finally, any additional code accumulated
  1648. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  1649. m4_defun([_LT_CONFIG_COMMANDS],
  1650. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  1651.         dnl If the libtool generation code has been placed in $CONFIG_LT,
  1652.         dnl instead of duplicating it all over again into config.status,
  1653.         dnl then we will have config.status run $CONFIG_LT later, so it
  1654.         dnl needs to know what name is stored there:
  1655.         [AC_CONFIG_COMMANDS([libtool],
  1656.             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  1657.     dnl If the libtool generation code is destined for config.status,
  1658.     dnl expand the accumulated commands and init code now:
  1659.     [AC_CONFIG_COMMANDS([libtool],
  1660.         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  1661. ])#_LT_CONFIG_COMMANDS
  1662.  
  1663.  
  1664. # Initialize.
  1665. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  1666. [
  1667.  
  1668. # The HP-UX ksh and POSIX shell print the target directory to stdout
  1669. # if CDPATH is set.
  1670. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  1671.  
  1672. sed_quote_subst='$sed_quote_subst'
  1673. double_quote_subst='$double_quote_subst'
  1674. delay_variable_subst='$delay_variable_subst'
  1675. _LT_CONFIG_STATUS_DECLARATIONS
  1676. LTCC='$LTCC'
  1677. LTCFLAGS='$LTCFLAGS'
  1678. compiler='$compiler_DEFAULT'
  1679.  
  1680. # A function that is used when there is no print builtin or printf.
  1681. func_fallback_echo ()
  1682. {
  1683.   eval 'cat <<_LTECHO_EOF
  1684. \$[]1
  1685. _LTECHO_EOF'
  1686. }
  1687.  
  1688. # Quote evaled strings.
  1689. for var in lt_decl_all_varnames([[ \
  1690. ]], lt_decl_quote_varnames); do
  1691.     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  1692.     *[[\\\\\\\`\\"\\\$]]*)
  1693.       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  1694.       ;;
  1695.     *)
  1696.       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  1697.       ;;
  1698.     esac
  1699. done
  1700.  
  1701. # Double-quote double-evaled strings.
  1702. for var in lt_decl_all_varnames([[ \
  1703. ]], lt_decl_dquote_varnames); do
  1704.     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  1705.     *[[\\\\\\\`\\"\\\$]]*)
  1706.       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  1707.       ;;
  1708.     *)
  1709.       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  1710.       ;;
  1711.     esac
  1712. done
  1713.  
  1714. _LT_OUTPUT_LIBTOOL_INIT
  1715. ])
  1716.  
  1717. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  1718. # ------------------------------------
  1719. # Generate a child script FILE with all initialization necessary to
  1720. # reuse the environment learned by the parent script, and make the
  1721. # file executable.  If COMMENT is supplied, it is inserted after the
  1722. # `#!' sequence but before initialization text begins.  After this
  1723. # macro, additional text can be appended to FILE to form the body of
  1724. # the child script.  The macro ends with non-zero status if the
  1725. # file could not be fully written (such as if the disk is full).
  1726. m4_ifdef([AS_INIT_GENERATED],
  1727. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  1728. [m4_defun([_LT_GENERATED_FILE_INIT],
  1729. [m4_require([AS_PREPARE])]dnl
  1730. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  1731. [lt_write_fail=0
  1732. cat >$1 <<_ASEOF || lt_write_fail=1
  1733. #! $SHELL
  1734. # Generated by $as_me.
  1735. $2
  1736. SHELL=\${CONFIG_SHELL-$SHELL}
  1737. export SHELL
  1738. _ASEOF
  1739. cat >>$1 <<\_ASEOF || lt_write_fail=1
  1740. AS_SHELL_SANITIZE
  1741. _AS_PREPARE
  1742. exec AS_MESSAGE_FD>&1
  1743. _ASEOF
  1744. test $lt_write_fail = 0 && chmod +x $1[]dnl
  1745. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  1746.  
  1747. # LT_OUTPUT
  1748. # ---------
  1749. # This macro allows early generation of the libtool script (before
  1750. # AC_OUTPUT is called), incase it is used in configure for compilation
  1751. # tests.
  1752. AC_DEFUN([LT_OUTPUT],
  1753. [: ${CONFIG_LT=./config.lt}
  1754. AC_MSG_NOTICE([creating $CONFIG_LT])
  1755. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  1756. [# Run this file to recreate a libtool stub with the current configuration.])
  1757.  
  1758. cat >>"$CONFIG_LT" <<\_LTEOF
  1759. lt_cl_silent=false
  1760. exec AS_MESSAGE_LOG_FD>>config.log
  1761. {
  1762.   echo
  1763.   AS_BOX([Running $as_me.])
  1764. } >&AS_MESSAGE_LOG_FD
  1765.  
  1766. lt_cl_help="\
  1767. \`$as_me' creates a local libtool stub from the current configuration,
  1768. for use in further configure time tests before the real libtool is
  1769. generated.
  1770.  
  1771. Usage: $[0] [[OPTIONS]]
  1772.  
  1773.   -h, --help      print this help, then exit
  1774.   -V, --version   print version number, then exit
  1775.   -q, --quiet     do not print progress messages
  1776.   -d, --debug     don't remove temporary files
  1777.  
  1778. Report bugs to <bug-libtool@gnu.org>."
  1779.  
  1780. lt_cl_version="\
  1781. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  1782. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  1783. configured by $[0], generated by m4_PACKAGE_STRING.
  1784.  
  1785. Copyright (C) 2011 Free Software Foundation, Inc.
  1786. This config.lt script is free software; the Free Software Foundation
  1787. gives unlimited permision to copy, distribute and modify it."
  1788.  
  1789. while test $[#] != 0
  1790. do
  1791.   case $[1] in
  1792.     --version | --v* | -V )
  1793.       echo "$lt_cl_version"; exit 0 ;;
  1794.     --help | --h* | -h )
  1795.       echo "$lt_cl_help"; exit 0 ;;
  1796.     --debug | --d* | -d )
  1797.       debug=: ;;
  1798.     --quiet | --q* | --silent | --s* | -q )
  1799.       lt_cl_silent=: ;;
  1800.  
  1801.     -*) AC_MSG_ERROR([unrecognized option: $[1]
  1802. Try \`$[0] --help' for more information.]) ;;
  1803.  
  1804.     *) AC_MSG_ERROR([unrecognized argument: $[1]
  1805. Try \`$[0] --help' for more information.]) ;;
  1806.   esac
  1807.   shift
  1808. done
  1809.  
  1810. if $lt_cl_silent; then
  1811.   exec AS_MESSAGE_FD>/dev/null
  1812. fi
  1813. _LTEOF
  1814.  
  1815. cat >>"$CONFIG_LT" <<_LTEOF
  1816. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  1817. _LTEOF
  1818.  
  1819. cat >>"$CONFIG_LT" <<\_LTEOF
  1820. AC_MSG_NOTICE([creating $ofile])
  1821. _LT_OUTPUT_LIBTOOL_COMMANDS
  1822. AS_EXIT(0)
  1823. _LTEOF
  1824. chmod +x "$CONFIG_LT"
  1825.  
  1826. # configure is writing to config.log, but config.lt does its own redirection,
  1827. # appending to config.log, which fails on DOS, as config.log is still kept
  1828. # open by configure.  Here we exec the FD to /dev/null, effectively closing
  1829. # config.log, so it can be properly (re)opened and appended to by config.lt.
  1830. lt_cl_success=:
  1831. test "$silent" = yes &&
  1832.   lt_config_lt_args="$lt_config_lt_args --quiet"
  1833. exec AS_MESSAGE_LOG_FD>/dev/null
  1834. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  1835. exec AS_MESSAGE_LOG_FD>>config.log
  1836. $lt_cl_success || AS_EXIT(1)
  1837. ])# LT_OUTPUT
  1838.  
  1839.  
  1840. # _LT_CONFIG(TAG)
  1841. # ---------------
  1842. # If TAG is the built-in tag, create an initial libtool script with a
  1843. # default configuration from the untagged config vars.  Otherwise add code
  1844. # to config.status for appending the configuration named by TAG from the
  1845. # matching tagged config vars.
  1846. m4_defun([_LT_CONFIG],
  1847. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1848. _LT_CONFIG_SAVE_COMMANDS([
  1849.   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  1850.   m4_if(_LT_TAG, [C], [
  1851.     # See if we are running on zsh, and set the options which allow our
  1852.     # commands through without removal of \ escapes.
  1853.     if test -n "${ZSH_VERSION+set}" ; then
  1854.       setopt NO_GLOB_SUBST
  1855.     fi
  1856.  
  1857.     cfgfile="${ofile}T"
  1858.     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  1859.     $RM "$cfgfile"
  1860.  
  1861.     cat <<_LT_EOF >> "$cfgfile"
  1862. #! $SHELL
  1863.  
  1864. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  1865. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  1866. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1867. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  1868. #
  1869. _LT_COPYING
  1870. _LT_LIBTOOL_TAGS
  1871.  
  1872. # ### BEGIN LIBTOOL CONFIG
  1873. _LT_LIBTOOL_CONFIG_VARS
  1874. _LT_LIBTOOL_TAG_VARS
  1875. # ### END LIBTOOL CONFIG
  1876.  
  1877. _LT_EOF
  1878.  
  1879.   case $host_os in
  1880.   aix3*)
  1881.     cat <<\_LT_EOF >> "$cfgfile"
  1882. # AIX sometimes has problems with the GCC collect2 program.  For some
  1883. # reason, if we set the COLLECT_NAMES environment variable, the problems
  1884. # vanish in a puff of smoke.
  1885. if test "X${COLLECT_NAMES+set}" != Xset; then
  1886.   COLLECT_NAMES=
  1887.   export COLLECT_NAMES
  1888. fi
  1889. _LT_EOF
  1890.     ;;
  1891.   esac
  1892.  
  1893.   _LT_PROG_LTMAIN
  1894.  
  1895.   # We use sed instead of cat because bash on DJGPP gets confused if
  1896.   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
  1897.   # text mode, it properly converts lines to CR/LF.  This bash problem
  1898.   # is reportedly fixed, but why not run on old versions too?
  1899.   sed '$q' "$ltmain" >> "$cfgfile" \
  1900.      || (rm -f "$cfgfile"; exit 1)
  1901.  
  1902.   _LT_PROG_REPLACE_SHELLFNS
  1903.  
  1904.    mv -f "$cfgfile" "$ofile" ||
  1905.     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  1906.   chmod +x "$ofile"
  1907. ],
  1908. [cat <<_LT_EOF >> "$ofile"
  1909.  
  1910. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  1911. dnl in a comment (ie after a #).
  1912. # ### BEGIN LIBTOOL TAG CONFIG: $1
  1913. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  1914. # ### END LIBTOOL TAG CONFIG: $1
  1915. _LT_EOF
  1916. ])dnl /m4_if
  1917. ],
  1918. [m4_if([$1], [], [
  1919.     PACKAGE='$PACKAGE'
  1920.     VERSION='$VERSION'
  1921.     TIMESTAMP='$TIMESTAMP'
  1922.     RM='$RM'
  1923.     ofile='$ofile'], [])
  1924. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  1925. ])# _LT_CONFIG
  1926.  
  1927.  
  1928. # LT_SUPPORTED_TAG(TAG)
  1929. # ---------------------
  1930. # Trace this macro to discover what tags are supported by the libtool
  1931. # --tag option, using:
  1932. #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
  1933. AC_DEFUN([LT_SUPPORTED_TAG], [])
  1934.  
  1935.  
  1936. # C support is built-in for now
  1937. m4_define([_LT_LANG_C_enabled], [])
  1938. m4_define([_LT_TAGS], [])
  1939.  
  1940.  
  1941. # LT_LANG(LANG)
  1942. # -------------
  1943. # Enable libtool support for the given language if not already enabled.
  1944. AC_DEFUN([LT_LANG],
  1945. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  1946. m4_case([$1],
  1947.   [C],                  [_LT_LANG(C)],
  1948.   [C++],                [_LT_LANG(CXX)],
  1949.   [Go],                 [_LT_LANG(GO)],
  1950.   [Java],               [_LT_LANG(GCJ)],
  1951.   [Fortran 77],         [_LT_LANG(F77)],
  1952.   [Fortran],            [_LT_LANG(FC)],
  1953.   [Windows Resource],   [_LT_LANG(RC)],
  1954.   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  1955.     [_LT_LANG($1)],
  1956.     [m4_fatal([$0: unsupported language: "$1"])])])dnl
  1957. ])# LT_LANG
  1958.  
  1959.  
  1960. # _LT_LANG(LANGNAME)
  1961. # ------------------
  1962. m4_defun([_LT_LANG],
  1963. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  1964.   [LT_SUPPORTED_TAG([$1])dnl
  1965.   m4_append([_LT_TAGS], [$1 ])dnl
  1966.   m4_define([_LT_LANG_]$1[_enabled], [])dnl
  1967.   _LT_LANG_$1_CONFIG($1)])dnl
  1968. ])# _LT_LANG
  1969.  
  1970.  
  1971. m4_ifndef([AC_PROG_GO], [
  1972. # NOTE: This macro has been submitted for inclusion into   #
  1973. #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
  1974. #  a released version of Autoconf we should remove this    #
  1975. #  macro and use it instead.                               #
  1976. m4_defun([AC_PROG_GO],
  1977. [AC_LANG_PUSH(Go)dnl
  1978. AC_ARG_VAR([GOC],     [Go compiler command])dnl
  1979. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  1980. _AC_ARG_VAR_LDFLAGS()dnl
  1981. AC_CHECK_TOOL(GOC, gccgo)
  1982. if test -z "$GOC"; then
  1983.   if test -n "$ac_tool_prefix"; then
  1984.     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  1985.   fi
  1986. fi
  1987. if test -z "$GOC"; then
  1988.   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  1989. fi
  1990. ])#m4_defun
  1991. ])#m4_ifndef
  1992.  
  1993.  
  1994. # _LT_LANG_DEFAULT_CONFIG
  1995. # -----------------------
  1996. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  1997. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  1998.   [LT_LANG(CXX)],
  1999.   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  2000.  
  2001. AC_PROVIDE_IFELSE([AC_PROG_F77],
  2002.   [LT_LANG(F77)],
  2003.   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  2004.  
  2005. AC_PROVIDE_IFELSE([AC_PROG_FC],
  2006.   [LT_LANG(FC)],
  2007.   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  2008.  
  2009. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  2010. dnl pulling things in needlessly.
  2011. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  2012.   [LT_LANG(GCJ)],
  2013.   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  2014.     [LT_LANG(GCJ)],
  2015.     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  2016.       [LT_LANG(GCJ)],
  2017.       [m4_ifdef([AC_PROG_GCJ],
  2018.         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  2019.        m4_ifdef([A][M_PROG_GCJ],
  2020.         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  2021.        m4_ifdef([LT_PROG_GCJ],
  2022.         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  2023.  
  2024. AC_PROVIDE_IFELSE([AC_PROG_GO],
  2025.   [LT_LANG(GO)],
  2026.   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  2027.  
  2028. AC_PROVIDE_IFELSE([LT_PROG_RC],
  2029.   [LT_LANG(RC)],
  2030.   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  2031. ])# _LT_LANG_DEFAULT_CONFIG
  2032.  
  2033. # Obsolete macros:
  2034. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  2035. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  2036. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  2037. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  2038. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  2039. dnl aclocal-1.4 backwards compatibility:
  2040. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  2041. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  2042. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  2043. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  2044. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  2045.  
  2046.  
  2047. # _LT_TAG_COMPILER
  2048. # ----------------
  2049. m4_defun([_LT_TAG_COMPILER],
  2050. [AC_REQUIRE([AC_PROG_CC])dnl
  2051.  
  2052. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  2053. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  2054. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  2055. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  2056.  
  2057. # If no C compiler was specified, use CC.
  2058. LTCC=${LTCC-"$CC"}
  2059.  
  2060. # If no C compiler flags were specified, use CFLAGS.
  2061. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  2062.  
  2063. # Allow CC to be a program name with arguments.
  2064. compiler=$CC
  2065. ])# _LT_TAG_COMPILER
  2066.  
  2067.  
  2068. # _LT_COMPILER_BOILERPLATE
  2069. # ------------------------
  2070. # Check for compiler boilerplate output or warnings with
  2071. # the simple compiler test code.
  2072. m4_defun([_LT_COMPILER_BOILERPLATE],
  2073. [m4_require([_LT_DECL_SED])dnl
  2074. ac_outfile=conftest.$ac_objext
  2075. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  2076. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  2077. _lt_compiler_boilerplate=`cat conftest.err`
  2078. $RM conftest*
  2079. ])# _LT_COMPILER_BOILERPLATE
  2080.  
  2081.  
  2082. # _LT_LINKER_BOILERPLATE
  2083. # ----------------------
  2084. # Check for linker boilerplate output or warnings with
  2085. # the simple link test code.
  2086. m4_defun([_LT_LINKER_BOILERPLATE],
  2087. [m4_require([_LT_DECL_SED])dnl
  2088. ac_outfile=conftest.$ac_objext
  2089. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  2090. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  2091. _lt_linker_boilerplate=`cat conftest.err`
  2092. $RM -r conftest*
  2093. ])# _LT_LINKER_BOILERPLATE
  2094.  
  2095. # _LT_REQUIRED_DARWIN_CHECKS
  2096. # -------------------------
  2097. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  2098.   case $host_os in
  2099.     rhapsody* | darwin*)
  2100.     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  2101.     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  2102.     AC_CHECK_TOOL([LIPO], [lipo], [:])
  2103.     AC_CHECK_TOOL([OTOOL], [otool], [:])
  2104.     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  2105.     _LT_DECL([], [DSYMUTIL], [1],
  2106.       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  2107.     _LT_DECL([], [NMEDIT], [1],
  2108.       [Tool to change global to local symbols on Mac OS X])
  2109.     _LT_DECL([], [LIPO], [1],
  2110.       [Tool to manipulate fat objects and archives on Mac OS X])
  2111.     _LT_DECL([], [OTOOL], [1],
  2112.       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  2113.     _LT_DECL([], [OTOOL64], [1],
  2114.       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  2115.  
  2116.     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  2117.       [lt_cv_apple_cc_single_mod=no
  2118.       if test -z "${LT_MULTI_MODULE}"; then
  2119.         # By default we will add the -single_module flag. You can override
  2120.         # by either setting the environment variable LT_MULTI_MODULE
  2121.         # non-empty at configure time, or by adding -multi_module to the
  2122.         # link flags.
  2123.         rm -rf libconftest.dylib*
  2124.         echo "int foo(void){return 1;}" > conftest.c
  2125.         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  2126. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  2127.         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  2128.           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  2129.         _lt_result=$?
  2130.         # If there is a non-empty error log, and "single_module"
  2131.         # appears in it, assume the flag caused a linker warning
  2132.         if test -s conftest.err && $GREP single_module conftest.err; then
  2133.           cat conftest.err >&AS_MESSAGE_LOG_FD
  2134.         # Otherwise, if the output was created with a 0 exit code from
  2135.         # the compiler, it worked.
  2136.         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  2137.           lt_cv_apple_cc_single_mod=yes
  2138.         else
  2139.           cat conftest.err >&AS_MESSAGE_LOG_FD
  2140.         fi
  2141.         rm -rf libconftest.dylib*
  2142.         rm -f conftest.*
  2143.       fi])
  2144.  
  2145.     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  2146.       [lt_cv_ld_exported_symbols_list],
  2147.       [lt_cv_ld_exported_symbols_list=no
  2148.       save_LDFLAGS=$LDFLAGS
  2149.       echo "_main" > conftest.sym
  2150.       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  2151.       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2152.         [lt_cv_ld_exported_symbols_list=yes],
  2153.         [lt_cv_ld_exported_symbols_list=no])
  2154.         LDFLAGS="$save_LDFLAGS"
  2155.     ])
  2156.  
  2157.     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  2158.       [lt_cv_ld_force_load=no
  2159.       cat > conftest.c << _LT_EOF
  2160. int forced_loaded() { return 2;}
  2161. _LT_EOF
  2162.       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  2163.       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  2164.       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  2165.       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  2166.       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  2167.       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  2168.       cat > conftest.c << _LT_EOF
  2169. int main() { return 0;}
  2170. _LT_EOF
  2171.       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  2172.       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  2173.       _lt_result=$?
  2174.       if test -s conftest.err && $GREP force_load conftest.err; then
  2175.         cat conftest.err >&AS_MESSAGE_LOG_FD
  2176.       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  2177.         lt_cv_ld_force_load=yes
  2178.       else
  2179.         cat conftest.err >&AS_MESSAGE_LOG_FD
  2180.       fi
  2181.         rm -f conftest.err libconftest.a conftest conftest.c
  2182.         rm -rf conftest.dSYM
  2183.     ])
  2184.     case $host_os in
  2185.     rhapsody* | darwin1.[[012]])
  2186.       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  2187.     darwin1.*)
  2188.       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  2189.     darwin*) # darwin 5.x on
  2190.       # if running on 10.5 or later, the deployment target defaults
  2191.       # to the OS version, if on x86, and 10.4, the deployment
  2192.       # target defaults to 10.4. Don't you love it?
  2193.       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  2194.         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  2195.           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  2196.         10.[[012]]*)
  2197.           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  2198.         10.*)
  2199.           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  2200.       esac
  2201.     ;;
  2202.   esac
  2203.     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  2204.       _lt_dar_single_mod='$single_module'
  2205.     fi
  2206.     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  2207.       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  2208.     else
  2209.       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2210.     fi
  2211.     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  2212.       _lt_dsymutil='~$DSYMUTIL $lib || :'
  2213.     else
  2214.       _lt_dsymutil=
  2215.     fi
  2216.     ;;
  2217.   esac
  2218. ])
  2219.  
  2220.  
  2221. # _LT_DARWIN_LINKER_FEATURES([TAG])
  2222. # ---------------------------------
  2223. # Checks for linker and compiler features on darwin
  2224. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  2225. [
  2226.   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  2227.   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  2228.   _LT_TAGVAR(hardcode_direct, $1)=no
  2229.   _LT_TAGVAR(hardcode_automatic, $1)=yes
  2230.   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2231.   if test "$lt_cv_ld_force_load" = "yes"; then
  2232.     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  2233.     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  2234.                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  2235.   else
  2236.     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  2237.   fi
  2238.   _LT_TAGVAR(link_all_deplibs, $1)=yes
  2239.   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  2240.   case $cc_basename in
  2241.      ifort*) _lt_dar_can_shared=yes ;;
  2242.      *) _lt_dar_can_shared=$GCC ;;
  2243.   esac
  2244.   if test "$_lt_dar_can_shared" = "yes"; then
  2245.     output_verbose_link_cmd=func_echo_all
  2246.     _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}"
  2247.     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  2248.     _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}"
  2249.     _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}"
  2250.     m4_if([$1], [CXX],
  2251. [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  2252.       _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}"
  2253.       _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}"
  2254.     fi
  2255. ],[])
  2256.   else
  2257.   _LT_TAGVAR(ld_shlibs, $1)=no
  2258.   fi
  2259. ])
  2260.  
  2261. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  2262. # ----------------------------------
  2263. # Links a minimal program and checks the executable
  2264. # for the system default hardcoded library path. In most cases,
  2265. # this is /usr/lib:/lib, but when the MPI compilers are used
  2266. # the location of the communication and MPI libs are included too.
  2267. # If we don't find anything, use the default library path according
  2268. # to the aix ld manual.
  2269. # Store the results from the different compilers for each TAGNAME.
  2270. # Allow to override them for all tags through lt_cv_aix_libpath.
  2271. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  2272. [m4_require([_LT_DECL_SED])dnl
  2273. if test "${lt_cv_aix_libpath+set}" = set; then
  2274.   aix_libpath=$lt_cv_aix_libpath
  2275. else
  2276.   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  2277.   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  2278.   lt_aix_libpath_sed='[
  2279.       /Import File Strings/,/^$/ {
  2280.           /^0/ {
  2281.               s/^0  *\([^ ]*\) *$/\1/
  2282.               p
  2283.           }
  2284.       }]'
  2285.   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  2286.   # Check for a 64-bit object if we didn't find anything.
  2287.   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  2288.     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  2289.   fi],[])
  2290.   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  2291.     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  2292.   fi
  2293.   ])
  2294.   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  2295. fi
  2296. ])# _LT_SYS_MODULE_PATH_AIX
  2297.  
  2298.  
  2299. # _LT_SHELL_INIT(ARG)
  2300. # -------------------
  2301. m4_define([_LT_SHELL_INIT],
  2302. [m4_divert_text([M4SH-INIT], [$1
  2303. ])])# _LT_SHELL_INIT
  2304.  
  2305.  
  2306.  
  2307. # _LT_PROG_ECHO_BACKSLASH
  2308. # -----------------------
  2309. # Find how we can fake an echo command that does not interpret backslash.
  2310. # In particular, with Autoconf 2.60 or later we add some code to the start
  2311. # of the generated configure script which will find a shell with a builtin
  2312. # printf (which we can use as an echo command).
  2313. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  2314. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  2315. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  2316. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  2317.  
  2318. AC_MSG_CHECKING([how to print strings])
  2319. # Test print first, because it will be a builtin if present.
  2320. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  2321.    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  2322.   ECHO='print -r --'
  2323. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  2324.   ECHO='printf %s\n'
  2325. else
  2326.   # Use this function as a fallback that always works.
  2327.   func_fallback_echo ()
  2328.   {
  2329.     eval 'cat <<_LTECHO_EOF
  2330. $[]1
  2331. _LTECHO_EOF'
  2332.   }
  2333.   ECHO='func_fallback_echo'
  2334. fi
  2335.  
  2336. # func_echo_all arg...
  2337. # Invoke $ECHO with all args, space-separated.
  2338. func_echo_all ()
  2339. {
  2340.     $ECHO "$*"
  2341. }
  2342.  
  2343. case "$ECHO" in
  2344.   printf*) AC_MSG_RESULT([printf]) ;;
  2345.   print*) AC_MSG_RESULT([print -r]) ;;
  2346.   *) AC_MSG_RESULT([cat]) ;;
  2347. esac
  2348.  
  2349. m4_ifdef([_AS_DETECT_SUGGESTED],
  2350. [_AS_DETECT_SUGGESTED([
  2351.   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  2352.     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  2353.     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  2354.     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  2355.     PATH=/empty FPATH=/empty; export PATH FPATH
  2356.     test "X`printf %s $ECHO`" = "X$ECHO" \
  2357.       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  2358.  
  2359. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  2360. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  2361. ])# _LT_PROG_ECHO_BACKSLASH
  2362.  
  2363.  
  2364. # _LT_WITH_SYSROOT
  2365. # ----------------
  2366. AC_DEFUN([_LT_WITH_SYSROOT],
  2367. [AC_MSG_CHECKING([for sysroot])
  2368. AC_ARG_WITH([sysroot],
  2369. [  --with-sysroot[=DIR] Search for dependent libraries within DIR
  2370.                         (or the compiler's sysroot if not specified).],
  2371. [], [with_sysroot=no])
  2372.  
  2373. dnl lt_sysroot will always be passed unquoted.  We quote it here
  2374. dnl in case the user passed a directory name.
  2375. lt_sysroot=
  2376. case ${with_sysroot} in #(
  2377.  yes)
  2378.    if test "$GCC" = yes; then
  2379.      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  2380.    fi
  2381.    ;; #(
  2382.  /*)
  2383.    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  2384.    ;; #(
  2385.  no|'')
  2386.    ;; #(
  2387.  *)
  2388.    AC_MSG_RESULT([${with_sysroot}])
  2389.    AC_MSG_ERROR([The sysroot must be an absolute path.])
  2390.    ;;
  2391. esac
  2392.  
  2393.  AC_MSG_RESULT([${lt_sysroot:-no}])
  2394. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  2395. [dependent libraries, and in which our libraries should be installed.])])
  2396.  
  2397. # _LT_ENABLE_LOCK
  2398. # ---------------
  2399. m4_defun([_LT_ENABLE_LOCK],
  2400. [AC_ARG_ENABLE([libtool-lock],
  2401.   [AS_HELP_STRING([--disable-libtool-lock],
  2402.     [avoid locking (might break parallel builds)])])
  2403. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  2404.  
  2405. # Some flags need to be propagated to the compiler or linker for good
  2406. # libtool support.
  2407. case $host in
  2408. ia64-*-hpux*)
  2409.   # Find out which ABI we are using.
  2410.   echo 'int i;' > conftest.$ac_ext
  2411.   if AC_TRY_EVAL(ac_compile); then
  2412.     case `/usr/bin/file conftest.$ac_objext` in
  2413.       *ELF-32*)
  2414.         HPUX_IA64_MODE="32"
  2415.         ;;
  2416.       *ELF-64*)
  2417.         HPUX_IA64_MODE="64"
  2418.         ;;
  2419.     esac
  2420.   fi
  2421.   rm -rf conftest*
  2422.   ;;
  2423. *-*-irix6*)
  2424.   # Find out which ABI we are using.
  2425.   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  2426.   if AC_TRY_EVAL(ac_compile); then
  2427.     if test "$lt_cv_prog_gnu_ld" = yes; then
  2428.       case `/usr/bin/file conftest.$ac_objext` in
  2429.         *32-bit*)
  2430.           LD="${LD-ld} -melf32bsmip"
  2431.           ;;
  2432.         *N32*)
  2433.           LD="${LD-ld} -melf32bmipn32"
  2434.           ;;
  2435.         *64-bit*)
  2436.           LD="${LD-ld} -melf64bmip"
  2437.         ;;
  2438.       esac
  2439.     else
  2440.       case `/usr/bin/file conftest.$ac_objext` in
  2441.         *32-bit*)
  2442.           LD="${LD-ld} -32"
  2443.           ;;
  2444.         *N32*)
  2445.           LD="${LD-ld} -n32"
  2446.           ;;
  2447.         *64-bit*)
  2448.           LD="${LD-ld} -64"
  2449.           ;;
  2450.       esac
  2451.     fi
  2452.   fi
  2453.   rm -rf conftest*
  2454.   ;;
  2455.  
  2456. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  2457. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  2458.   # Find out which ABI we are using.
  2459.   echo 'int i;' > conftest.$ac_ext
  2460.   if AC_TRY_EVAL(ac_compile); then
  2461.     case `/usr/bin/file conftest.o` in
  2462.       *32-bit*)
  2463.         case $host in
  2464.           x86_64-*kfreebsd*-gnu)
  2465.             LD="${LD-ld} -m elf_i386_fbsd"
  2466.             ;;
  2467.           x86_64-*linux*)
  2468.             case `/usr/bin/file conftest.o` in
  2469.               *x86-64*)
  2470.                 LD="${LD-ld} -m elf32_x86_64"
  2471.                 ;;
  2472.               *)
  2473.                 LD="${LD-ld} -m elf_i386"
  2474.                 ;;
  2475.             esac
  2476.             ;;
  2477.           powerpc64le-*)
  2478.             LD="${LD-ld} -m elf32lppclinux"
  2479.             ;;
  2480.           powerpc64-*)
  2481.             LD="${LD-ld} -m elf32ppclinux"
  2482.             ;;
  2483.           s390x-*linux*)
  2484.             LD="${LD-ld} -m elf_s390"
  2485.             ;;
  2486.           sparc64-*linux*)
  2487.             LD="${LD-ld} -m elf32_sparc"
  2488.             ;;
  2489.         esac
  2490.         ;;
  2491.       *64-bit*)
  2492.         case $host in
  2493.           x86_64-*kfreebsd*-gnu)
  2494.             LD="${LD-ld} -m elf_x86_64_fbsd"
  2495.             ;;
  2496.           x86_64-*linux*)
  2497.             LD="${LD-ld} -m elf_x86_64"
  2498.             ;;
  2499.           powerpcle-*)
  2500.             LD="${LD-ld} -m elf64lppc"
  2501.             ;;
  2502.           powerpc-*)
  2503.             LD="${LD-ld} -m elf64ppc"
  2504.             ;;
  2505.           s390*-*linux*|s390*-*tpf*)
  2506.             LD="${LD-ld} -m elf64_s390"
  2507.             ;;
  2508.           sparc*-*linux*)
  2509.             LD="${LD-ld} -m elf64_sparc"
  2510.             ;;
  2511.         esac
  2512.         ;;
  2513.     esac
  2514.   fi
  2515.   rm -rf conftest*
  2516.   ;;
  2517.  
  2518. *-*-sco3.2v5*)
  2519.   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  2520.   SAVE_CFLAGS="$CFLAGS"
  2521.   CFLAGS="$CFLAGS -belf"
  2522.   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  2523.     [AC_LANG_PUSH(C)
  2524.      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  2525.      AC_LANG_POP])
  2526.   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  2527.     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  2528.     CFLAGS="$SAVE_CFLAGS"
  2529.   fi
  2530.   ;;
  2531. *-*solaris*)
  2532.   # Find out which ABI we are using.
  2533.   echo 'int i;' > conftest.$ac_ext
  2534.   if AC_TRY_EVAL(ac_compile); then
  2535.     case `/usr/bin/file conftest.o` in
  2536.     *64-bit*)
  2537.       case $lt_cv_prog_gnu_ld in
  2538.       yes*)
  2539.         case $host in
  2540.         i?86-*-solaris*)
  2541.           LD="${LD-ld} -m elf_x86_64"
  2542.           ;;
  2543.         sparc*-*-solaris*)
  2544.           LD="${LD-ld} -m elf64_sparc"
  2545.           ;;
  2546.         esac
  2547.         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
  2548.         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  2549.           LD="${LD-ld}_sol2"
  2550.         fi
  2551.         ;;
  2552.       *)
  2553.         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  2554.           LD="${LD-ld} -64"
  2555.         fi
  2556.         ;;
  2557.       esac
  2558.       ;;
  2559.     esac
  2560.   fi
  2561.   rm -rf conftest*
  2562.   ;;
  2563. esac
  2564.  
  2565. need_locks="$enable_libtool_lock"
  2566. ])# _LT_ENABLE_LOCK
  2567.  
  2568.  
  2569. # _LT_PROG_AR
  2570. # -----------
  2571. m4_defun([_LT_PROG_AR],
  2572. [AC_CHECK_TOOLS(AR, [ar], false)
  2573. : ${AR=ar}
  2574. : ${AR_FLAGS=cru}
  2575. _LT_DECL([], [AR], [1], [The archiver])
  2576. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  2577.  
  2578. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  2579.   [lt_cv_ar_at_file=no
  2580.    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  2581.      [echo conftest.$ac_objext > conftest.lst
  2582.       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  2583.       AC_TRY_EVAL([lt_ar_try])
  2584.       if test "$ac_status" -eq 0; then
  2585.         # Ensure the archiver fails upon bogus file names.
  2586.         rm -f conftest.$ac_objext libconftest.a
  2587.         AC_TRY_EVAL([lt_ar_try])
  2588.         if test "$ac_status" -ne 0; then
  2589.           lt_cv_ar_at_file=@
  2590.         fi
  2591.       fi
  2592.       rm -f conftest.* libconftest.a
  2593.      ])
  2594.   ])
  2595.  
  2596. if test "x$lt_cv_ar_at_file" = xno; then
  2597.   archiver_list_spec=
  2598. else
  2599.   archiver_list_spec=$lt_cv_ar_at_file
  2600. fi
  2601. _LT_DECL([], [archiver_list_spec], [1],
  2602.   [How to feed a file listing to the archiver])
  2603. ])# _LT_PROG_AR
  2604.  
  2605.  
  2606. # _LT_CMD_OLD_ARCHIVE
  2607. # -------------------
  2608. m4_defun([_LT_CMD_OLD_ARCHIVE],
  2609. [_LT_PROG_AR
  2610.  
  2611. AC_CHECK_TOOL(STRIP, strip, :)
  2612. test -z "$STRIP" && STRIP=:
  2613. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  2614.  
  2615. AC_CHECK_TOOL(RANLIB, ranlib, :)
  2616. test -z "$RANLIB" && RANLIB=:
  2617. _LT_DECL([], [RANLIB], [1],
  2618.     [Commands used to install an old-style archive])
  2619.  
  2620. # Determine commands to create old-style static archives.
  2621. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  2622. old_postinstall_cmds='chmod 644 $oldlib'
  2623. old_postuninstall_cmds=
  2624.  
  2625. if test -n "$RANLIB"; then
  2626.   case $host_os in
  2627.   openbsd*)
  2628.     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  2629.     ;;
  2630.   *)
  2631.     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  2632.     ;;
  2633.   esac
  2634.   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  2635. fi
  2636.  
  2637. case $host_os in
  2638.   darwin*)
  2639.     lock_old_archive_extraction=yes ;;
  2640.   *)
  2641.     lock_old_archive_extraction=no ;;
  2642. esac
  2643. _LT_DECL([], [old_postinstall_cmds], [2])
  2644. _LT_DECL([], [old_postuninstall_cmds], [2])
  2645. _LT_TAGDECL([], [old_archive_cmds], [2],
  2646.     [Commands used to build an old-style archive])
  2647. _LT_DECL([], [lock_old_archive_extraction], [0],
  2648.     [Whether to use a lock for old archive extraction])
  2649. ])# _LT_CMD_OLD_ARCHIVE
  2650.  
  2651.  
  2652. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  2653. #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  2654. # ----------------------------------------------------------------
  2655. # Check whether the given compiler option works
  2656. AC_DEFUN([_LT_COMPILER_OPTION],
  2657. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2658. m4_require([_LT_DECL_SED])dnl
  2659. AC_CACHE_CHECK([$1], [$2],
  2660.   [$2=no
  2661.    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  2662.    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  2663.    lt_compiler_flag="$3"
  2664.    # Insert the option either (1) after the last *FLAGS variable, or
  2665.    # (2) before a word containing "conftest.", or (3) at the end.
  2666.    # Note that $ac_compile itself does not contain backslashes and begins
  2667.    # with a dollar sign (not a hyphen), so the echo should work correctly.
  2668.    # The option is referenced via a variable to avoid confusing sed.
  2669.    lt_compile=`echo "$ac_compile" | $SED \
  2670.    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  2671.    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  2672.    -e 's:$: $lt_compiler_flag:'`
  2673.    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  2674.    (eval "$lt_compile" 2>conftest.err)
  2675.    ac_status=$?
  2676.    cat conftest.err >&AS_MESSAGE_LOG_FD
  2677.    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  2678.    if (exit $ac_status) && test -s "$ac_outfile"; then
  2679.      # The compiler can only warn and ignore the option if not recognized
  2680.      # So say no if there are warnings other than the usual output.
  2681.      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  2682.      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  2683.      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  2684.        $2=yes
  2685.      fi
  2686.    fi
  2687.    $RM conftest*
  2688. ])
  2689.  
  2690. if test x"[$]$2" = xyes; then
  2691.     m4_if([$5], , :, [$5])
  2692. else
  2693.     m4_if([$6], , :, [$6])
  2694. fi
  2695. ])# _LT_COMPILER_OPTION
  2696.  
  2697. # Old name:
  2698. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  2699. dnl aclocal-1.4 backwards compatibility:
  2700. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  2701.  
  2702.  
  2703. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  2704. #                  [ACTION-SUCCESS], [ACTION-FAILURE])
  2705. # ----------------------------------------------------
  2706. # Check whether the given linker option works
  2707. AC_DEFUN([_LT_LINKER_OPTION],
  2708. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2709. m4_require([_LT_DECL_SED])dnl
  2710. AC_CACHE_CHECK([$1], [$2],
  2711.   [$2=no
  2712.    save_LDFLAGS="$LDFLAGS"
  2713.    LDFLAGS="$LDFLAGS $3"
  2714.    echo "$lt_simple_link_test_code" > conftest.$ac_ext
  2715.    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  2716.      # The linker can only warn and ignore the option if not recognized
  2717.      # So say no if there are warnings
  2718.      if test -s conftest.err; then
  2719.        # Append any errors to the config.log.
  2720.        cat conftest.err 1>&AS_MESSAGE_LOG_FD
  2721.        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  2722.        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  2723.        if diff conftest.exp conftest.er2 >/dev/null; then
  2724.          $2=yes
  2725.        fi
  2726.      else
  2727.        $2=yes
  2728.      fi
  2729.    fi
  2730.    $RM -r conftest*
  2731.    LDFLAGS="$save_LDFLAGS"
  2732. ])
  2733.  
  2734. if test x"[$]$2" = xyes; then
  2735.     m4_if([$4], , :, [$4])
  2736. else
  2737.     m4_if([$5], , :, [$5])
  2738. fi
  2739. ])# _LT_LINKER_OPTION
  2740.  
  2741. # Old name:
  2742. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  2743. dnl aclocal-1.4 backwards compatibility:
  2744. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  2745.  
  2746.  
  2747. # LT_CMD_MAX_LEN
  2748. #---------------
  2749. AC_DEFUN([LT_CMD_MAX_LEN],
  2750. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2751. # find the maximum length of command line arguments
  2752. AC_MSG_CHECKING([the maximum length of command line arguments])
  2753. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  2754.   i=0
  2755.   teststring="ABCD"
  2756.  
  2757.   case $build_os in
  2758.   msdosdjgpp*)
  2759.     # On DJGPP, this test can blow up pretty badly due to problems in libc
  2760.     # (any single argument exceeding 2000 bytes causes a buffer overrun
  2761.     # during glob expansion).  Even if it were fixed, the result of this
  2762.     # check would be larger than it should be.
  2763.     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
  2764.     ;;
  2765.  
  2766.   gnu*)
  2767.     # Under GNU Hurd, this test is not required because there is
  2768.     # no limit to the length of command line arguments.
  2769.     # Libtool will interpret -1 as no limit whatsoever
  2770.     lt_cv_sys_max_cmd_len=-1;
  2771.     ;;
  2772.  
  2773.   cygwin* | mingw* | cegcc*)
  2774.     # On Win9x/ME, this test blows up -- it succeeds, but takes
  2775.     # about 5 minutes as the teststring grows exponentially.
  2776.     # Worse, since 9x/ME are not pre-emptively multitasking,
  2777.     # you end up with a "frozen" computer, even though with patience
  2778.     # the test eventually succeeds (with a max line length of 256k).
  2779.     # Instead, let's just punt: use the minimum linelength reported by
  2780.     # all of the supported platforms: 8192 (on NT/2K/XP).
  2781.     lt_cv_sys_max_cmd_len=8192;
  2782.     ;;
  2783.  
  2784.   mint*)
  2785.     # On MiNT this can take a long time and run out of memory.
  2786.     lt_cv_sys_max_cmd_len=8192;
  2787.     ;;
  2788.  
  2789.   amigaos*)
  2790.     # On AmigaOS with pdksh, this test takes hours, literally.
  2791.     # So we just punt and use a minimum line length of 8192.
  2792.     lt_cv_sys_max_cmd_len=8192;
  2793.     ;;
  2794.  
  2795.   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  2796.     # This has been around since 386BSD, at least.  Likely further.
  2797.     if test -x /sbin/sysctl; then
  2798.       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  2799.     elif test -x /usr/sbin/sysctl; then
  2800.       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  2801.     else
  2802.       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
  2803.     fi
  2804.     # And add a safety zone
  2805.     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  2806.     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  2807.     ;;
  2808.  
  2809.   interix*)
  2810.     # We know the value 262144 and hardcode it with a safety zone (like BSD)
  2811.     lt_cv_sys_max_cmd_len=196608
  2812.     ;;
  2813.  
  2814.   os2*)
  2815.     # The test takes a long time on OS/2.
  2816.     lt_cv_sys_max_cmd_len=8192
  2817.     ;;
  2818.  
  2819.   osf*)
  2820.     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  2821.     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  2822.     # nice to cause kernel panics so lets avoid the loop below.
  2823.     # First set a reasonable default.
  2824.     lt_cv_sys_max_cmd_len=16384
  2825.     #
  2826.     if test -x /sbin/sysconfig; then
  2827.       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  2828.         *1*) lt_cv_sys_max_cmd_len=-1 ;;
  2829.       esac
  2830.     fi
  2831.     ;;
  2832.   sco3.2v5*)
  2833.     lt_cv_sys_max_cmd_len=102400
  2834.     ;;
  2835.   sysv5* | sco5v6* | sysv4.2uw2*)
  2836.     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  2837.     if test -n "$kargmax"; then
  2838.       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
  2839.     else
  2840.       lt_cv_sys_max_cmd_len=32768
  2841.     fi
  2842.     ;;
  2843.   *)
  2844.     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  2845.     if test -n "$lt_cv_sys_max_cmd_len" && \
  2846.         test undefined != "$lt_cv_sys_max_cmd_len"; then
  2847.       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  2848.       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  2849.     else
  2850.       # Make teststring a little bigger before we do anything with it.
  2851.       # a 1K string should be a reasonable start.
  2852.       for i in 1 2 3 4 5 6 7 8 ; do
  2853.         teststring=$teststring$teststring
  2854.       done
  2855.       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  2856.       # If test is not a shell built-in, we'll probably end up computing a
  2857.       # maximum length that is only half of the actual maximum length, but
  2858.       # we can't tell.
  2859.       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
  2860.                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  2861.               test $i != 17 # 1/2 MB should be enough
  2862.       do
  2863.         i=`expr $i + 1`
  2864.         teststring=$teststring$teststring
  2865.       done
  2866.       # Only check the string length outside the loop.
  2867.       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  2868.       teststring=
  2869.       # Add a significant safety factor because C++ compilers can tack on
  2870.       # massive amounts of additional arguments before passing them to the
  2871.       # linker.  It appears as though 1/2 is a usable value.
  2872.       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  2873.     fi
  2874.     ;;
  2875.   esac
  2876. ])
  2877. if test -n $lt_cv_sys_max_cmd_len ; then
  2878.   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  2879. else
  2880.   AC_MSG_RESULT(none)
  2881. fi
  2882. max_cmd_len=$lt_cv_sys_max_cmd_len
  2883. _LT_DECL([], [max_cmd_len], [0],
  2884.     [What is the maximum length of a command?])
  2885. ])# LT_CMD_MAX_LEN
  2886.  
  2887. # Old name:
  2888. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  2889. dnl aclocal-1.4 backwards compatibility:
  2890. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  2891.  
  2892.  
  2893. # _LT_HEADER_DLFCN
  2894. # ----------------
  2895. m4_defun([_LT_HEADER_DLFCN],
  2896. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  2897. ])# _LT_HEADER_DLFCN
  2898.  
  2899.  
  2900. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  2901. #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  2902. # ----------------------------------------------------------------
  2903. m4_defun([_LT_TRY_DLOPEN_SELF],
  2904. [m4_require([_LT_HEADER_DLFCN])dnl
  2905. if test "$cross_compiling" = yes; then :
  2906.   [$4]
  2907. else
  2908.   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  2909.   lt_status=$lt_dlunknown
  2910.   cat > conftest.$ac_ext <<_LT_EOF
  2911. [#line $LINENO "configure"
  2912. #include "confdefs.h"
  2913.  
  2914. #if HAVE_DLFCN_H
  2915. #include <dlfcn.h>
  2916. #endif
  2917.  
  2918. #include <stdio.h>
  2919.  
  2920. #ifdef RTLD_GLOBAL
  2921. #  define LT_DLGLOBAL           RTLD_GLOBAL
  2922. #else
  2923. #  ifdef DL_GLOBAL
  2924. #    define LT_DLGLOBAL         DL_GLOBAL
  2925. #  else
  2926. #    define LT_DLGLOBAL         0
  2927. #  endif
  2928. #endif
  2929.  
  2930. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  2931.    find out it does not work in some platform. */
  2932. #ifndef LT_DLLAZY_OR_NOW
  2933. #  ifdef RTLD_LAZY
  2934. #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
  2935. #  else
  2936. #    ifdef DL_LAZY
  2937. #      define LT_DLLAZY_OR_NOW          DL_LAZY
  2938. #    else
  2939. #      ifdef RTLD_NOW
  2940. #        define LT_DLLAZY_OR_NOW        RTLD_NOW
  2941. #      else
  2942. #        ifdef DL_NOW
  2943. #          define LT_DLLAZY_OR_NOW      DL_NOW
  2944. #        else
  2945. #          define LT_DLLAZY_OR_NOW      0
  2946. #        endif
  2947. #      endif
  2948. #    endif
  2949. #  endif
  2950. #endif
  2951.  
  2952. /* When -fvisbility=hidden is used, assume the code has been annotated
  2953.    correspondingly for the symbols needed.  */
  2954. #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  2955. int fnord () __attribute__((visibility("default")));
  2956. #endif
  2957.  
  2958. int fnord () { return 42; }
  2959. int main ()
  2960. {
  2961.   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  2962.   int status = $lt_dlunknown;
  2963.  
  2964.   if (self)
  2965.     {
  2966.       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
  2967.       else
  2968.         {
  2969.           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
  2970.           else puts (dlerror ());
  2971.         }
  2972.       /* dlclose (self); */
  2973.     }
  2974.   else
  2975.     puts (dlerror ());
  2976.  
  2977.   return status;
  2978. }]
  2979. _LT_EOF
  2980.   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  2981.     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  2982.     lt_status=$?
  2983.     case x$lt_status in
  2984.       x$lt_dlno_uscore) $1 ;;
  2985.       x$lt_dlneed_uscore) $2 ;;
  2986.       x$lt_dlunknown|x*) $3 ;;
  2987.     esac
  2988.   else :
  2989.     # compilation failed
  2990.     $3
  2991.   fi
  2992. fi
  2993. rm -fr conftest*
  2994. ])# _LT_TRY_DLOPEN_SELF
  2995.  
  2996.  
  2997. # LT_SYS_DLOPEN_SELF
  2998. # ------------------
  2999. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  3000. [m4_require([_LT_HEADER_DLFCN])dnl
  3001. if test "x$enable_dlopen" != xyes; then
  3002.   enable_dlopen=unknown
  3003.   enable_dlopen_self=unknown
  3004.   enable_dlopen_self_static=unknown
  3005. else
  3006.   lt_cv_dlopen=no
  3007.   lt_cv_dlopen_libs=
  3008.  
  3009.   case $host_os in
  3010.   beos*)
  3011.     lt_cv_dlopen="load_add_on"
  3012.     lt_cv_dlopen_libs=
  3013.     lt_cv_dlopen_self=yes
  3014.     ;;
  3015.  
  3016.   mingw* | pw32* | cegcc*)
  3017.     lt_cv_dlopen="LoadLibrary"
  3018.     lt_cv_dlopen_libs=
  3019.     ;;
  3020.  
  3021.   cygwin*)
  3022.     lt_cv_dlopen="dlopen"
  3023.     lt_cv_dlopen_libs=
  3024.     ;;
  3025.  
  3026.   darwin*)
  3027.   # if libdl is installed we need to link against it
  3028.     AC_CHECK_LIB([dl], [dlopen],
  3029.                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  3030.     lt_cv_dlopen="dyld"
  3031.     lt_cv_dlopen_libs=
  3032.     lt_cv_dlopen_self=yes
  3033.     ])
  3034.     ;;
  3035.  
  3036.   *)
  3037.     AC_CHECK_FUNC([shl_load],
  3038.           [lt_cv_dlopen="shl_load"],
  3039.       [AC_CHECK_LIB([dld], [shl_load],
  3040.             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  3041.         [AC_CHECK_FUNC([dlopen],
  3042.               [lt_cv_dlopen="dlopen"],
  3043.           [AC_CHECK_LIB([dl], [dlopen],
  3044.                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  3045.             [AC_CHECK_LIB([svld], [dlopen],
  3046.                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  3047.               [AC_CHECK_LIB([dld], [dld_link],
  3048.                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  3049.               ])
  3050.             ])
  3051.           ])
  3052.         ])
  3053.       ])
  3054.     ;;
  3055.   esac
  3056.  
  3057.   if test "x$lt_cv_dlopen" != xno; then
  3058.     enable_dlopen=yes
  3059.   else
  3060.     enable_dlopen=no
  3061.   fi
  3062.  
  3063.   case $lt_cv_dlopen in
  3064.   dlopen)
  3065.     save_CPPFLAGS="$CPPFLAGS"
  3066.     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  3067.  
  3068.     save_LDFLAGS="$LDFLAGS"
  3069.     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  3070.  
  3071.     save_LIBS="$LIBS"
  3072.     LIBS="$lt_cv_dlopen_libs $LIBS"
  3073.  
  3074.     AC_CACHE_CHECK([whether a program can dlopen itself],
  3075.           lt_cv_dlopen_self, [dnl
  3076.           _LT_TRY_DLOPEN_SELF(
  3077.             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  3078.             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  3079.     ])
  3080.  
  3081.     if test "x$lt_cv_dlopen_self" = xyes; then
  3082.       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  3083.       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  3084.           lt_cv_dlopen_self_static, [dnl
  3085.           _LT_TRY_DLOPEN_SELF(
  3086.             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  3087.             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
  3088.       ])
  3089.     fi
  3090.  
  3091.     CPPFLAGS="$save_CPPFLAGS"
  3092.     LDFLAGS="$save_LDFLAGS"
  3093.     LIBS="$save_LIBS"
  3094.     ;;
  3095.   esac
  3096.  
  3097.   case $lt_cv_dlopen_self in
  3098.   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  3099.   *) enable_dlopen_self=unknown ;;
  3100.   esac
  3101.  
  3102.   case $lt_cv_dlopen_self_static in
  3103.   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  3104.   *) enable_dlopen_self_static=unknown ;;
  3105.   esac
  3106. fi
  3107. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  3108.          [Whether dlopen is supported])
  3109. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  3110.          [Whether dlopen of programs is supported])
  3111. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  3112.          [Whether dlopen of statically linked programs is supported])
  3113. ])# LT_SYS_DLOPEN_SELF
  3114.  
  3115. # Old name:
  3116. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  3117. dnl aclocal-1.4 backwards compatibility:
  3118. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  3119.  
  3120.  
  3121. # _LT_COMPILER_C_O([TAGNAME])
  3122. # ---------------------------
  3123. # Check to see if options -c and -o are simultaneously supported by compiler.
  3124. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  3125. m4_defun([_LT_COMPILER_C_O],
  3126. [m4_require([_LT_DECL_SED])dnl
  3127. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3128. m4_require([_LT_TAG_COMPILER])dnl
  3129. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  3130.   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  3131.   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  3132.    $RM -r conftest 2>/dev/null
  3133.    mkdir conftest
  3134.    cd conftest
  3135.    mkdir out
  3136.    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  3137.  
  3138.    lt_compiler_flag="-o out/conftest2.$ac_objext"
  3139.    # Insert the option either (1) after the last *FLAGS variable, or
  3140.    # (2) before a word containing "conftest.", or (3) at the end.
  3141.    # Note that $ac_compile itself does not contain backslashes and begins
  3142.    # with a dollar sign (not a hyphen), so the echo should work correctly.
  3143.    lt_compile=`echo "$ac_compile" | $SED \
  3144.    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  3145.    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  3146.    -e 's:$: $lt_compiler_flag:'`
  3147.    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  3148.    (eval "$lt_compile" 2>out/conftest.err)
  3149.    ac_status=$?
  3150.    cat out/conftest.err >&AS_MESSAGE_LOG_FD
  3151.    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  3152.    if (exit $ac_status) && test -s out/conftest2.$ac_objext
  3153.    then
  3154.      # The compiler can only warn and ignore the option if not recognized
  3155.      # So say no if there are warnings
  3156.      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  3157.      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  3158.      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  3159.        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  3160.      fi
  3161.    fi
  3162.    chmod u+w . 2>&AS_MESSAGE_LOG_FD
  3163.    $RM conftest*
  3164.    # SGI C++ compiler will create directory out/ii_files/ for
  3165.    # template instantiation
  3166.    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  3167.    $RM out/* && rmdir out
  3168.    cd ..
  3169.    $RM -r conftest
  3170.    $RM conftest*
  3171. ])
  3172. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  3173.         [Does compiler simultaneously support -c and -o options?])
  3174. ])# _LT_COMPILER_C_O
  3175.  
  3176.  
  3177. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  3178. # ----------------------------------
  3179. # Check to see if we can do hard links to lock some files if needed
  3180. m4_defun([_LT_COMPILER_FILE_LOCKS],
  3181. [m4_require([_LT_ENABLE_LOCK])dnl
  3182. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3183. _LT_COMPILER_C_O([$1])
  3184.  
  3185. hard_links="nottested"
  3186. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  3187.   # do not overwrite the value of need_locks provided by the user
  3188.   AC_MSG_CHECKING([if we can lock with hard links])
  3189.   hard_links=yes
  3190.   $RM conftest*
  3191.   ln conftest.a conftest.b 2>/dev/null && hard_links=no
  3192.   touch conftest.a
  3193.   ln conftest.a conftest.b 2>&5 || hard_links=no
  3194.   ln conftest.a conftest.b 2>/dev/null && hard_links=no
  3195.   AC_MSG_RESULT([$hard_links])
  3196.   if test "$hard_links" = no; then
  3197.     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  3198.     need_locks=warn
  3199.   fi
  3200. else
  3201.   need_locks=no
  3202. fi
  3203. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  3204. ])# _LT_COMPILER_FILE_LOCKS
  3205.  
  3206.  
  3207. # _LT_CHECK_OBJDIR
  3208. # ----------------
  3209. m4_defun([_LT_CHECK_OBJDIR],
  3210. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  3211. [rm -f .libs 2>/dev/null
  3212. mkdir .libs 2>/dev/null
  3213. if test -d .libs; then
  3214.   lt_cv_objdir=.libs
  3215. else
  3216.   # MS-DOS does not allow filenames that begin with a dot.
  3217.   lt_cv_objdir=_libs
  3218. fi
  3219. rmdir .libs 2>/dev/null])
  3220. objdir=$lt_cv_objdir
  3221. _LT_DECL([], [objdir], [0],
  3222.          [The name of the directory that contains temporary libtool files])dnl
  3223. m4_pattern_allow([LT_OBJDIR])dnl
  3224. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  3225.   [Define to the sub-directory in which libtool stores uninstalled libraries.])
  3226. ])# _LT_CHECK_OBJDIR
  3227.  
  3228.  
  3229. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  3230. # --------------------------------------
  3231. # Check hardcoding attributes.
  3232. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  3233. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  3234. _LT_TAGVAR(hardcode_action, $1)=
  3235. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  3236.    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  3237.    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  3238.  
  3239.   # We can hardcode non-existent directories.
  3240.   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  3241.      # If the only mechanism to avoid hardcoding is shlibpath_var, we
  3242.      # have to relink, otherwise we might link with an installed library
  3243.      # when we should be linking with a yet-to-be-installed one
  3244.      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  3245.      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  3246.     # Linking always hardcodes the temporary library directory.
  3247.     _LT_TAGVAR(hardcode_action, $1)=relink
  3248.   else
  3249.     # We can link without hardcoding, and we can hardcode nonexisting dirs.
  3250.     _LT_TAGVAR(hardcode_action, $1)=immediate
  3251.   fi
  3252. else
  3253.   # We cannot hardcode anything, or else we can only hardcode existing
  3254.   # directories.
  3255.   _LT_TAGVAR(hardcode_action, $1)=unsupported
  3256. fi
  3257. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  3258.  
  3259. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  3260.    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  3261.   # Fast installation is not supported
  3262.   enable_fast_install=no
  3263. elif test "$shlibpath_overrides_runpath" = yes ||
  3264.      test "$enable_shared" = no; then
  3265.   # Fast installation is not necessary
  3266.   enable_fast_install=needless
  3267. fi
  3268. _LT_TAGDECL([], [hardcode_action], [0],
  3269.     [How to hardcode a shared library path into an executable])
  3270. ])# _LT_LINKER_HARDCODE_LIBPATH
  3271.  
  3272.  
  3273. # _LT_CMD_STRIPLIB
  3274. # ----------------
  3275. m4_defun([_LT_CMD_STRIPLIB],
  3276. [m4_require([_LT_DECL_EGREP])
  3277. striplib=
  3278. old_striplib=
  3279. AC_MSG_CHECKING([whether stripping libraries is possible])
  3280. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  3281.   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  3282.   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  3283.   AC_MSG_RESULT([yes])
  3284. else
  3285. # FIXME - insert some real tests, host_os isn't really good enough
  3286.   case $host_os in
  3287.   darwin*)
  3288.     if test -n "$STRIP" ; then
  3289.       striplib="$STRIP -x"
  3290.       old_striplib="$STRIP -S"
  3291.       AC_MSG_RESULT([yes])
  3292.     else
  3293.       AC_MSG_RESULT([no])
  3294.     fi
  3295.     ;;
  3296.   *)
  3297.     AC_MSG_RESULT([no])
  3298.     ;;
  3299.   esac
  3300. fi
  3301. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  3302. _LT_DECL([], [striplib], [1])
  3303. ])# _LT_CMD_STRIPLIB
  3304.  
  3305.  
  3306. # _LT_SYS_DYNAMIC_LINKER([TAG])
  3307. # -----------------------------
  3308. # PORTME Fill in your ld.so characteristics
  3309. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  3310. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3311. m4_require([_LT_DECL_EGREP])dnl
  3312. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  3313. m4_require([_LT_DECL_OBJDUMP])dnl
  3314. m4_require([_LT_DECL_SED])dnl
  3315. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  3316. AC_MSG_CHECKING([dynamic linker characteristics])
  3317. m4_if([$1],
  3318.         [], [
  3319. if test "$GCC" = yes; then
  3320.   case $host_os in
  3321.     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  3322.     *) lt_awk_arg="/^libraries:/" ;;
  3323.   esac
  3324.   case $host_os in
  3325.     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
  3326.     *) lt_sed_strip_eq="s,=/,/,g" ;;
  3327.   esac
  3328.   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  3329.   case $lt_search_path_spec in
  3330.   *\;*)
  3331.     # if the path contains ";" then we assume it to be the separator
  3332.     # otherwise default to the standard path separator (i.e. ":") - it is
  3333.     # assumed that no part of a normal pathname contains ";" but that should
  3334.     # okay in the real world where ";" in dirpaths is itself problematic.
  3335.     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  3336.     ;;
  3337.   *)
  3338.     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  3339.     ;;
  3340.   esac
  3341.   # Ok, now we have the path, separated by spaces, we can step through it
  3342.   # and add multilib dir if necessary.
  3343.   lt_tmp_lt_search_path_spec=
  3344.   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  3345.   for lt_sys_path in $lt_search_path_spec; do
  3346.     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  3347.       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  3348.     else
  3349.       test -d "$lt_sys_path" && \
  3350.         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  3351.     fi
  3352.   done
  3353.   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  3354. BEGIN {RS=" "; FS="/|\n";} {
  3355.   lt_foo="";
  3356.   lt_count=0;
  3357.   for (lt_i = NF; lt_i > 0; lt_i--) {
  3358.     if ($lt_i != "" && $lt_i != ".") {
  3359.       if ($lt_i == "..") {
  3360.         lt_count++;
  3361.       } else {
  3362.         if (lt_count == 0) {
  3363.           lt_foo="/" $lt_i lt_foo;
  3364.         } else {
  3365.           lt_count--;
  3366.         }
  3367.       }
  3368.     }
  3369.   }
  3370.   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  3371.   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  3372. }'`
  3373.   # AWK program above erroneously prepends '/' to C:/dos/paths
  3374.   # for these hosts.
  3375.   case $host_os in
  3376.     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  3377.       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  3378.   esac
  3379.   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  3380. else
  3381.   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  3382. fi])
  3383. library_names_spec=
  3384. libname_spec='lib$name'
  3385. soname_spec=
  3386. shrext_cmds=".so"
  3387. postinstall_cmds=
  3388. postuninstall_cmds=
  3389. finish_cmds=
  3390. finish_eval=
  3391. shlibpath_var=
  3392. shlibpath_overrides_runpath=unknown
  3393. version_type=none
  3394. dynamic_linker="$host_os ld.so"
  3395. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  3396. need_lib_prefix=unknown
  3397. hardcode_into_libs=no
  3398.  
  3399. # when you set need_version to no, make sure it does not cause -set_version
  3400. # flags to be left without arguments
  3401. need_version=unknown
  3402.  
  3403. case $host_os in
  3404. aix3*)
  3405.   version_type=linux # correct to gnu/linux during the next big refactor
  3406.   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  3407.   shlibpath_var=LIBPATH
  3408.  
  3409.   # AIX 3 has no versioning support, so we append a major version to the name.
  3410.   soname_spec='${libname}${release}${shared_ext}$major'
  3411.   ;;
  3412.  
  3413. aix[[4-9]]*)
  3414.   version_type=linux # correct to gnu/linux during the next big refactor
  3415.   need_lib_prefix=no
  3416.   need_version=no
  3417.   hardcode_into_libs=yes
  3418.   if test "$host_cpu" = ia64; then
  3419.     # AIX 5 supports IA64
  3420.     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  3421.     shlibpath_var=LD_LIBRARY_PATH
  3422.   else
  3423.     # With GCC up to 2.95.x, collect2 would create an import file
  3424.     # for dependence libraries.  The import file would start with
  3425.     # the line `#! .'.  This would cause the generated library to
  3426.     # depend on `.', always an invalid library.  This was fixed in
  3427.     # development snapshots of GCC prior to 3.0.
  3428.     case $host_os in
  3429.       aix4 | aix4.[[01]] | aix4.[[01]].*)
  3430.       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  3431.            echo ' yes '
  3432.            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  3433.         :
  3434.       else
  3435.         can_build_shared=no
  3436.       fi
  3437.       ;;
  3438.     esac
  3439.     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  3440.     # soname into executable. Probably we can add versioning support to
  3441.     # collect2, so additional links can be useful in future.
  3442.     if test "$aix_use_runtimelinking" = yes; then
  3443.       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  3444.       # instead of lib<name>.a to let people know that these are not
  3445.       # typical AIX shared libraries.
  3446.       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3447.     else
  3448.       # We preserve .a as extension for shared libraries through AIX4.2
  3449.       # and later when we are not doing run time linking.
  3450.       library_names_spec='${libname}${release}.a $libname.a'
  3451.       soname_spec='${libname}${release}${shared_ext}$major'
  3452.     fi
  3453.     shlibpath_var=LIBPATH
  3454.   fi
  3455.   ;;
  3456.  
  3457. amigaos*)
  3458.   case $host_cpu in
  3459.   powerpc)
  3460.     # Since July 2007 AmigaOS4 officially supports .so libraries.
  3461.     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  3462.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3463.     ;;
  3464.   m68k)
  3465.     library_names_spec='$libname.ixlibrary $libname.a'
  3466.     # Create ${libname}_ixlibrary.a entries in /sys/libs.
  3467.     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  3468.     ;;
  3469.   esac
  3470.   ;;
  3471.  
  3472. beos*)
  3473.   library_names_spec='${libname}${shared_ext}'
  3474.   dynamic_linker="$host_os ld.so"
  3475.   shlibpath_var=LIBRARY_PATH
  3476.   ;;
  3477.  
  3478. bsdi[[45]]*)
  3479.   version_type=linux # correct to gnu/linux during the next big refactor
  3480.   need_version=no
  3481.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3482.   soname_spec='${libname}${release}${shared_ext}$major'
  3483.   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  3484.   shlibpath_var=LD_LIBRARY_PATH
  3485.   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  3486.   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  3487.   # the default ld.so.conf also contains /usr/contrib/lib and
  3488.   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  3489.   # libtool to hard-code these into programs
  3490.   ;;
  3491.  
  3492. cygwin* | mingw* | pw32* | cegcc*)
  3493.   version_type=windows
  3494.   shrext_cmds=".dll"
  3495.   need_version=no
  3496.   need_lib_prefix=no
  3497.  
  3498.   case $GCC,$cc_basename in
  3499.   yes,*)
  3500.     # gcc
  3501.     library_names_spec='$libname.dll.a'
  3502.     # DLL is installed to $(libdir)/../bin by postinstall_cmds
  3503.     postinstall_cmds='base_file=`basename \${file}`~
  3504.       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  3505.       dldir=$destdir/`dirname \$dlpath`~
  3506.       test -d \$dldir || mkdir -p \$dldir~
  3507.       $install_prog $dir/$dlname \$dldir/$dlname~
  3508.       chmod a+x \$dldir/$dlname~
  3509.       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  3510.         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  3511.       fi'
  3512.     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  3513.       dlpath=$dir/\$dldll~
  3514.        $RM \$dlpath'
  3515.     shlibpath_overrides_runpath=yes
  3516.  
  3517.     case $host_os in
  3518.     cygwin*)
  3519.       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  3520.       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  3521. m4_if([$1], [],[
  3522.       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  3523.       ;;
  3524.     mingw* | cegcc*)
  3525.       # MinGW DLLs use traditional 'lib' prefix
  3526.       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  3527.       ;;
  3528.     pw32*)
  3529.       # pw32 DLLs use 'pw' prefix rather than 'lib'
  3530.       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  3531.       ;;
  3532.     esac
  3533.     dynamic_linker='Win32 ld.exe'
  3534.     ;;
  3535.  
  3536.   *,cl*)
  3537.     # Native MSVC
  3538.     libname_spec='$name'
  3539.     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  3540.     library_names_spec='${libname}.dll.lib'
  3541.  
  3542.     case $build_os in
  3543.     mingw*)
  3544.       sys_lib_search_path_spec=
  3545.       lt_save_ifs=$IFS
  3546.       IFS=';'
  3547.       for lt_path in $LIB
  3548.       do
  3549.         IFS=$lt_save_ifs
  3550.         # Let DOS variable expansion print the short 8.3 style file name.
  3551.         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  3552.         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  3553.       done
  3554.       IFS=$lt_save_ifs
  3555.       # Convert to MSYS style.
  3556.       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  3557.       ;;
  3558.     cygwin*)
  3559.       # Convert to unix form, then to dos form, then back to unix form
  3560.       # but this time dos style (no spaces!) so that the unix form looks
  3561.       # like /cygdrive/c/PROGRA~1:/cygdr...
  3562.       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  3563.       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  3564.       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  3565.       ;;
  3566.     *)
  3567.       sys_lib_search_path_spec="$LIB"
  3568.       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  3569.         # It is most probably a Windows format PATH.
  3570.         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  3571.       else
  3572.         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  3573.       fi
  3574.       # FIXME: find the short name or the path components, as spaces are
  3575.       # common. (e.g. "Program Files" -> "PROGRA~1")
  3576.       ;;
  3577.     esac
  3578.  
  3579.     # DLL is installed to $(libdir)/../bin by postinstall_cmds
  3580.     postinstall_cmds='base_file=`basename \${file}`~
  3581.       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  3582.       dldir=$destdir/`dirname \$dlpath`~
  3583.       test -d \$dldir || mkdir -p \$dldir~
  3584.       $install_prog $dir/$dlname \$dldir/$dlname'
  3585.     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  3586.       dlpath=$dir/\$dldll~
  3587.        $RM \$dlpath'
  3588.     shlibpath_overrides_runpath=yes
  3589.     dynamic_linker='Win32 link.exe'
  3590.     ;;
  3591.  
  3592.   *)
  3593.     # Assume MSVC wrapper
  3594.     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  3595.     dynamic_linker='Win32 ld.exe'
  3596.     ;;
  3597.   esac
  3598.   # FIXME: first we should search . and the directory the executable is in
  3599.   shlibpath_var=PATH
  3600.   ;;
  3601.  
  3602. darwin* | rhapsody*)
  3603.   dynamic_linker="$host_os dyld"
  3604.   version_type=darwin
  3605.   need_lib_prefix=no
  3606.   need_version=no
  3607.   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  3608.   soname_spec='${libname}${release}${major}$shared_ext'
  3609.   shlibpath_overrides_runpath=yes
  3610.   shlibpath_var=DYLD_LIBRARY_PATH
  3611.   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  3612. m4_if([$1], [],[
  3613.   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  3614.   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  3615.   ;;
  3616.  
  3617. dgux*)
  3618.   version_type=linux # correct to gnu/linux during the next big refactor
  3619.   need_lib_prefix=no
  3620.   need_version=no
  3621.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  3622.   soname_spec='${libname}${release}${shared_ext}$major'
  3623.   shlibpath_var=LD_LIBRARY_PATH
  3624.   ;;
  3625.  
  3626. freebsd* | dragonfly*)
  3627.   # DragonFly does not have aout.  When/if they implement a new
  3628.   # versioning mechanism, adjust this.
  3629.   if test -x /usr/bin/objformat; then
  3630.     objformat=`/usr/bin/objformat`
  3631.   else
  3632.     case $host_os in
  3633.     freebsd[[23]].*) objformat=aout ;;
  3634.     *) objformat=elf ;;
  3635.     esac
  3636.   fi
  3637.   version_type=freebsd-$objformat
  3638.   case $version_type in
  3639.     freebsd-elf*)
  3640.       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  3641.       need_version=no
  3642.       need_lib_prefix=no
  3643.       ;;
  3644.     freebsd-*)
  3645.       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  3646.       need_version=yes
  3647.       ;;
  3648.   esac
  3649.   shlibpath_var=LD_LIBRARY_PATH
  3650.   case $host_os in
  3651.   freebsd2.*)
  3652.     shlibpath_overrides_runpath=yes
  3653.     ;;
  3654.   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  3655.     shlibpath_overrides_runpath=yes
  3656.     hardcode_into_libs=yes
  3657.     ;;
  3658.   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  3659.   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  3660.     shlibpath_overrides_runpath=no
  3661.     hardcode_into_libs=yes
  3662.     ;;
  3663.   *) # from 4.6 on, and DragonFly
  3664.     shlibpath_overrides_runpath=yes
  3665.     hardcode_into_libs=yes
  3666.     ;;
  3667.   esac
  3668.   ;;
  3669.  
  3670. haiku*)
  3671.   version_type=linux # correct to gnu/linux during the next big refactor
  3672.   need_lib_prefix=no
  3673.   need_version=no
  3674.   dynamic_linker="$host_os runtime_loader"
  3675.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  3676.   soname_spec='${libname}${release}${shared_ext}$major'
  3677.   shlibpath_var=LIBRARY_PATH
  3678.   shlibpath_overrides_runpath=yes
  3679.   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  3680.   hardcode_into_libs=yes
  3681.   ;;
  3682.  
  3683. hpux9* | hpux10* | hpux11*)
  3684.   # Give a soname corresponding to the major version so that dld.sl refuses to
  3685.   # link against other versions.
  3686.   version_type=sunos
  3687.   need_lib_prefix=no
  3688.   need_version=no
  3689.   case $host_cpu in
  3690.   ia64*)
  3691.     shrext_cmds='.so'
  3692.     hardcode_into_libs=yes
  3693.     dynamic_linker="$host_os dld.so"
  3694.     shlibpath_var=LD_LIBRARY_PATH
  3695.     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  3696.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3697.     soname_spec='${libname}${release}${shared_ext}$major'
  3698.     if test "X$HPUX_IA64_MODE" = X32; then
  3699.       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  3700.     else
  3701.       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  3702.     fi
  3703.     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  3704.     ;;
  3705.   hppa*64*)
  3706.     shrext_cmds='.sl'
  3707.     hardcode_into_libs=yes
  3708.     dynamic_linker="$host_os dld.sl"
  3709.     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  3710.     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  3711.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3712.     soname_spec='${libname}${release}${shared_ext}$major'
  3713.     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  3714.     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  3715.     ;;
  3716.   *)
  3717.     shrext_cmds='.sl'
  3718.     dynamic_linker="$host_os dld.sl"
  3719.     shlibpath_var=SHLIB_PATH
  3720.     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  3721.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3722.     soname_spec='${libname}${release}${shared_ext}$major'
  3723.     ;;
  3724.   esac
  3725.   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  3726.   postinstall_cmds='chmod 555 $lib'
  3727.   # or fails outright, so override atomically:
  3728.   install_override_mode=555
  3729.   ;;
  3730.  
  3731. interix[[3-9]]*)
  3732.   version_type=linux # correct to gnu/linux during the next big refactor
  3733.   need_lib_prefix=no
  3734.   need_version=no
  3735.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  3736.   soname_spec='${libname}${release}${shared_ext}$major'
  3737.   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  3738.   shlibpath_var=LD_LIBRARY_PATH
  3739.   shlibpath_overrides_runpath=no
  3740.   hardcode_into_libs=yes
  3741.   ;;
  3742.  
  3743. irix5* | irix6* | nonstopux*)
  3744.   case $host_os in
  3745.     nonstopux*) version_type=nonstopux ;;
  3746.     *)
  3747.         if test "$lt_cv_prog_gnu_ld" = yes; then
  3748.                 version_type=linux # correct to gnu/linux during the next big refactor
  3749.         else
  3750.                 version_type=irix
  3751.         fi ;;
  3752.   esac
  3753.   need_lib_prefix=no
  3754.   need_version=no
  3755.   soname_spec='${libname}${release}${shared_ext}$major'
  3756.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  3757.   case $host_os in
  3758.   irix5* | nonstopux*)
  3759.     libsuff= shlibsuff=
  3760.     ;;
  3761.   *)
  3762.     case $LD in # libtool.m4 will add one of these switches to LD
  3763.     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  3764.       libsuff= shlibsuff= libmagic=32-bit;;
  3765.     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  3766.       libsuff=32 shlibsuff=N32 libmagic=N32;;
  3767.     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  3768.       libsuff=64 shlibsuff=64 libmagic=64-bit;;
  3769.     *) libsuff= shlibsuff= libmagic=never-match;;
  3770.     esac
  3771.     ;;
  3772.   esac
  3773.   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  3774.   shlibpath_overrides_runpath=no
  3775.   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  3776.   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  3777.   hardcode_into_libs=yes
  3778.   ;;
  3779.  
  3780. # No shared lib support for Linux oldld, aout, or coff.
  3781. linux*oldld* | linux*aout* | linux*coff*)
  3782.   dynamic_linker=no
  3783.   ;;
  3784.  
  3785. # This must be glibc/ELF.
  3786. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3787.   version_type=linux # correct to gnu/linux during the next big refactor
  3788.   need_lib_prefix=no
  3789.   need_version=no
  3790.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3791.   soname_spec='${libname}${release}${shared_ext}$major'
  3792.   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  3793.   shlibpath_var=LD_LIBRARY_PATH
  3794.   shlibpath_overrides_runpath=no
  3795.  
  3796.   # Some binutils ld are patched to set DT_RUNPATH
  3797.   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  3798.     [lt_cv_shlibpath_overrides_runpath=no
  3799.     save_LDFLAGS=$LDFLAGS
  3800.     save_libdir=$libdir
  3801.     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  3802.          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  3803.     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  3804.       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  3805.          [lt_cv_shlibpath_overrides_runpath=yes])])
  3806.     LDFLAGS=$save_LDFLAGS
  3807.     libdir=$save_libdir
  3808.     ])
  3809.   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  3810.  
  3811.   # This implies no fast_install, which is unacceptable.
  3812.   # Some rework will be needed to allow for fast_install
  3813.   # before this can be enabled.
  3814.   hardcode_into_libs=yes
  3815.  
  3816.   # Append ld.so.conf contents to the search path
  3817.   if test -f /etc/ld.so.conf; then
  3818.     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
  3819.     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  3820.   fi
  3821.  
  3822.   # We used to test for /lib/ld.so.1 and disable shared libraries on
  3823.   # powerpc, because MkLinux only supported shared libraries with the
  3824.   # GNU dynamic linker.  Since this was broken with cross compilers,
  3825.   # most powerpc-linux boxes support dynamic linking these days and
  3826.   # people can always --disable-shared, the test was removed, and we
  3827.   # assume the GNU/Linux dynamic linker is in use.
  3828.   dynamic_linker='GNU/Linux ld.so'
  3829.   ;;
  3830.  
  3831. netbsdelf*-gnu)
  3832.   version_type=linux
  3833.   need_lib_prefix=no
  3834.   need_version=no
  3835.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  3836.   soname_spec='${libname}${release}${shared_ext}$major'
  3837.   shlibpath_var=LD_LIBRARY_PATH
  3838.   shlibpath_overrides_runpath=no
  3839.   hardcode_into_libs=yes
  3840.   dynamic_linker='NetBSD ld.elf_so'
  3841.   ;;
  3842.  
  3843. netbsd*)
  3844.   version_type=sunos
  3845.   need_lib_prefix=no
  3846.   need_version=no
  3847.   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  3848.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3849.     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3850.     dynamic_linker='NetBSD (a.out) ld.so'
  3851.   else
  3852.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  3853.     soname_spec='${libname}${release}${shared_ext}$major'
  3854.     dynamic_linker='NetBSD ld.elf_so'
  3855.   fi
  3856.   shlibpath_var=LD_LIBRARY_PATH
  3857.   shlibpath_overrides_runpath=yes
  3858.   hardcode_into_libs=yes
  3859.   ;;
  3860.  
  3861. newsos6)
  3862.   version_type=linux # correct to gnu/linux during the next big refactor
  3863.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3864.   shlibpath_var=LD_LIBRARY_PATH
  3865.   shlibpath_overrides_runpath=yes
  3866.   ;;
  3867.  
  3868. *nto* | *qnx*)
  3869.   version_type=qnx
  3870.   need_lib_prefix=no
  3871.   need_version=no
  3872.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3873.   soname_spec='${libname}${release}${shared_ext}$major'
  3874.   shlibpath_var=LD_LIBRARY_PATH
  3875.   shlibpath_overrides_runpath=no
  3876.   hardcode_into_libs=yes
  3877.   dynamic_linker='ldqnx.so'
  3878.   ;;
  3879.  
  3880. openbsd*)
  3881.   version_type=sunos
  3882.   sys_lib_dlsearch_path_spec="/usr/lib"
  3883.   need_lib_prefix=no
  3884.   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  3885.   case $host_os in
  3886.     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
  3887.     *)                          need_version=no  ;;
  3888.   esac
  3889.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3890.   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3891.   shlibpath_var=LD_LIBRARY_PATH
  3892.   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3893.     case $host_os in
  3894.       openbsd2.[[89]] | openbsd2.[[89]].*)
  3895.         shlibpath_overrides_runpath=no
  3896.         ;;
  3897.       *)
  3898.         shlibpath_overrides_runpath=yes
  3899.         ;;
  3900.       esac
  3901.   else
  3902.     shlibpath_overrides_runpath=yes
  3903.   fi
  3904.   ;;
  3905.  
  3906. os2*)
  3907.   libname_spec='$name'
  3908.   shrext_cmds=".dll"
  3909.   need_lib_prefix=no
  3910.   library_names_spec='$libname${shared_ext} $libname.a'
  3911.   dynamic_linker='OS/2 ld.exe'
  3912.   shlibpath_var=LIBPATH
  3913.   ;;
  3914.  
  3915. osf3* | osf4* | osf5*)
  3916.   version_type=osf
  3917.   need_lib_prefix=no
  3918.   need_version=no
  3919.   soname_spec='${libname}${release}${shared_ext}$major'
  3920.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3921.   shlibpath_var=LD_LIBRARY_PATH
  3922.   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  3923.   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  3924.   ;;
  3925.  
  3926. rdos*)
  3927.   dynamic_linker=no
  3928.   ;;
  3929.  
  3930. solaris*)
  3931.   version_type=linux # correct to gnu/linux during the next big refactor
  3932.   need_lib_prefix=no
  3933.   need_version=no
  3934.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3935.   soname_spec='${libname}${release}${shared_ext}$major'
  3936.   shlibpath_var=LD_LIBRARY_PATH
  3937.   shlibpath_overrides_runpath=yes
  3938.   hardcode_into_libs=yes
  3939.   # ldd complains unless libraries are executable
  3940.   postinstall_cmds='chmod +x $lib'
  3941.   ;;
  3942.  
  3943. sunos4*)
  3944.   version_type=sunos
  3945.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3946.   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  3947.   shlibpath_var=LD_LIBRARY_PATH
  3948.   shlibpath_overrides_runpath=yes
  3949.   if test "$with_gnu_ld" = yes; then
  3950.     need_lib_prefix=no
  3951.   fi
  3952.   need_version=yes
  3953.   ;;
  3954.  
  3955. sysv4 | sysv4.3*)
  3956.   version_type=linux # correct to gnu/linux during the next big refactor
  3957.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3958.   soname_spec='${libname}${release}${shared_ext}$major'
  3959.   shlibpath_var=LD_LIBRARY_PATH
  3960.   case $host_vendor in
  3961.     sni)
  3962.       shlibpath_overrides_runpath=no
  3963.       need_lib_prefix=no
  3964.       runpath_var=LD_RUN_PATH
  3965.       ;;
  3966.     siemens)
  3967.       need_lib_prefix=no
  3968.       ;;
  3969.     motorola)
  3970.       need_lib_prefix=no
  3971.       need_version=no
  3972.       shlibpath_overrides_runpath=no
  3973.       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  3974.       ;;
  3975.   esac
  3976.   ;;
  3977.  
  3978. sysv4*MP*)
  3979.   if test -d /usr/nec ;then
  3980.     version_type=linux # correct to gnu/linux during the next big refactor
  3981.     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  3982.     soname_spec='$libname${shared_ext}.$major'
  3983.     shlibpath_var=LD_LIBRARY_PATH
  3984.   fi
  3985.   ;;
  3986.  
  3987. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3988.   version_type=freebsd-elf
  3989.   need_lib_prefix=no
  3990.   need_version=no
  3991.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  3992.   soname_spec='${libname}${release}${shared_ext}$major'
  3993.   shlibpath_var=LD_LIBRARY_PATH
  3994.   shlibpath_overrides_runpath=yes
  3995.   hardcode_into_libs=yes
  3996.   if test "$with_gnu_ld" = yes; then
  3997.     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  3998.   else
  3999.     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  4000.     case $host_os in
  4001.       sco3.2v5*)
  4002.         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  4003.         ;;
  4004.     esac
  4005.   fi
  4006.   sys_lib_dlsearch_path_spec='/usr/lib'
  4007.   ;;
  4008.  
  4009. tpf*)
  4010.   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
  4011.   version_type=linux # correct to gnu/linux during the next big refactor
  4012.   need_lib_prefix=no
  4013.   need_version=no
  4014.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4015.   shlibpath_var=LD_LIBRARY_PATH
  4016.   shlibpath_overrides_runpath=no
  4017.   hardcode_into_libs=yes
  4018.   ;;
  4019.  
  4020. uts4*)
  4021.   version_type=linux # correct to gnu/linux during the next big refactor
  4022.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  4023.   soname_spec='${libname}${release}${shared_ext}$major'
  4024.   shlibpath_var=LD_LIBRARY_PATH
  4025.   ;;
  4026.  
  4027. *)
  4028.   dynamic_linker=no
  4029.   ;;
  4030. esac
  4031. AC_MSG_RESULT([$dynamic_linker])
  4032. test "$dynamic_linker" = no && can_build_shared=no
  4033.  
  4034. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  4035. if test "$GCC" = yes; then
  4036.   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  4037. fi
  4038.  
  4039. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  4040.   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  4041. fi
  4042. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  4043.   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  4044. fi
  4045.  
  4046. _LT_DECL([], [variables_saved_for_relink], [1],
  4047.     [Variables whose values should be saved in libtool wrapper scripts and
  4048.     restored at link time])
  4049. _LT_DECL([], [need_lib_prefix], [0],
  4050.     [Do we need the "lib" prefix for modules?])
  4051. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  4052. _LT_DECL([], [version_type], [0], [Library versioning type])
  4053. _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
  4054. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  4055. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  4056.     [Is shlibpath searched before the hard-coded library search path?])
  4057. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  4058. _LT_DECL([], [library_names_spec], [1],
  4059.     [[List of archive names.  First name is the real one, the rest are links.
  4060.     The last name is the one that the linker finds with -lNAME]])
  4061. _LT_DECL([], [soname_spec], [1],
  4062.     [[The coded name of the library, if different from the real name]])
  4063. _LT_DECL([], [install_override_mode], [1],
  4064.     [Permission mode override for installation of shared libraries])
  4065. _LT_DECL([], [postinstall_cmds], [2],
  4066.     [Command to use after installation of a shared archive])
  4067. _LT_DECL([], [postuninstall_cmds], [2],
  4068.     [Command to use after uninstallation of a shared archive])
  4069. _LT_DECL([], [finish_cmds], [2],
  4070.     [Commands used to finish a libtool library installation in a directory])
  4071. _LT_DECL([], [finish_eval], [1],
  4072.     [[As "finish_cmds", except a single script fragment to be evaled but
  4073.     not shown]])
  4074. _LT_DECL([], [hardcode_into_libs], [0],
  4075.     [Whether we should hardcode library paths into libraries])
  4076. _LT_DECL([], [sys_lib_search_path_spec], [2],
  4077.     [Compile-time system search path for libraries])
  4078. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  4079.     [Run-time system search path for libraries])
  4080. ])# _LT_SYS_DYNAMIC_LINKER
  4081.  
  4082.  
  4083. # _LT_PATH_TOOL_PREFIX(TOOL)
  4084. # --------------------------
  4085. # find a file program which can recognize shared library
  4086. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  4087. [m4_require([_LT_DECL_EGREP])dnl
  4088. AC_MSG_CHECKING([for $1])
  4089. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  4090. [case $MAGIC_CMD in
  4091. [[\\/*] |  ?:[\\/]*])
  4092.   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  4093.   ;;
  4094. *)
  4095.   lt_save_MAGIC_CMD="$MAGIC_CMD"
  4096.   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4097. dnl $ac_dummy forces splitting on constant user-supplied paths.
  4098. dnl POSIX.2 word splitting is done only on the output of word expansions,
  4099. dnl not every word.  This closes a longstanding sh security hole.
  4100.   ac_dummy="m4_if([$2], , $PATH, [$2])"
  4101.   for ac_dir in $ac_dummy; do
  4102.     IFS="$lt_save_ifs"
  4103.     test -z "$ac_dir" && ac_dir=.
  4104.     if test -f $ac_dir/$1; then
  4105.       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  4106.       if test -n "$file_magic_test_file"; then
  4107.         case $deplibs_check_method in
  4108.         "file_magic "*)
  4109.           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  4110.           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  4111.           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  4112.             $EGREP "$file_magic_regex" > /dev/null; then
  4113.             :
  4114.           else
  4115.             cat <<_LT_EOF 1>&2
  4116.  
  4117. *** Warning: the command libtool uses to detect shared libraries,
  4118. *** $file_magic_cmd, produces output that libtool cannot recognize.
  4119. *** The result is that libtool may fail to recognize shared libraries
  4120. *** as such.  This will affect the creation of libtool libraries that
  4121. *** depend on shared libraries, but programs linked with such libtool
  4122. *** libraries will work regardless of this problem.  Nevertheless, you
  4123. *** may want to report the problem to your system manager and/or to
  4124. *** bug-libtool@gnu.org
  4125.  
  4126. _LT_EOF
  4127.           fi ;;
  4128.         esac
  4129.       fi
  4130.       break
  4131.     fi
  4132.   done
  4133.   IFS="$lt_save_ifs"
  4134.   MAGIC_CMD="$lt_save_MAGIC_CMD"
  4135.   ;;
  4136. esac])
  4137. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  4138. if test -n "$MAGIC_CMD"; then
  4139.   AC_MSG_RESULT($MAGIC_CMD)
  4140. else
  4141.   AC_MSG_RESULT(no)
  4142. fi
  4143. _LT_DECL([], [MAGIC_CMD], [0],
  4144.          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  4145. ])# _LT_PATH_TOOL_PREFIX
  4146.  
  4147. # Old name:
  4148. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  4149. dnl aclocal-1.4 backwards compatibility:
  4150. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  4151.  
  4152.  
  4153. # _LT_PATH_MAGIC
  4154. # --------------
  4155. # find a file program which can recognize a shared library
  4156. m4_defun([_LT_PATH_MAGIC],
  4157. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  4158. if test -z "$lt_cv_path_MAGIC_CMD"; then
  4159.   if test -n "$ac_tool_prefix"; then
  4160.     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  4161.   else
  4162.     MAGIC_CMD=:
  4163.   fi
  4164. fi
  4165. ])# _LT_PATH_MAGIC
  4166.  
  4167.  
  4168. # LT_PATH_LD
  4169. # ----------
  4170. # find the pathname to the GNU or non-GNU linker
  4171. AC_DEFUN([LT_PATH_LD],
  4172. [AC_REQUIRE([AC_PROG_CC])dnl
  4173. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4174. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  4175. m4_require([_LT_DECL_SED])dnl
  4176. m4_require([_LT_DECL_EGREP])dnl
  4177. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  4178.  
  4179. AC_ARG_WITH([gnu-ld],
  4180.     [AS_HELP_STRING([--with-gnu-ld],
  4181.         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  4182.     [test "$withval" = no || with_gnu_ld=yes],
  4183.     [with_gnu_ld=no])dnl
  4184.  
  4185. ac_prog=ld
  4186. if test "$GCC" = yes; then
  4187.   # Check if gcc -print-prog-name=ld gives a path.
  4188.   AC_MSG_CHECKING([for ld used by $CC])
  4189.   case $host in
  4190.   *-*-mingw*)
  4191.     # gcc leaves a trailing carriage return which upsets mingw
  4192.     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  4193.   *)
  4194.     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  4195.   esac
  4196.   case $ac_prog in
  4197.     # Accept absolute paths.
  4198.     [[\\/]]* | ?:[[\\/]]*)
  4199.       re_direlt='/[[^/]][[^/]]*/\.\./'
  4200.       # Canonicalize the pathname of ld
  4201.       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  4202.       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  4203.         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  4204.       done
  4205.       test -z "$LD" && LD="$ac_prog"
  4206.       ;;
  4207.   "")
  4208.     # If it fails, then pretend we aren't using GCC.
  4209.     ac_prog=ld
  4210.     ;;
  4211.   *)
  4212.     # If it is relative, then search for the first ld in PATH.
  4213.     with_gnu_ld=unknown
  4214.     ;;
  4215.   esac
  4216. elif test "$with_gnu_ld" = yes; then
  4217.   AC_MSG_CHECKING([for GNU ld])
  4218. else
  4219.   AC_MSG_CHECKING([for non-GNU ld])
  4220. fi
  4221. AC_CACHE_VAL(lt_cv_path_LD,
  4222. [if test -z "$LD"; then
  4223.   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  4224.   for ac_dir in $PATH; do
  4225.     IFS="$lt_save_ifs"
  4226.     test -z "$ac_dir" && ac_dir=.
  4227.     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  4228.       lt_cv_path_LD="$ac_dir/$ac_prog"
  4229.       # Check to see if the program is GNU ld.  I'd rather use --version,
  4230.       # but apparently some variants of GNU ld only accept -v.
  4231.       # Break only if it was the GNU/non-GNU ld that we prefer.
  4232.       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  4233.       *GNU* | *'with BFD'*)
  4234.         test "$with_gnu_ld" != no && break
  4235.         ;;
  4236.       *)
  4237.         test "$with_gnu_ld" != yes && break
  4238.         ;;
  4239.       esac
  4240.     fi
  4241.   done
  4242.   IFS="$lt_save_ifs"
  4243. else
  4244.   lt_cv_path_LD="$LD" # Let the user override the test with a path.
  4245. fi])
  4246. LD="$lt_cv_path_LD"
  4247. if test -n "$LD"; then
  4248.   AC_MSG_RESULT($LD)
  4249. else
  4250.   AC_MSG_RESULT(no)
  4251. fi
  4252. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  4253. _LT_PATH_LD_GNU
  4254. AC_SUBST([LD])
  4255.  
  4256. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  4257. ])# LT_PATH_LD
  4258.  
  4259. # Old names:
  4260. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  4261. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  4262. dnl aclocal-1.4 backwards compatibility:
  4263. dnl AC_DEFUN([AM_PROG_LD], [])
  4264. dnl AC_DEFUN([AC_PROG_LD], [])
  4265.  
  4266.  
  4267. # _LT_PATH_LD_GNU
  4268. #- --------------
  4269. m4_defun([_LT_PATH_LD_GNU],
  4270. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  4271. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  4272. case `$LD -v 2>&1 </dev/null` in
  4273. *GNU* | *'with BFD'*)
  4274.   lt_cv_prog_gnu_ld=yes
  4275.   ;;
  4276. *)
  4277.   lt_cv_prog_gnu_ld=no
  4278.   ;;
  4279. esac])
  4280. with_gnu_ld=$lt_cv_prog_gnu_ld
  4281. ])# _LT_PATH_LD_GNU
  4282.  
  4283.  
  4284. # _LT_CMD_RELOAD
  4285. # --------------
  4286. # find reload flag for linker
  4287. #   -- PORTME Some linkers may need a different reload flag.
  4288. m4_defun([_LT_CMD_RELOAD],
  4289. [AC_CACHE_CHECK([for $LD option to reload object files],
  4290.   lt_cv_ld_reload_flag,
  4291.   [lt_cv_ld_reload_flag='-r'])
  4292. reload_flag=$lt_cv_ld_reload_flag
  4293. case $reload_flag in
  4294. "" | " "*) ;;
  4295. *) reload_flag=" $reload_flag" ;;
  4296. esac
  4297. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  4298. case $host_os in
  4299.   cygwin* | mingw* | pw32* | cegcc*)
  4300.     if test "$GCC" != yes; then
  4301.       reload_cmds=false
  4302.     fi
  4303.     ;;
  4304.   darwin*)
  4305.     if test "$GCC" = yes; then
  4306.       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  4307.     else
  4308.       reload_cmds='$LD$reload_flag -o $output$reload_objs'
  4309.     fi
  4310.     ;;
  4311. esac
  4312. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  4313. _LT_TAGDECL([], [reload_cmds], [2])dnl
  4314. ])# _LT_CMD_RELOAD
  4315.  
  4316.  
  4317. # _LT_CHECK_MAGIC_METHOD
  4318. # ----------------------
  4319. # how to check for library dependencies
  4320. #  -- PORTME fill in with the dynamic library characteristics
  4321. m4_defun([_LT_CHECK_MAGIC_METHOD],
  4322. [m4_require([_LT_DECL_EGREP])
  4323. m4_require([_LT_DECL_OBJDUMP])
  4324. AC_CACHE_CHECK([how to recognize dependent libraries],
  4325. lt_cv_deplibs_check_method,
  4326. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  4327. lt_cv_file_magic_test_file=
  4328. lt_cv_deplibs_check_method='unknown'
  4329. # Need to set the preceding variable on all platforms that support
  4330. # interlibrary dependencies.
  4331. # 'none' -- dependencies not supported.
  4332. # `unknown' -- same as none, but documents that we really don't know.
  4333. # 'pass_all' -- all dependencies passed with no checks.
  4334. # 'test_compile' -- check by making test program.
  4335. # 'file_magic [[regex]]' -- check by looking for files in library path
  4336. # which responds to the $file_magic_cmd with a given extended regex.
  4337. # If you have `file' or equivalent on your system and you're not sure
  4338. # whether `pass_all' will *always* work, you probably want this one.
  4339.  
  4340. case $host_os in
  4341. aix[[4-9]]*)
  4342.   lt_cv_deplibs_check_method=pass_all
  4343.   ;;
  4344.  
  4345. beos*)
  4346.   lt_cv_deplibs_check_method=pass_all
  4347.   ;;
  4348.  
  4349. bsdi[[45]]*)
  4350.   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  4351.   lt_cv_file_magic_cmd='/usr/bin/file -L'
  4352.   lt_cv_file_magic_test_file=/shlib/libc.so
  4353.   ;;
  4354.  
  4355. cygwin*)
  4356.   # func_win32_libid is a shell function defined in ltmain.sh
  4357.   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  4358.   lt_cv_file_magic_cmd='func_win32_libid'
  4359.   ;;
  4360.  
  4361. mingw* | pw32*)
  4362.   # Base MSYS/MinGW do not provide the 'file' command needed by
  4363.   # func_win32_libid shell function, so use a weaker test based on 'objdump',
  4364.   # unless we find 'file', for example because we are cross-compiling.
  4365.   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  4366.   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  4367.     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  4368.     lt_cv_file_magic_cmd='func_win32_libid'
  4369.   else
  4370.     # Keep this pattern in sync with the one in func_win32_libid.
  4371.     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  4372.     lt_cv_file_magic_cmd='$OBJDUMP -f'
  4373.   fi
  4374.   ;;
  4375.  
  4376. cegcc*)
  4377.   # use the weaker test based on 'objdump'. See mingw*.
  4378.   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  4379.   lt_cv_file_magic_cmd='$OBJDUMP -f'
  4380.   ;;
  4381.  
  4382. darwin* | rhapsody*)
  4383.   lt_cv_deplibs_check_method=pass_all
  4384.   ;;
  4385.  
  4386. freebsd* | dragonfly*)
  4387.   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  4388.     case $host_cpu in
  4389.     i*86 )
  4390.       # Not sure whether the presence of OpenBSD here was a mistake.
  4391.       # Let's accept both of them until this is cleared up.
  4392.       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  4393.       lt_cv_file_magic_cmd=/usr/bin/file
  4394.       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  4395.       ;;
  4396.     esac
  4397.   else
  4398.     lt_cv_deplibs_check_method=pass_all
  4399.   fi
  4400.   ;;
  4401.  
  4402. haiku*)
  4403.   lt_cv_deplibs_check_method=pass_all
  4404.   ;;
  4405.  
  4406. hpux10.20* | hpux11*)
  4407.   lt_cv_file_magic_cmd=/usr/bin/file
  4408.   case $host_cpu in
  4409.   ia64*)
  4410.     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  4411.     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  4412.     ;;
  4413.   hppa*64*)
  4414.     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
  4415.     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  4416.     ;;
  4417.   *)
  4418.     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  4419.     lt_cv_file_magic_test_file=/usr/lib/libc.sl
  4420.     ;;
  4421.   esac
  4422.   ;;
  4423.  
  4424. interix[[3-9]]*)
  4425.   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  4426.   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  4427.   ;;
  4428.  
  4429. irix5* | irix6* | nonstopux*)
  4430.   case $LD in
  4431.   *-32|*"-32 ") libmagic=32-bit;;
  4432.   *-n32|*"-n32 ") libmagic=N32;;
  4433.   *-64|*"-64 ") libmagic=64-bit;;
  4434.   *) libmagic=never-match;;
  4435.   esac
  4436.   lt_cv_deplibs_check_method=pass_all
  4437.   ;;
  4438.  
  4439. # This must be glibc/ELF.
  4440. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4441.   lt_cv_deplibs_check_method=pass_all
  4442.   ;;
  4443.  
  4444. netbsd* | netbsdelf*-gnu)
  4445.   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  4446.     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  4447.   else
  4448.     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  4449.   fi
  4450.   ;;
  4451.  
  4452. newos6*)
  4453.   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  4454.   lt_cv_file_magic_cmd=/usr/bin/file
  4455.   lt_cv_file_magic_test_file=/usr/lib/libnls.so
  4456.   ;;
  4457.  
  4458. *nto* | *qnx*)
  4459.   lt_cv_deplibs_check_method=pass_all
  4460.   ;;
  4461.  
  4462. openbsd*)
  4463.   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4464.     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  4465.   else
  4466.     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'