aclocal.m4 revision 52b01e16
11.92Stls# generated automatically by aclocal 1.11 -*- Autoconf -*-
21.48Sitojun
31.6Sitojun# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
41.1Sitojun# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
51.1Sitojun# This file is free software; the Free Software Foundation
61.1Sitojun# gives unlimited permission to copy and/or distribute it,
71.42Sitojun# with or without modifications, as long as this notice is preserved.
81.1Sitojun
91.1Sitojun# This program is distributed in the hope that it will be useful,
101.1Sitojun# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
111.1Sitojun# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
121.1Sitojun# PARTICULAR PURPOSE.
131.1Sitojun
141.1Sitojunm4_ifndef([AC_AUTOCONF_VERSION],
151.1Sitojun  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
161.1Sitojunm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
171.1Sitojun[m4_warning([this file was generated for autoconf 2.63.
181.1SitojunYou have another version of autoconf.  It may work, but is not guaranteed to.
191.42SitojunIf you have problems, you may need to regenerate the build system entirely.
201.1SitojunTo do so, use the procedure documented by the package, typically `autoreconf'.])])
211.1Sitojun
221.1Sitojun# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
231.1Sitojun#
241.1Sitojun# This file is free software; the Free Software Foundation
251.1Sitojun# gives unlimited permission to copy and/or distribute it,
261.1Sitojun# with or without modifications, as long as this notice is preserved.
271.1Sitojun
281.1Sitojun# AM_AUTOMAKE_VERSION(VERSION)
291.1Sitojun# ----------------------------
301.1Sitojun# Automake X.Y traces this macro to ensure aclocal.m4 has been
311.1Sitojun# generated from the m4 files accompanying Automake X.Y.
321.1Sitojun# (This private macro should not be called outside this file.)
331.1SitojunAC_DEFUN([AM_AUTOMAKE_VERSION],
341.1Sitojun[am__api_version='1.11'
351.1Sitojundnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
361.14Sitojundnl require some minimum version.  Point them to the right macro.
371.1Sitojunm4_if([$1], [1.11], [],
381.27Sitojun      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
391.27Sitojun])
401.27Sitojun
411.27Sitojun# _AM_AUTOCONF_VERSION(VERSION)
421.27Sitojun# -----------------------------
431.27Sitojun# aclocal traces this macro to find the Autoconf version.
441.27Sitojun# This is a private macro too.  Using m4_define simplifies
451.14Sitojun# the logic in aclocal, which can simply ignore this definition.
461.14Sitojunm4_define([_AM_AUTOCONF_VERSION], [])
471.22Sitojun
481.14Sitojun# AM_SET_CURRENT_AUTOMAKE_VERSION
491.14Sitojun# -------------------------------
501.30Sitojun# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
511.30Sitojun# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
521.30SitojunAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
531.30Sitojun[AM_AUTOMAKE_VERSION([1.11])dnl
541.1Sitojunm4_ifndef([AC_AUTOCONF_VERSION],
551.39Sitojun  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
561.39Sitojun_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
571.39Sitojun
581.92Stls# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
591.39Sitojun
601.1Sitojun# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
611.38Sitojun#
621.14Sitojun# This file is free software; the Free Software Foundation
631.1Sitojun# gives unlimited permission to copy and/or distribute it,
641.1Sitojun# with or without modifications, as long as this notice is preserved.
651.14Sitojun
661.1Sitojun# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
671.1Sitojun# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
681.1Sitojun# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
691.51Slukem#
701.51Slukem# Of course, Automake must honor this variable whenever it calls a
711.51Slukem# tool from the auxiliary directory.  The problem is that $srcdir (and
721.1Sitojun# therefore $ac_aux_dir as well) can be either absolute or relative,
731.1Sitojun# depending on how configure is run.  This is pretty annoying, since
741.51Slukem# it makes $ac_aux_dir quite unusable in subdirectories: in the top
751.51Slukem# source directory, any form will work fine, but in subdirectories a
761.51Slukem# relative path needs to be adjusted first.
771.14Sitojun#
781.1Sitojun# $ac_aux_dir/missing
791.14Sitojun#    fails when called from a subdirectory if $ac_aux_dir is relative
801.32Sitojun# $top_srcdir/$ac_aux_dir/missing
811.32Sitojun#    fails if $ac_aux_dir is absolute,
821.32Sitojun#    fails when called from a subdirectory in a VPATH build with
831.32Sitojun#          a relative $ac_aux_dir
841.32Sitojun#
851.32Sitojun# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
861.32Sitojun# are both prefixed by $srcdir.  In an in-source build this is usually
871.32Sitojun# harmless because $srcdir is `.', but things will broke when you
881.38Sitojun# start a VPATH build or use an absolute $srcdir.
891.38Sitojun#
901.84Schristos# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
911.84Schristos# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
921.38Sitojun#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
931.38Sitojun# and then we would define $MISSING as
941.38Sitojun#   MISSING="\${SHELL} $am_aux_dir/missing"
951.38Sitojun# This will work as long as MISSING is not called from configure, because
961.32Sitojun# unfortunately $(top_srcdir) has no meaning in configure.
971.32Sitojun# However there are other variables, like CC, which are often used in
981.1Sitojun# configure, and could therefore not use this "fixed" $ac_aux_dir.
991.1Sitojun#
1001.1Sitojun# Another solution, used here, is to always expand $ac_aux_dir to an
1011.1Sitojun# absolute PATH.  The drawback is that using absolute paths prevent a
1021.1Sitojun# configured tree to be moved without reconfiguration.
1031.1Sitojun
1041.49SlukemAC_DEFUN([AM_AUX_DIR_EXPAND],
1051.49Slukem[dnl Rely on autoconf to set up CDPATH properly.
1061.1SitojunAC_PREREQ([2.50])dnl
1071.1Sitojun# expand $ac_aux_dir to an absolute path
1081.1Sitojunam_aux_dir=`cd $ac_aux_dir && pwd`
1091.1Sitojun])
1101.1Sitojun
1111.1Sitojun# AM_CONDITIONAL                                            -*- Autoconf -*-
1121.49Slukem
1131.1Sitojun# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1141.14Sitojun# Free Software Foundation, Inc.
1151.1Sitojun#
1161.1Sitojun# This file is free software; the Free Software Foundation
1171.1Sitojun# gives unlimited permission to copy and/or distribute it,
1181.1Sitojun# with or without modifications, as long as this notice is preserved.
1191.1Sitojun
1201.1Sitojun# serial 9
1211.14Sitojun
1221.1Sitojun# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1231.1Sitojun# -------------------------------------
1241.1Sitojun# Define a conditional.
1251.1SitojunAC_DEFUN([AM_CONDITIONAL],
1261.1Sitojun[AC_PREREQ(2.52)dnl
1271.14Sitojun ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1281.1Sitojun	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1291.1SitojunAC_SUBST([$1_TRUE])dnl
1301.1SitojunAC_SUBST([$1_FALSE])dnl
1311.1Sitojun_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1321.14Sitojun_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1331.14Sitojunm4_define([_AM_COND_VALUE_$1], [$2])dnl
1341.14Sitojunif $2; then
1351.14Sitojun  $1_TRUE=
1361.14Sitojun  $1_FALSE='#'
1371.14Sitojunelse
1381.14Sitojun  $1_TRUE='#'
1391.14Sitojun  $1_FALSE=
1401.14Sitojunfi
1411.14SitojunAC_CONFIG_COMMANDS_PRE(
1421.14Sitojun[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1431.14Sitojun  AC_MSG_ERROR([[conditional "$1" was never defined.
1441.14SitojunUsually this means the macro was only invoked conditionally.]])
1451.14Sitojunfi])])
1461.14Sitojun
1471.14Sitojun# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1481.14Sitojun# Free Software Foundation, Inc.
1491.14Sitojun#
1501.14Sitojun# This file is free software; the Free Software Foundation
1511.14Sitojun# gives unlimited permission to copy and/or distribute it,
1521.14Sitojun# with or without modifications, as long as this notice is preserved.
1531.14Sitojun
1541.14Sitojun# serial 10
1551.14Sitojun
1561.14Sitojun# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1571.14Sitojun# written in clear, in which case automake, when reading aclocal.m4,
1581.14Sitojun# will think it sees a *use*, and therefore will trigger all it's
1591.32Sitojun# C support machinery.  Also note that it means that autoscan, seeing
1601.32Sitojun# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1611.32Sitojun
1621.14Sitojun
1631.1Sitojun# _AM_DEPENDENCIES(NAME)
1641.1Sitojun# ----------------------
1651.1Sitojun# See how the compiler implements dependency checking.
1661.1Sitojun# NAME is "CC", "CXX", "GCJ", or "OBJC".
1671.1Sitojun# We try a few techniques and use that to set a single cache variable.
1681.1Sitojun#
1691.1Sitojun# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1701.1Sitojun# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1711.32Sitojun# dependency, and given that the user is not expected to run this macro,
1721.32Sitojun# just rely on AC_PROG_CC.
1731.32SitojunAC_DEFUN([_AM_DEPENDENCIES],
1741.87Schristos[AC_REQUIRE([AM_SET_DEPDIR])dnl
1751.32SitojunAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1761.32SitojunAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1771.63SitojunAC_REQUIRE([AM_DEP_TRACK])dnl
1781.32Sitojun
1791.32Sitojunifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
1801.32Sitojun       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
1811.32Sitojun       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1821.32Sitojun       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
1831.32Sitojun       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1841.32Sitojun                   [depcc="$$1"   am_compiler_list=])
1851.32Sitojun
1861.32SitojunAC_CACHE_CHECK([dependency style of $depcc],
1871.43Sitojun               [am_cv_$1_dependencies_compiler_type],
1881.32Sitojun[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1891.32Sitojun  # We make a subdir and do the tests there.  Otherwise we can end up
1901.32Sitojun  # making bogus files that we don't know about and never remove.  For
1911.32Sitojun  # instance it was reported that on HP-UX the gcc test will end up
1921.1Sitojun  # making a dummy file named `D' -- because `-MD' means `put the output
1931.70Schristos  # in D'.
1941.70Schristos  mkdir conftest.dir
1951.89Schristos  # Copy depcomp to subdir because otherwise we won't find it if we're
1961.70Schristos  # using a relative directory.
1971.89Schristos  cp "$am_depcomp" conftest.dir
1981.70Schristos  cd conftest.dir
1991.89Schristos  # We will build objects and dependencies in a subdirectory because
2001.70Schristos  # it helps to detect inapplicable dependency modes.  For instance
2011.89Schristos  # both Tru64's cc and ICC support -MD to output dependencies as a
2021.70Schristos  # side effect of compilation, but ICC will put the dependencies in
2031.70Schristos  # the current directory while Tru64 will put them in the object
2041.70Schristos  # directory.
2051.70Schristos  mkdir sub
2061.89Schristos
2071.89Schristos  am_cv_$1_dependencies_compiler_type=none
2081.89Schristos  if test "$am_compiler_list" = ""; then
2091.89Schristos     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2101.70Schristos  fi
2111.27Sitojun  am__universal=false
2121.70Schristos  m4_case([$1], [CC],
2131.42Sitojun    [case " $depcc " in #(
2141.14Sitojun     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2151.70Schristos     esac],
2161.70Schristos    [CXX],
2171.73Stsarna    [case " $depcc " in #(
2181.70Schristos     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2191.70Schristos     esac])
2201.70Schristos
2211.70Schristos  for depmode in $am_compiler_list; do
2221.70Schristos    # Setup a source with many dependencies, because some compilers
2231.70Schristos    # like to wrap large dependency lists on column 80 (with \), and
2241.32Sitojun    # we should not choose a depcomp mode which is confused by this.
2251.70Schristos    #
2261.70Schristos    # We need to recreate these files for each test, as the compiler may
2271.32Sitojun    # overwrite some of them when testing with obscure command lines.
2281.32Sitojun    # This happens at least with the AIX C compiler.
2291.70Schristos    : > sub/conftest.c
2301.73Stsarna    for i in 1 2 3 4 5 6; do
2311.70Schristos      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2321.70Schristos      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
2331.32Sitojun      # Solaris 8's {/usr,}/bin/sh.
2341.53Sjdolecek      touch sub/conftst$i.h
2351.7Slukem    done
2361.7Slukem    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2371.7Slukem
2381.7Slukem    # We check with `-c' and `-o' for the sake of the "dashmstdout"
2391.7Slukem    # mode.  It turns out that the SunPro C++ compiler does not properly
2401.2Slukem    # handle `-M -o', and we need to detect this.  Also, some Intel
2411.7Slukem    # versions had trouble with output in subdirs
2421.7Slukem    am__obj=sub/conftest.${OBJEXT-o}
2431.14Sitojun    am__minus_obj="-o $am__obj"
2441.2Slukem    case $depmode in
2451.2Slukem    gcc)
2461.7Slukem      # This depmode causes a compiler race in universal mode.
2471.7Slukem      test "$am__universal" = false || continue
2481.7Slukem      ;;
2491.77Sginsbach    nosideeffect)
2501.7Slukem      # after this tag, mechanisms are not by side-effect, so they'll
2511.1Sitojun      # only be used when explicitly requested
2521.1Sitojun      if test "x$enable_dependency_tracking" = xyes; then
2531.14Sitojun	continue
2541.14Sitojun      else
2551.82Srpaulo	break
2561.82Srpaulo      fi
2571.82Srpaulo      ;;
2581.82Srpaulo    msvisualcpp | msvcmsys)
2591.82Srpaulo      # This compiler won't grok `-c -o', but also, the minuso test has
2601.82Srpaulo      # not run yet.  These depmodes are late enough in the game, and
2611.82Srpaulo      # so weak that their functioning should not be impacted.
2621.82Srpaulo      am__obj=conftest.${OBJEXT-o}
2631.20Smycroft      am__minus_obj=
2641.14Sitojun      ;;
2651.89Schristos    none) break ;;
2661.82Srpaulo    esac
2671.82Srpaulo    if depmode=$depmode \
2681.89Schristos       source=sub/conftest.c object=$am__obj \
2691.82Srpaulo       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2701.82Srpaulo       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2711.20Smycroft         >/dev/null 2>conftest.err &&
2721.14Sitojun       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2731.82Srpaulo       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2741.82Srpaulo       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2751.82Srpaulo       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2761.82Srpaulo      # icc doesn't choke on unknown options, it will just issue warnings
2771.82Srpaulo      # or remarks (even with -Werror).  So we grep stderr for any message
2781.82Srpaulo      # that says an option was ignored or not supported.
2791.20Smycroft      # When given -MP, icc 7.0 and 7.1 complain thusly:
2801.14Sitojun      #   icc: Command line warning: ignoring option '-M'; no argument required
2811.82Srpaulo      # The diagnosis changed in icc 8.0:
2821.82Srpaulo      #   icc: Command line remark: option '-MP' not supported
2831.82Srpaulo      if (grep 'ignoring option' conftest.err ||
2841.82Srpaulo          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2851.82Srpaulo        am_cv_$1_dependencies_compiler_type=$depmode
2861.82Srpaulo        break
2871.20Smycroft      fi
2881.14Sitojun    fi
2891.82Srpaulo  done
2901.82Srpaulo
2911.82Srpaulo  cd ..
2921.82Srpaulo  rm -rf conftest.dir
2931.20Smycroftelse
2941.1Sitojun  am_cv_$1_dependencies_compiler_type=none
2951.70Schristosfi
2961.70Schristos])
2971.1SitojunAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2981.1SitojunAM_CONDITIONAL([am__fastdep$1], [
2991.1Sitojun  test "x$enable_dependency_tracking" != xno \
3001.70Schristos  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3011.1Sitojun])
3021.1Sitojun
3031.1Sitojun
3041.70Schristos# AM_SET_DEPDIR
3051.1Sitojun# -------------
3061.1Sitojun# Choose a directory name for dependency files.
3071.1Sitojun# This macro is AC_REQUIREd in _AM_DEPENDENCIES
3081.51SlukemAC_DEFUN([AM_SET_DEPDIR],
3091.51Slukem[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3101.26SitojunAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3111.1Sitojun])
3121.1Sitojun
3131.1Sitojun
3141.1Sitojun# AM_DEP_TRACK
3151.1Sitojun# ------------
3161.27SitojunAC_DEFUN([AM_DEP_TRACK],
3171.27Sitojun[AC_ARG_ENABLE(dependency-tracking,
3181.1Sitojun[  --disable-dependency-tracking  speeds up one-time build
3191.1Sitojun  --enable-dependency-tracking   do not reject slow dependency extractors])
3201.1Sitojunif test "x$enable_dependency_tracking" != xno; then
3211.70Schristos  am_depcomp="$ac_aux_dir/depcomp"
3221.1Sitojun  AMDEPBACKSLASH='\'
3231.45Sitojunfi
3241.67SitojunAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3251.45SitojunAC_SUBST([AMDEPBACKSLASH])dnl
3261.51Slukem_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3271.51Slukem])
3281.46Sitojun
3291.67Sitojun# Generate code to set up dependency tracking.              -*- Autoconf -*-
3301.45Sitojun
3311.59Sitojun# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
3321.67Sitojun# Free Software Foundation, Inc.
3331.67Sitojun#
3341.67Sitojun# This file is free software; the Free Software Foundation
3351.45Sitojun# gives unlimited permission to copy and/or distribute it,
3361.67Sitojun# with or without modifications, as long as this notice is preserved.
3371.1Sitojun
3381.1Sitojun#serial 5
3391.1Sitojun
3401.70Schristos# _AM_OUTPUT_DEPENDENCY_COMMANDS
3411.70Schristos# ------------------------------
3421.1SitojunAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3431.1Sitojun[{
3441.1Sitojun  # Autoconf 2.62 quotes --file arguments for eval, but not when files
3451.14Sitojun  # are listed without --file.  Let's play safe and only enable the eval
3461.1Sitojun  # if we detect the quoting.
3471.14Sitojun  case $CONFIG_FILES in
3481.1Sitojun  *\'*) eval set x "$CONFIG_FILES" ;;
3491.14Sitojun  *)   set x $CONFIG_FILES ;;
3501.89Schristos  esac
3511.1Sitojun  shift
3521.51Slukem  for mf
3531.51Slukem  do
3541.51Slukem    # Strip MF so we end up with the name of the file.
3551.51Slukem    mf=`echo "$mf" | sed -e 's/:.*$//'`
3561.51Slukem    # Check whether this is an Automake generated Makefile or not.
3571.89Schristos    # We used to match only the files named `Makefile.in', but
3581.32Sitojun    # some people rename them; so instead we look at the file content.
3591.1Sitojun    # Grep'ing the first line is not enough: some people post-process
3601.86Schristos    # each Makefile.in and add a new line on top of each file to say so.
3611.1Sitojun    # Grep'ing the whole file is not good either: AIX grep has a line
3621.1Sitojun    # limit of 2048, but all sed's we know have understand at least 4000.
3631.1Sitojun    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3641.1Sitojun      dirpart=`AS_DIRNAME("$mf")`
3651.1Sitojun    else
3661.1Sitojun      continue
3671.1Sitojun    fi
3681.1Sitojun    # Extract the definition of DEPDIR, am__include, and am__quote
3691.1Sitojun    # from the Makefile without running `make'.
3701.1Sitojun    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3711.1Sitojun    test -z "$DEPDIR" && continue
3721.1Sitojun    am__include=`sed -n 's/^am__include = //p' < "$mf"`
3731.1Sitojun    test -z "am__include" && continue
3741.1Sitojun    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3751.1Sitojun    # When using ansi2knr, U may be empty or an underscore; expand it
3761.1Sitojun    U=`sed -n 's/^U = //p' < "$mf"`
3771.1Sitojun    # Find all dependency output files, they are included files with
3781.1Sitojun    # $(DEPDIR) in their names.  We invoke sed twice because it is the
3791.1Sitojun    # simplest approach to changing $(DEPDIR) to its actual value in the
3801.1Sitojun    # expansion.
3811.1Sitojun    for file in `sed -n "
3821.1Sitojun      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3831.1Sitojun	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
3841.1Sitojun      # Make sure the directory exists.
3851.1Sitojun      test -f "$dirpart/$file" && continue
3861.1Sitojun      fdir=`AS_DIRNAME(["$file"])`
3871.1Sitojun      AS_MKDIR_P([$dirpart/$fdir])
3881.1Sitojun      # echo "creating $dirpart/$file"
3891.1Sitojun      echo '# dummy' > "$dirpart/$file"
3901.1Sitojun    done
3911.14Sitojun  done
3921.14Sitojun}
3931.14Sitojun])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3941.14Sitojun
3951.14Sitojun
3961.14Sitojun# AM_OUTPUT_DEPENDENCY_COMMANDS
3971.14Sitojun# -----------------------------
3981.14Sitojun# This macro should only be invoked once -- use via AC_REQUIRE.
3991.14Sitojun#
4001.14Sitojun# This code is only required when automatic dependency tracking
4011.14Sitojun# is enabled.  FIXME.  This creates each `.P' file that we will
4021.14Sitojun# need in order to bootstrap the dependency handling code.
4031.14SitojunAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
4041.14Sitojun[AC_CONFIG_COMMANDS([depfiles],
4051.14Sitojun     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
4061.14Sitojun     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
4071.14Sitojun])
4081.1Sitojun
4091.1Sitojun# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
4101.1Sitojun# Free Software Foundation, Inc.
4111.1Sitojun#
4121.1Sitojun# This file is free software; the Free Software Foundation
4131.14Sitojun# gives unlimited permission to copy and/or distribute it,
4141.14Sitojun# with or without modifications, as long as this notice is preserved.
4151.14Sitojun
4161.1Sitojun# serial 8
4171.14Sitojun
4181.27Sitojun# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
4191.27SitojunAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
4201.27Sitojun
4211.27Sitojun# Do all the work for Automake.                             -*- Autoconf -*-
4221.23Sitojun
4231.21Smycroft# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4241.27Sitojun# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
4251.27Sitojun#
4261.14Sitojun# This file is free software; the Free Software Foundation
4271.27Sitojun# gives unlimited permission to copy and/or distribute it,
4281.27Sitojun# with or without modifications, as long as this notice is preserved.
4291.27Sitojun
4301.27Sitojun# serial 16
4311.89Schristos
4321.14Sitojun# This macro actually does too much.  Some checks are only needed if
4331.14Sitojun# your package does certain things.  But this isn't really a big deal.
4341.21Smycroft
4351.21Smycroft# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4361.14Sitojun# AM_INIT_AUTOMAKE([OPTIONS])
4371.14Sitojun# -----------------------------------------------
4381.14Sitojun# The call with PACKAGE and VERSION arguments is the old style
4391.14Sitojun# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4401.14Sitojun# and VERSION should now be passed to AC_INIT and removed from
4411.14Sitojun# the call to AM_INIT_AUTOMAKE.
4421.14Sitojun# We support both call styles for the transition.  After
4431.14Sitojun# the next Automake release, Autoconf can make the AC_INIT
4441.32Sitojun# arguments mandatory, and then we can depend on a new Autoconf
4451.32Sitojun# release and drop the old call support.
4461.32SitojunAC_DEFUN([AM_INIT_AUTOMAKE],
4471.32Sitojun[AC_PREREQ([2.62])dnl
4481.14Sitojundnl Autoconf wants to disallow AM_ names.  We explicitly allow
4491.14Sitojundnl the ones we care about.
4501.14Sitojunm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4511.14SitojunAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4521.14SitojunAC_REQUIRE([AC_PROG_INSTALL])dnl
4531.14Sitojunif test "`cd $srcdir && pwd`" != "`pwd`"; then
4541.14Sitojun  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4551.14Sitojun  # is not polluted with repeated "-I."
4561.14Sitojun  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4571.14Sitojun  # test to see if srcdir already configured
4581.14Sitojun  if test -f $srcdir/config.status; then
4591.14Sitojun    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4601.14Sitojun  fi
4611.14Sitojunfi
4621.14Sitojun
4631.89Schristos# test whether we have cygpath
4641.89Schristosif test -z "$CYGPATH_W"; then
4651.14Sitojun  if (cygpath --version) >/dev/null 2>/dev/null; then
4661.65Sitojun    CYGPATH_W='cygpath -w'
4671.89Schristos  else
4681.14Sitojun    CYGPATH_W=echo
4691.14Sitojun  fi
4701.14Sitojunfi
4711.14SitojunAC_SUBST([CYGPATH_W])
4721.79Schristos
4731.14Sitojun# Define the identity of the package.
4741.14Sitojundnl Distinguish between old-style and new-style calls.
4751.14Sitojunm4_ifval([$2],
4761.14Sitojun[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4771.14Sitojun AC_SUBST([PACKAGE], [$1])dnl
4781.76Sginsbach AC_SUBST([VERSION], [$2])],
4791.14Sitojun[_AM_SET_OPTIONS([$1])dnl
4801.14Sitojundnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4811.14Sitojunm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
4821.14Sitojun  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4831.14Sitojun AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4841.14Sitojun AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4851.43Sitojun
4861.64Sitojun_AM_IF_OPTION([no-define],,
4871.64Sitojun[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
4881.14Sitojun AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
4891.14Sitojun
4901.14Sitojun# Some tools Automake needs.
4911.14SitojunAC_REQUIRE([AM_SANITY_CHECK])dnl
4921.14SitojunAC_REQUIRE([AC_ARG_PROGRAM])dnl
4931.14SitojunAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
4941.32SitojunAM_MISSING_PROG(AUTOCONF, autoconf)
4951.14SitojunAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
4961.14SitojunAM_MISSING_PROG(AUTOHEADER, autoheader)
4971.32SitojunAM_MISSING_PROG(MAKEINFO, makeinfo)
4981.32SitojunAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4991.14SitojunAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
5001.14SitojunAC_REQUIRE([AM_PROG_MKDIR_P])dnl
5011.32Sitojun# We need awk for the "check" target.  The system "awk" is bad on
5021.32Sitojun# some platforms.
5031.32SitojunAC_REQUIRE([AC_PROG_AWK])dnl
5041.32SitojunAC_REQUIRE([AC_PROG_MAKE_SET])dnl
5051.32SitojunAC_REQUIRE([AM_SET_LEADING_DOT])dnl
5061.32Sitojun_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5071.32Sitojun	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5081.32Sitojun			     [_AM_PROG_TAR([v7])])])
5091.14Sitojun_AM_IF_OPTION([no-dependencies],,
5101.32Sitojun[AC_PROVIDE_IFELSE([AC_PROG_CC],
5111.32Sitojun		  [_AM_DEPENDENCIES(CC)],
5121.32Sitojun		  [define([AC_PROG_CC],
5131.32Sitojun			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
5141.1SitojunAC_PROVIDE_IFELSE([AC_PROG_CXX],
5151.89Schristos		  [_AM_DEPENDENCIES(CXX)],
5161.89Schristos		  [define([AC_PROG_CXX],
5171.14Sitojun			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
5181.32SitojunAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5191.32Sitojun		  [_AM_DEPENDENCIES(OBJC)],
5201.1Sitojun		  [define([AC_PROG_OBJC],
5211.14Sitojun			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
5221.14Sitojun])
5231.14Sitojun_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
5241.14Sitojundnl The `parallel-tests' driver may need to know about EXEEXT, so add the
5251.14Sitojundnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
5261.14Sitojundnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
5271.14SitojunAC_CONFIG_COMMANDS_PRE(dnl
5281.89Schristos[m4_provide_if([_AM_COMPILER_EXEEXT],
5291.89Schristos  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
5301.14Sitojun])
5311.89Schristos
5321.89Schristosdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
5331.89Schristosdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
5341.89Schristosdnl mangled by Autoconf and run in a shell conditional statement.
5351.89Schristosm4_define([_AC_COMPILER_EXEEXT],
5361.14Sitojunm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5371.14Sitojun
5381.89Schristos
5391.14Sitojun# When config.status generates a header, we must update the stamp-h file.
5401.14Sitojun# This file resides in the same directory as the config header
5411.14Sitojun# that is generated.  The stamp files are numbered to have different names.
5421.14Sitojun
5431.14Sitojun# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
5441.14Sitojun# loop where config.status creates the headers, so we can generate
5451.14Sitojun# our stamp files there.
5461.14SitojunAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
5471.14Sitojun[# Compute $1's index in $config_headers.
5481.14Sitojun_am_arg=$1
5491.70Schristos_am_stamp_count=1
5501.89Schristosfor _am_header in $config_headers :; do
5511.14Sitojun  case $_am_header in
5521.32Sitojun    $_am_arg | $_am_arg:* )
5531.32Sitojun      break ;;
5541.27Sitojun    * )
5551.32Sitojun      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
5561.32Sitojun  esac
5571.32Sitojundone
5581.32Sitojunecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
5591.87Schristos
5601.32Sitojun# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
5611.14Sitojun#
5621.51Slukem# This file is free software; the Free Software Foundation
5631.51Slukem# gives unlimited permission to copy and/or distribute it,
5641.51Slukem# with or without modifications, as long as this notice is preserved.
5651.51Slukem
5661.51Slukem# AM_PROG_INSTALL_SH
5671.32Sitojun# ------------------
5681.14Sitojun# Define $install_sh.
5691.14SitojunAC_DEFUN([AM_PROG_INSTALL_SH],
5701.14Sitojun[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
5711.14Sitojunif test x"${install_sh}" != xset; then
5721.89Schristos  case $am_aux_dir in
5731.14Sitojun  *\ * | *\	*)
5741.14Sitojun    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5751.32Sitojun  *)
5761.32Sitojun    install_sh="\${SHELL} $am_aux_dir/install-sh"
5771.32Sitojun  esac
5781.32Sitojunfi
5791.32SitojunAC_SUBST(install_sh)])
5801.32Sitojun
5811.14Sitojun# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
5821.14Sitojun#
5831.32Sitojun# This file is free software; the Free Software Foundation
5841.32Sitojun# gives unlimited permission to copy and/or distribute it,
5851.15Sitojun# with or without modifications, as long as this notice is preserved.
5861.32Sitojun
5871.32Sitojun# serial 2
5881.32Sitojun
5891.89Schristos# Check whether the underlying file-system supports filenames
5901.32Sitojun# with a leading dot.  For instance MS-DOS doesn't.
5911.16SitojunAC_DEFUN([AM_SET_LEADING_DOT],
5921.32Sitojun[rm -rf .tst 2>/dev/null
5931.16Sitojunmkdir .tst 2>/dev/null
5941.15Sitojunif test -d .tst; then
5951.32Sitojun  am__leading_dot=.
5961.14Sitojunelse
5971.14Sitojun  am__leading_dot=_
5981.14Sitojunfi
5991.14Sitojunrmdir .tst 2>/dev/null
6001.34SitojunAC_SUBST([am__leading_dot])])
6011.34Sitojun
6021.14Sitojun# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
6031.14Sitojun# From Jim Meyering
6041.14Sitojun
6051.14Sitojun# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
6061.14Sitojun# Free Software Foundation, Inc.
6071.14Sitojun#
6081.14Sitojun# This file is free software; the Free Software Foundation
6091.14Sitojun# gives unlimited permission to copy and/or distribute it,
6101.14Sitojun# with or without modifications, as long as this notice is preserved.
6111.70Schristos
6121.89Schristos# serial 5
6131.14Sitojun
6141.14Sitojun# AM_MAINTAINER_MODE([DEFAULT-MODE])
6151.14Sitojun# ----------------------------------
6161.14Sitojun# Control maintainer-specific portions of Makefiles.
6171.14Sitojun# Default is to disable them, unless `enable' is passed literally.
6181.14Sitojun# For symmetry, `disable' may be passed as well.  Anyway, the user
6191.14Sitojun# can override the default with the --enable/--disable switch.
6201.51SlukemAC_DEFUN([AM_MAINTAINER_MODE],
6211.51Slukem[m4_case(m4_default([$1], [disable]),
6221.51Slukem       [enable], [m4_define([am_maintainer_other], [disable])],
6231.51Slukem       [disable], [m4_define([am_maintainer_other], [enable])],
6241.14Sitojun       [m4_define([am_maintainer_other], [enable])
6251.14Sitojun        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
6261.14SitojunAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
6271.14Sitojun  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
6281.14Sitojun  AC_ARG_ENABLE([maintainer-mode],
6291.14Sitojun[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
6301.14Sitojun			  (and sometimes confusing) to the casual installer],
6311.14Sitojun      [USE_MAINTAINER_MODE=$enableval],
6321.14Sitojun      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
6331.14Sitojun  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6341.14Sitojun  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
6351.14Sitojun  MAINT=$MAINTAINER_MODE_TRUE
6361.14Sitojun  AC_SUBST([MAINT])dnl
6371.14Sitojun]
6381.14Sitojun)
6391.14Sitojun
6401.14SitojunAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6411.14Sitojun
6421.89Schristos# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6431.14Sitojun
6441.14Sitojun# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
6451.14Sitojun#
6461.42Sitojun# This file is free software; the Free Software Foundation
6471.42Sitojun# gives unlimited permission to copy and/or distribute it,
6481.14Sitojun# with or without modifications, as long as this notice is preserved.
6491.14Sitojun
6501.14Sitojun# serial 4
6511.14Sitojun
6521.14Sitojun# AM_MAKE_INCLUDE()
6531.14Sitojun# -----------------
6541.89Schristos# Check to see how make treats includes.
6551.14SitojunAC_DEFUN([AM_MAKE_INCLUDE],
6561.14Sitojun[am_make=${MAKE-make}
6571.14Sitojuncat > confinc << 'END'
6581.14Sitojunam__doit:
6591.14Sitojun	@echo this is the am__doit target
6601.89Schristos.PHONY: am__doit
6611.14SitojunEND
6621.14Sitojun# If we don't find an include directive, just comment out the code.
6631.14SitojunAC_MSG_CHECKING([for style of include used by $am_make])
6641.14Sitojunam__include="#"
6651.14Sitojunam__quote=
6661.14Sitojun_am_result=none
6671.14Sitojun# First try GNU make style include.
6681.14Sitojunecho "include confinc" > confmf
6691.14Sitojun# Ignore all kinds of additional output from `make'.
6701.14Sitojuncase `$am_make -s -f confmf 2> /dev/null` in #(
6711.14Sitojun*the\ am__doit\ target*)
6721.14Sitojun  am__include=include
6731.14Sitojun  am__quote=
6741.14Sitojun  _am_result=GNU
6751.14Sitojun  ;;
6761.14Sitojunesac
6771.70Schristos# Now try BSD make style include.
6781.89Schristosif test "$am__include" = "#"; then
6791.89Schristos   echo '.include "confinc"' > confmf
6801.14Sitojun   case `$am_make -s -f confmf 2> /dev/null` in #(
6811.14Sitojun   *the\ am__doit\ target*)
6821.14Sitojun     am__include=.include
6831.14Sitojun     am__quote="\""
6841.14Sitojun     _am_result=BSD
6851.14Sitojun     ;;
6861.14Sitojun   esac
6871.51Slukemfi
6881.51SlukemAC_SUBST([am__include])
6891.51SlukemAC_SUBST([am__quote])
6901.51SlukemAC_MSG_RESULT([$_am_result])
6911.51Slukemrm -f confinc confmf
6921.14Sitojun])
6931.14Sitojun
6941.14Sitojun# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
6951.14Sitojun
6961.14Sitojun# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
6971.14Sitojun# Free Software Foundation, Inc.
6981.14Sitojun#
6991.89Schristos# This file is free software; the Free Software Foundation
7001.14Sitojun# gives unlimited permission to copy and/or distribute it,
7011.14Sitojun# with or without modifications, as long as this notice is preserved.
7021.14Sitojun
7031.42Sitojun# serial 6
7041.42Sitojun
7051.14Sitojun# AM_MISSING_PROG(NAME, PROGRAM)
7061.27Sitojun# ------------------------------
7071.27SitojunAC_DEFUN([AM_MISSING_PROG],
7081.27Sitojun[AC_REQUIRE([AM_MISSING_HAS_RUN])
7091.27Sitojun$1=${$1-"${am_missing_run}$2"}
7101.27SitojunAC_SUBST($1)])
7111.27Sitojun
7121.27Sitojun
7131.89Schristos# AM_MISSING_HAS_RUN
7141.65Sitojun# ------------------
7151.65Sitojun# Define MISSING if not defined so far and test if it supports --run.
7161.65Sitojun# If it does, set am_missing_run to use it, otherwise, to nothing.
7171.65SitojunAC_DEFUN([AM_MISSING_HAS_RUN],
7181.65Sitojun[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7191.65SitojunAC_REQUIRE_AUX_FILE([missing])dnl
7201.65Sitojunif test x"${MISSING+set}" != xset; then
7211.65Sitojun  case $am_aux_dir in
7221.27Sitojun  *\ * | *\	*)
7231.27Sitojun    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7241.42Sitojun  *)
7251.27Sitojun    MISSING="\${SHELL} $am_aux_dir/missing" ;;
7261.27Sitojun  esac
7271.27Sitojunfi
7281.27Sitojun# Use eval to expand $SHELL
7291.27Sitojunif eval "$MISSING --run true"; then
7301.27Sitojun  am_missing_run="$MISSING --run "
7311.27Sitojunelse
7321.27Sitojun  am_missing_run=
7331.27Sitojun  AC_MSG_WARN([`missing' script is too old or missing])
7341.89Schristosfi
7351.65Sitojun])
7361.65Sitojun
7371.65Sitojun# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7381.65Sitojun#
7391.65Sitojun# This file is free software; the Free Software Foundation
7401.65Sitojun# gives unlimited permission to copy and/or distribute it,
7411.65Sitojun# with or without modifications, as long as this notice is preserved.
7421.65Sitojun
7431.81Schristos# AM_PROG_MKDIR_P
7441.27Sitojun# ---------------
7451.42Sitojun# Check for `mkdir -p'.
7461.27SitojunAC_DEFUN([AM_PROG_MKDIR_P],
7471.27Sitojun[AC_PREREQ([2.60])dnl
7481.27SitojunAC_REQUIRE([AC_PROG_MKDIR_P])dnl
7491.1Sitojundnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
7501.1Sitojundnl while keeping a definition of mkdir_p for backward compatibility.
7511.14Sitojundnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
7521.14Sitojundnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
7531.14Sitojundnl Makefile.ins that do not define MKDIR_P, so we do our own
7541.14Sitojundnl adjustment using top_builddir (which is defined more often than
7551.14Sitojundnl MKDIR_P).
7561.14SitojunAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
7571.14Sitojuncase $mkdir_p in
7581.14Sitojun  [[\\/$]]* | ?:[[\\/]]*) ;;
7591.14Sitojun  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7601.14Sitojunesac
7611.14Sitojun])
7621.14Sitojun
7631.14Sitojun# Helper functions for option handling.                     -*- Autoconf -*-
7641.14Sitojun
7651.70Schristos# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
7661.89Schristos#
7671.14Sitojun# This file is free software; the Free Software Foundation
7681.29Sitojun# gives unlimited permission to copy and/or distribute it,
7691.90Schristos# with or without modifications, as long as this notice is preserved.
7701.14Sitojun
7711.14Sitojun# serial 4
7721.14Sitojun
7731.14Sitojun# _AM_MANGLE_OPTION(NAME)
7741.30Sitojun# -----------------------
7751.14SitojunAC_DEFUN([_AM_MANGLE_OPTION],
7761.14Sitojun[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7771.51Slukem
7781.51Slukem# _AM_SET_OPTION(NAME)
7791.51Slukem# ------------------------------
7801.51Slukem# Set option NAME.  Presently that only means defining a flag for this option.
7811.51SlukemAC_DEFUN([_AM_SET_OPTION],
7821.14Sitojun[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7831.14Sitojun
7841.14Sitojun# _AM_SET_OPTIONS(OPTIONS)
7851.89Schristos# ----------------------------------
7861.14Sitojun# OPTIONS is a space-separated list of Automake options.
7871.14SitojunAC_DEFUN([_AM_SET_OPTIONS],
7881.14Sitojun[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7891.42Sitojun
7901.42Sitojun# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7911.42Sitojun# -------------------------------------------
7921.14Sitojun# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7931.89SchristosAC_DEFUN([_AM_IF_OPTION],
7941.89Schristos[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7951.14Sitojun
7961.14Sitojun# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7971.14Sitojun
7981.89Schristos# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
7991.89Schristos# Free Software Foundation, Inc.
8001.14Sitojun#
8011.30Sitojun# This file is free software; the Free Software Foundation
8021.30Sitojun# gives unlimited permission to copy and/or distribute it,
8031.30Sitojun# with or without modifications, as long as this notice is preserved.
8041.30Sitojun
8051.30Sitojun# serial 5
8061.30Sitojun
8071.30Sitojun# AM_SANITY_CHECK
8081.30Sitojun# ---------------
8091.30SitojunAC_DEFUN([AM_SANITY_CHECK],
8101.30Sitojun[AC_MSG_CHECKING([whether build environment is sane])
8111.1Sitojun# Just in case
8121.89Schristossleep 1
8131.1Sitojunecho timestamp > conftest.file
8141.59Sitojun# Reject unsafe characters in $srcdir or the absolute working directory
8151.27Sitojun# name.  Accept space and tab only in the latter.
8161.14Sitojunam_lf='
8171.14Sitojun'
8181.14Sitojuncase `pwd` in
8191.36Schristos  *[[\\\"\#\$\&\'\`$am_lf]]*)
8201.60Sitojun    AC_MSG_ERROR([unsafe absolute working directory name]);;
8211.27Sitojunesac
8221.43Sitojuncase $srcdir in
8231.27Sitojun  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8241.27Sitojun    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8251.14Sitojunesac
8261.1Sitojun
8271.14Sitojun# Do `set' in a subshell so we don't clobber the current shell's
8281.14Sitojun# arguments.  Must try -L first in case configure is actually a
8291.14Sitojun# symlink; some systems play weird games with the mod time of symlinks
8301.1Sitojun# (eg FreeBSD returns the mod time of the symlink's containing
8311.14Sitojun# directory).
8321.1Sitojunif (
8331.1Sitojun   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8341.1Sitojun   if test "$[*]" = "X"; then
8351.70Schristos      # -L didn't work.
8361.1Sitojun      set X `ls -t "$srcdir/configure" conftest.file`
8371.51Slukem   fi
8381.51Slukem   rm -f conftest.file
8391.51Slukem   if test "$[*]" != "X $srcdir/configure conftest.file" \
8401.51Slukem      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8411.51Slukem
8421.14Sitojun      # If neither matched, then we have a broken ls.  This can happen
8431.66Sitojun      # if, for instance, CONFIG_SHELL is bash and it inherits a
8441.14Sitojun      # broken ls alias from the environment.  This has actually
8451.14Sitojun      # happened.  Such a system could not be considered "sane".
8461.14Sitojun      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8471.14Sitojunalias in your environment])
8481.14Sitojun   fi
8491.1Sitojun
8501.14Sitojun   test "$[2]" = conftest.file
8511.70Schristos   )
8521.14Sitojunthen
8531.14Sitojun   # Ok.
8541.14Sitojun   :
8551.12Slukemelse
8561.51Slukem   AC_MSG_ERROR([newly created file is older than distributed files!
8571.51SlukemCheck your system clock])
8581.51Slukemfi
8591.51SlukemAC_MSG_RESULT(yes)])
8601.14Sitojun
8611.14Sitojun# Copyright (C) 2009  Free Software Foundation, Inc.
8621.14Sitojun#
8631.14Sitojun# This file is free software; the Free Software Foundation
8641.14Sitojun# gives unlimited permission to copy and/or distribute it,
8651.14Sitojun# with or without modifications, as long as this notice is preserved.
8661.36Schristos
8671.20Smycroft# serial 1
8681.14Sitojun
8691.14Sitojun# AM_SILENT_RULES([DEFAULT])
8701.14Sitojun# --------------------------
8711.36Schristos# Enable less verbose build rules; with the default set to DEFAULT
8721.20Smycroft# (`yes' being less verbose, `no' or empty being verbose).
8731.14SitojunAC_DEFUN([AM_SILENT_RULES],
8741.14Sitojun[AC_ARG_ENABLE([silent-rules],
8751.1Sitojun[  --enable-silent-rules          less verbose build output (undo: `make V=1')
8761.14Sitojun  --disable-silent-rules         verbose build output (undo: `make V=0')])
8771.89Schristoscase $enable_silent_rules in
8781.89Schristosyes) AM_DEFAULT_VERBOSITY=0;;
8791.14Sitojunno)  AM_DEFAULT_VERBOSITY=1;;
8801.4Sitojun*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
8811.51Slukemesac
8821.51SlukemAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
8831.51SlukemAM_BACKSLASH='\'
8841.89SchristosAC_SUBST([AM_BACKSLASH])dnl
8851.1Sitojun_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8861.1Sitojun])
8871.1Sitojun
8881.89Schristos# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8891.89Schristos#
8901.1Sitojun# This file is free software; the Free Software Foundation
8911.14Sitojun# gives unlimited permission to copy and/or distribute it,
8921.14Sitojun# with or without modifications, as long as this notice is preserved.
8931.14Sitojun
8941.14Sitojun# AM_PROG_INSTALL_STRIP
8951.12Slukem# ---------------------
8961.51Slukem# One issue with vendor `install' (even GNU) is that you can't
8971.51Slukem# specify the program used to strip binaries.  This is especially
8981.51Slukem# annoying in cross-compiling environments, where the build's strip
8991.14Sitojun# is unlikely to handle the host's binaries.
9001.14Sitojun# Fortunately install-sh will honor a STRIPPROG variable, so we
9011.23Sitojun# always use install-sh in `make install-strip', and initialize
9021.23Sitojun# STRIPPROG with the value of the STRIP variable (set by the user).
9031.27SitojunAC_DEFUN([AM_PROG_INSTALL_STRIP],
9041.23Sitojun[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9051.27Sitojun# Installed binaries are usually stripped using `strip' when the user
9061.23Sitojun# run `make install-strip'.  However `strip' might not be the right
9071.23Sitojun# tool to use in cross-compilation environments, therefore Automake
9081.14Sitojun# will honor the `STRIP' environment variable to overrule this program.
9091.23Sitojundnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9101.1Sitojunif test "$cross_compiling" != no; then
9111.14Sitojun  AC_CHECK_TOOL([STRIP], [strip], :)
9121.14Sitojunfi
9131.14SitojunINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9141.14SitojunAC_SUBST([INSTALL_STRIP_PROGRAM])])
9151.14Sitojun
9161.14Sitojun# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9171.14Sitojun#
9181.14Sitojun# This file is free software; the Free Software Foundation
9191.92Stls# gives unlimited permission to copy and/or distribute it,
9201.92Stls# with or without modifications, as long as this notice is preserved.
9211.92Stls
9221.92Stls# serial 2
9231.92Stls
9241.92Stls# _AM_SUBST_NOTMAKE(VARIABLE)
9251.14Sitojun# ---------------------------
9261.14Sitojun# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9271.14Sitojun# This macro is traced by Automake.
9281.1SitojunAC_DEFUN([_AM_SUBST_NOTMAKE])
9291.14Sitojun
9301.67Sitojun# AM_SUBST_NOTMAKE(VARIABLE)
9311.67Sitojun# ---------------------------
9321.14Sitojun# Public sister of _AM_SUBST_NOTMAKE.
9331.14SitojunAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9341.14Sitojun
9351.14Sitojun# Check how to create a tarball.                            -*- Autoconf -*-
9361.58Sitojun
9371.14Sitojun# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9381.84Schristos#
9391.67Sitojun# This file is free software; the Free Software Foundation
9401.67Sitojun# gives unlimited permission to copy and/or distribute it,
9411.67Sitojun# with or without modifications, as long as this notice is preserved.
9421.14Sitojun
9431.14Sitojun# serial 2
9441.14Sitojun
9451.1Sitojun# _AM_PROG_TAR(FORMAT)
9461.14Sitojun# --------------------
9471.14Sitojun# Check how to create a tarball in format FORMAT.
9481.1Sitojun# FORMAT should be one of `v7', `ustar', or `pax'.
9491.1Sitojun#
9501.14Sitojun# Substitute a variable $(am__tar) that is a command
9511.1Sitojun# writing to stdout a FORMAT-tarball containing the directory
9521.1Sitojun# $tardir.
9531.14Sitojun#     tardir=directory && $(am__tar) > result.tar
9541.89Schristos#
9551.85Schristos# Substitute a variable $(am__untar) that extract such
9561.14Sitojun# a tarball read from stdin.
9571.14Sitojun#     $(am__untar) < result.tar
9581.1SitojunAC_DEFUN([_AM_PROG_TAR],
9591.1Sitojun[# Always define AMTAR for backward compatibility.
9601.14SitojunAM_MISSING_PROG([AMTAR], [tar])
9611.14Sitojunm4_if([$1], [v7],
9621.1Sitojun     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9631.36Schristos     [m4_case([$1], [ustar],, [pax],,
9641.36Schristos              [m4_fatal([Unknown tar format])])
9651.1SitojunAC_MSG_CHECKING([how to create a $1 tar archive])
9661.1Sitojun# Loop over all known methods to create a tar archive until one works.
9671.14Sitojun_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9681.36Schristos_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9691.36Schristos# Do not fold the above two line into one, because Tru64 sh and
9701.1Sitojun# Solaris sh will not grok spaces in the rhs of `-'.
9711.1Sitojunfor _am_tool in $_am_tools
9721.1Sitojundo
9731.14Sitojun  case $_am_tool in
9741.14Sitojun  gnutar)
9751.14Sitojun    for _am_tar in tar gnutar gtar;
9761.14Sitojun    do
9771.14Sitojun      AM_RUN_LOG([$_am_tar --version]) && break
9781.14Sitojun    done
9791.70Schristos    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9801.14Sitojun    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9811.14Sitojun    am__untar="$_am_tar -xf -"
9821.1Sitojun    ;;
9831.14Sitojun  plaintar)
9841.14Sitojun    # Must skip GNU tar: if it does not support --format= it doesn't create
9851.14Sitojun    # ustar tarball either.
9861.14Sitojun    (tar --version) >/dev/null 2>&1 && continue
9871.14Sitojun    am__tar='tar chf - "$$tardir"'
9881.1Sitojun    am__tar_='tar chf - "$tardir"'
9891.14Sitojun    am__untar='tar xf -'
9901.1Sitojun    ;;
9911.27Sitojun  pax)
9921.27Sitojun    am__tar='pax -L -x $1 -w "$$tardir"'
9931.27Sitojun    am__tar_='pax -L -x $1 -w "$tardir"'
9941.60Sitojun    am__untar='pax -r'
9951.70Schristos    ;;
9961.27Sitojun  cpio)
9971.59Sitojun    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9981.51Slukem    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9991.27Sitojun    am__untar='cpio -i -H $1 -d'
10001.46Sitojun    ;;
10011.51Slukem  none)
10021.51Slukem    am__tar=false
10031.60Sitojun    am__tar_=false
10041.51Slukem    am__untar=false
10051.51Slukem    ;;
10061.51Slukem  esac
10071.46Sitojun
10081.46Sitojun  # If the value was cached, stop now.  We just wanted to have am__tar
10091.46Sitojun  # and am__untar set.
10101.27Sitojun  test -n "${am_cv_prog_tar_$1}" && break
10111.27Sitojun
10121.27Sitojun  # tar/untar a dummy directory, and stop if the command works
10131.27Sitojun  rm -rf conftest.dir
10141.27Sitojun  mkdir conftest.dir
10151.27Sitojun  echo GrepMe > conftest.dir/file
10161.27Sitojun  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10171.60Sitojun  rm -rf conftest.dir
10181.60Sitojun  if test -s conftest.tar; then
10191.27Sitojun    AM_RUN_LOG([$am__untar <conftest.tar])
10201.60Sitojun    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10211.27Sitojun  fi
10221.27Sitojundone
10231.27Sitojunrm -rf conftest.dir
10241.27Sitojun
10251.27SitojunAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10261.27SitojunAC_MSG_RESULT([$am_cv_prog_tar_$1])])
10271.27SitojunAC_SUBST([am__tar])
10281.27SitojunAC_SUBST([am__untar])
10291.27Sitojun]) # _AM_PROG_TAR
10301.27Sitojun
10311.27Sitojundnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
10321.27Sitojundnl
10331.59Sitojundnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
10341.59Sitojundnl 
10351.61Sitojundnl Permission is hereby granted, free of charge, to any person obtaining a
10361.60Sitojundnl copy of this software and associated documentation files (the
10371.60Sitojundnl "Software"), to deal in the Software without restriction, including
10381.27Sitojundnl without limitation the rights to use, copy, modify, merge, publish,
10391.27Sitojundnl distribute, and/or sell copies of the Software, and to permit persons
10401.27Sitojundnl to whom the Software is furnished to do so, provided that the above
10411.42Sitojundnl copyright notice(s) and this permission notice appear in all copies of
10421.32Sitojundnl the Software and that both the above copyright notice(s) and this
10431.32Sitojundnl permission notice appear in supporting documentation.
10441.32Sitojundnl
10451.32Sitojundnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10461.32Sitojundnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10471.32Sitojundnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
10481.32Sitojundnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
10491.70Schristosdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
10501.70Schristosdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
10511.32Sitojundnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
10521.32Sitojundnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
10531.32Sitojundnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
10541.32Sitojundnl
10551.32Sitojundnl Except as contained in this notice, the name of a copyright holder
10561.32Sitojundnl shall not be used in advertising or otherwise to promote the sale, use
10571.32Sitojundnl or other dealings in this Software without prior written authorization
10581.32Sitojundnl of the copyright holder.
10591.32Sitojun
10601.56Sitojun# XORG_MACROS_VERSION(required-version)
10611.56Sitojun# -------------------------------------
10621.32Sitojun# Minimum version: 1.1.0
10631.32Sitojun#
10641.70Schristos# If you're using a macro added in Version 1.1 or newer, include this in
10651.32Sitojun# your configure.ac with the minimum required version, such as:
10661.32Sitojun# XORG_MACROS_VERSION(1.1)
10671.51Slukem#
10681.51Slukem# To ensure that this macro is defined, also add:
10691.51Slukem# m4_ifndef([XORG_MACROS_VERSION],
10701.51Slukem#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
10711.32Sitojun#
10721.32Sitojun#
10731.32Sitojun# See the "minimum version" comment for each macro you use to see what 
10741.32Sitojun# version you require.
10751.32Sitojunm4_defun([XORG_MACROS_VERSION],[
10761.32Sitojunm4_define([vers_have], [1.3.0])
10771.32Sitojunm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
10781.32Sitojunm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
10791.32Sitojunm4_if(m4_cmp(maj_have, maj_needed), 0,,
10801.32Sitojun    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
10811.32Sitojunm4_if(m4_version_compare(vers_have, [$1]), -1,
10821.32Sitojun    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
10831.70Schristosm4_undefine([vers_have])
10841.32Sitojunm4_undefine([maj_have])
10851.32Sitojunm4_undefine([maj_needed])
10861.32Sitojun]) # XORG_MACROS_VERSION
10871.32Sitojun
10881.32Sitojun# XORG_PROG_RAWCPP()
10891.32Sitojun# ------------------
10901.32Sitojun# Minimum version: 1.0.0
10911.32Sitojun#
10921.56Sitojun# Find cpp program and necessary flags for use in pre-processing text files
10931.32Sitojun# such as man pages and config files
10941.32SitojunAC_DEFUN([XORG_PROG_RAWCPP],[
10951.32SitojunAC_REQUIRE([AC_PROG_CPP])
10961.32SitojunAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
10971.32Sitojun   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
10981.56Sitojun
10991.32Sitojun# Check for flag to avoid builtin definitions - assumes unix is predefined,
11001.32Sitojun# which is not the best choice for supporting other OS'es, but covers most
11011.32Sitojun# of the ones we need for now.
11021.32SitojunAC_MSG_CHECKING([if $RAWCPP requires -undef])
11031.32SitojunAC_LANG_CONFTEST([Does cpp redefine unix ?])
11041.32Sitojunif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
11051.32Sitojun	AC_MSG_RESULT([no])
11061.32Sitojunelse
11071.32Sitojun	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
11081.32Sitojun		RAWCPPFLAGS=-undef
11091.32Sitojun		AC_MSG_RESULT([yes])
11101.32Sitojun	# under Cygwin unix is still defined even with -undef
11111.32Sitojun	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
11121.32Sitojun		RAWCPPFLAGS="-undef -ansi"
11131.32Sitojun		AC_MSG_RESULT([yes, with -ansi])
11141.32Sitojun	else
11151.32Sitojun		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
11161.32Sitojun	fi
11171.32Sitojunfi
11181.32Sitojunrm -f conftest.$ac_ext
11191.32Sitojun
11201.32SitojunAC_MSG_CHECKING([if $RAWCPP requires -traditional])
11211.32SitojunAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
11221.56Sitojunif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
11231.32Sitojun	AC_MSG_RESULT([no])
11241.32Sitojunelse
11251.32Sitojun	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
11261.32Sitojun		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
11271.32Sitojun		AC_MSG_RESULT([yes])
11281.32Sitojun	else
11291.32Sitojun		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
11301.32Sitojun	fi
11311.32Sitojunfi
11321.32Sitojunrm -f conftest.$ac_ext
11331.32SitojunAC_SUBST(RAWCPPFLAGS)
11341.32Sitojun]) # XORG_PROG_RAWCPP
11351.32Sitojun
11361.32Sitojun# XORG_MANPAGE_SECTIONS()
11371.32Sitojun# -----------------------
11381.32Sitojun# Minimum version: 1.0.0
11391.32Sitojun#
11401.32Sitojun# Determine which sections man pages go in for the different man page types
11411.32Sitojun# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
11421.32Sitojun# Not sure if there's any better way than just hardcoding by OS name.
11431.32Sitojun# Override default settings by setting environment variables
11441.32Sitojun
11451.32SitojunAC_DEFUN([XORG_MANPAGE_SECTIONS],[
11461.32SitojunAC_REQUIRE([AC_CANONICAL_HOST])
11471.32Sitojun
11481.32Sitojunif test x$APP_MAN_SUFFIX = x    ; then
11491.56Sitojun    APP_MAN_SUFFIX=1
11501.32Sitojunfi
11511.32Sitojunif test x$APP_MAN_DIR = x    ; then
11521.32Sitojun    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
11531.66Sitojunfi
11541.32Sitojun
11551.32Sitojunif test x$LIB_MAN_SUFFIX = x    ; then
11561.32Sitojun    LIB_MAN_SUFFIX=3
11571.32Sitojunfi
11581.32Sitojunif test x$LIB_MAN_DIR = x    ; then
11591.32Sitojun    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
11601.32Sitojunfi
11611.32Sitojun
11621.32Sitojunif test x$FILE_MAN_SUFFIX = x    ; then
11631.32Sitojun    case $host_os in
11641.88Schristos	solaris*)	FILE_MAN_SUFFIX=4  ;;
11651.88Schristos	*)		FILE_MAN_SUFFIX=5  ;;
11661.88Schristos    esac
11671.32Sitojunfi
11681.32Sitojunif test x$FILE_MAN_DIR = x    ; then
11691.32Sitojun    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
11701.88Schristosfi
11711.32Sitojun
11721.32Sitojunif test x$MISC_MAN_SUFFIX = x    ; then
11731.32Sitojun    case $host_os in
11741.32Sitojun	solaris*)	MISC_MAN_SUFFIX=5  ;;
11751.32Sitojun	*)		MISC_MAN_SUFFIX=7  ;;
11761.32Sitojun    esac
11771.32Sitojunfi
11781.88Schristosif test x$MISC_MAN_DIR = x    ; then
11791.88Schristos    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
11801.32Sitojunfi
11811.32Sitojun
11821.32Sitojunif test x$DRIVER_MAN_SUFFIX = x    ; then
11831.32Sitojun    case $host_os in
11841.32Sitojun	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
11851.32Sitojun	*)		DRIVER_MAN_SUFFIX=4  ;;
11861.32Sitojun    esac
11871.32Sitojunfi
11881.32Sitojunif test x$DRIVER_MAN_DIR = x    ; then
11891.32Sitojun    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
11901.32Sitojunfi
11911.62Sitojun
11921.62Sitojunif test x$ADMIN_MAN_SUFFIX = x    ; then
11931.62Sitojun    case $host_os in
11941.62Sitojun	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
11951.62Sitojun	*)		ADMIN_MAN_SUFFIX=8  ;;
11961.62Sitojun    esac
11971.62Sitojunfi
11981.62Sitojunif test x$ADMIN_MAN_DIR = x    ; then
11991.32Sitojun    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
12001.32Sitojunfi
12011.32Sitojun
12021.32Sitojun
12031.32SitojunAC_SUBST([APP_MAN_SUFFIX])
12041.32SitojunAC_SUBST([LIB_MAN_SUFFIX])
12051.32SitojunAC_SUBST([FILE_MAN_SUFFIX])
12061.32SitojunAC_SUBST([MISC_MAN_SUFFIX])
12071.32SitojunAC_SUBST([DRIVER_MAN_SUFFIX])
12081.32SitojunAC_SUBST([ADMIN_MAN_SUFFIX])
12091.32SitojunAC_SUBST([APP_MAN_DIR])
12101.32SitojunAC_SUBST([LIB_MAN_DIR])
12111.32SitojunAC_SUBST([FILE_MAN_DIR])
12121.32SitojunAC_SUBST([MISC_MAN_DIR])
12131.32SitojunAC_SUBST([DRIVER_MAN_DIR])
12141.32SitojunAC_SUBST([ADMIN_MAN_DIR])
12151.32Sitojun]) # XORG_MANPAGE_SECTIONS
12161.36Schristos
12171.32Sitojun# XORG_CHECK_LINUXDOC
12181.32Sitojun# -------------------
12191.32Sitojun# Minimum version: 1.0.0
12201.32Sitojun#
12211.32Sitojun# Defines the variable MAKE_TEXT if the necessary tools and
12221.32Sitojun# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
12231.32Sitojun# Whether or not the necessary tools and files are found can be checked
12241.32Sitojun# with the AM_CONDITIONAL "BUILD_LINUXDOC"
12251.32SitojunAC_DEFUN([XORG_CHECK_LINUXDOC],[
12261.32Sitojunif test x$XORG_SGML_PATH = x ; then
12271.32Sitojun    XORG_SGML_PATH=$prefix/share/sgml
12281.32Sitojunfi
12291.32SitojunHAVE_DEFS_ENT=
12301.32Sitojun
12311.32Sitojunif test x"$cross_compiling" = x"yes" ; then
12321.32Sitojun  HAVE_DEFS_ENT=no
12331.32Sitojunelse
12341.32Sitojun  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
12351.32Sitojunfi
12361.32Sitojun
12371.32SitojunAC_PATH_PROG(LINUXDOC, linuxdoc)
12381.32SitojunAC_PATH_PROG(PS2PDF, ps2pdf)
12391.32Sitojun
12401.32SitojunAC_MSG_CHECKING([Whether to build documentation])
12411.32Sitojun
12421.73Stsarnaif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
12431.73Stsarna   BUILDDOC=yes
12441.73Stsarnaelse
12451.73Stsarna   BUILDDOC=no
12461.73Stsarnafi
12471.73Stsarna
12481.73StsarnaAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
12491.73Stsarna
12501.73StsarnaAC_MSG_RESULT([$BUILDDOC])
12511.73Stsarna
12521.73StsarnaAC_MSG_CHECKING([Whether to build pdf documentation])
12531.73Stsarna
12541.73Stsarnaif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
12551.73Stsarna   BUILDPDFDOC=yes
12561.73Stsarnaelse
12571.73Stsarna   BUILDPDFDOC=no
12581.73Stsarnafi
12591.73Stsarna
12601.73StsarnaAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
12611.73Stsarna
12621.73StsarnaAC_MSG_RESULT([$BUILDPDFDOC])
12631.73Stsarna
12641.73StsarnaMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
12651.73StsarnaMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
12661.73StsarnaMAKE_PDF="$PS2PDF"
12671.73StsarnaMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
12681.73Stsarna
12691.73StsarnaAC_SUBST(MAKE_TEXT)
12701.73StsarnaAC_SUBST(MAKE_PS)
12711.73StsarnaAC_SUBST(MAKE_PDF)
12721.73StsarnaAC_SUBST(MAKE_HTML)
12731.32Sitojun]) # XORG_CHECK_LINUXDOC
12741.32Sitojun
12751.70Schristos# XORG_CHECK_DOCBOOK
12761.32Sitojun# -------------------
12771.32Sitojun# Minimum version: 1.0.0
12781.63Sitojun#
12791.32Sitojun# Checks for the ability to build output formats from SGML DocBook source.
12801.32Sitojun# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
12811.32Sitojun# indicates whether the necessary tools and files are found and, if set,
12821.32Sitojun# $(MAKE_XXX) blah.sgml will produce blah.xxx.
12831.73StsarnaAC_DEFUN([XORG_CHECK_DOCBOOK],[
12841.32Sitojunif test x$XORG_SGML_PATH = x ; then
12851.32Sitojun    XORG_SGML_PATH=$prefix/share/sgml
12861.32Sitojunfi
12871.32SitojunHAVE_DEFS_ENT=
12881.78SmjlBUILDTXTDOC=no
12891.32SitojunBUILDPDFDOC=no
12901.32SitojunBUILDPSDOC=no
12911.32SitojunBUILDHTMLDOC=no
12921.32Sitojun
12931.63SitojunAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
12941.63Sitojun
12951.63SitojunAC_PATH_PROG(DOCBOOKPS, docbook2ps)
12961.63SitojunAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
12971.63SitojunAC_PATH_PROG(DOCBOOKHTML, docbook2html)
12981.63SitojunAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
12991.63Sitojun
13001.63SitojunAC_MSG_CHECKING([Whether to build text documentation])
13011.63Sitojunif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
13021.63Sitojun   test x$BUILD_TXTDOC != xno; then
13031.63Sitojun	BUILDTXTDOC=yes
13041.63Sitojunfi
13051.32SitojunAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
13061.32SitojunAC_MSG_RESULT([$BUILDTXTDOC])
13071.32Sitojun
13081.52SitojunAC_MSG_CHECKING([Whether to build PDF documentation])
13091.43Sitojunif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
13101.43Sitojun   test x$BUILD_PDFDOC != xno; then
13111.63Sitojun	BUILDPDFDOC=yes
13121.63Sitojunfi
13131.32SitojunAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
13141.52SitojunAC_MSG_RESULT([$BUILDPDFDOC])
13151.43Sitojun
13161.43SitojunAC_MSG_CHECKING([Whether to build PostScript documentation])
13171.63Sitojunif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
13181.63Sitojun   test x$BUILD_PSDOC != xno; then
13191.32Sitojun	BUILDPSDOC=yes
13201.32Sitojunfi
13211.52SitojunAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
13221.43SitojunAC_MSG_RESULT([$BUILDPSDOC])
13231.43Sitojun
13241.63SitojunAC_MSG_CHECKING([Whether to build HTML documentation])
13251.63Sitojunif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
13261.32Sitojun   test x$BUILD_HTMLDOC != xno; then
13271.32Sitojun	BUILDHTMLDOC=yes
13281.52Sitojunfi
13291.43SitojunAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
13301.43SitojunAC_MSG_RESULT([$BUILDHTMLDOC])
13311.63Sitojun
13321.63SitojunMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
13331.32SitojunMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
13341.32SitojunMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
13351.63SitojunMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
13361.63Sitojun
13371.32SitojunAC_SUBST(MAKE_TEXT)
13381.32SitojunAC_SUBST(MAKE_PS)
13391.73StsarnaAC_SUBST(MAKE_PDF)
13401.73StsarnaAC_SUBST(MAKE_HTML)
13411.73Stsarna]) # XORG_CHECK_DOCBOOK
13421.73Stsarna
13431.73Stsarna# XORG_CHECK_MALLOC_ZERO
13441.73Stsarna# ----------------------
13451.73Stsarna# Minimum version: 1.0.0
13461.73Stsarna#
13471.73Stsarna# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
13481.73Stsarna# malloc(0) returns NULL.  Packages should add one of these cflags to
13491.63Sitojun# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
13501.63SitojunAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
13511.32SitojunAC_ARG_ENABLE(malloc0returnsnull,
13521.63Sitojun	AS_HELP_STRING([--enable-malloc0returnsnull],
13531.63Sitojun		       [malloc(0) returns NULL (default: auto)]),
13541.32Sitojun	[MALLOC_ZERO_RETURNS_NULL=$enableval],
13551.32Sitojun	[MALLOC_ZERO_RETURNS_NULL=auto])
13561.32Sitojun
13571.32SitojunAC_MSG_CHECKING([whether malloc(0) returns NULL])
13581.32Sitojunif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
13591.32Sitojun	AC_RUN_IFELSE([
13601.63Sitojunchar *malloc();
13611.32Sitojunchar *realloc();
13621.32Sitojunchar *calloc();
13631.32Sitojunmain() {
13641.63Sitojun    char *m0, *r0, *c0, *p;
13651.63Sitojun    m0 = malloc(0);
13661.73Stsarna    p = malloc(10);
13671.73Stsarna    r0 = realloc(p,0);
13681.32Sitojun    c0 = calloc(0);
13691.32Sitojun    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
13701.32Sitojun}],
13711.32Sitojun		[MALLOC_ZERO_RETURNS_NULL=yes],
13721.32Sitojun		[MALLOC_ZERO_RETURNS_NULL=no])
13731.32Sitojunfi
13741.32SitojunAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
13751.32Sitojun
13761.73Stsarnaif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
13771.73Stsarna	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
13781.73Stsarna	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
13791.73Stsarna	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
13801.73Stsarnaelse
13811.73Stsarna	MALLOC_ZERO_CFLAGS=""
13821.73Stsarna	XMALLOC_ZERO_CFLAGS=""
13831.32Sitojun	XTMALLOC_ZERO_CFLAGS=""
13841.32Sitojunfi
13851.32Sitojun
13861.32SitojunAC_SUBST([MALLOC_ZERO_CFLAGS])
13871.32SitojunAC_SUBST([XMALLOC_ZERO_CFLAGS])
13881.70SchristosAC_SUBST([XTMALLOC_ZERO_CFLAGS])
13891.32Sitojun]) # XORG_CHECK_MALLOC_ZERO
13901.51Slukem
13911.70Schristos# XORG_WITH_LINT()
13921.70Schristos# ----------------
13931.32Sitojun# Minimum version: 1.1.0
13941.70Schristos#
13951.32Sitojun# Sets up flags for source checkers such as lint and sparse if --with-lint
13961.32Sitojun# is specified.   (Use --with-lint=sparse for sparse.)
13971.32Sitojun# Sets $LINT to name of source checker passed with --with-lint (default: lint)
13981.70Schristos# Sets $LINT_FLAGS to flags to pass to source checker
13991.32Sitojun# Sets LINT automake conditional if enabled (default: disabled)
14001.51Slukem#
14011.70SchristosAC_DEFUN([XORG_WITH_LINT],[
14021.70Schristos
14031.70Schristos# Allow checking code with lint, sparse, etc.
14041.32SitojunAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
14051.32Sitojun		[Use a lint-style source code checker (default: disabled)])],
14061.32Sitojun		[use_lint=$withval], [use_lint=no])
14071.32Sitojunif test "x$use_lint" = "xyes" ; then
14081.70Schristos	LINT="lint"
14091.32Sitojunelse
14101.32Sitojun	LINT="$use_lint"
14111.48Sitojunfi
14121.32Sitojunif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
14131.32Sitojun    case $LINT in
14141.32Sitojun	lint|*/lint)
14151.32Sitojun	    case $host_os in
14161.32Sitojun		solaris*)
14171.51Slukem			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
14181.51Slukem			;;
14191.51Slukem	    esac
14201.70Schristos	    ;;
14211.32Sitojun    esac
14221.32Sitojunfi
14231.70Schristos
14241.32SitojunAC_SUBST(LINT)
14251.32SitojunAC_SUBST(LINT_FLAGS)
14261.32SitojunAM_CONDITIONAL(LINT, [test x$LINT != xno])
14271.32Sitojun
14281.32Sitojun]) # XORG_WITH_LINT
14291.32Sitojun
14301.32Sitojun# XORG_LINT_LIBRARY(LIBNAME)
14311.32Sitojun# --------------------------
14321.32Sitojun# Minimum version: 1.1.0
14331.32Sitojun#
14341.32Sitojun# Sets up flags for building lint libraries for checking programs that call
14351.48Sitojun# functions in the library.
14361.32Sitojun# Disabled by default, enable with --enable-lint-library
14371.32Sitojun# Sets: 
14381.32Sitojun#	@LINTLIB@		- name of lint library file to make
14391.32Sitojun#	MAKE_LINT_LIB		- automake conditional
14401.32Sitojun#
14411.48Sitojun
14421.48SitojunAC_DEFUN([XORG_LINT_LIBRARY],[
14431.32SitojunAC_REQUIRE([XORG_WITH_LINT])
14441.32Sitojun# Build lint "library" for more indepth checks of programs calling this library
14451.32SitojunAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
14461.32Sitojun	[Create lint library (default: disabled)])],
14471.32Sitojun	[make_lint_lib=$enableval], [make_lint_lib=no])
14481.32Sitojunif test "x$make_lint_lib" != "xno" ; then
14491.32Sitojun	if test "x$LINT" = "xno" ; then
14501.32Sitojun		AC_MSG_ERROR([Cannot make lint library without --with-lint])
14511.32Sitojun	fi
14521.32Sitojun	if test "x$make_lint_lib" = "xyes" ; then
14531.32Sitojun		LINTLIB=llib-l$1.ln
14541.32Sitojun	else
14551.32Sitojun		LINTLIB=$make_lint_lib
14561.32Sitojun	fi
14571.32Sitojunfi
14581.32SitojunAC_SUBST(LINTLIB)
14591.32SitojunAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
14601.32Sitojun
14611.32Sitojun]) # XORG_LINT_LIBRARY
14621.48Sitojun
14631.32Sitojun# XORG_CWARNFLAGS
14641.32Sitojun# ---------------
14651.32Sitojun# Minimum version: 1.2.0
14661.32Sitojun#
14671.32Sitojun# Defines CWARNFLAGS to enable C compiler warnings.
14681.32Sitojun#
14691.32SitojunAC_DEFUN([XORG_CWARNFLAGS], [
14701.32SitojunAC_REQUIRE([AC_PROG_CC])
14711.32Sitojunif  test "x$GCC" = xyes ; then
14721.32Sitojun    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
14731.70Schristos-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
14741.32Sitojun-Wbad-function-cast"
14751.32Sitojun    case `$CC -dumpversion` in
14761.32Sitojun    3.4.* | 4.*)
14771.32Sitojun	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
14781.32Sitojun	;;
14791.70Schristos    esac
14801.70Schristoselse
14811.70Schristos    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
14821.70Schristos    if test "x$SUNCC" = "xyes"; then
14831.32Sitojun	CWARNFLAGS="-v"
14841.32Sitojun    fi
14851.91Slukemfi
14861.32SitojunAC_SUBST(CWARNFLAGS)
14871.32Sitojunm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
14881.32Sitojun]) # XORG_CWARNFLAGS
14891.32Sitojun
14901.70Schristos# XORG_STRICT_OPTION
14911.70Schristos# -----------------------
14921.32Sitojun# Minimum version: 1.3.0
14931.32Sitojun#
14941.32Sitojun# Add configure option to enable strict compilation
14951.32SitojunAC_DEFUN([XORG_STRICT_OPTION], [
14961.70SchristosAC_REQUIRE([AC_PROG_CC])
14971.32SitojunAC_REQUIRE([AC_PROG_CC_C99])
14981.32SitojunAC_REQUIRE([XORG_CWARNFLAGS])
14991.32Sitojun
15001.32SitojunAC_ARG_ENABLE(strict-compilation,
15011.32Sitojun			  AS_HELP_STRING([--enable-strict-compilation],
15021.32Sitojun			  [Enable all warnings from compiler and make them errors (default: disabled)]),
15031.32Sitojun			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
15041.32Sitojunif test "x$STRICT_COMPILE" = "xyes"; then
15051.32Sitojun	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
15061.32Sitojun	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
15071.70Schristos	if test "x$GCC" = xyes ; then
15081.32Sitojun		STRICT_CFLAGS="-pedantic -Werror"
15091.32Sitojun	elif test "x$SUNCC" = "xyes"; then
15101.32Sitojun		STRICT_CFLAGS="-errwarn"
15111.32Sitojun    elif test "x$INTELCC" = "xyes"; then
15121.51Slukem		STRICT_CFLAGS="-Werror"
15131.32Sitojun	fi
15141.32Sitojunfi
15151.32SitojunCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
15161.32SitojunAC_SUBST([CWARNFLAGS])
15171.51Slukem]) # XORG_STRICT_OPTION
15181.51Slukem
15191.51Slukem# XORG_DEFAULT_OPTIONS
15201.51Slukem# --------------------
15211.32Sitojun# Minimum version: 1.3.0
15221.32Sitojun#
15231.36Schristos# Defines default options for X.Org modules.
15241.36Schristos#
15251.36SchristosAC_DEFUN([XORG_DEFAULT_OPTIONS], [
15261.32SitojunXORG_CWARNFLAGS
15271.32SitojunXORG_STRICT_OPTION
15281.32SitojunXORG_RELEASE_VERSION
15291.32SitojunXORG_CHANGELOG
15301.32SitojunXORG_MANPAGE_SECTIONS
15311.32Sitojun]) # XORG_DEFAULT_OPTIONS
15321.32Sitojundnl Copyright 2005 Red Hat, Inc
15331.32Sitojundnl
15341.32Sitojundnl Permission to use, copy, modify, distribute, and sell this software and its
15351.32Sitojundnl documentation for any purpose is hereby granted without fee, provided that
15361.32Sitojundnl the above copyright notice appear in all copies and that both that
15371.32Sitojundnl copyright notice and this permission notice appear in supporting
15381.32Sitojundnl documentation.
15391.32Sitojundnl
15401.32Sitojundnl The above copyright notice and this permission notice shall be included
15411.32Sitojundnl in all copies or substantial portions of the Software.
15421.32Sitojundnl
15431.32Sitojundnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15441.32Sitojundnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15451.32Sitojundnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15461.32Sitojundnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
15471.32Sitojundnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
15481.32Sitojundnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
15491.32Sitojundnl OTHER DEALINGS IN THE SOFTWARE.
15501.32Sitojundnl
15511.32Sitojundnl Except as contained in this notice, the name of the copyright holders shall
15521.32Sitojundnl not be used in advertising or otherwise to promote the sale, use or
15531.32Sitojundnl other dealings in this Software without prior written authorization
15541.32Sitojundnl from the copyright holders.
15551.32Sitojundnl
15561.32Sitojun
15571.32Sitojun# XORG_RELEASE_VERSION
15581.32Sitojun# --------------------
15591.32Sitojun# Adds --with/without-release-string and changes the PACKAGE and
15601.32Sitojun# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
15611.32Sitojun# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
15621.32Sitojun# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
15631.32Sitojun 
15641.32SitojunAC_DEFUN([XORG_RELEASE_VERSION],[
15651.32Sitojun	AC_ARG_WITH(release-version,
15661.32Sitojun			AS_HELP_STRING([--with-release-version=STRING],
15671.32Sitojun				[Use release version string in package name]),
15681.37Sitojun			[RELEASE_VERSION="$withval"],
15691.37Sitojun			[RELEASE_VERSION=""])
15701.32Sitojun	if test "x$RELEASE_VERSION" != "x"; then
15711.32Sitojun		PACKAGE="$PACKAGE-$RELEASE_VERSION"
15721.80Schristos		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
15731.32Sitojun		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
15741.32Sitojun	fi
15751.32Sitojun	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
15761.32Sitojun		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
15771.32Sitojun		[Major version of this package])
15781.32Sitojun	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
15791.32Sitojun	if test "x$PVM" = "x"; then
15801.32Sitojun		PVM="0"
15811.32Sitojun	fi
15821.32Sitojun	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
15831.32Sitojun		[$PVM],
15841.32Sitojun		[Minor version of this package])
15851.32Sitojun	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
15861.32Sitojun	if test "x$PVP" = "x"; then
15871.70Schristos		PVP="0"
15881.32Sitojun	fi
15891.32Sitojun	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
15901.32Sitojun		[$PVP],
15911.72Schristos		[Patch version of this package])
15921.72Schristos])
15931.32Sitojun
15941.32Sitojun# XORG_CHANGELOG()
15951.72Schristos# ----------------
15961.72Schristos# Minimum version: 1.2.0
15971.72Schristos#
15981.72Schristos# Defines the variable CHANGELOG_CMD as the command to generate
15991.32Sitojun# ChangeLog from git.
16001.32Sitojun#
16011.32Sitojun# Arrange that distcleancheck ignores ChangeLog left over by distclean.
16021.32Sitojun#
16031.32SitojunAC_DEFUN([XORG_CHANGELOG], [
16041.32SitojunCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
16051.32Sitojunmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
16061.32Sitojunecho 'git directory not found: installing possibly empty changelog.' >&2)"
16071.33SitojunAC_SUBST([CHANGELOG_CMD])
16081.72SchristosAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
16091.72Schristos]) # XORG_CHANGELOG
16101.33Sitojun
16111.33Sitojun# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
16121.33Sitojun
16131.33Sitojun# serial 52 AC_PROG_LIBTOOL
16141.33Sitojun
16151.72Schristos
16161.33Sitojun# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
16171.33Sitojun# -----------------------------------------------------------
16181.33Sitojun# If this macro is not defined by Autoconf, define it here.
16191.33Sitojunm4_ifdef([AC_PROVIDE_IFELSE],
16201.33Sitojun         [],
16211.32Sitojun         [m4_define([AC_PROVIDE_IFELSE],
16221.72Schristos	         [m4_ifdef([AC_PROVIDE_$1],
16231.32Sitojun		           [$2], [$3])])])
16241.32Sitojun
16251.32Sitojun
16261.72Schristos# AC_PROG_LIBTOOL
16271.72Schristos# ---------------
16281.32SitojunAC_DEFUN([AC_PROG_LIBTOOL],
16291.72Schristos[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
16301.72Schristosdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
16311.32Sitojundnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
16321.72Schristos  AC_PROVIDE_IFELSE([AC_PROG_CXX],
16331.32Sitojun    [AC_LIBTOOL_CXX],
16341.32Sitojun    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
16351.32Sitojun  ])])
16361.32Sitojundnl And a similar setup for Fortran 77 support
16371.32Sitojun  AC_PROVIDE_IFELSE([AC_PROG_F77],
16381.32Sitojun    [AC_LIBTOOL_F77],
16391.32Sitojun    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
16401.32Sitojun])])
16411.32Sitojun
16421.32Sitojundnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
16431.32Sitojundnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
16441.32Sitojundnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
16451.32Sitojun  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
16461.32Sitojun    [AC_LIBTOOL_GCJ],
16471.32Sitojun    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
16481.32Sitojun      [AC_LIBTOOL_GCJ],
16491.32Sitojun      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
16501.32Sitojun	[AC_LIBTOOL_GCJ],
16511.32Sitojun      [ifdef([AC_PROG_GCJ],
16521.32Sitojun	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
16531.32Sitojun       ifdef([A][M_PROG_GCJ],
16541.32Sitojun	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
16551.32Sitojun       ifdef([LT_AC_PROG_GCJ],
16561.32Sitojun	     [define([LT_AC_PROG_GCJ],
16571.70Schristos		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
16581.70Schristos])])# AC_PROG_LIBTOOL
16591.32Sitojun
16601.32Sitojun
16611.32Sitojun# _AC_PROG_LIBTOOL
16621.32Sitojun# ----------------
16631.32SitojunAC_DEFUN([_AC_PROG_LIBTOOL],
16641.32Sitojun[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
16651.32SitojunAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
16661.32SitojunAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
16671.51SlukemAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
16681.51Slukem
16691.51Slukem# This can be used to rebuild libtool when needed
16701.32SitojunLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
16711.32Sitojun
16721.32Sitojun# Always use our own libtool.
16731.32SitojunLIBTOOL='$(SHELL) $(top_builddir)/libtool'
16741.32SitojunAC_SUBST(LIBTOOL)dnl
16751.32Sitojun
16761.32Sitojun# Prevent multiple expansion
16771.32Sitojundefine([AC_PROG_LIBTOOL], [])
16781.32Sitojun])# _AC_PROG_LIBTOOL
16791.32Sitojun
16801.32Sitojun
16811.32Sitojun# AC_LIBTOOL_SETUP
16821.43Sitojun# ----------------
16831.43SitojunAC_DEFUN([AC_LIBTOOL_SETUP],
16841.32Sitojun[AC_PREREQ(2.50)dnl
16851.32SitojunAC_REQUIRE([AC_ENABLE_SHARED])dnl
16861.32SitojunAC_REQUIRE([AC_ENABLE_STATIC])dnl
16871.70SchristosAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
16881.70SchristosAC_REQUIRE([AC_CANONICAL_HOST])dnl
16891.32SitojunAC_REQUIRE([AC_CANONICAL_BUILD])dnl
16901.32SitojunAC_REQUIRE([AC_PROG_CC])dnl
16911.70SchristosAC_REQUIRE([AC_PROG_LD])dnl
16921.32SitojunAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
16931.47SitojunAC_REQUIRE([AC_PROG_NM])dnl
16941.70Schristos
16951.70SchristosAC_REQUIRE([AC_PROG_LN_S])dnl
16961.47SitojunAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
16971.32Sitojun# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
16981.32SitojunAC_REQUIRE([AC_OBJEXT])dnl
16991.70SchristosAC_REQUIRE([AC_EXEEXT])dnl
17001.70Schristosdnl
17011.32SitojunAC_LIBTOOL_SYS_MAX_CMD_LEN
17021.32SitojunAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
17031.70SchristosAC_LIBTOOL_OBJDIR
17041.32Sitojun
17051.70SchristosAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
17061.35Sitojun_LT_AC_PROG_ECHO_BACKSLASH
17071.32Sitojun
17081.32Sitojuncase $host_os in
17091.70Schristosaix3*)
17101.32Sitojun  # AIX sometimes has problems with the GCC collect2 program.  For some
17111.32Sitojun  # reason, if we set the COLLECT_NAMES environment variable, the problems
17121.32Sitojun  # vanish in a puff of smoke.
17131.70Schristos  if test "X${COLLECT_NAMES+set}" != Xset; then
17141.32Sitojun    COLLECT_NAMES=
17151.35Sitojun    export COLLECT_NAMES
17161.32Sitojun  fi
17171.35Sitojun  ;;
17181.32Sitojunesac
17191.32Sitojun
17201.70Schristos# Sed substitution that helps us do robust quoting.  It backslashifies
17211.57Sitojun# metacharacters that are still active within double-quoted strings.
17221.32SitojunXsed='sed -e 1s/^X//'
17231.32Sitojun[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
17241.32Sitojun
17251.32Sitojun# Same as above, but do not quote variable references.
17261.32Sitojun[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
17271.32Sitojun
17281.32Sitojun# Sed substitution to delay expansion of an escaped shell variable in a
17291.32Sitojun# double_quote_subst'ed string.
17301.32Sitojundelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
17311.32Sitojun
17321.32Sitojun# Sed substitution to avoid accidental globbing in evaled expressions
17331.32Sitojunno_glob_subst='s/\*/\\\*/g'
17341.32Sitojun
17351.32Sitojun# Constants:
17361.32Sitojunrm="rm -f"
17371.32Sitojun
17381.32Sitojun# Global variables:
17391.32Sitojundefault_ofile=libtool
17401.32Sitojuncan_build_shared=yes
17411.32Sitojun
17421.32Sitojun# All known linkers require a `.a' archive for static linking (except MSVC,
17431.32Sitojun# which needs '.lib').
17441.32Sitojunlibext=a
17451.32Sitojunltmain="$ac_aux_dir/ltmain.sh"
17461.32Sitojunofile="$default_ofile"
17471.32Sitojunwith_gnu_ld="$lt_cv_prog_gnu_ld"
17481.32Sitojun
17491.32SitojunAC_CHECK_TOOL(AR, ar, false)
17501.70SchristosAC_CHECK_TOOL(RANLIB, ranlib, :)
17511.32SitojunAC_CHECK_TOOL(STRIP, strip, :)
17521.70Schristos
17531.32Sitojunold_CC="$CC"
17541.32Sitojunold_CFLAGS="$CFLAGS"
17551.32Sitojun
17561.32Sitojun# Set sane defaults for various variables
17571.32Sitojuntest -z "$AR" && AR=ar
17581.32Sitojuntest -z "$AR_FLAGS" && AR_FLAGS=cru
17591.32Sitojuntest -z "$AS" && AS=as
17601.32Sitojuntest -z "$CC" && CC=cc
17611.32Sitojuntest -z "$LTCC" && LTCC=$CC
17621.73Stsarnatest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
17631.32Sitojuntest -z "$DLLTOOL" && DLLTOOL=dlltool
17641.32Sitojuntest -z "$LD" && LD=ld
17651.51Slukemtest -z "$LN_S" && LN_S="ln -s"
17661.32Sitojuntest -z "$MAGIC_CMD" && MAGIC_CMD=file
17671.32Sitojuntest -z "$NM" && NM=nm
17681.32Sitojuntest -z "$SED" && SED=sed
17691.71Schristostest -z "$OBJDUMP" && OBJDUMP=objdump
17701.51Slukemtest -z "$RANLIB" && RANLIB=:
17711.51Slukemtest -z "$STRIP" && STRIP=:
17721.51Slukemtest -z "$ac_objext" && ac_objext=o
17731.51Slukem
17741.51Slukem# Determine commands to create old-style static archives.
17751.32Sitojunold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
17761.32Sitojunold_postinstall_cmds='chmod 644 $oldlib'
17771.32Sitojunold_postuninstall_cmds=
17781.32Sitojun
17791.32Sitojunif test -n "$RANLIB"; then
17801.32Sitojun  case $host_os in
17811.32Sitojun  openbsd*)
17821.32Sitojun    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
17831.32Sitojun    ;;
17841.32Sitojun  *)
17851.32Sitojun    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
17861.32Sitojun    ;;
17871.70Schristos  esac
17881.70Schristos  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
17891.70Schristosfi
17901.70Schristos
17911.32Sitojun_LT_CC_BASENAME([$compiler])
17921.32Sitojun
17931.32Sitojun# Only perform the check for file, if the check method requires it
17941.32Sitojuncase $deplibs_check_method in
17951.32Sitojunfile_magic*)
17961.32Sitojun  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
17971.70Schristos    AC_PATH_MAGIC
17981.70Schristos  fi
17991.73Stsarna  ;;
18001.32Sitojunesac
18011.32Sitojun
18021.32Sitojun_LT_REQUIRED_DARWIN_CHECKS
18031.32Sitojun
18041.32SitojunAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
18051.32SitojunAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
18061.32Sitojunenable_win32_dll=yes, enable_win32_dll=no)
18071.32Sitojun
18081.32SitojunAC_ARG_ENABLE([libtool-lock],
18091.32Sitojun    [AC_HELP_STRING([--disable-libtool-lock],
18101.32Sitojun	[avoid locking (might break parallel builds)])])
18111.70Schristostest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
18121.70Schristos
18131.32SitojunAC_ARG_WITH([pic],
18141.32Sitojun    [AC_HELP_STRING([--with-pic],
18151.70Schristos	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
18161.32Sitojun    [pic_mode="$withval"],
18171.32Sitojun    [pic_mode=default])
18181.32Sitojuntest -z "$pic_mode" && pic_mode=default
18191.70Schristos
18201.73Stsarna# Use C for the default configuration in the libtool script
18211.70Schristostagname=
18221.32SitojunAC_LIBTOOL_LANG_C_CONFIG
18231.32Sitojun_LT_AC_TAGCONFIG
18241.32Sitojun])# AC_LIBTOOL_SETUP
18251.32Sitojun
18261.32Sitojun
18271.32Sitojun# _LT_AC_SYS_COMPILER
18281.32Sitojun# -------------------
18291.32SitojunAC_DEFUN([_LT_AC_SYS_COMPILER],
18301.32Sitojun[AC_REQUIRE([AC_PROG_CC])dnl
18311.32Sitojun
18321.32Sitojun# If no C compiler was specified, use CC.
18331.32SitojunLTCC=${LTCC-"$CC"}
18341.32Sitojun
18351.32Sitojun# If no C compiler flags were specified, use CFLAGS.
18361.32SitojunLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
18371.32Sitojun
18381.70Schristos# Allow CC to be a program name with arguments.
18391.32Sitojuncompiler=$CC
18401.32Sitojun])# _LT_AC_SYS_COMPILER
18411.32Sitojun
18421.32Sitojun
18431.32Sitojun# _LT_CC_BASENAME(CC)
18441.32Sitojun# -------------------
18451.32Sitojun# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
18461.32SitojunAC_DEFUN([_LT_CC_BASENAME],
18471.32Sitojun[for cc_temp in $1""; do
18481.32Sitojun  case $cc_temp in
18491.32Sitojun    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
18501.32Sitojun    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
18511.32Sitojun    \-*) ;;
18521.32Sitojun    *) break;;
18531.32Sitojun  esac
18541.32Sitojundone
18551.32Sitojuncc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
18561.32Sitojun])
18571.32Sitojun
18581.32Sitojun
18591.32Sitojun# _LT_COMPILER_BOILERPLATE
18601.32Sitojun# ------------------------
18611.32Sitojun# Check for compiler boilerplate output or warnings with
18621.32Sitojun# the simple compiler test code.
18631.70SchristosAC_DEFUN([_LT_COMPILER_BOILERPLATE],
18641.32Sitojun[AC_REQUIRE([LT_AC_PROG_SED])dnl
18651.32Sitojunac_outfile=conftest.$ac_objext
18661.32Sitojunecho "$lt_simple_compile_test_code" >conftest.$ac_ext
18671.32Sitojuneval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
18681.32Sitojun_lt_compiler_boilerplate=`cat conftest.err`
18691.32Sitojun$rm conftest*
18701.32Sitojun])# _LT_COMPILER_BOILERPLATE
18711.32Sitojun
18721.32Sitojun
18731.32Sitojun# _LT_LINKER_BOILERPLATE
18741.70Schristos# ----------------------
18751.73Stsarna# Check for linker boilerplate output or warnings with
18761.70Schristos# the simple link test code.
18771.32SitojunAC_DEFUN([_LT_LINKER_BOILERPLATE],
18781.32Sitojun[AC_REQUIRE([LT_AC_PROG_SED])dnl
18791.32Sitojunac_outfile=conftest.$ac_objext
18801.32Sitojunecho "$lt_simple_link_test_code" >conftest.$ac_ext
18811.32Sitojuneval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
18821.32Sitojun_lt_linker_boilerplate=`cat conftest.err`
18831.32Sitojun$rm -r conftest*
18841.32Sitojun])# _LT_LINKER_BOILERPLATE
18851.32Sitojun
18861.32Sitojun# _LT_REQUIRED_DARWIN_CHECKS
18871.32Sitojun# --------------------------
18881.32Sitojun# Check for some things on darwin
18891.32SitojunAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
18901.32Sitojun  case $host_os in
18911.32Sitojun    rhapsody* | darwin*)
18921.32Sitojun    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
18931.70Schristos    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
18941.32Sitojun
18951.32Sitojun    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
18961.32Sitojun      [lt_cv_apple_cc_single_mod=no
18971.32Sitojun      if test -z "${LT_MULTI_MODULE}"; then
18981.32Sitojun   # By default we will add the -single_module flag. You can override
18991.32Sitojun   # by either setting the environment variable LT_MULTI_MODULE
19001.32Sitojun   # non-empty at configure time, or by adding -multi_module to the
19011.73Stsarna   # link flags.
19021.70Schristos   echo "int foo(void){return 1;}" > conftest.c
19031.32Sitojun   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
19041.32Sitojun     -dynamiclib ${wl}-single_module conftest.c
19051.32Sitojun   if test -f libconftest.dylib; then
19061.32Sitojun     lt_cv_apple_cc_single_mod=yes
19071.51Slukem     rm -rf libconftest.dylib*
19081.51Slukem   fi
19091.51Slukem   rm conftest.c
19101.32Sitojun      fi])
19111.32Sitojun    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
19121.70Schristos      [lt_cv_ld_exported_symbols_list],
19131.32Sitojun      [lt_cv_ld_exported_symbols_list=no
19141.32Sitojun      save_LDFLAGS=$LDFLAGS
19151.32Sitojun      echo "_main" > conftest.sym
19161.32Sitojun      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
19171.32Sitojun      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
19181.32Sitojun   [lt_cv_ld_exported_symbols_list=yes],
19191.32Sitojun   [lt_cv_ld_exported_symbols_list=no])
19201.32Sitojun   LDFLAGS="$save_LDFLAGS"
19211.32Sitojun    ])
19221.63Sitojun    case $host_os in
19231.32Sitojun    rhapsody* | darwin1.[[0123]])
19241.70Schristos      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
19251.32Sitojun    darwin1.*)
19261.40Sitojun     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19271.32Sitojun    darwin*)
19281.32Sitojun      # if running on 10.5 or later, the deployment target defaults
19291.32Sitojun      # to the OS version, if on x86, and 10.4, the deployment
19301.32Sitojun      # target defaults to 10.4. Don't you love it?
19311.32Sitojun      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
19321.32Sitojun   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
19331.32Sitojun     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19341.63Sitojun   10.[[012]]*)
19351.32Sitojun     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
19361.70Schristos   10.*)
19371.32Sitojun     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
19381.54Sitojun      esac
19391.32Sitojun    ;;
19401.70Schristos  esac
19411.32Sitojun    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1942      _lt_dar_single_mod='$single_module'
1943    fi
1944    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1945      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1946    else
1947      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
1948    fi
1949    if test "$DSYMUTIL" != ":"; then
1950      _lt_dsymutil="~$DSYMUTIL \$lib || :"
1951    else
1952      _lt_dsymutil=
1953    fi
1954    ;;
1955  esac
1956])
1957
1958# _LT_AC_SYS_LIBPATH_AIX
1959# ----------------------
1960# Links a minimal program and checks the executable
1961# for the system default hardcoded library path. In most cases,
1962# this is /usr/lib:/lib, but when the MPI compilers are used
1963# the location of the communication and MPI libs are included too.
1964# If we don't find anything, use the default library path according
1965# to the aix ld manual.
1966AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1967[AC_REQUIRE([LT_AC_PROG_SED])dnl
1968AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1969lt_aix_libpath_sed='
1970    /Import File Strings/,/^$/ {
1971	/^0/ {
1972	    s/^0  *\(.*\)$/\1/
1973	    p
1974	}
1975    }'
1976aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1977# Check for a 64-bit object if we didn't find anything.
1978if test -z "$aix_libpath"; then
1979  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1980fi],[])
1981if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1982])# _LT_AC_SYS_LIBPATH_AIX
1983
1984
1985# _LT_AC_SHELL_INIT(ARG)
1986# ----------------------
1987AC_DEFUN([_LT_AC_SHELL_INIT],
1988[ifdef([AC_DIVERSION_NOTICE],
1989	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1990	 [AC_DIVERT_PUSH(NOTICE)])
1991$1
1992AC_DIVERT_POP
1993])# _LT_AC_SHELL_INIT
1994
1995
1996# _LT_AC_PROG_ECHO_BACKSLASH
1997# --------------------------
1998# Add some code to the start of the generated configure script which
1999# will find an echo command which doesn't interpret backslashes.
2000AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
2001[_LT_AC_SHELL_INIT([
2002# Check that we are running under the correct shell.
2003SHELL=${CONFIG_SHELL-/bin/sh}
2004
2005case X$ECHO in
2006X*--fallback-echo)
2007  # Remove one level of quotation (which was required for Make).
2008  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2009  ;;
2010esac
2011
2012echo=${ECHO-echo}
2013if test "X[$]1" = X--no-reexec; then
2014  # Discard the --no-reexec flag, and continue.
2015  shift
2016elif test "X[$]1" = X--fallback-echo; then
2017  # Avoid inline document here, it may be left over
2018  :
2019elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
2020  # Yippee, $echo works!
2021  :
2022else
2023  # Restart under the correct shell.
2024  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2025fi
2026
2027if test "X[$]1" = X--fallback-echo; then
2028  # used as fallback echo
2029  shift
2030  cat <<EOF
2031[$]*
2032EOF
2033  exit 0
2034fi
2035
2036# The HP-UX ksh and POSIX shell print the target directory to stdout
2037# if CDPATH is set.
2038(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2039
2040if test -z "$ECHO"; then
2041if test "X${echo_test_string+set}" != Xset; then
2042# find a string as large as possible, as long as the shell can cope with it
2043  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2044    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2045    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
2046       echo_test_string=`eval $cmd` &&
2047       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
2048    then
2049      break
2050    fi
2051  done
2052fi
2053
2054if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2055   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2056   test "X$echo_testing_string" = "X$echo_test_string"; then
2057  :
2058else
2059  # The Solaris, AIX, and Digital Unix default echo programs unquote
2060  # backslashes.  This makes it impossible to quote backslashes using
2061  #   echo "$something" | sed 's/\\/\\\\/g'
2062  #
2063  # So, first we look for a working echo in the user's PATH.
2064
2065  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2066  for dir in $PATH /usr/ucb; do
2067    IFS="$lt_save_ifs"
2068    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2069       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2070       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2071       test "X$echo_testing_string" = "X$echo_test_string"; then
2072      echo="$dir/echo"
2073      break
2074    fi
2075  done
2076  IFS="$lt_save_ifs"
2077
2078  if test "X$echo" = Xecho; then
2079    # We didn't find a better echo, so look for alternatives.
2080    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
2081       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
2082       test "X$echo_testing_string" = "X$echo_test_string"; then
2083      # This shell has a builtin print -r that does the trick.
2084      echo='print -r'
2085    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
2086	 test "X$CONFIG_SHELL" != X/bin/ksh; then
2087      # If we have ksh, try running configure again with it.
2088      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2089      export ORIGINAL_CONFIG_SHELL
2090      CONFIG_SHELL=/bin/ksh
2091      export CONFIG_SHELL
2092      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2093    else
2094      # Try using printf.
2095      echo='printf %s\n'
2096      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2097	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2098	 test "X$echo_testing_string" = "X$echo_test_string"; then
2099	# Cool, printf works
2100	:
2101      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2102	   test "X$echo_testing_string" = 'X\t' &&
2103	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2104	   test "X$echo_testing_string" = "X$echo_test_string"; then
2105	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2106	export CONFIG_SHELL
2107	SHELL="$CONFIG_SHELL"
2108	export SHELL
2109	echo="$CONFIG_SHELL [$]0 --fallback-echo"
2110      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2111	   test "X$echo_testing_string" = 'X\t' &&
2112	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2113	   test "X$echo_testing_string" = "X$echo_test_string"; then
2114	echo="$CONFIG_SHELL [$]0 --fallback-echo"
2115      else
2116	# maybe with a smaller string...
2117	prev=:
2118
2119	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2120	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
2121	  then
2122	    break
2123	  fi
2124	  prev="$cmd"
2125	done
2126
2127	if test "$prev" != 'sed 50q "[$]0"'; then
2128	  echo_test_string=`eval $prev`
2129	  export echo_test_string
2130	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2131	else
2132	  # Oops.  We lost completely, so just stick with echo.
2133	  echo=echo
2134	fi
2135      fi
2136    fi
2137  fi
2138fi
2139fi
2140
2141# Copy echo and quote the copy suitably for passing to libtool from
2142# the Makefile, instead of quoting the original, which is used later.
2143ECHO=$echo
2144if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2145   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2146fi
2147
2148AC_SUBST(ECHO)
2149])])# _LT_AC_PROG_ECHO_BACKSLASH
2150
2151
2152# _LT_AC_LOCK
2153# -----------
2154AC_DEFUN([_LT_AC_LOCK],
2155[AC_ARG_ENABLE([libtool-lock],
2156    [AC_HELP_STRING([--disable-libtool-lock],
2157	[avoid locking (might break parallel builds)])])
2158test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2159
2160# Some flags need to be propagated to the compiler or linker for good
2161# libtool support.
2162case $host in
2163ia64-*-hpux*)
2164  # Find out which ABI we are using.
2165  echo 'int i;' > conftest.$ac_ext
2166  if AC_TRY_EVAL(ac_compile); then
2167    case `/usr/bin/file conftest.$ac_objext` in
2168    *ELF-32*)
2169      HPUX_IA64_MODE="32"
2170      ;;
2171    *ELF-64*)
2172      HPUX_IA64_MODE="64"
2173      ;;
2174    esac
2175  fi
2176  rm -rf conftest*
2177  ;;
2178*-*-irix6*)
2179  # Find out which ABI we are using.
2180  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2181  if AC_TRY_EVAL(ac_compile); then
2182   if test "$lt_cv_prog_gnu_ld" = yes; then
2183    case `/usr/bin/file conftest.$ac_objext` in
2184    *32-bit*)
2185      LD="${LD-ld} -melf32bsmip"
2186      ;;
2187    *N32*)
2188      LD="${LD-ld} -melf32bmipn32"
2189      ;;
2190    *64-bit*)
2191      LD="${LD-ld} -melf64bmip"
2192      ;;
2193    esac
2194   else
2195    case `/usr/bin/file conftest.$ac_objext` in
2196    *32-bit*)
2197      LD="${LD-ld} -32"
2198      ;;
2199    *N32*)
2200      LD="${LD-ld} -n32"
2201      ;;
2202    *64-bit*)
2203      LD="${LD-ld} -64"
2204      ;;
2205    esac
2206   fi
2207  fi
2208  rm -rf conftest*
2209  ;;
2210
2211x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2212s390*-*linux*|sparc*-*linux*)
2213  # Find out which ABI we are using.
2214  echo 'int i;' > conftest.$ac_ext
2215  if AC_TRY_EVAL(ac_compile); then
2216    case `/usr/bin/file conftest.o` in
2217    *32-bit*)
2218      case $host in
2219        x86_64-*kfreebsd*-gnu)
2220          LD="${LD-ld} -m elf_i386_fbsd"
2221          ;;
2222        x86_64-*linux*)
2223          LD="${LD-ld} -m elf_i386"
2224          ;;
2225        ppc64-*linux*|powerpc64-*linux*)
2226          LD="${LD-ld} -m elf32ppclinux"
2227          ;;
2228        s390x-*linux*)
2229          LD="${LD-ld} -m elf_s390"
2230          ;;
2231        sparc64-*linux*)
2232          LD="${LD-ld} -m elf32_sparc"
2233          ;;
2234      esac
2235      ;;
2236    *64-bit*)
2237      case $host in
2238        x86_64-*kfreebsd*-gnu)
2239          LD="${LD-ld} -m elf_x86_64_fbsd"
2240          ;;
2241        x86_64-*linux*)
2242          LD="${LD-ld} -m elf_x86_64"
2243          ;;
2244        ppc*-*linux*|powerpc*-*linux*)
2245          LD="${LD-ld} -m elf64ppc"
2246          ;;
2247        s390*-*linux*)
2248          LD="${LD-ld} -m elf64_s390"
2249          ;;
2250        sparc*-*linux*)
2251          LD="${LD-ld} -m elf64_sparc"
2252          ;;
2253      esac
2254      ;;
2255    esac
2256  fi
2257  rm -rf conftest*
2258  ;;
2259
2260*-*-sco3.2v5*)
2261  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2262  SAVE_CFLAGS="$CFLAGS"
2263  CFLAGS="$CFLAGS -belf"
2264  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2265    [AC_LANG_PUSH(C)
2266     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2267     AC_LANG_POP])
2268  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2269    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2270    CFLAGS="$SAVE_CFLAGS"
2271  fi
2272  ;;
2273sparc*-*solaris*)
2274  # Find out which ABI we are using.
2275  echo 'int i;' > conftest.$ac_ext
2276  if AC_TRY_EVAL(ac_compile); then
2277    case `/usr/bin/file conftest.o` in
2278    *64-bit*)
2279      case $lt_cv_prog_gnu_ld in
2280      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2281      *)
2282        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2283	  LD="${LD-ld} -64"
2284	fi
2285	;;
2286      esac
2287      ;;
2288    esac
2289  fi
2290  rm -rf conftest*
2291  ;;
2292
2293AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2294[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
2295  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
2296  AC_CHECK_TOOL(AS, as, false)
2297  AC_CHECK_TOOL(OBJDUMP, objdump, false)
2298  ;;
2299  ])
2300esac
2301
2302need_locks="$enable_libtool_lock"
2303
2304])# _LT_AC_LOCK
2305
2306
2307# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2308#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2309# ----------------------------------------------------------------
2310# Check whether the given compiler option works
2311AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
2312[AC_REQUIRE([LT_AC_PROG_SED])
2313AC_CACHE_CHECK([$1], [$2],
2314  [$2=no
2315  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2316   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2317   lt_compiler_flag="$3"
2318   # Insert the option either (1) after the last *FLAGS variable, or
2319   # (2) before a word containing "conftest.", or (3) at the end.
2320   # Note that $ac_compile itself does not contain backslashes and begins
2321   # with a dollar sign (not a hyphen), so the echo should work correctly.
2322   # The option is referenced via a variable to avoid confusing sed.
2323   lt_compile=`echo "$ac_compile" | $SED \
2324   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2325   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2326   -e 's:$: $lt_compiler_flag:'`
2327   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2328   (eval "$lt_compile" 2>conftest.err)
2329   ac_status=$?
2330   cat conftest.err >&AS_MESSAGE_LOG_FD
2331   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2332   if (exit $ac_status) && test -s "$ac_outfile"; then
2333     # The compiler can only warn and ignore the option if not recognized
2334     # So say no if there are warnings other than the usual output.
2335     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2336     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2337     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2338       $2=yes
2339     fi
2340   fi
2341   $rm conftest*
2342])
2343
2344if test x"[$]$2" = xyes; then
2345    ifelse([$5], , :, [$5])
2346else
2347    ifelse([$6], , :, [$6])
2348fi
2349])# AC_LIBTOOL_COMPILER_OPTION
2350
2351
2352# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2353#                          [ACTION-SUCCESS], [ACTION-FAILURE])
2354# ------------------------------------------------------------
2355# Check whether the given compiler option works
2356AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
2357[AC_REQUIRE([LT_AC_PROG_SED])dnl
2358AC_CACHE_CHECK([$1], [$2],
2359  [$2=no
2360   save_LDFLAGS="$LDFLAGS"
2361   LDFLAGS="$LDFLAGS $3"
2362   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2363   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2364     # The linker can only warn and ignore the option if not recognized
2365     # So say no if there are warnings
2366     if test -s conftest.err; then
2367       # Append any errors to the config.log.
2368       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2369       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2370       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2371       if diff conftest.exp conftest.er2 >/dev/null; then
2372         $2=yes
2373       fi
2374     else
2375       $2=yes
2376     fi
2377   fi
2378   $rm -r conftest*
2379   LDFLAGS="$save_LDFLAGS"
2380])
2381
2382if test x"[$]$2" = xyes; then
2383    ifelse([$4], , :, [$4])
2384else
2385    ifelse([$5], , :, [$5])
2386fi
2387])# AC_LIBTOOL_LINKER_OPTION
2388
2389
2390# AC_LIBTOOL_SYS_MAX_CMD_LEN
2391# --------------------------
2392AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
2393[# find the maximum length of command line arguments
2394AC_MSG_CHECKING([the maximum length of command line arguments])
2395AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2396  i=0
2397  teststring="ABCD"
2398
2399  case $build_os in
2400  msdosdjgpp*)
2401    # On DJGPP, this test can blow up pretty badly due to problems in libc
2402    # (any single argument exceeding 2000 bytes causes a buffer overrun
2403    # during glob expansion).  Even if it were fixed, the result of this
2404    # check would be larger than it should be.
2405    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2406    ;;
2407
2408  gnu*)
2409    # Under GNU Hurd, this test is not required because there is
2410    # no limit to the length of command line arguments.
2411    # Libtool will interpret -1 as no limit whatsoever
2412    lt_cv_sys_max_cmd_len=-1;
2413    ;;
2414
2415  cygwin* | mingw*)
2416    # On Win9x/ME, this test blows up -- it succeeds, but takes
2417    # about 5 minutes as the teststring grows exponentially.
2418    # Worse, since 9x/ME are not pre-emptively multitasking,
2419    # you end up with a "frozen" computer, even though with patience
2420    # the test eventually succeeds (with a max line length of 256k).
2421    # Instead, let's just punt: use the minimum linelength reported by
2422    # all of the supported platforms: 8192 (on NT/2K/XP).
2423    lt_cv_sys_max_cmd_len=8192;
2424    ;;
2425
2426  amigaos*)
2427    # On AmigaOS with pdksh, this test takes hours, literally.
2428    # So we just punt and use a minimum line length of 8192.
2429    lt_cv_sys_max_cmd_len=8192;
2430    ;;
2431
2432  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2433    # This has been around since 386BSD, at least.  Likely further.
2434    if test -x /sbin/sysctl; then
2435      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2436    elif test -x /usr/sbin/sysctl; then
2437      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2438    else
2439      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2440    fi
2441    # And add a safety zone
2442    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2443    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2444    ;;
2445
2446  interix*)
2447    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2448    lt_cv_sys_max_cmd_len=196608
2449    ;;
2450
2451  osf*)
2452    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2453    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2454    # nice to cause kernel panics so lets avoid the loop below.
2455    # First set a reasonable default.
2456    lt_cv_sys_max_cmd_len=16384
2457    #
2458    if test -x /sbin/sysconfig; then
2459      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2460        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2461      esac
2462    fi
2463    ;;
2464  sco3.2v5*)
2465    lt_cv_sys_max_cmd_len=102400
2466    ;;
2467  sysv5* | sco5v6* | sysv4.2uw2*)
2468    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2469    if test -n "$kargmax"; then
2470      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
2471    else
2472      lt_cv_sys_max_cmd_len=32768
2473    fi
2474    ;;
2475  *)
2476    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2477    if test -n "$lt_cv_sys_max_cmd_len"; then
2478      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2479      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2480    else
2481      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2482      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2483	       = "XX$teststring") >/dev/null 2>&1 &&
2484	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
2485	      lt_cv_sys_max_cmd_len=$new_result &&
2486	      test $i != 17 # 1/2 MB should be enough
2487      do
2488        i=`expr $i + 1`
2489        teststring=$teststring$teststring
2490      done
2491      teststring=
2492      # Add a significant safety factor because C++ compilers can tack on massive
2493      # amounts of additional arguments before passing them to the linker.
2494      # It appears as though 1/2 is a usable value.
2495      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2496    fi
2497    ;;
2498  esac
2499])
2500if test -n $lt_cv_sys_max_cmd_len ; then
2501  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2502else
2503  AC_MSG_RESULT(none)
2504fi
2505])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2506
2507
2508# _LT_AC_CHECK_DLFCN
2509# ------------------
2510AC_DEFUN([_LT_AC_CHECK_DLFCN],
2511[AC_CHECK_HEADERS(dlfcn.h)dnl
2512])# _LT_AC_CHECK_DLFCN
2513
2514
2515# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2516#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2517# ---------------------------------------------------------------------
2518AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2519[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2520if test "$cross_compiling" = yes; then :
2521  [$4]
2522else
2523  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2524  lt_status=$lt_dlunknown
2525  cat > conftest.$ac_ext <<EOF
2526[#line __oline__ "configure"
2527#include "confdefs.h"
2528
2529#if HAVE_DLFCN_H
2530#include <dlfcn.h>
2531#endif
2532
2533#include <stdio.h>
2534
2535#ifdef RTLD_GLOBAL
2536#  define LT_DLGLOBAL		RTLD_GLOBAL
2537#else
2538#  ifdef DL_GLOBAL
2539#    define LT_DLGLOBAL		DL_GLOBAL
2540#  else
2541#    define LT_DLGLOBAL		0
2542#  endif
2543#endif
2544
2545/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2546   find out it does not work in some platform. */
2547#ifndef LT_DLLAZY_OR_NOW
2548#  ifdef RTLD_LAZY
2549#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2550#  else
2551#    ifdef DL_LAZY
2552#      define LT_DLLAZY_OR_NOW		DL_LAZY
2553#    else
2554#      ifdef RTLD_NOW
2555#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2556#      else
2557#        ifdef DL_NOW
2558#          define LT_DLLAZY_OR_NOW	DL_NOW
2559#        else
2560#          define LT_DLLAZY_OR_NOW	0
2561#        endif
2562#      endif
2563#    endif
2564#  endif
2565#endif
2566
2567#ifdef __cplusplus
2568extern "C" void exit (int);
2569#endif
2570
2571void fnord() { int i=42;}
2572int main ()
2573{
2574  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2575  int status = $lt_dlunknown;
2576
2577  if (self)
2578    {
2579      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2580      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2581      /* dlclose (self); */
2582    }
2583  else
2584    puts (dlerror ());
2585
2586    exit (status);
2587}]
2588EOF
2589  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2590    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2591    lt_status=$?
2592    case x$lt_status in
2593      x$lt_dlno_uscore) $1 ;;
2594      x$lt_dlneed_uscore) $2 ;;
2595      x$lt_dlunknown|x*) $3 ;;
2596    esac
2597  else :
2598    # compilation failed
2599    $3
2600  fi
2601fi
2602rm -fr conftest*
2603])# _LT_AC_TRY_DLOPEN_SELF
2604
2605
2606# AC_LIBTOOL_DLOPEN_SELF
2607# ----------------------
2608AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2609[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2610if test "x$enable_dlopen" != xyes; then
2611  enable_dlopen=unknown
2612  enable_dlopen_self=unknown
2613  enable_dlopen_self_static=unknown
2614else
2615  lt_cv_dlopen=no
2616  lt_cv_dlopen_libs=
2617
2618  case $host_os in
2619  beos*)
2620    lt_cv_dlopen="load_add_on"
2621    lt_cv_dlopen_libs=
2622    lt_cv_dlopen_self=yes
2623    ;;
2624
2625  mingw* | pw32*)
2626    lt_cv_dlopen="LoadLibrary"
2627    lt_cv_dlopen_libs=
2628   ;;
2629
2630  cygwin*)
2631    lt_cv_dlopen="dlopen"
2632    lt_cv_dlopen_libs=
2633   ;;
2634
2635  darwin*)
2636  # if libdl is installed we need to link against it
2637    AC_CHECK_LIB([dl], [dlopen],
2638		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2639    lt_cv_dlopen="dyld"
2640    lt_cv_dlopen_libs=
2641    lt_cv_dlopen_self=yes
2642    ])
2643   ;;
2644
2645  *)
2646    AC_CHECK_FUNC([shl_load],
2647	  [lt_cv_dlopen="shl_load"],
2648      [AC_CHECK_LIB([dld], [shl_load],
2649	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2650	[AC_CHECK_FUNC([dlopen],
2651	      [lt_cv_dlopen="dlopen"],
2652	  [AC_CHECK_LIB([dl], [dlopen],
2653		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2654	    [AC_CHECK_LIB([svld], [dlopen],
2655		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2656	      [AC_CHECK_LIB([dld], [dld_link],
2657		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2658	      ])
2659	    ])
2660	  ])
2661	])
2662      ])
2663    ;;
2664  esac
2665
2666  if test "x$lt_cv_dlopen" != xno; then
2667    enable_dlopen=yes
2668  else
2669    enable_dlopen=no
2670  fi
2671
2672  case $lt_cv_dlopen in
2673  dlopen)
2674    save_CPPFLAGS="$CPPFLAGS"
2675    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2676
2677    save_LDFLAGS="$LDFLAGS"
2678    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2679
2680    save_LIBS="$LIBS"
2681    LIBS="$lt_cv_dlopen_libs $LIBS"
2682
2683    AC_CACHE_CHECK([whether a program can dlopen itself],
2684	  lt_cv_dlopen_self, [dnl
2685	  _LT_AC_TRY_DLOPEN_SELF(
2686	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2687	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2688    ])
2689
2690    if test "x$lt_cv_dlopen_self" = xyes; then
2691      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2692      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2693    	  lt_cv_dlopen_self_static, [dnl
2694	  _LT_AC_TRY_DLOPEN_SELF(
2695	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2696	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2697      ])
2698    fi
2699
2700    CPPFLAGS="$save_CPPFLAGS"
2701    LDFLAGS="$save_LDFLAGS"
2702    LIBS="$save_LIBS"
2703    ;;
2704  esac
2705
2706  case $lt_cv_dlopen_self in
2707  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2708  *) enable_dlopen_self=unknown ;;
2709  esac
2710
2711  case $lt_cv_dlopen_self_static in
2712  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2713  *) enable_dlopen_self_static=unknown ;;
2714  esac
2715fi
2716])# AC_LIBTOOL_DLOPEN_SELF
2717
2718
2719# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2720# ---------------------------------
2721# Check to see if options -c and -o are simultaneously supported by compiler
2722AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2723[AC_REQUIRE([LT_AC_PROG_SED])dnl
2724AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2725AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2726  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2727  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2728   $rm -r conftest 2>/dev/null
2729   mkdir conftest
2730   cd conftest
2731   mkdir out
2732   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2733
2734   lt_compiler_flag="-o out/conftest2.$ac_objext"
2735   # Insert the option either (1) after the last *FLAGS variable, or
2736   # (2) before a word containing "conftest.", or (3) at the end.
2737   # Note that $ac_compile itself does not contain backslashes and begins
2738   # with a dollar sign (not a hyphen), so the echo should work correctly.
2739   lt_compile=`echo "$ac_compile" | $SED \
2740   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2741   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2742   -e 's:$: $lt_compiler_flag:'`
2743   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2744   (eval "$lt_compile" 2>out/conftest.err)
2745   ac_status=$?
2746   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2747   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2748   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2749   then
2750     # The compiler can only warn and ignore the option if not recognized
2751     # So say no if there are warnings
2752     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2753     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2754     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2755       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2756     fi
2757   fi
2758   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2759   $rm conftest*
2760   # SGI C++ compiler will create directory out/ii_files/ for
2761   # template instantiation
2762   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2763   $rm out/* && rmdir out
2764   cd ..
2765   rmdir conftest
2766   $rm conftest*
2767])
2768])# AC_LIBTOOL_PROG_CC_C_O
2769
2770
2771# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2772# -----------------------------------------
2773# Check to see if we can do hard links to lock some files if needed
2774AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2775[AC_REQUIRE([_LT_AC_LOCK])dnl
2776
2777hard_links="nottested"
2778if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2779  # do not overwrite the value of need_locks provided by the user
2780  AC_MSG_CHECKING([if we can lock with hard links])
2781  hard_links=yes
2782  $rm conftest*
2783  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2784  touch conftest.a
2785  ln conftest.a conftest.b 2>&5 || hard_links=no
2786  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2787  AC_MSG_RESULT([$hard_links])
2788  if test "$hard_links" = no; then
2789    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2790    need_locks=warn
2791  fi
2792else
2793  need_locks=no
2794fi
2795])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2796
2797
2798# AC_LIBTOOL_OBJDIR
2799# -----------------
2800AC_DEFUN([AC_LIBTOOL_OBJDIR],
2801[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2802[rm -f .libs 2>/dev/null
2803mkdir .libs 2>/dev/null
2804if test -d .libs; then
2805  lt_cv_objdir=.libs
2806else
2807  # MS-DOS does not allow filenames that begin with a dot.
2808  lt_cv_objdir=_libs
2809fi
2810rmdir .libs 2>/dev/null])
2811objdir=$lt_cv_objdir
2812])# AC_LIBTOOL_OBJDIR
2813
2814
2815# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2816# ----------------------------------------------
2817# Check hardcoding attributes.
2818AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2819[AC_MSG_CHECKING([how to hardcode library paths into programs])
2820_LT_AC_TAGVAR(hardcode_action, $1)=
2821if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2822   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2823   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2824
2825  # We can hardcode non-existant directories.
2826  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2827     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2828     # have to relink, otherwise we might link with an installed library
2829     # when we should be linking with a yet-to-be-installed one
2830     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2831     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2832    # Linking always hardcodes the temporary library directory.
2833    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2834  else
2835    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2836    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2837  fi
2838else
2839  # We cannot hardcode anything, or else we can only hardcode existing
2840  # directories.
2841  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2842fi
2843AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2844
2845if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2846  # Fast installation is not supported
2847  enable_fast_install=no
2848elif test "$shlibpath_overrides_runpath" = yes ||
2849     test "$enable_shared" = no; then
2850  # Fast installation is not necessary
2851  enable_fast_install=needless
2852fi
2853])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2854
2855
2856# AC_LIBTOOL_SYS_LIB_STRIP
2857# ------------------------
2858AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2859[striplib=
2860old_striplib=
2861AC_MSG_CHECKING([whether stripping libraries is possible])
2862if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2863  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2864  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2865  AC_MSG_RESULT([yes])
2866else
2867# FIXME - insert some real tests, host_os isn't really good enough
2868  case $host_os in
2869   darwin*)
2870       if test -n "$STRIP" ; then
2871         striplib="$STRIP -x"
2872         old_striplib="$STRIP -S"
2873         AC_MSG_RESULT([yes])
2874       else
2875  AC_MSG_RESULT([no])
2876fi
2877       ;;
2878   *)
2879  AC_MSG_RESULT([no])
2880    ;;
2881  esac
2882fi
2883])# AC_LIBTOOL_SYS_LIB_STRIP
2884
2885
2886# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2887# -----------------------------
2888# PORTME Fill in your ld.so characteristics
2889AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2890[AC_REQUIRE([LT_AC_PROG_SED])dnl
2891AC_MSG_CHECKING([dynamic linker characteristics])
2892library_names_spec=
2893libname_spec='lib$name'
2894soname_spec=
2895shrext_cmds=".so"
2896postinstall_cmds=
2897postuninstall_cmds=
2898finish_cmds=
2899finish_eval=
2900shlibpath_var=
2901shlibpath_overrides_runpath=unknown
2902version_type=none
2903dynamic_linker="$host_os ld.so"
2904sys_lib_dlsearch_path_spec="/lib /usr/lib"
2905m4_if($1,[],[
2906if test "$GCC" = yes; then
2907  case $host_os in
2908    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2909    *) lt_awk_arg="/^libraries:/" ;;
2910  esac
2911  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2912  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
2913    # if the path contains ";" then we assume it to be the separator
2914    # otherwise default to the standard path separator (i.e. ":") - it is
2915    # assumed that no part of a normal pathname contains ";" but that should
2916    # okay in the real world where ";" in dirpaths is itself problematic.
2917    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2918  else
2919    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2920  fi
2921  # Ok, now we have the path, separated by spaces, we can step through it
2922  # and add multilib dir if necessary.
2923  lt_tmp_lt_search_path_spec=
2924  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2925  for lt_sys_path in $lt_search_path_spec; do
2926    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2927      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2928    else
2929      test -d "$lt_sys_path" && \
2930	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2931    fi
2932  done
2933  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
2934BEGIN {RS=" "; FS="/|\n";} {
2935  lt_foo="";
2936  lt_count=0;
2937  for (lt_i = NF; lt_i > 0; lt_i--) {
2938    if ($lt_i != "" && $lt_i != ".") {
2939      if ($lt_i == "..") {
2940        lt_count++;
2941      } else {
2942        if (lt_count == 0) {
2943          lt_foo="/" $lt_i lt_foo;
2944        } else {
2945          lt_count--;
2946        }
2947      }
2948    }
2949  }
2950  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2951  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2952}'`
2953  sys_lib_search_path_spec=`echo $lt_search_path_spec`
2954else
2955  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2956fi])
2957need_lib_prefix=unknown
2958hardcode_into_libs=no
2959
2960# when you set need_version to no, make sure it does not cause -set_version
2961# flags to be left without arguments
2962need_version=unknown
2963
2964case $host_os in
2965aix3*)
2966  version_type=linux
2967  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2968  shlibpath_var=LIBPATH
2969
2970  # AIX 3 has no versioning support, so we append a major version to the name.
2971  soname_spec='${libname}${release}${shared_ext}$major'
2972  ;;
2973
2974aix[[4-9]]*)
2975  version_type=linux
2976  need_lib_prefix=no
2977  need_version=no
2978  hardcode_into_libs=yes
2979  if test "$host_cpu" = ia64; then
2980    # AIX 5 supports IA64
2981    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2982    shlibpath_var=LD_LIBRARY_PATH
2983  else
2984    # With GCC up to 2.95.x, collect2 would create an import file
2985    # for dependence libraries.  The import file would start with
2986    # the line `#! .'.  This would cause the generated library to
2987    # depend on `.', always an invalid library.  This was fixed in
2988    # development snapshots of GCC prior to 3.0.
2989    case $host_os in
2990      aix4 | aix4.[[01]] | aix4.[[01]].*)
2991      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2992	   echo ' yes '
2993	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2994	:
2995      else
2996	can_build_shared=no
2997      fi
2998      ;;
2999    esac
3000    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3001    # soname into executable. Probably we can add versioning support to
3002    # collect2, so additional links can be useful in future.
3003    if test "$aix_use_runtimelinking" = yes; then
3004      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3005      # instead of lib<name>.a to let people know that these are not
3006      # typical AIX shared libraries.
3007      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3008    else
3009      # We preserve .a as extension for shared libraries through AIX4.2
3010      # and later when we are not doing run time linking.
3011      library_names_spec='${libname}${release}.a $libname.a'
3012      soname_spec='${libname}${release}${shared_ext}$major'
3013    fi
3014    shlibpath_var=LIBPATH
3015  fi
3016  ;;
3017
3018amigaos*)
3019  library_names_spec='$libname.ixlibrary $libname.a'
3020  # Create ${libname}_ixlibrary.a entries in /sys/libs.
3021  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3022  ;;
3023
3024beos*)
3025  library_names_spec='${libname}${shared_ext}'
3026  dynamic_linker="$host_os ld.so"
3027  shlibpath_var=LIBRARY_PATH
3028  ;;
3029
3030bsdi[[45]]*)
3031  version_type=linux
3032  need_version=no
3033  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3034  soname_spec='${libname}${release}${shared_ext}$major'
3035  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3036  shlibpath_var=LD_LIBRARY_PATH
3037  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3038  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3039  # the default ld.so.conf also contains /usr/contrib/lib and
3040  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3041  # libtool to hard-code these into programs
3042  ;;
3043
3044cygwin* | mingw* | pw32*)
3045  version_type=windows
3046  shrext_cmds=".dll"
3047  need_version=no
3048  need_lib_prefix=no
3049
3050  case $GCC,$host_os in
3051  yes,cygwin* | yes,mingw* | yes,pw32*)
3052    library_names_spec='$libname.dll.a'
3053    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3054    postinstall_cmds='base_file=`basename \${file}`~
3055      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
3056      dldir=$destdir/`dirname \$dlpath`~
3057      test -d \$dldir || mkdir -p \$dldir~
3058      $install_prog $dir/$dlname \$dldir/$dlname~
3059      chmod a+x \$dldir/$dlname'
3060    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3061      dlpath=$dir/\$dldll~
3062       $rm \$dlpath'
3063    shlibpath_overrides_runpath=yes
3064
3065    case $host_os in
3066    cygwin*)
3067      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3068      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3069      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3070      ;;
3071    mingw*)
3072      # MinGW DLLs use traditional 'lib' prefix
3073      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3074      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3075      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
3076        # It is most probably a Windows format PATH printed by
3077        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3078        # path with ; separators, and with drive letters. We can handle the
3079        # drive letters (cygwin fileutils understands them), so leave them,
3080        # especially as we might pass files found there to a mingw objdump,
3081        # which wouldn't understand a cygwinified path. Ahh.
3082        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3083      else
3084        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3085      fi
3086      ;;
3087    pw32*)
3088      # pw32 DLLs use 'pw' prefix rather than 'lib'
3089      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3090      ;;
3091    esac
3092    ;;
3093
3094  *)
3095    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3096    ;;
3097  esac
3098  dynamic_linker='Win32 ld.exe'
3099  # FIXME: first we should search . and the directory the executable is in
3100  shlibpath_var=PATH
3101  ;;
3102
3103darwin* | rhapsody*)
3104  dynamic_linker="$host_os dyld"
3105  version_type=darwin
3106  need_lib_prefix=no
3107  need_version=no
3108  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3109  soname_spec='${libname}${release}${major}$shared_ext'
3110  shlibpath_overrides_runpath=yes
3111  shlibpath_var=DYLD_LIBRARY_PATH
3112  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3113  m4_if([$1], [],[
3114  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
3115  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3116  ;;
3117
3118dgux*)
3119  version_type=linux
3120  need_lib_prefix=no
3121  need_version=no
3122  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3123  soname_spec='${libname}${release}${shared_ext}$major'
3124  shlibpath_var=LD_LIBRARY_PATH
3125  ;;
3126
3127freebsd1*)
3128  dynamic_linker=no
3129  ;;
3130
3131freebsd* | dragonfly*)
3132  # DragonFly does not have aout.  When/if they implement a new
3133  # versioning mechanism, adjust this.
3134  if test -x /usr/bin/objformat; then
3135    objformat=`/usr/bin/objformat`
3136  else
3137    case $host_os in
3138    freebsd[[123]]*) objformat=aout ;;
3139    *) objformat=elf ;;
3140    esac
3141  fi
3142  version_type=freebsd-$objformat
3143  case $version_type in
3144    freebsd-elf*)
3145      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3146      need_version=no
3147      need_lib_prefix=no
3148      ;;
3149    freebsd-*)
3150      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3151      need_version=yes
3152      ;;
3153  esac
3154  shlibpath_var=LD_LIBRARY_PATH
3155  case $host_os in
3156  freebsd2*)
3157    shlibpath_overrides_runpath=yes
3158    ;;
3159  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3160    shlibpath_overrides_runpath=yes
3161    hardcode_into_libs=yes
3162    ;;
3163  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3164  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3165    shlibpath_overrides_runpath=no
3166    hardcode_into_libs=yes
3167    ;;
3168  *) # from 4.6 on, and DragonFly
3169    shlibpath_overrides_runpath=yes
3170    hardcode_into_libs=yes
3171    ;;
3172  esac
3173  ;;
3174
3175gnu*)
3176  version_type=linux
3177  need_lib_prefix=no
3178  need_version=no
3179  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3180  soname_spec='${libname}${release}${shared_ext}$major'
3181  shlibpath_var=LD_LIBRARY_PATH
3182  hardcode_into_libs=yes
3183  ;;
3184
3185hpux9* | hpux10* | hpux11*)
3186  # Give a soname corresponding to the major version so that dld.sl refuses to
3187  # link against other versions.
3188  version_type=sunos
3189  need_lib_prefix=no
3190  need_version=no
3191  case $host_cpu in
3192  ia64*)
3193    shrext_cmds='.so'
3194    hardcode_into_libs=yes
3195    dynamic_linker="$host_os dld.so"
3196    shlibpath_var=LD_LIBRARY_PATH
3197    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3198    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3199    soname_spec='${libname}${release}${shared_ext}$major'
3200    if test "X$HPUX_IA64_MODE" = X32; then
3201      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3202    else
3203      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3204    fi
3205    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3206    ;;
3207   hppa*64*)
3208     shrext_cmds='.sl'
3209     hardcode_into_libs=yes
3210     dynamic_linker="$host_os dld.sl"
3211     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3212     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3213     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3214     soname_spec='${libname}${release}${shared_ext}$major'
3215     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3216     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3217     ;;
3218   *)
3219    shrext_cmds='.sl'
3220    dynamic_linker="$host_os dld.sl"
3221    shlibpath_var=SHLIB_PATH
3222    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3223    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3224    soname_spec='${libname}${release}${shared_ext}$major'
3225    ;;
3226  esac
3227  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3228  postinstall_cmds='chmod 555 $lib'
3229  ;;
3230
3231interix[[3-9]]*)
3232  version_type=linux
3233  need_lib_prefix=no
3234  need_version=no
3235  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3236  soname_spec='${libname}${release}${shared_ext}$major'
3237  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3238  shlibpath_var=LD_LIBRARY_PATH
3239  shlibpath_overrides_runpath=no
3240  hardcode_into_libs=yes
3241  ;;
3242
3243irix5* | irix6* | nonstopux*)
3244  case $host_os in
3245    nonstopux*) version_type=nonstopux ;;
3246    *)
3247	if test "$lt_cv_prog_gnu_ld" = yes; then
3248		version_type=linux
3249	else
3250		version_type=irix
3251	fi ;;
3252  esac
3253  need_lib_prefix=no
3254  need_version=no
3255  soname_spec='${libname}${release}${shared_ext}$major'
3256  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3257  case $host_os in
3258  irix5* | nonstopux*)
3259    libsuff= shlibsuff=
3260    ;;
3261  *)
3262    case $LD in # libtool.m4 will add one of these switches to LD
3263    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3264      libsuff= shlibsuff= libmagic=32-bit;;
3265    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3266      libsuff=32 shlibsuff=N32 libmagic=N32;;
3267    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3268      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3269    *) libsuff= shlibsuff= libmagic=never-match;;
3270    esac
3271    ;;
3272  esac
3273  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3274  shlibpath_overrides_runpath=no
3275  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3276  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3277  hardcode_into_libs=yes
3278  ;;
3279
3280# No shared lib support for Linux oldld, aout, or coff.
3281linux*oldld* | linux*aout* | linux*coff*)
3282  dynamic_linker=no
3283  ;;
3284
3285# This must be Linux ELF.
3286linux* | k*bsd*-gnu)
3287  version_type=linux
3288  need_lib_prefix=no
3289  need_version=no
3290  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3291  soname_spec='${libname}${release}${shared_ext}$major'
3292  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3293  shlibpath_var=LD_LIBRARY_PATH
3294  shlibpath_overrides_runpath=no
3295  # This implies no fast_install, which is unacceptable.
3296  # Some rework will be needed to allow for fast_install
3297  # before this can be enabled.
3298  hardcode_into_libs=yes
3299
3300  # Append ld.so.conf contents to the search path
3301  if test -f /etc/ld.so.conf; then
3302    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3303    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3304  fi
3305
3306  # We used to test for /lib/ld.so.1 and disable shared libraries on
3307  # powerpc, because MkLinux only supported shared libraries with the
3308  # GNU dynamic linker.  Since this was broken with cross compilers,
3309  # most powerpc-linux boxes support dynamic linking these days and
3310  # people can always --disable-shared, the test was removed, and we
3311  # assume the GNU/Linux dynamic linker is in use.
3312  dynamic_linker='GNU/Linux ld.so'
3313  ;;
3314
3315netbsd*)
3316  version_type=sunos
3317  need_lib_prefix=no
3318  need_version=no
3319  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3320    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3321    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3322    dynamic_linker='NetBSD (a.out) ld.so'
3323  else
3324    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3325    soname_spec='${libname}${release}${shared_ext}$major'
3326    dynamic_linker='NetBSD ld.elf_so'
3327  fi
3328  shlibpath_var=LD_LIBRARY_PATH
3329  shlibpath_overrides_runpath=yes
3330  hardcode_into_libs=yes
3331  ;;
3332
3333newsos6)
3334  version_type=linux
3335  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3336  shlibpath_var=LD_LIBRARY_PATH
3337  shlibpath_overrides_runpath=yes
3338  ;;
3339
3340nto-qnx*)
3341  version_type=linux
3342  need_lib_prefix=no
3343  need_version=no
3344  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3345  soname_spec='${libname}${release}${shared_ext}$major'
3346  shlibpath_var=LD_LIBRARY_PATH
3347  shlibpath_overrides_runpath=yes
3348  ;;
3349
3350openbsd*)
3351  version_type=sunos
3352  sys_lib_dlsearch_path_spec="/usr/lib"
3353  need_lib_prefix=no
3354  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3355  case $host_os in
3356    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3357    *)                         need_version=no  ;;
3358  esac
3359  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3360  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3361  shlibpath_var=LD_LIBRARY_PATH
3362  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3363    case $host_os in
3364      openbsd2.[[89]] | openbsd2.[[89]].*)
3365	shlibpath_overrides_runpath=no
3366	;;
3367      *)
3368	shlibpath_overrides_runpath=yes
3369	;;
3370      esac
3371  else
3372    shlibpath_overrides_runpath=yes
3373  fi
3374  ;;
3375
3376os2*)
3377  libname_spec='$name'
3378  shrext_cmds=".dll"
3379  need_lib_prefix=no
3380  library_names_spec='$libname${shared_ext} $libname.a'
3381  dynamic_linker='OS/2 ld.exe'
3382  shlibpath_var=LIBPATH
3383  ;;
3384
3385osf3* | osf4* | osf5*)
3386  version_type=osf
3387  need_lib_prefix=no
3388  need_version=no
3389  soname_spec='${libname}${release}${shared_ext}$major'
3390  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3391  shlibpath_var=LD_LIBRARY_PATH
3392  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3393  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3394  ;;
3395
3396rdos*)
3397  dynamic_linker=no
3398  ;;
3399
3400solaris*)
3401  version_type=linux
3402  need_lib_prefix=no
3403  need_version=no
3404  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3405  soname_spec='${libname}${release}${shared_ext}$major'
3406  shlibpath_var=LD_LIBRARY_PATH
3407  shlibpath_overrides_runpath=yes
3408  hardcode_into_libs=yes
3409  # ldd complains unless libraries are executable
3410  postinstall_cmds='chmod +x $lib'
3411  ;;
3412
3413sunos4*)
3414  version_type=sunos
3415  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3416  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3417  shlibpath_var=LD_LIBRARY_PATH
3418  shlibpath_overrides_runpath=yes
3419  if test "$with_gnu_ld" = yes; then
3420    need_lib_prefix=no
3421  fi
3422  need_version=yes
3423  ;;
3424
3425sysv4 | sysv4.3*)
3426  version_type=linux
3427  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3428  soname_spec='${libname}${release}${shared_ext}$major'
3429  shlibpath_var=LD_LIBRARY_PATH
3430  case $host_vendor in
3431    sni)
3432      shlibpath_overrides_runpath=no
3433      need_lib_prefix=no
3434      export_dynamic_flag_spec='${wl}-Blargedynsym'
3435      runpath_var=LD_RUN_PATH
3436      ;;
3437    siemens)
3438      need_lib_prefix=no
3439      ;;
3440    motorola)
3441      need_lib_prefix=no
3442      need_version=no
3443      shlibpath_overrides_runpath=no
3444      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3445      ;;
3446  esac
3447  ;;
3448
3449sysv4*MP*)
3450  if test -d /usr/nec ;then
3451    version_type=linux
3452    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3453    soname_spec='$libname${shared_ext}.$major'
3454    shlibpath_var=LD_LIBRARY_PATH
3455  fi
3456  ;;
3457
3458sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3459  version_type=freebsd-elf
3460  need_lib_prefix=no
3461  need_version=no
3462  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3463  soname_spec='${libname}${release}${shared_ext}$major'
3464  shlibpath_var=LD_LIBRARY_PATH
3465  hardcode_into_libs=yes
3466  if test "$with_gnu_ld" = yes; then
3467    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3468    shlibpath_overrides_runpath=no
3469  else
3470    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3471    shlibpath_overrides_runpath=yes
3472    case $host_os in
3473      sco3.2v5*)
3474        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3475	;;
3476    esac
3477  fi
3478  sys_lib_dlsearch_path_spec='/usr/lib'
3479  ;;
3480
3481uts4*)
3482  version_type=linux
3483  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3484  soname_spec='${libname}${release}${shared_ext}$major'
3485  shlibpath_var=LD_LIBRARY_PATH
3486  ;;
3487
3488*)
3489  dynamic_linker=no
3490  ;;
3491esac
3492AC_MSG_RESULT([$dynamic_linker])
3493test "$dynamic_linker" = no && can_build_shared=no
3494
3495AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
3496[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
3497sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3498AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
3499[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
3500sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3501
3502variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3503if test "$GCC" = yes; then
3504  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3505fi
3506])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3507
3508
3509# _LT_AC_TAGCONFIG
3510# ----------------
3511AC_DEFUN([_LT_AC_TAGCONFIG],
3512[AC_REQUIRE([LT_AC_PROG_SED])dnl
3513AC_ARG_WITH([tags],
3514    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3515        [include additional configurations @<:@automatic@:>@])],
3516    [tagnames="$withval"])
3517
3518if test -f "$ltmain" && test -n "$tagnames"; then
3519  if test ! -f "${ofile}"; then
3520    AC_MSG_WARN([output file `$ofile' does not exist])
3521  fi
3522
3523  if test -z "$LTCC"; then
3524    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3525    if test -z "$LTCC"; then
3526      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3527    else
3528      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3529    fi
3530  fi
3531  if test -z "$LTCFLAGS"; then
3532    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
3533  fi
3534
3535  # Extract list of available tagged configurations in $ofile.
3536  # Note that this assumes the entire list is on one line.
3537  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3538
3539  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3540  for tagname in $tagnames; do
3541    IFS="$lt_save_ifs"
3542    # Check whether tagname contains only valid characters
3543    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3544    "") ;;
3545    *)  AC_MSG_ERROR([invalid tag name: $tagname])
3546	;;
3547    esac
3548
3549    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3550    then
3551      AC_MSG_ERROR([tag name \"$tagname\" already exists])
3552    fi
3553
3554    # Update the list of available tags.
3555    if test -n "$tagname"; then
3556      echo appending configuration tag \"$tagname\" to $ofile
3557
3558      case $tagname in
3559      CXX)
3560	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3561	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3562	    (test "X$CXX" != "Xg++"))) ; then
3563	  AC_LIBTOOL_LANG_CXX_CONFIG
3564	else
3565	  tagname=""
3566	fi
3567	;;
3568
3569      F77)
3570	if test -n "$F77" && test "X$F77" != "Xno"; then
3571	  AC_LIBTOOL_LANG_F77_CONFIG
3572	else
3573	  tagname=""
3574	fi
3575	;;
3576
3577      GCJ)
3578	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3579	  AC_LIBTOOL_LANG_GCJ_CONFIG
3580	else
3581	  tagname=""
3582	fi
3583	;;
3584
3585      RC)
3586	AC_LIBTOOL_LANG_RC_CONFIG
3587	;;
3588
3589      *)
3590	AC_MSG_ERROR([Unsupported tag name: $tagname])
3591	;;
3592      esac
3593
3594      # Append the new tag name to the list of available tags.
3595      if test -n "$tagname" ; then
3596      available_tags="$available_tags $tagname"
3597    fi
3598    fi
3599  done
3600  IFS="$lt_save_ifs"
3601
3602  # Now substitute the updated list of available tags.
3603  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3604    mv "${ofile}T" "$ofile"
3605    chmod +x "$ofile"
3606  else
3607    rm -f "${ofile}T"
3608    AC_MSG_ERROR([unable to update list of available tagged configurations.])
3609  fi
3610fi
3611])# _LT_AC_TAGCONFIG
3612
3613
3614# AC_LIBTOOL_DLOPEN
3615# -----------------
3616# enable checks for dlopen support
3617AC_DEFUN([AC_LIBTOOL_DLOPEN],
3618 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3619])# AC_LIBTOOL_DLOPEN
3620
3621
3622# AC_LIBTOOL_WIN32_DLL
3623# --------------------
3624# declare package support for building win32 DLLs
3625AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3626[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3627])# AC_LIBTOOL_WIN32_DLL
3628
3629
3630# AC_ENABLE_SHARED([DEFAULT])
3631# ---------------------------
3632# implement the --enable-shared flag
3633# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3634AC_DEFUN([AC_ENABLE_SHARED],
3635[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3636AC_ARG_ENABLE([shared],
3637    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3638	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3639    [p=${PACKAGE-default}
3640    case $enableval in
3641    yes) enable_shared=yes ;;
3642    no) enable_shared=no ;;
3643    *)
3644      enable_shared=no
3645      # Look at the argument we got.  We use all the common list separators.
3646      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3647      for pkg in $enableval; do
3648	IFS="$lt_save_ifs"
3649	if test "X$pkg" = "X$p"; then
3650	  enable_shared=yes
3651	fi
3652      done
3653      IFS="$lt_save_ifs"
3654      ;;
3655    esac],
3656    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3657])# AC_ENABLE_SHARED
3658
3659
3660# AC_DISABLE_SHARED
3661# -----------------
3662# set the default shared flag to --disable-shared
3663AC_DEFUN([AC_DISABLE_SHARED],
3664[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3665AC_ENABLE_SHARED(no)
3666])# AC_DISABLE_SHARED
3667
3668
3669# AC_ENABLE_STATIC([DEFAULT])
3670# ---------------------------
3671# implement the --enable-static flag
3672# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3673AC_DEFUN([AC_ENABLE_STATIC],
3674[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3675AC_ARG_ENABLE([static],
3676    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3677	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3678    [p=${PACKAGE-default}
3679    case $enableval in
3680    yes) enable_static=yes ;;
3681    no) enable_static=no ;;
3682    *)
3683     enable_static=no
3684      # Look at the argument we got.  We use all the common list separators.
3685      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3686      for pkg in $enableval; do
3687	IFS="$lt_save_ifs"
3688	if test "X$pkg" = "X$p"; then
3689	  enable_static=yes
3690	fi
3691      done
3692      IFS="$lt_save_ifs"
3693      ;;
3694    esac],
3695    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3696])# AC_ENABLE_STATIC
3697
3698
3699# AC_DISABLE_STATIC
3700# -----------------
3701# set the default static flag to --disable-static
3702AC_DEFUN([AC_DISABLE_STATIC],
3703[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3704AC_ENABLE_STATIC(no)
3705])# AC_DISABLE_STATIC
3706
3707
3708# AC_ENABLE_FAST_INSTALL([DEFAULT])
3709# ---------------------------------
3710# implement the --enable-fast-install flag
3711# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3712AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3713[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3714AC_ARG_ENABLE([fast-install],
3715    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3716    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3717    [p=${PACKAGE-default}
3718    case $enableval in
3719    yes) enable_fast_install=yes ;;
3720    no) enable_fast_install=no ;;
3721    *)
3722      enable_fast_install=no
3723      # Look at the argument we got.  We use all the common list separators.
3724      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3725      for pkg in $enableval; do
3726	IFS="$lt_save_ifs"
3727	if test "X$pkg" = "X$p"; then
3728	  enable_fast_install=yes
3729	fi
3730      done
3731      IFS="$lt_save_ifs"
3732      ;;
3733    esac],
3734    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3735])# AC_ENABLE_FAST_INSTALL
3736
3737
3738# AC_DISABLE_FAST_INSTALL
3739# -----------------------
3740# set the default to --disable-fast-install
3741AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3742[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3743AC_ENABLE_FAST_INSTALL(no)
3744])# AC_DISABLE_FAST_INSTALL
3745
3746
3747# AC_LIBTOOL_PICMODE([MODE])
3748# --------------------------
3749# implement the --with-pic flag
3750# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3751AC_DEFUN([AC_LIBTOOL_PICMODE],
3752[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3753pic_mode=ifelse($#,1,$1,default)
3754])# AC_LIBTOOL_PICMODE
3755
3756
3757# AC_PROG_EGREP
3758# -------------
3759# This is predefined starting with Autoconf 2.54, so this conditional
3760# definition can be removed once we require Autoconf 2.54 or later.
3761m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3762[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3763   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3764    then ac_cv_prog_egrep='grep -E'
3765    else ac_cv_prog_egrep='egrep'
3766    fi])
3767 EGREP=$ac_cv_prog_egrep
3768 AC_SUBST([EGREP])
3769])])
3770
3771
3772# AC_PATH_TOOL_PREFIX
3773# -------------------
3774# find a file program which can recognize shared library
3775AC_DEFUN([AC_PATH_TOOL_PREFIX],
3776[AC_REQUIRE([AC_PROG_EGREP])dnl
3777AC_MSG_CHECKING([for $1])
3778AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3779[case $MAGIC_CMD in
3780[[\\/*] |  ?:[\\/]*])
3781  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3782  ;;
3783*)
3784  lt_save_MAGIC_CMD="$MAGIC_CMD"
3785  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3786dnl $ac_dummy forces splitting on constant user-supplied paths.
3787dnl POSIX.2 word splitting is done only on the output of word expansions,
3788dnl not every word.  This closes a longstanding sh security hole.
3789  ac_dummy="ifelse([$2], , $PATH, [$2])"
3790  for ac_dir in $ac_dummy; do
3791    IFS="$lt_save_ifs"
3792    test -z "$ac_dir" && ac_dir=.
3793    if test -f $ac_dir/$1; then
3794      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3795      if test -n "$file_magic_test_file"; then
3796	case $deplibs_check_method in
3797	"file_magic "*)
3798	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3799	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3800	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3801	    $EGREP "$file_magic_regex" > /dev/null; then
3802	    :
3803	  else
3804	    cat <<EOF 1>&2
3805
3806*** Warning: the command libtool uses to detect shared libraries,
3807*** $file_magic_cmd, produces output that libtool cannot recognize.
3808*** The result is that libtool may fail to recognize shared libraries
3809*** as such.  This will affect the creation of libtool libraries that
3810*** depend on shared libraries, but programs linked with such libtool
3811*** libraries will work regardless of this problem.  Nevertheless, you
3812*** may want to report the problem to your system manager and/or to
3813*** bug-libtool@gnu.org
3814
3815EOF
3816	  fi ;;
3817	esac
3818      fi
3819      break
3820    fi
3821  done
3822  IFS="$lt_save_ifs"
3823  MAGIC_CMD="$lt_save_MAGIC_CMD"
3824  ;;
3825esac])
3826MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3827if test -n "$MAGIC_CMD"; then
3828  AC_MSG_RESULT($MAGIC_CMD)
3829else
3830  AC_MSG_RESULT(no)
3831fi
3832])# AC_PATH_TOOL_PREFIX
3833
3834
3835# AC_PATH_MAGIC
3836# -------------
3837# find a file program which can recognize a shared library
3838AC_DEFUN([AC_PATH_MAGIC],
3839[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3840if test -z "$lt_cv_path_MAGIC_CMD"; then
3841  if test -n "$ac_tool_prefix"; then
3842    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3843  else
3844    MAGIC_CMD=:
3845  fi
3846fi
3847])# AC_PATH_MAGIC
3848
3849
3850# AC_PROG_LD
3851# ----------
3852# find the pathname to the GNU or non-GNU linker
3853AC_DEFUN([AC_PROG_LD],
3854[AC_ARG_WITH([gnu-ld],
3855    [AC_HELP_STRING([--with-gnu-ld],
3856	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3857    [test "$withval" = no || with_gnu_ld=yes],
3858    [with_gnu_ld=no])
3859AC_REQUIRE([LT_AC_PROG_SED])dnl
3860AC_REQUIRE([AC_PROG_CC])dnl
3861AC_REQUIRE([AC_CANONICAL_HOST])dnl
3862AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3863ac_prog=ld
3864if test "$GCC" = yes; then
3865  # Check if gcc -print-prog-name=ld gives a path.
3866  AC_MSG_CHECKING([for ld used by $CC])
3867  case $host in
3868  *-*-mingw*)
3869    # gcc leaves a trailing carriage return which upsets mingw
3870    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3871  *)
3872    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3873  esac
3874  case $ac_prog in
3875    # Accept absolute paths.
3876    [[\\/]]* | ?:[[\\/]]*)
3877      re_direlt='/[[^/]][[^/]]*/\.\./'
3878      # Canonicalize the pathname of ld
3879      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3880      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3881	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3882      done
3883      test -z "$LD" && LD="$ac_prog"
3884      ;;
3885  "")
3886    # If it fails, then pretend we aren't using GCC.
3887    ac_prog=ld
3888    ;;
3889  *)
3890    # If it is relative, then search for the first ld in PATH.
3891    with_gnu_ld=unknown
3892    ;;
3893  esac
3894elif test "$with_gnu_ld" = yes; then
3895  AC_MSG_CHECKING([for GNU ld])
3896else
3897  AC_MSG_CHECKING([for non-GNU ld])
3898fi
3899AC_CACHE_VAL(lt_cv_path_LD,
3900[if test -z "$LD"; then
3901  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3902  for ac_dir in $PATH; do
3903    IFS="$lt_save_ifs"
3904    test -z "$ac_dir" && ac_dir=.
3905    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3906      lt_cv_path_LD="$ac_dir/$ac_prog"
3907      # Check to see if the program is GNU ld.  I'd rather use --version,
3908      # but apparently some variants of GNU ld only accept -v.
3909      # Break only if it was the GNU/non-GNU ld that we prefer.
3910      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3911      *GNU* | *'with BFD'*)
3912	test "$with_gnu_ld" != no && break
3913	;;
3914      *)
3915	test "$with_gnu_ld" != yes && break
3916	;;
3917      esac
3918    fi
3919  done
3920  IFS="$lt_save_ifs"
3921else
3922  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3923fi])
3924LD="$lt_cv_path_LD"
3925if test -n "$LD"; then
3926  AC_MSG_RESULT($LD)
3927else
3928  AC_MSG_RESULT(no)
3929fi
3930test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3931AC_PROG_LD_GNU
3932])# AC_PROG_LD
3933
3934
3935# AC_PROG_LD_GNU
3936# --------------
3937AC_DEFUN([AC_PROG_LD_GNU],
3938[AC_REQUIRE([AC_PROG_EGREP])dnl
3939AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3940[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3941case `$LD -v 2>&1 </dev/null` in
3942*GNU* | *'with BFD'*)
3943  lt_cv_prog_gnu_ld=yes
3944  ;;
3945*)
3946  lt_cv_prog_gnu_ld=no
3947  ;;
3948esac])
3949with_gnu_ld=$lt_cv_prog_gnu_ld
3950])# AC_PROG_LD_GNU
3951
3952
3953# AC_PROG_LD_RELOAD_FLAG
3954# ----------------------
3955# find reload flag for linker
3956#   -- PORTME Some linkers may need a different reload flag.
3957AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3958[AC_CACHE_CHECK([for $LD option to reload object files],
3959  lt_cv_ld_reload_flag,
3960  [lt_cv_ld_reload_flag='-r'])
3961reload_flag=$lt_cv_ld_reload_flag
3962case $reload_flag in
3963"" | " "*) ;;
3964*) reload_flag=" $reload_flag" ;;
3965esac
3966reload_cmds='$LD$reload_flag -o $output$reload_objs'
3967case $host_os in
3968  darwin*)
3969    if test "$GCC" = yes; then
3970      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3971    else
3972      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3973    fi
3974    ;;
3975esac
3976])# AC_PROG_LD_RELOAD_FLAG
3977
3978
3979# AC_DEPLIBS_CHECK_METHOD
3980# -----------------------
3981# how to check for library dependencies
3982#  -- PORTME fill in with the dynamic library characteristics
3983AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3984[AC_CACHE_CHECK([how to recognize dependent libraries],
3985lt_cv_deplibs_check_method,
3986[lt_cv_file_magic_cmd='$MAGIC_CMD'
3987lt_cv_file_magic_test_file=
3988lt_cv_deplibs_check_method='unknown'
3989# Need to set the preceding variable on all platforms that support
3990# interlibrary dependencies.
3991# 'none' -- dependencies not supported.
3992# `unknown' -- same as none, but documents that we really don't know.
3993# 'pass_all' -- all dependencies passed with no checks.
3994# 'test_compile' -- check by making test program.
3995# 'file_magic [[regex]]' -- check by looking for files in library path
3996# which responds to the $file_magic_cmd with a given extended regex.
3997# If you have `file' or equivalent on your system and you're not sure
3998# whether `pass_all' will *always* work, you probably want this one.
3999
4000case $host_os in
4001aix[[4-9]]*)
4002  lt_cv_deplibs_check_method=pass_all
4003  ;;
4004
4005beos*)
4006  lt_cv_deplibs_check_method=pass_all
4007  ;;
4008
4009bsdi[[45]]*)
4010  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4011  lt_cv_file_magic_cmd='/usr/bin/file -L'
4012  lt_cv_file_magic_test_file=/shlib/libc.so
4013  ;;
4014
4015cygwin*)
4016  # func_win32_libid is a shell function defined in ltmain.sh
4017  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4018  lt_cv_file_magic_cmd='func_win32_libid'
4019  ;;
4020
4021mingw* | pw32*)
4022  # Base MSYS/MinGW do not provide the 'file' command needed by
4023  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4024  # unless we find 'file', for example because we are cross-compiling.
4025  if ( file / ) >/dev/null 2>&1; then
4026    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4027    lt_cv_file_magic_cmd='func_win32_libid'
4028  else
4029    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4030    lt_cv_file_magic_cmd='$OBJDUMP -f'
4031  fi
4032  ;;
4033
4034darwin* | rhapsody*)
4035  lt_cv_deplibs_check_method=pass_all
4036  ;;
4037
4038freebsd* | dragonfly*)
4039  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4040    case $host_cpu in
4041    i*86 )
4042      # Not sure whether the presence of OpenBSD here was a mistake.
4043      # Let's accept both of them until this is cleared up.
4044      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4045      lt_cv_file_magic_cmd=/usr/bin/file
4046      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4047      ;;
4048    esac
4049  else
4050    lt_cv_deplibs_check_method=pass_all
4051  fi
4052  ;;
4053
4054gnu*)
4055  lt_cv_deplibs_check_method=pass_all
4056  ;;
4057
4058hpux10.20* | hpux11*)
4059  lt_cv_file_magic_cmd=/usr/bin/file
4060  case $host_cpu in
4061  ia64*)
4062    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4063    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4064    ;;
4065  hppa*64*)
4066    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
4067    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4068    ;;
4069  *)
4070    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4071    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4072    ;;
4073  esac
4074  ;;
4075
4076interix[[3-9]]*)
4077  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4078  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4079  ;;
4080
4081irix5* | irix6* | nonstopux*)
4082  case $LD in
4083  *-32|*"-32 ") libmagic=32-bit;;
4084  *-n32|*"-n32 ") libmagic=N32;;
4085  *-64|*"-64 ") libmagic=64-bit;;
4086  *) libmagic=never-match;;
4087  esac
4088  lt_cv_deplibs_check_method=pass_all
4089  ;;
4090
4091# This must be Linux ELF.
4092linux* | k*bsd*-gnu)
4093  lt_cv_deplibs_check_method=pass_all
4094  ;;
4095
4096netbsd*)
4097  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4098    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4099  else
4100    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4101  fi
4102  ;;
4103
4104newos6*)
4105  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4106  lt_cv_file_magic_cmd=/usr/bin/file
4107  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4108  ;;
4109
4110nto-qnx*)
4111  lt_cv_deplibs_check_method=unknown
4112  ;;
4113
4114openbsd*)
4115  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4116    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4117  else
4118    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4119  fi
4120  ;;
4121
4122osf3* | osf4* | osf5*)
4123  lt_cv_deplibs_check_method=pass_all
4124  ;;
4125
4126rdos*)
4127  lt_cv_deplibs_check_method=pass_all
4128  ;;
4129
4130solaris*)
4131  lt_cv_deplibs_check_method=pass_all
4132  ;;
4133
4134sysv4 | sysv4.3*)
4135  case $host_vendor in
4136  motorola)
4137    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
4138    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4139    ;;
4140  ncr)
4141    lt_cv_deplibs_check_method=pass_all
4142    ;;
4143  sequent)
4144    lt_cv_file_magic_cmd='/bin/file'
4145    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4146    ;;
4147  sni)
4148    lt_cv_file_magic_cmd='/bin/file'
4149    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4150    lt_cv_file_magic_test_file=/lib/libc.so
4151    ;;
4152  siemens)
4153    lt_cv_deplibs_check_method=pass_all
4154    ;;
4155  pc)
4156    lt_cv_deplibs_check_method=pass_all
4157    ;;
4158  esac
4159  ;;
4160
4161sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4162  lt_cv_deplibs_check_method=pass_all
4163  ;;
4164esac
4165])
4166file_magic_cmd=$lt_cv_file_magic_cmd
4167deplibs_check_method=$lt_cv_deplibs_check_method
4168test -z "$deplibs_check_method" && deplibs_check_method=unknown
4169])# AC_DEPLIBS_CHECK_METHOD
4170
4171
4172# AC_PROG_NM
4173# ----------
4174# find the pathname to a BSD-compatible name lister
4175AC_DEFUN([AC_PROG_NM],
4176[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4177[if test -n "$NM"; then
4178  # Let the user override the test.
4179  lt_cv_path_NM="$NM"
4180else
4181  lt_nm_to_check="${ac_tool_prefix}nm"
4182  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4183    lt_nm_to_check="$lt_nm_to_check nm"
4184  fi
4185  for lt_tmp_nm in $lt_nm_to_check; do
4186    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4187    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4188      IFS="$lt_save_ifs"
4189      test -z "$ac_dir" && ac_dir=.
4190      tmp_nm="$ac_dir/$lt_tmp_nm"
4191      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4192	# Check to see if the nm accepts a BSD-compat flag.
4193	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4194	#   nm: unknown option "B" ignored
4195	# Tru64's nm complains that /dev/null is an invalid object file
4196	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4197	*/dev/null* | *'Invalid file or object type'*)
4198	  lt_cv_path_NM="$tmp_nm -B"
4199	  break
4200	  ;;
4201	*)
4202	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4203	  */dev/null*)
4204	    lt_cv_path_NM="$tmp_nm -p"
4205	    break
4206	    ;;
4207	  *)
4208	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4209	    continue # so that we can try to find one that supports BSD flags
4210	    ;;
4211	  esac
4212	  ;;
4213	esac
4214      fi
4215    done
4216    IFS="$lt_save_ifs"
4217  done
4218  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4219fi])
4220NM="$lt_cv_path_NM"
4221])# AC_PROG_NM
4222
4223
4224# AC_CHECK_LIBM
4225# -------------
4226# check for math library
4227AC_DEFUN([AC_CHECK_LIBM],
4228[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4229LIBM=
4230case $host in
4231*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4232  # These system don't have libm, or don't need it
4233  ;;
4234*-ncr-sysv4.3*)
4235  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4236  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4237  ;;
4238*)
4239  AC_CHECK_LIB(m, cos, LIBM="-lm")
4240  ;;
4241esac
4242])# AC_CHECK_LIBM
4243
4244
4245# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
4246# -----------------------------------
4247# sets LIBLTDL to the link flags for the libltdl convenience library and
4248# LTDLINCL to the include flags for the libltdl header and adds
4249# --enable-ltdl-convenience to the configure arguments.  Note that
4250# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4251# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
4252# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
4253# (note the single quotes!).  If your package is not flat and you're not
4254# using automake, define top_builddir and top_srcdir appropriately in
4255# the Makefiles.
4256AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4257[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4258  case $enable_ltdl_convenience in
4259  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4260  "") enable_ltdl_convenience=yes
4261      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4262  esac
4263  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4264  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4265  # For backwards non-gettext consistent compatibility...
4266  INCLTDL="$LTDLINCL"
4267])# AC_LIBLTDL_CONVENIENCE
4268
4269
4270# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
4271# -----------------------------------
4272# sets LIBLTDL to the link flags for the libltdl installable library and
4273# LTDLINCL to the include flags for the libltdl header and adds
4274# --enable-ltdl-install to the configure arguments.  Note that
4275# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4276# and an installed libltdl is not found, it is assumed to be `libltdl'.
4277# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
4278# '${top_srcdir}/' (note the single quotes!).  If your package is not
4279# flat and you're not using automake, define top_builddir and top_srcdir
4280# appropriately in the Makefiles.
4281# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4282AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4283[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4284  AC_CHECK_LIB(ltdl, lt_dlinit,
4285  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4286  [if test x"$enable_ltdl_install" = xno; then
4287     AC_MSG_WARN([libltdl not installed, but installation disabled])
4288   else
4289     enable_ltdl_install=yes
4290   fi
4291  ])
4292  if test x"$enable_ltdl_install" = x"yes"; then
4293    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4294    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4295    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4296  else
4297    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4298    LIBLTDL="-lltdl"
4299    LTDLINCL=
4300  fi
4301  # For backwards non-gettext consistent compatibility...
4302  INCLTDL="$LTDLINCL"
4303])# AC_LIBLTDL_INSTALLABLE
4304
4305
4306# AC_LIBTOOL_CXX
4307# --------------
4308# enable support for C++ libraries
4309AC_DEFUN([AC_LIBTOOL_CXX],
4310[AC_REQUIRE([_LT_AC_LANG_CXX])
4311])# AC_LIBTOOL_CXX
4312
4313
4314# _LT_AC_LANG_CXX
4315# ---------------
4316AC_DEFUN([_LT_AC_LANG_CXX],
4317[AC_REQUIRE([AC_PROG_CXX])
4318AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4319_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
4320])# _LT_AC_LANG_CXX
4321
4322# _LT_AC_PROG_CXXCPP
4323# ------------------
4324AC_DEFUN([_LT_AC_PROG_CXXCPP],
4325[
4326AC_REQUIRE([AC_PROG_CXX])
4327if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4328    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4329    (test "X$CXX" != "Xg++"))) ; then
4330  AC_PROG_CXXCPP
4331fi
4332])# _LT_AC_PROG_CXXCPP
4333
4334# AC_LIBTOOL_F77
4335# --------------
4336# enable support for Fortran 77 libraries
4337AC_DEFUN([AC_LIBTOOL_F77],
4338[AC_REQUIRE([_LT_AC_LANG_F77])
4339])# AC_LIBTOOL_F77
4340
4341
4342# _LT_AC_LANG_F77
4343# ---------------
4344AC_DEFUN([_LT_AC_LANG_F77],
4345[AC_REQUIRE([AC_PROG_F77])
4346_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
4347])# _LT_AC_LANG_F77
4348
4349
4350# AC_LIBTOOL_GCJ
4351# --------------
4352# enable support for GCJ libraries
4353AC_DEFUN([AC_LIBTOOL_GCJ],
4354[AC_REQUIRE([_LT_AC_LANG_GCJ])
4355])# AC_LIBTOOL_GCJ
4356
4357
4358# _LT_AC_LANG_GCJ
4359# ---------------
4360AC_DEFUN([_LT_AC_LANG_GCJ],
4361[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4362  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4363    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4364      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4365	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4366	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4367_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
4368])# _LT_AC_LANG_GCJ
4369
4370
4371# AC_LIBTOOL_RC
4372# -------------
4373# enable support for Windows resource files
4374AC_DEFUN([AC_LIBTOOL_RC],
4375[AC_REQUIRE([LT_AC_PROG_RC])
4376_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
4377])# AC_LIBTOOL_RC
4378
4379
4380# AC_LIBTOOL_LANG_C_CONFIG
4381# ------------------------
4382# Ensure that the configuration vars for the C compiler are
4383# suitably defined.  Those variables are subsequently used by
4384# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4385AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
4386AC_DEFUN([_LT_AC_LANG_C_CONFIG],
4387[lt_save_CC="$CC"
4388AC_LANG_PUSH(C)
4389
4390# Source file extension for C test sources.
4391ac_ext=c
4392
4393# Object file extension for compiled C test sources.
4394objext=o
4395_LT_AC_TAGVAR(objext, $1)=$objext
4396
4397# Code to be used in simple compile tests
4398lt_simple_compile_test_code="int some_variable = 0;"
4399
4400# Code to be used in simple link tests
4401lt_simple_link_test_code='int main(){return(0);}'
4402
4403_LT_AC_SYS_COMPILER
4404
4405# save warnings/boilerplate of simple test code
4406_LT_COMPILER_BOILERPLATE
4407_LT_LINKER_BOILERPLATE
4408
4409AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4410AC_LIBTOOL_PROG_COMPILER_PIC($1)
4411AC_LIBTOOL_PROG_CC_C_O($1)
4412AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4413AC_LIBTOOL_PROG_LD_SHLIBS($1)
4414AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4415AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4416AC_LIBTOOL_SYS_LIB_STRIP
4417AC_LIBTOOL_DLOPEN_SELF
4418
4419# Report which library types will actually be built
4420AC_MSG_CHECKING([if libtool supports shared libraries])
4421AC_MSG_RESULT([$can_build_shared])
4422
4423AC_MSG_CHECKING([whether to build shared libraries])
4424test "$can_build_shared" = "no" && enable_shared=no
4425
4426# On AIX, shared libraries and static libraries use the same namespace, and
4427# are all built from PIC.
4428case $host_os in
4429aix3*)
4430  test "$enable_shared" = yes && enable_static=no
4431  if test -n "$RANLIB"; then
4432    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4433    postinstall_cmds='$RANLIB $lib'
4434  fi
4435  ;;
4436
4437aix[[4-9]]*)
4438  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4439    test "$enable_shared" = yes && enable_static=no
4440  fi
4441    ;;
4442esac
4443AC_MSG_RESULT([$enable_shared])
4444
4445AC_MSG_CHECKING([whether to build static libraries])
4446# Make sure either enable_shared or enable_static is yes.
4447test "$enable_shared" = yes || enable_static=yes
4448AC_MSG_RESULT([$enable_static])
4449
4450AC_LIBTOOL_CONFIG($1)
4451
4452AC_LANG_POP
4453CC="$lt_save_CC"
4454])# AC_LIBTOOL_LANG_C_CONFIG
4455
4456
4457# AC_LIBTOOL_LANG_CXX_CONFIG
4458# --------------------------
4459# Ensure that the configuration vars for the C compiler are
4460# suitably defined.  Those variables are subsequently used by
4461# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4462AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4463AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4464[AC_LANG_PUSH(C++)
4465AC_REQUIRE([AC_PROG_CXX])
4466AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4467
4468_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4469_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4470_LT_AC_TAGVAR(always_export_symbols, $1)=no
4471_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4472_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4473_LT_AC_TAGVAR(hardcode_direct, $1)=no
4474_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4475_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4476_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4477_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4478_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4479_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4480_LT_AC_TAGVAR(module_cmds, $1)=
4481_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4482_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4483_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4484_LT_AC_TAGVAR(no_undefined_flag, $1)=
4485_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4486_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4487
4488# Dependencies to place before and after the object being linked:
4489_LT_AC_TAGVAR(predep_objects, $1)=
4490_LT_AC_TAGVAR(postdep_objects, $1)=
4491_LT_AC_TAGVAR(predeps, $1)=
4492_LT_AC_TAGVAR(postdeps, $1)=
4493_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4494_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4495
4496# Source file extension for C++ test sources.
4497ac_ext=cpp
4498
4499# Object file extension for compiled C++ test sources.
4500objext=o
4501_LT_AC_TAGVAR(objext, $1)=$objext
4502
4503# Code to be used in simple compile tests
4504lt_simple_compile_test_code="int some_variable = 0;"
4505
4506# Code to be used in simple link tests
4507lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
4508
4509# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4510_LT_AC_SYS_COMPILER
4511
4512# save warnings/boilerplate of simple test code
4513_LT_COMPILER_BOILERPLATE
4514_LT_LINKER_BOILERPLATE
4515
4516# Allow CC to be a program name with arguments.
4517lt_save_CC=$CC
4518lt_save_LD=$LD
4519lt_save_GCC=$GCC
4520GCC=$GXX
4521lt_save_with_gnu_ld=$with_gnu_ld
4522lt_save_path_LD=$lt_cv_path_LD
4523if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4524  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4525else
4526  $as_unset lt_cv_prog_gnu_ld
4527fi
4528if test -n "${lt_cv_path_LDCXX+set}"; then
4529  lt_cv_path_LD=$lt_cv_path_LDCXX
4530else
4531  $as_unset lt_cv_path_LD
4532fi
4533test -z "${LDCXX+set}" || LD=$LDCXX
4534CC=${CXX-"c++"}
4535compiler=$CC
4536_LT_AC_TAGVAR(compiler, $1)=$CC
4537_LT_CC_BASENAME([$compiler])
4538
4539# We don't want -fno-exception wen compiling C++ code, so set the
4540# no_builtin_flag separately
4541if test "$GXX" = yes; then
4542  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4543else
4544  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4545fi
4546
4547if test "$GXX" = yes; then
4548  # Set up default GNU C++ configuration
4549
4550  AC_PROG_LD
4551
4552  # Check if GNU C++ uses GNU ld as the underlying linker, since the
4553  # archiving commands below assume that GNU ld is being used.
4554  if test "$with_gnu_ld" = yes; then
4555    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4556    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4557
4558    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4559    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4560
4561    # If archive_cmds runs LD, not CC, wlarc should be empty
4562    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4563    #     investigate it a little bit more. (MM)
4564    wlarc='${wl}'
4565
4566    # ancient GNU ld didn't support --whole-archive et. al.
4567    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4568	grep 'no-whole-archive' > /dev/null; then
4569      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4570    else
4571      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4572    fi
4573  else
4574    with_gnu_ld=no
4575    wlarc=
4576
4577    # A generic and very simple default shared library creation
4578    # command for GNU C++ for the case where it uses the native
4579    # linker, instead of GNU ld.  If possible, this setting should
4580    # overridden to take advantage of the native linker features on
4581    # the platform it is being used on.
4582    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4583  fi
4584
4585  # Commands to make compiler produce verbose output that lists
4586  # what "hidden" libraries, object files and flags are used when
4587  # linking a shared library.
4588  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4589
4590else
4591  GXX=no
4592  with_gnu_ld=no
4593  wlarc=
4594fi
4595
4596# PORTME: fill in a description of your system's C++ link characteristics
4597AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4598_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4599case $host_os in
4600  aix3*)
4601    # FIXME: insert proper C++ library support
4602    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4603    ;;
4604  aix[[4-9]]*)
4605    if test "$host_cpu" = ia64; then
4606      # On IA64, the linker does run time linking by default, so we don't
4607      # have to do anything special.
4608      aix_use_runtimelinking=no
4609      exp_sym_flag='-Bexport'
4610      no_entry_flag=""
4611    else
4612      aix_use_runtimelinking=no
4613
4614      # Test if we are trying to use run time linking or normal
4615      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4616      # need to do runtime linking.
4617      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4618	for ld_flag in $LDFLAGS; do
4619	  case $ld_flag in
4620	  *-brtl*)
4621	    aix_use_runtimelinking=yes
4622	    break
4623	    ;;
4624	  esac
4625	done
4626	;;
4627      esac
4628
4629      exp_sym_flag='-bexport'
4630      no_entry_flag='-bnoentry'
4631    fi
4632
4633    # When large executables or shared objects are built, AIX ld can
4634    # have problems creating the table of contents.  If linking a library
4635    # or program results in "error TOC overflow" add -mminimal-toc to
4636    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4637    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4638
4639    _LT_AC_TAGVAR(archive_cmds, $1)=''
4640    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4641    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4642    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4643
4644    if test "$GXX" = yes; then
4645      case $host_os in aix4.[[012]]|aix4.[[012]].*)
4646      # We only want to do this on AIX 4.2 and lower, the check
4647      # below for broken collect2 doesn't work under 4.3+
4648	collect2name=`${CC} -print-prog-name=collect2`
4649	if test -f "$collect2name" && \
4650	   strings "$collect2name" | grep resolve_lib_name >/dev/null
4651	then
4652	  # We have reworked collect2
4653	  :
4654	else
4655	  # We have old collect2
4656	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4657	  # It fails to find uninstalled libraries when the uninstalled
4658	  # path is not listed in the libpath.  Setting hardcode_minus_L
4659	  # to unsupported forces relinking
4660	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4661	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4662	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4663	fi
4664	;;
4665      esac
4666      shared_flag='-shared'
4667      if test "$aix_use_runtimelinking" = yes; then
4668	shared_flag="$shared_flag "'${wl}-G'
4669      fi
4670    else
4671      # not using gcc
4672      if test "$host_cpu" = ia64; then
4673	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4674	# chokes on -Wl,-G. The following line is correct:
4675	shared_flag='-G'
4676      else
4677	if test "$aix_use_runtimelinking" = yes; then
4678	  shared_flag='${wl}-G'
4679	else
4680	  shared_flag='${wl}-bM:SRE'
4681	fi
4682      fi
4683    fi
4684
4685    # It seems that -bexpall does not export symbols beginning with
4686    # underscore (_), so it is better to generate a list of symbols to export.
4687    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4688    if test "$aix_use_runtimelinking" = yes; then
4689      # Warning - without using the other runtime loading flags (-brtl),
4690      # -berok will link without error, but may produce a broken library.
4691      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4692      # Determine the default libpath from the value encoded in an empty executable.
4693      _LT_AC_SYS_LIBPATH_AIX
4694      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4695
4696      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4697     else
4698      if test "$host_cpu" = ia64; then
4699	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4700	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4701	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4702      else
4703	# Determine the default libpath from the value encoded in an empty executable.
4704	_LT_AC_SYS_LIBPATH_AIX
4705	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4706	# Warning - without using the other run time loading flags,
4707	# -berok will link without error, but may produce a broken library.
4708	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4709	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4710	# Exported symbols can be pulled into shared objects from archives
4711	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4712	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4713	# This is similar to how AIX traditionally builds its shared libraries.
4714	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4715      fi
4716    fi
4717    ;;
4718
4719  beos*)
4720    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4721      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4722      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4723      # support --undefined.  This deserves some investigation.  FIXME
4724      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4725    else
4726      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4727    fi
4728    ;;
4729
4730  chorus*)
4731    case $cc_basename in
4732      *)
4733	# FIXME: insert proper C++ library support
4734	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4735	;;
4736    esac
4737    ;;
4738
4739  cygwin* | mingw* | pw32*)
4740    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4741    # as there is no search path for DLLs.
4742    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4743    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4744    _LT_AC_TAGVAR(always_export_symbols, $1)=no
4745    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4746
4747    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4748      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4749      # If the export-symbols file already is a .def file (1st line
4750      # is EXPORTS), use it as is; otherwise, prepend...
4751      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4752	cp $export_symbols $output_objdir/$soname.def;
4753      else
4754	echo EXPORTS > $output_objdir/$soname.def;
4755	cat $export_symbols >> $output_objdir/$soname.def;
4756      fi~
4757      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4758    else
4759      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4760    fi
4761  ;;
4762      darwin* | rhapsody*)
4763      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4764      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4765      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4766      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4767      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4768      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4769      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
4770      if test "$GXX" = yes ; then
4771      output_verbose_link_cmd='echo'
4772      _LT_AC_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}"
4773      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
4774      _LT_AC_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}"
4775      _LT_AC_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}"
4776      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
4777        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
4778        _LT_AC_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}"
4779      fi
4780      else
4781      case $cc_basename in
4782        xlc*)
4783         output_verbose_link_cmd='echo'
4784          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
4785          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4786          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4787          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4788          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4789          ;;
4790       *)
4791         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4792          ;;
4793      esac
4794      fi
4795        ;;
4796
4797  dgux*)
4798    case $cc_basename in
4799      ec++*)
4800	# FIXME: insert proper C++ library support
4801	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4802	;;
4803      ghcx*)
4804	# Green Hills C++ Compiler
4805	# FIXME: insert proper C++ library support
4806	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4807	;;
4808      *)
4809	# FIXME: insert proper C++ library support
4810	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4811	;;
4812    esac
4813    ;;
4814  freebsd[[12]]*)
4815    # C++ shared libraries reported to be fairly broken before switch to ELF
4816    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4817    ;;
4818  freebsd-elf*)
4819    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4820    ;;
4821  freebsd* | dragonfly*)
4822    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4823    # conventions
4824    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4825    ;;
4826  gnu*)
4827    ;;
4828  hpux9*)
4829    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4830    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4831    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4832    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4833    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4834				# but as the default
4835				# location of the library.
4836
4837    case $cc_basename in
4838    CC*)
4839      # FIXME: insert proper C++ library support
4840      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4841      ;;
4842    aCC*)
4843      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4844      # Commands to make compiler produce verbose output that lists
4845      # what "hidden" libraries, object files and flags are used when
4846      # linking a shared library.
4847      #
4848      # There doesn't appear to be a way to prevent this compiler from
4849      # explicitly linking system object files so we need to strip them
4850      # from the output so that they don't get included in the library
4851      # dependencies.
4852      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4853      ;;
4854    *)
4855      if test "$GXX" = yes; then
4856        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4857      else
4858        # FIXME: insert proper C++ library support
4859        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4860      fi
4861      ;;
4862    esac
4863    ;;
4864  hpux10*|hpux11*)
4865    if test $with_gnu_ld = no; then
4866      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4867      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4868
4869      case $host_cpu in
4870      hppa*64*|ia64*) ;;
4871      *)
4872	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4873        ;;
4874      esac
4875    fi
4876    case $host_cpu in
4877    hppa*64*|ia64*)
4878      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4879      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4880      ;;
4881    *)
4882      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4883      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4884					      # but as the default
4885					      # location of the library.
4886      ;;
4887    esac
4888
4889    case $cc_basename in
4890      CC*)
4891	# FIXME: insert proper C++ library support
4892	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4893	;;
4894      aCC*)
4895	case $host_cpu in
4896	hppa*64*)
4897	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4898	  ;;
4899	ia64*)
4900	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4901	  ;;
4902	*)
4903	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4904	  ;;
4905	esac
4906	# Commands to make compiler produce verbose output that lists
4907	# what "hidden" libraries, object files and flags are used when
4908	# linking a shared library.
4909	#
4910	# There doesn't appear to be a way to prevent this compiler from
4911	# explicitly linking system object files so we need to strip them
4912	# from the output so that they don't get included in the library
4913	# dependencies.
4914	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4915	;;
4916      *)
4917	if test "$GXX" = yes; then
4918	  if test $with_gnu_ld = no; then
4919	    case $host_cpu in
4920	    hppa*64*)
4921	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4922	      ;;
4923	    ia64*)
4924	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4925	      ;;
4926	    *)
4927	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4928	      ;;
4929	    esac
4930	  fi
4931	else
4932	  # FIXME: insert proper C++ library support
4933	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4934	fi
4935	;;
4936    esac
4937    ;;
4938  interix[[3-9]]*)
4939    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4940    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4941    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4942    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4943    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4944    # Instead, shared libraries are loaded at an image base (0x10000000 by
4945    # default) and relocated if they conflict, which is a slow very memory
4946    # consuming and fragmenting process.  To avoid this, we pick a random,
4947    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4948    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4949    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4950    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4951    ;;
4952  irix5* | irix6*)
4953    case $cc_basename in
4954      CC*)
4955	# SGI C++
4956	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4957
4958	# Archives containing C++ object files must be created using
4959	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4960	# necessary to make sure instantiated templates are included
4961	# in the archive.
4962	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4963	;;
4964      *)
4965	if test "$GXX" = yes; then
4966	  if test "$with_gnu_ld" = no; then
4967	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4968	  else
4969	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4970	  fi
4971	fi
4972	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4973	;;
4974    esac
4975    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4976    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4977    ;;
4978  linux* | k*bsd*-gnu)
4979    case $cc_basename in
4980      KCC*)
4981	# Kuck and Associates, Inc. (KAI) C++ Compiler
4982
4983	# KCC will only create a shared library if the output file
4984	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4985	# to its proper name (with version) after linking.
4986	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4987	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4988	# Commands to make compiler produce verbose output that lists
4989	# what "hidden" libraries, object files and flags are used when
4990	# linking a shared library.
4991	#
4992	# There doesn't appear to be a way to prevent this compiler from
4993	# explicitly linking system object files so we need to strip them
4994	# from the output so that they don't get included in the library
4995	# dependencies.
4996	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4997
4998	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4999	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5000
5001	# Archives containing C++ object files must be created using
5002	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5003	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5004	;;
5005      icpc*)
5006	# Intel C++
5007	with_gnu_ld=yes
5008	# version 8.0 and above of icpc choke on multiply defined symbols
5009	# if we add $predep_objects and $postdep_objects, however 7.1 and
5010	# earlier do not add the objects themselves.
5011	case `$CC -V 2>&1` in
5012	*"Version 7."*)
5013  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5014  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5015	  ;;
5016	*)  # Version 8.0 or newer
5017	  tmp_idyn=
5018	  case $host_cpu in
5019	    ia64*) tmp_idyn=' -i_dynamic';;
5020	  esac
5021  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5022	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5023	  ;;
5024	esac
5025	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5026	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5027	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5028	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5029	;;
5030      pgCC* | pgcpp*)
5031        # Portland Group C++ compiler
5032	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5033  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5034
5035	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5036	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5037	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5038        ;;
5039      cxx*)
5040	# Compaq C++
5041	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5042	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
5043
5044	runpath_var=LD_RUN_PATH
5045	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5046	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5047
5048	# Commands to make compiler produce verbose output that lists
5049	# what "hidden" libraries, object files and flags are used when
5050	# linking a shared library.
5051	#
5052	# There doesn't appear to be a way to prevent this compiler from
5053	# explicitly linking system object files so we need to strip them
5054	# from the output so that they don't get included in the library
5055	# dependencies.
5056	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5057	;;
5058      *)
5059	case `$CC -V 2>&1 | sed 5q` in
5060	*Sun\ C*)
5061	  # Sun C++ 5.9
5062	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5063	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5064	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
5065	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5066	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5067
5068	  # Not sure whether something based on
5069	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5070	  # would be better.
5071	  output_verbose_link_cmd='echo'
5072
5073	  # Archives containing C++ object files must be created using
5074	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
5075	  # necessary to make sure instantiated templates are included
5076	  # in the archive.
5077	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5078	  ;;
5079	esac
5080	;;
5081    esac
5082    ;;
5083  lynxos*)
5084    # FIXME: insert proper C++ library support
5085    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5086    ;;
5087  m88k*)
5088    # FIXME: insert proper C++ library support
5089    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5090    ;;
5091  mvs*)
5092    case $cc_basename in
5093      cxx*)
5094	# FIXME: insert proper C++ library support
5095	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5096	;;
5097      *)
5098	# FIXME: insert proper C++ library support
5099	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5100	;;
5101    esac
5102    ;;
5103  netbsd*)
5104    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5105      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5106      wlarc=
5107      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5108      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5109      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5110    fi
5111    # Workaround some broken pre-1.5 toolchains
5112    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5113    ;;
5114  openbsd2*)
5115    # C++ shared libraries are fairly broken
5116    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5117    ;;
5118  openbsd*)
5119    if test -f /usr/libexec/ld.so; then
5120      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5121      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5122      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5123      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5124      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5125	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
5126	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5127	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5128      fi
5129      output_verbose_link_cmd='echo'
5130    else
5131      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5132    fi
5133    ;;
5134  osf3*)
5135    case $cc_basename in
5136      KCC*)
5137	# Kuck and Associates, Inc. (KAI) C++ Compiler
5138
5139	# KCC will only create a shared library if the output file
5140	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5141	# to its proper name (with version) after linking.
5142	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5143
5144	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5145	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5146
5147	# Archives containing C++ object files must be created using
5148	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5149	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5150
5151	;;
5152      RCC*)
5153	# Rational C++ 2.4.1
5154	# FIXME: insert proper C++ library support
5155	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5156	;;
5157      cxx*)
5158	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5159	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5160
5161	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5162	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5163
5164	# Commands to make compiler produce verbose output that lists
5165	# what "hidden" libraries, object files and flags are used when
5166	# linking a shared library.
5167	#
5168	# There doesn't appear to be a way to prevent this compiler from
5169	# explicitly linking system object files so we need to strip them
5170	# from the output so that they don't get included in the library
5171	# dependencies.
5172	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5173	;;
5174      *)
5175	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5176	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5177	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5178
5179	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5180	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5181
5182	  # Commands to make compiler produce verbose output that lists
5183	  # what "hidden" libraries, object files and flags are used when
5184	  # linking a shared library.
5185	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5186
5187	else
5188	  # FIXME: insert proper C++ library support
5189	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5190	fi
5191	;;
5192    esac
5193    ;;
5194  osf4* | osf5*)
5195    case $cc_basename in
5196      KCC*)
5197	# Kuck and Associates, Inc. (KAI) C++ Compiler
5198
5199	# KCC will only create a shared library if the output file
5200	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5201	# to its proper name (with version) after linking.
5202	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5203
5204	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5205	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5206
5207	# Archives containing C++ object files must be created using
5208	# the KAI C++ compiler.
5209	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5210	;;
5211      RCC*)
5212	# Rational C++ 2.4.1
5213	# FIXME: insert proper C++ library support
5214	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5215	;;
5216      cxx*)
5217	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5218	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5219	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5220	  echo "-hidden">> $lib.exp~
5221	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
5222	  $rm $lib.exp'
5223
5224	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5225	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5226
5227	# Commands to make compiler produce verbose output that lists
5228	# what "hidden" libraries, object files and flags are used when
5229	# linking a shared library.
5230	#
5231	# There doesn't appear to be a way to prevent this compiler from
5232	# explicitly linking system object files so we need to strip them
5233	# from the output so that they don't get included in the library
5234	# dependencies.
5235	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5236	;;
5237      *)
5238	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5239	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5240	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5241
5242	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5243	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5244
5245	  # Commands to make compiler produce verbose output that lists
5246	  # what "hidden" libraries, object files and flags are used when
5247	  # linking a shared library.
5248	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5249
5250	else
5251	  # FIXME: insert proper C++ library support
5252	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5253	fi
5254	;;
5255    esac
5256    ;;
5257  psos*)
5258    # FIXME: insert proper C++ library support
5259    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5260    ;;
5261  sunos4*)
5262    case $cc_basename in
5263      CC*)
5264	# Sun C++ 4.x
5265	# FIXME: insert proper C++ library support
5266	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5267	;;
5268      lcc*)
5269	# Lucid
5270	# FIXME: insert proper C++ library support
5271	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5272	;;
5273      *)
5274	# FIXME: insert proper C++ library support
5275	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5276	;;
5277    esac
5278    ;;
5279  solaris*)
5280    case $cc_basename in
5281      CC*)
5282	# Sun C++ 4.2, 5.x and Centerline C++
5283        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
5284	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5285	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5286	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5287	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5288
5289	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5290	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5291	case $host_os in
5292	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5293	  *)
5294	    # The compiler driver will combine and reorder linker options,
5295	    # but understands `-z linker_flag'.
5296	    # Supported since Solaris 2.6 (maybe 2.5.1?)
5297	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5298	    ;;
5299	esac
5300	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5301
5302	output_verbose_link_cmd='echo'
5303
5304	# Archives containing C++ object files must be created using
5305	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
5306	# necessary to make sure instantiated templates are included
5307	# in the archive.
5308	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5309	;;
5310      gcx*)
5311	# Green Hills C++ Compiler
5312	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5313
5314	# The C++ compiler must be used to create the archive.
5315	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5316	;;
5317      *)
5318	# GNU C++ compiler with Solaris linker
5319	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5320	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5321	  if $CC --version | grep -v '^2\.7' > /dev/null; then
5322	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5323	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5324		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5325
5326	    # Commands to make compiler produce verbose output that lists
5327	    # what "hidden" libraries, object files and flags are used when
5328	    # linking a shared library.
5329	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5330	  else
5331	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
5332	    # platform.
5333	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5334	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5335		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5336
5337	    # Commands to make compiler produce verbose output that lists
5338	    # what "hidden" libraries, object files and flags are used when
5339	    # linking a shared library.
5340	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5341	  fi
5342
5343	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5344	  case $host_os in
5345	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5346	  *)
5347	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5348	    ;;
5349	  esac
5350	fi
5351	;;
5352    esac
5353    ;;
5354  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5355    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5356    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5357    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5358    runpath_var='LD_RUN_PATH'
5359
5360    case $cc_basename in
5361      CC*)
5362	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5363	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5364	;;
5365      *)
5366	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5367	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5368	;;
5369    esac
5370    ;;
5371  sysv5* | sco3.2v5* | sco5v6*)
5372    # Note: We can NOT use -z defs as we might desire, because we do not
5373    # link with -lc, and that would cause any symbols used from libc to
5374    # always be unresolved, which means just about no library would
5375    # ever link correctly.  If we're not using GNU ld we use -z text
5376    # though, which does catch some bad symbols but isn't as heavy-handed
5377    # as -z defs.
5378    # For security reasons, it is highly recommended that you always
5379    # use absolute paths for naming shared libraries, and exclude the
5380    # DT_RUNPATH tag from executables and libraries.  But doing so
5381    # requires that you compile everything twice, which is a pain.
5382    # So that behaviour is only enabled if SCOABSPATH is set to a
5383    # non-empty value in the environment.  Most likely only useful for
5384    # creating official distributions of packages.
5385    # This is a hack until libtool officially supports absolute path
5386    # names for shared libraries.
5387    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5388    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5389    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5390    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5391    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
5392    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5393    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5394    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5395    runpath_var='LD_RUN_PATH'
5396
5397    case $cc_basename in
5398      CC*)
5399	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5400	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5401	;;
5402      *)
5403	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5404	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5405	;;
5406    esac
5407    ;;
5408  tandem*)
5409    case $cc_basename in
5410      NCC*)
5411	# NonStop-UX NCC 3.20
5412	# FIXME: insert proper C++ library support
5413	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5414	;;
5415      *)
5416	# FIXME: insert proper C++ library support
5417	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5418	;;
5419    esac
5420    ;;
5421  vxworks*)
5422    # FIXME: insert proper C++ library support
5423    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5424    ;;
5425  *)
5426    # FIXME: insert proper C++ library support
5427    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5428    ;;
5429esac
5430AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5431test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5432
5433_LT_AC_TAGVAR(GCC, $1)="$GXX"
5434_LT_AC_TAGVAR(LD, $1)="$LD"
5435
5436AC_LIBTOOL_POSTDEP_PREDEP($1)
5437AC_LIBTOOL_PROG_COMPILER_PIC($1)
5438AC_LIBTOOL_PROG_CC_C_O($1)
5439AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5440AC_LIBTOOL_PROG_LD_SHLIBS($1)
5441AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5442AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5443
5444AC_LIBTOOL_CONFIG($1)
5445
5446AC_LANG_POP
5447CC=$lt_save_CC
5448LDCXX=$LD
5449LD=$lt_save_LD
5450GCC=$lt_save_GCC
5451with_gnu_ldcxx=$with_gnu_ld
5452with_gnu_ld=$lt_save_with_gnu_ld
5453lt_cv_path_LDCXX=$lt_cv_path_LD
5454lt_cv_path_LD=$lt_save_path_LD
5455lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5456lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5457])# AC_LIBTOOL_LANG_CXX_CONFIG
5458
5459# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5460# ------------------------------------
5461# Figure out "hidden" library dependencies from verbose
5462# compiler output when linking a shared library.
5463# Parse the compiler output and extract the necessary
5464# objects, libraries and library flags.
5465AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
5466[AC_REQUIRE([LT_AC_PROG_SED])dnl
5467dnl we can't use the lt_simple_compile_test_code here,
5468dnl because it contains code intended for an executable,
5469dnl not a library.  It's possible we should let each
5470dnl tag define a new lt_????_link_test_code variable,
5471dnl but it's only used here...
5472ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5473int a;
5474void foo (void) { a = 0; }
5475EOF
5476],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5477class Foo
5478{
5479public:
5480  Foo (void) { a = 0; }
5481private:
5482  int a;
5483};
5484EOF
5485],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5486      subroutine foo
5487      implicit none
5488      integer*4 a
5489      a=0
5490      return
5491      end
5492EOF
5493],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5494public class foo {
5495  private int a;
5496  public void bar (void) {
5497    a = 0;
5498  }
5499};
5500EOF
5501])
5502dnl Parse the compiler output and extract the necessary
5503dnl objects, libraries and library flags.
5504if AC_TRY_EVAL(ac_compile); then
5505  # Parse the compiler output and extract the necessary
5506  # objects, libraries and library flags.
5507
5508  # Sentinel used to keep track of whether or not we are before
5509  # the conftest object file.
5510  pre_test_object_deps_done=no
5511
5512  # The `*' in the case matches for architectures that use `case' in
5513  # $output_verbose_cmd can trigger glob expansion during the loop
5514  # eval without this substitution.
5515  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5516
5517  for p in `eval $output_verbose_link_cmd`; do
5518    case $p in
5519
5520    -L* | -R* | -l*)
5521       # Some compilers place space between "-{L,R}" and the path.
5522       # Remove the space.
5523       if test $p = "-L" \
5524	  || test $p = "-R"; then
5525	 prev=$p
5526	 continue
5527       else
5528	 prev=
5529       fi
5530
5531       if test "$pre_test_object_deps_done" = no; then
5532	 case $p in
5533	 -L* | -R*)
5534	   # Internal compiler library paths should come after those
5535	   # provided the user.  The postdeps already come after the
5536	   # user supplied libs so there is no need to process them.
5537	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5538	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5539	   else
5540	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5541	   fi
5542	   ;;
5543	 # The "-l" case would never come before the object being
5544	 # linked, so don't bother handling this case.
5545	 esac
5546       else
5547	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5548	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5549	 else
5550	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5551	 fi
5552       fi
5553       ;;
5554
5555    *.$objext)
5556       # This assumes that the test object file only shows up
5557       # once in the compiler output.
5558       if test "$p" = "conftest.$objext"; then
5559	 pre_test_object_deps_done=yes
5560	 continue
5561       fi
5562
5563       if test "$pre_test_object_deps_done" = no; then
5564	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5565	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
5566	 else
5567	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5568	 fi
5569       else
5570	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5571	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5572	 else
5573	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5574	 fi
5575       fi
5576       ;;
5577
5578    *) ;; # Ignore the rest.
5579
5580    esac
5581  done
5582
5583  # Clean up.
5584  rm -f a.out a.exe
5585else
5586  echo "libtool.m4: error: problem compiling $1 test program"
5587fi
5588
5589$rm -f confest.$objext
5590
5591_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
5592if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5593  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
5594fi
5595
5596# PORTME: override above test on systems where it is broken
5597ifelse([$1],[CXX],
5598[case $host_os in
5599interix[[3-9]]*)
5600  # Interix 3.5 installs completely hosed .la files for C++, so rather than
5601  # hack all around it, let's just trust "g++" to DTRT.
5602  _LT_AC_TAGVAR(predep_objects,$1)=
5603  _LT_AC_TAGVAR(postdep_objects,$1)=
5604  _LT_AC_TAGVAR(postdeps,$1)=
5605  ;;
5606
5607linux*)
5608  case `$CC -V 2>&1 | sed 5q` in
5609  *Sun\ C*)
5610    # Sun C++ 5.9
5611    #
5612    # The more standards-conforming stlport4 library is
5613    # incompatible with the Cstd library. Avoid specifying
5614    # it if it's in CXXFLAGS. Ignore libCrun as
5615    # -library=stlport4 depends on it.
5616    case " $CXX $CXXFLAGS " in
5617    *" -library=stlport4 "*)
5618      solaris_use_stlport4=yes
5619      ;;
5620    esac
5621    if test "$solaris_use_stlport4" != yes; then
5622      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
5623    fi
5624    ;;
5625  esac
5626  ;;
5627
5628solaris*)
5629  case $cc_basename in
5630  CC*)
5631    # The more standards-conforming stlport4 library is
5632    # incompatible with the Cstd library. Avoid specifying
5633    # it if it's in CXXFLAGS. Ignore libCrun as
5634    # -library=stlport4 depends on it.
5635    case " $CXX $CXXFLAGS " in
5636    *" -library=stlport4 "*)
5637      solaris_use_stlport4=yes
5638      ;;
5639    esac
5640
5641    # Adding this requires a known-good setup of shared libraries for
5642    # Sun compiler versions before 5.6, else PIC objects from an old
5643    # archive will be linked into the output, leading to subtle bugs.
5644    if test "$solaris_use_stlport4" != yes; then
5645      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
5646    fi
5647    ;;
5648  esac
5649  ;;
5650esac
5651])
5652case " $_LT_AC_TAGVAR(postdeps, $1) " in
5653*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5654esac
5655])# AC_LIBTOOL_POSTDEP_PREDEP
5656
5657# AC_LIBTOOL_LANG_F77_CONFIG
5658# --------------------------
5659# Ensure that the configuration vars for the C compiler are
5660# suitably defined.  Those variables are subsequently used by
5661# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5662AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5663AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5664[AC_REQUIRE([AC_PROG_F77])
5665AC_LANG_PUSH(Fortran 77)
5666
5667_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5668_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5669_LT_AC_TAGVAR(always_export_symbols, $1)=no
5670_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5671_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5672_LT_AC_TAGVAR(hardcode_direct, $1)=no
5673_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5674_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5675_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5676_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5677_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5678_LT_AC_TAGVAR(module_cmds, $1)=
5679_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5680_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5681_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5682_LT_AC_TAGVAR(no_undefined_flag, $1)=
5683_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5684_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5685
5686# Source file extension for f77 test sources.
5687ac_ext=f
5688
5689# Object file extension for compiled f77 test sources.
5690objext=o
5691_LT_AC_TAGVAR(objext, $1)=$objext
5692
5693# Code to be used in simple compile tests
5694lt_simple_compile_test_code="\
5695      subroutine t
5696      return
5697      end
5698"
5699
5700# Code to be used in simple link tests
5701lt_simple_link_test_code="\
5702      program t
5703      end
5704"
5705
5706# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5707_LT_AC_SYS_COMPILER
5708
5709# save warnings/boilerplate of simple test code
5710_LT_COMPILER_BOILERPLATE
5711_LT_LINKER_BOILERPLATE
5712
5713# Allow CC to be a program name with arguments.
5714lt_save_CC="$CC"
5715CC=${F77-"f77"}
5716compiler=$CC
5717_LT_AC_TAGVAR(compiler, $1)=$CC
5718_LT_CC_BASENAME([$compiler])
5719
5720AC_MSG_CHECKING([if libtool supports shared libraries])
5721AC_MSG_RESULT([$can_build_shared])
5722
5723AC_MSG_CHECKING([whether to build shared libraries])
5724test "$can_build_shared" = "no" && enable_shared=no
5725
5726# On AIX, shared libraries and static libraries use the same namespace, and
5727# are all built from PIC.
5728case $host_os in
5729aix3*)
5730  test "$enable_shared" = yes && enable_static=no
5731  if test -n "$RANLIB"; then
5732    archive_cmds="$archive_cmds~\$RANLIB \$lib"
5733    postinstall_cmds='$RANLIB $lib'
5734  fi
5735  ;;
5736aix[[4-9]]*)
5737  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5738    test "$enable_shared" = yes && enable_static=no
5739  fi
5740  ;;
5741esac
5742AC_MSG_RESULT([$enable_shared])
5743
5744AC_MSG_CHECKING([whether to build static libraries])
5745# Make sure either enable_shared or enable_static is yes.
5746test "$enable_shared" = yes || enable_static=yes
5747AC_MSG_RESULT([$enable_static])
5748
5749_LT_AC_TAGVAR(GCC, $1)="$G77"
5750_LT_AC_TAGVAR(LD, $1)="$LD"
5751
5752AC_LIBTOOL_PROG_COMPILER_PIC($1)
5753AC_LIBTOOL_PROG_CC_C_O($1)
5754AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5755AC_LIBTOOL_PROG_LD_SHLIBS($1)
5756AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5757AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5758
5759AC_LIBTOOL_CONFIG($1)
5760
5761AC_LANG_POP
5762CC="$lt_save_CC"
5763])# AC_LIBTOOL_LANG_F77_CONFIG
5764
5765
5766# AC_LIBTOOL_LANG_GCJ_CONFIG
5767# --------------------------
5768# Ensure that the configuration vars for the C compiler are
5769# suitably defined.  Those variables are subsequently used by
5770# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5771AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5772AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5773[AC_LANG_SAVE
5774
5775# Source file extension for Java test sources.
5776ac_ext=java
5777
5778# Object file extension for compiled Java test sources.
5779objext=o
5780_LT_AC_TAGVAR(objext, $1)=$objext
5781
5782# Code to be used in simple compile tests
5783lt_simple_compile_test_code="class foo {}"
5784
5785# Code to be used in simple link tests
5786lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
5787
5788# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5789_LT_AC_SYS_COMPILER
5790
5791# save warnings/boilerplate of simple test code
5792_LT_COMPILER_BOILERPLATE
5793_LT_LINKER_BOILERPLATE
5794
5795# Allow CC to be a program name with arguments.
5796lt_save_CC="$CC"
5797CC=${GCJ-"gcj"}
5798compiler=$CC
5799_LT_AC_TAGVAR(compiler, $1)=$CC
5800_LT_CC_BASENAME([$compiler])
5801
5802# GCJ did not exist at the time GCC didn't implicitly link libc in.
5803_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5804
5805_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5806
5807AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5808AC_LIBTOOL_PROG_COMPILER_PIC($1)
5809AC_LIBTOOL_PROG_CC_C_O($1)
5810AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5811AC_LIBTOOL_PROG_LD_SHLIBS($1)
5812AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5813AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5814
5815AC_LIBTOOL_CONFIG($1)
5816
5817AC_LANG_RESTORE
5818CC="$lt_save_CC"
5819])# AC_LIBTOOL_LANG_GCJ_CONFIG
5820
5821
5822# AC_LIBTOOL_LANG_RC_CONFIG
5823# -------------------------
5824# Ensure that the configuration vars for the Windows resource compiler are
5825# suitably defined.  Those variables are subsequently used by
5826# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5827AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5828AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5829[AC_LANG_SAVE
5830
5831# Source file extension for RC test sources.
5832ac_ext=rc
5833
5834# Object file extension for compiled RC test sources.
5835objext=o
5836_LT_AC_TAGVAR(objext, $1)=$objext
5837
5838# Code to be used in simple compile tests
5839lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
5840
5841# Code to be used in simple link tests
5842lt_simple_link_test_code="$lt_simple_compile_test_code"
5843
5844# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5845_LT_AC_SYS_COMPILER
5846
5847# save warnings/boilerplate of simple test code
5848_LT_COMPILER_BOILERPLATE
5849_LT_LINKER_BOILERPLATE
5850
5851# Allow CC to be a program name with arguments.
5852lt_save_CC="$CC"
5853CC=${RC-"windres"}
5854compiler=$CC
5855_LT_AC_TAGVAR(compiler, $1)=$CC
5856_LT_CC_BASENAME([$compiler])
5857_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5858
5859AC_LIBTOOL_CONFIG($1)
5860
5861AC_LANG_RESTORE
5862CC="$lt_save_CC"
5863])# AC_LIBTOOL_LANG_RC_CONFIG
5864
5865
5866# AC_LIBTOOL_CONFIG([TAGNAME])
5867# ----------------------------
5868# If TAGNAME is not passed, then create an initial libtool script
5869# with a default configuration from the untagged config vars.  Otherwise
5870# add code to config.status for appending the configuration named by
5871# TAGNAME from the matching tagged config vars.
5872AC_DEFUN([AC_LIBTOOL_CONFIG],
5873[# The else clause should only fire when bootstrapping the
5874# libtool distribution, otherwise you forgot to ship ltmain.sh
5875# with your package, and you will get complaints that there are
5876# no rules to generate ltmain.sh.
5877if test -f "$ltmain"; then
5878  # See if we are running on zsh, and set the options which allow our commands through
5879  # without removal of \ escapes.
5880  if test -n "${ZSH_VERSION+set}" ; then
5881    setopt NO_GLOB_SUBST
5882  fi
5883  # Now quote all the things that may contain metacharacters while being
5884  # careful not to overquote the AC_SUBSTed values.  We take copies of the
5885  # variables and quote the copies for generation of the libtool script.
5886  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5887    SED SHELL STRIP \
5888    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5889    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5890    deplibs_check_method reload_flag reload_cmds need_locks \
5891    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5892    lt_cv_sys_global_symbol_to_c_name_address \
5893    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5894    old_postinstall_cmds old_postuninstall_cmds \
5895    _LT_AC_TAGVAR(compiler, $1) \
5896    _LT_AC_TAGVAR(CC, $1) \
5897    _LT_AC_TAGVAR(LD, $1) \
5898    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5899    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5900    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5901    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5902    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5903    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5904    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5905    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5906    _LT_AC_TAGVAR(old_archive_cmds, $1) \
5907    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5908    _LT_AC_TAGVAR(predep_objects, $1) \
5909    _LT_AC_TAGVAR(postdep_objects, $1) \
5910    _LT_AC_TAGVAR(predeps, $1) \
5911    _LT_AC_TAGVAR(postdeps, $1) \
5912    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5913    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
5914    _LT_AC_TAGVAR(archive_cmds, $1) \
5915    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5916    _LT_AC_TAGVAR(postinstall_cmds, $1) \
5917    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5918    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5919    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5920    _LT_AC_TAGVAR(no_undefined_flag, $1) \
5921    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5922    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5923    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5924    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5925    _LT_AC_TAGVAR(hardcode_automatic, $1) \
5926    _LT_AC_TAGVAR(module_cmds, $1) \
5927    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5928    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5929    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
5930    _LT_AC_TAGVAR(exclude_expsyms, $1) \
5931    _LT_AC_TAGVAR(include_expsyms, $1); do
5932
5933    case $var in
5934    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5935    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5936    _LT_AC_TAGVAR(archive_cmds, $1) | \
5937    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5938    _LT_AC_TAGVAR(module_cmds, $1) | \
5939    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5940    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5941    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5942    extract_expsyms_cmds | reload_cmds | finish_cmds | \
5943    postinstall_cmds | postuninstall_cmds | \
5944    old_postinstall_cmds | old_postuninstall_cmds | \
5945    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5946      # Double-quote double-evaled strings.
5947      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5948      ;;
5949    *)
5950      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5951      ;;
5952    esac
5953  done
5954
5955  case $lt_echo in
5956  *'\[$]0 --fallback-echo"')
5957    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5958    ;;
5959  esac
5960
5961ifelse([$1], [],
5962  [cfgfile="${ofile}T"
5963  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5964  $rm -f "$cfgfile"
5965  AC_MSG_NOTICE([creating $ofile])],
5966  [cfgfile="$ofile"])
5967
5968  cat <<__EOF__ >> "$cfgfile"
5969ifelse([$1], [],
5970[#! $SHELL
5971
5972# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5973# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5974# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5975#
5976# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5977# Free Software Foundation, Inc.
5978#
5979# This file is part of GNU Libtool:
5980# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5981#
5982# This program is free software; you can redistribute it and/or modify
5983# it under the terms of the GNU General Public License as published by
5984# the Free Software Foundation; either version 2 of the License, or
5985# (at your option) any later version.
5986#
5987# This program is distributed in the hope that it will be useful, but
5988# WITHOUT ANY WARRANTY; without even the implied warranty of
5989# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5990# General Public License for more details.
5991#
5992# You should have received a copy of the GNU General Public License
5993# along with this program; if not, write to the Free Software
5994# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5995#
5996# As a special exception to the GNU General Public License, if you
5997# distribute this file as part of a program that contains a
5998# configuration script generated by Autoconf, you may include it under
5999# the same distribution terms that you use for the rest of that program.
6000
6001# A sed program that does not truncate output.
6002SED=$lt_SED
6003
6004# Sed that helps us avoid accidentally triggering echo(1) options like -n.
6005Xsed="$SED -e 1s/^X//"
6006
6007# The HP-UX ksh and POSIX shell print the target directory to stdout
6008# if CDPATH is set.
6009(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
6010
6011# The names of the tagged configurations supported by this script.
6012available_tags=
6013
6014# ### BEGIN LIBTOOL CONFIG],
6015[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
6016
6017# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6018
6019# Shell to use when invoking shell scripts.
6020SHELL=$lt_SHELL
6021
6022# Whether or not to build shared libraries.
6023build_libtool_libs=$enable_shared
6024
6025# Whether or not to build static libraries.
6026build_old_libs=$enable_static
6027
6028# Whether or not to add -lc for building shared libraries.
6029build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
6030
6031# Whether or not to disallow shared libs when runtime libs are static
6032allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
6033
6034# Whether or not to optimize for fast installation.
6035fast_install=$enable_fast_install
6036
6037# The host system.
6038host_alias=$host_alias
6039host=$host
6040host_os=$host_os
6041
6042# The build system.
6043build_alias=$build_alias
6044build=$build
6045build_os=$build_os
6046
6047# An echo program that does not interpret backslashes.
6048echo=$lt_echo
6049
6050# The archiver.
6051AR=$lt_AR
6052AR_FLAGS=$lt_AR_FLAGS
6053
6054# A C compiler.
6055LTCC=$lt_LTCC
6056
6057# LTCC compiler flags.
6058LTCFLAGS=$lt_LTCFLAGS
6059
6060# A language-specific compiler.
6061CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
6062
6063# Is the compiler the GNU C compiler?
6064with_gcc=$_LT_AC_TAGVAR(GCC, $1)
6065
6066# An ERE matcher.
6067EGREP=$lt_EGREP
6068
6069# The linker used to build libraries.
6070LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
6071
6072# Whether we need hard or soft links.
6073LN_S=$lt_LN_S
6074
6075# A BSD-compatible nm program.
6076NM=$lt_NM
6077
6078# A symbol stripping program
6079STRIP=$lt_STRIP
6080
6081# Used to examine libraries when file_magic_cmd begins "file"
6082MAGIC_CMD=$MAGIC_CMD
6083
6084# Used on cygwin: DLL creation program.
6085DLLTOOL="$DLLTOOL"
6086
6087# Used on cygwin: object dumper.
6088OBJDUMP="$OBJDUMP"
6089
6090# Used on cygwin: assembler.
6091AS="$AS"
6092
6093# The name of the directory that contains temporary libtool files.
6094objdir=$objdir
6095
6096# How to create reloadable object files.
6097reload_flag=$lt_reload_flag
6098reload_cmds=$lt_reload_cmds
6099
6100# How to pass a linker flag through the compiler.
6101wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6102
6103# Object file suffix (normally "o").
6104objext="$ac_objext"
6105
6106# Old archive suffix (normally "a").
6107libext="$libext"
6108
6109# Shared library suffix (normally ".so").
6110shrext_cmds='$shrext_cmds'
6111
6112# Executable file suffix (normally "").
6113exeext="$exeext"
6114
6115# Additional compiler flags for building library objects.
6116pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6117pic_mode=$pic_mode
6118
6119# What is the maximum length of a command?
6120max_cmd_len=$lt_cv_sys_max_cmd_len
6121
6122# Does compiler simultaneously support -c and -o options?
6123compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
6124
6125# Must we lock files when doing compilation?
6126need_locks=$lt_need_locks
6127
6128# Do we need the lib prefix for modules?
6129need_lib_prefix=$need_lib_prefix
6130
6131# Do we need a version for libraries?
6132need_version=$need_version
6133
6134# Whether dlopen is supported.
6135dlopen_support=$enable_dlopen
6136
6137# Whether dlopen of programs is supported.
6138dlopen_self=$enable_dlopen_self
6139
6140# Whether dlopen of statically linked programs is supported.
6141dlopen_self_static=$enable_dlopen_self_static
6142
6143# Compiler flag to prevent dynamic linking.
6144link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
6145
6146# Compiler flag to turn off builtin functions.
6147no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
6148
6149# Compiler flag to allow reflexive dlopens.
6150export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
6151
6152# Compiler flag to generate shared objects directly from archives.
6153whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
6154
6155# Compiler flag to generate thread-safe objects.
6156thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
6157
6158# Library versioning type.
6159version_type=$version_type
6160
6161# Format of library name prefix.
6162libname_spec=$lt_libname_spec
6163
6164# List of archive names.  First name is the real one, the rest are links.
6165# The last name is the one that the linker finds with -lNAME.
6166library_names_spec=$lt_library_names_spec
6167
6168# The coded name of the library, if different from the real name.
6169soname_spec=$lt_soname_spec
6170
6171# Commands used to build and install an old-style archive.
6172RANLIB=$lt_RANLIB
6173old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
6174old_postinstall_cmds=$lt_old_postinstall_cmds
6175old_postuninstall_cmds=$lt_old_postuninstall_cmds
6176
6177# Create an old-style archive from a shared archive.
6178old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
6179
6180# Create a temporary old-style archive to link instead of a shared archive.
6181old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
6182
6183# Commands used to build and install a shared archive.
6184archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
6185archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
6186postinstall_cmds=$lt_postinstall_cmds
6187postuninstall_cmds=$lt_postuninstall_cmds
6188
6189# Commands used to build a loadable module (assumed same as above if empty)
6190module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
6191module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
6192
6193# Commands to strip libraries.
6194old_striplib=$lt_old_striplib
6195striplib=$lt_striplib
6196
6197# Dependencies to place before the objects being linked to create a
6198# shared library.
6199predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
6200
6201# Dependencies to place after the objects being linked to create a
6202# shared library.
6203postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
6204
6205# Dependencies to place before the objects being linked to create a
6206# shared library.
6207predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
6208
6209# Dependencies to place after the objects being linked to create a
6210# shared library.
6211postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
6212
6213# The directories searched by this compiler when creating a shared
6214# library
6215compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
6216
6217# The library search path used internally by the compiler when linking
6218# a shared library.
6219compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
6220
6221# Method to check whether dependent libraries are shared objects.
6222deplibs_check_method=$lt_deplibs_check_method
6223
6224# Command to use when deplibs_check_method == file_magic.
6225file_magic_cmd=$lt_file_magic_cmd
6226
6227# Flag that allows shared libraries with undefined symbols to be built.
6228allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
6229
6230# Flag that forces no undefined symbols.
6231no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
6232
6233# Commands used to finish a libtool library installation in a directory.
6234finish_cmds=$lt_finish_cmds
6235
6236# Same as above, but a single script fragment to be evaled but not shown.
6237finish_eval=$lt_finish_eval
6238
6239# Take the output of nm and produce a listing of raw symbols and C names.
6240global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
6241
6242# Transform the output of nm in a proper C declaration
6243global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
6244
6245# Transform the output of nm in a C name address pair
6246global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
6247
6248# This is the shared library runtime path variable.
6249runpath_var=$runpath_var
6250
6251# This is the shared library path variable.
6252shlibpath_var=$shlibpath_var
6253
6254# Is shlibpath searched before the hard-coded library search path?
6255shlibpath_overrides_runpath=$shlibpath_overrides_runpath
6256
6257# How to hardcode a shared library path into an executable.
6258hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
6259
6260# Whether we should hardcode library paths into libraries.
6261hardcode_into_libs=$hardcode_into_libs
6262
6263# Flag to hardcode \$libdir into a binary during linking.
6264# This must work even if \$libdir does not exist.
6265hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
6266
6267# If ld is used when linking, flag to hardcode \$libdir into
6268# a binary during linking. This must work even if \$libdir does
6269# not exist.
6270hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
6271
6272# Whether we need a single -rpath flag with a separated argument.
6273hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6274
6275# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6276# resulting binary.
6277hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6278
6279# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6280# resulting binary.
6281hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6282
6283# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6284# the resulting binary.
6285hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6286
6287# Set to yes if building a shared library automatically hardcodes DIR into the library
6288# and all subsequent libraries and executables linked against it.
6289hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6290
6291# Variables whose values should be saved in libtool wrapper scripts and
6292# restored at relink time.
6293variables_saved_for_relink="$variables_saved_for_relink"
6294
6295# Whether libtool must link a program against all its dependency libraries.
6296link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6297
6298# Compile-time system search path for libraries
6299sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6300
6301# Run-time system search path for libraries
6302sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6303
6304# Fix the shell variable \$srcfile for the compiler.
6305fix_srcfile_path=$lt_fix_srcfile_path
6306
6307# Set to yes if exported symbols are required.
6308always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6309
6310# The commands to list exported symbols.
6311export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6312
6313# The commands to extract the exported symbol list from a shared archive.
6314extract_expsyms_cmds=$lt_extract_expsyms_cmds
6315
6316# Symbols that should not be listed in the preloaded symbols.
6317exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6318
6319# Symbols that must always be exported.
6320include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6321
6322ifelse([$1],[],
6323[# ### END LIBTOOL CONFIG],
6324[# ### END LIBTOOL TAG CONFIG: $tagname])
6325
6326__EOF__
6327
6328ifelse([$1],[], [
6329  case $host_os in
6330  aix3*)
6331    cat <<\EOF >> "$cfgfile"
6332
6333# AIX sometimes has problems with the GCC collect2 program.  For some
6334# reason, if we set the COLLECT_NAMES environment variable, the problems
6335# vanish in a puff of smoke.
6336if test "X${COLLECT_NAMES+set}" != Xset; then
6337  COLLECT_NAMES=
6338  export COLLECT_NAMES
6339fi
6340EOF
6341    ;;
6342  esac
6343
6344  # We use sed instead of cat because bash on DJGPP gets confused if
6345  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
6346  # text mode, it properly converts lines to CR/LF.  This bash problem
6347  # is reportedly fixed, but why not run on old versions too?
6348  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6349
6350  mv -f "$cfgfile" "$ofile" || \
6351    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6352  chmod +x "$ofile"
6353])
6354else
6355  # If there is no Makefile yet, we rely on a make rule to execute
6356  # `config.status --recheck' to rerun these tests and create the
6357  # libtool script then.
6358  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
6359  if test -f "$ltmain_in"; then
6360    test -f Makefile && make "$ltmain"
6361  fi
6362fi
6363])# AC_LIBTOOL_CONFIG
6364
6365
6366# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6367# -------------------------------------------
6368AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6369[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6370
6371_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6372
6373if test "$GCC" = yes; then
6374  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6375
6376  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6377    lt_cv_prog_compiler_rtti_exceptions,
6378    [-fno-rtti -fno-exceptions], [],
6379    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6380fi
6381])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6382
6383
6384# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6385# ---------------------------------
6386AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6387[AC_REQUIRE([AC_CANONICAL_HOST])
6388AC_REQUIRE([LT_AC_PROG_SED])
6389AC_REQUIRE([AC_PROG_NM])
6390AC_REQUIRE([AC_OBJEXT])
6391# Check for command to grab the raw symbol name followed by C symbol from nm.
6392AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6393AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6394[
6395# These are sane defaults that work on at least a few old systems.
6396# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6397
6398# Character class describing NM global symbol codes.
6399symcode='[[BCDEGRST]]'
6400
6401# Regexp to match symbols that can be accessed directly from C.
6402sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6403
6404# Transform an extracted symbol line into a proper C declaration
6405lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6406
6407# Transform an extracted symbol line into symbol name and symbol address
6408lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6409
6410# Define system-specific variables.
6411case $host_os in
6412aix*)
6413  symcode='[[BCDT]]'
6414  ;;
6415cygwin* | mingw* | pw32*)
6416  symcode='[[ABCDGISTW]]'
6417  ;;
6418hpux*) # Its linker distinguishes data from code symbols
6419  if test "$host_cpu" = ia64; then
6420    symcode='[[ABCDEGRST]]'
6421  fi
6422  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6423  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6424  ;;
6425linux* | k*bsd*-gnu)
6426  if test "$host_cpu" = ia64; then
6427    symcode='[[ABCDGIRSTW]]'
6428    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6429    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6430  fi
6431  ;;
6432irix* | nonstopux*)
6433  symcode='[[BCDEGRST]]'
6434  ;;
6435osf*)
6436  symcode='[[BCDEGQRST]]'
6437  ;;
6438solaris*)
6439  symcode='[[BDRT]]'
6440  ;;
6441sco3.2v5*)
6442  symcode='[[DT]]'
6443  ;;
6444sysv4.2uw2*)
6445  symcode='[[DT]]'
6446  ;;
6447sysv5* | sco5v6* | unixware* | OpenUNIX*)
6448  symcode='[[ABDT]]'
6449  ;;
6450sysv4)
6451  symcode='[[DFNSTU]]'
6452  ;;
6453esac
6454
6455# Handle CRLF in mingw tool chain
6456opt_cr=
6457case $build_os in
6458mingw*)
6459  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6460  ;;
6461esac
6462
6463# If we're using GNU nm, then use its standard symbol codes.
6464case `$NM -V 2>&1` in
6465*GNU* | *'with BFD'*)
6466  symcode='[[ABCDGIRSTW]]' ;;
6467esac
6468
6469# Try without a prefix undercore, then with it.
6470for ac_symprfx in "" "_"; do
6471
6472  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6473  symxfrm="\\1 $ac_symprfx\\2 \\2"
6474
6475  # Write the raw and C identifiers.
6476  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6477
6478  # Check to see that the pipe works correctly.
6479  pipe_works=no
6480
6481  rm -f conftest*
6482  cat > conftest.$ac_ext <<EOF
6483#ifdef __cplusplus
6484extern "C" {
6485#endif
6486char nm_test_var;
6487void nm_test_func(){}
6488#ifdef __cplusplus
6489}
6490#endif
6491int main(){nm_test_var='a';nm_test_func();return(0);}
6492EOF
6493
6494  if AC_TRY_EVAL(ac_compile); then
6495    # Now try to grab the symbols.
6496    nlist=conftest.nm
6497    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6498      # Try sorting and uniquifying the output.
6499      if sort "$nlist" | uniq > "$nlist"T; then
6500	mv -f "$nlist"T "$nlist"
6501      else
6502	rm -f "$nlist"T
6503      fi
6504
6505      # Make sure that we snagged all the symbols we need.
6506      if grep ' nm_test_var$' "$nlist" >/dev/null; then
6507	if grep ' nm_test_func$' "$nlist" >/dev/null; then
6508	  cat <<EOF > conftest.$ac_ext
6509#ifdef __cplusplus
6510extern "C" {
6511#endif
6512
6513EOF
6514	  # Now generate the symbol file.
6515	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6516
6517	  cat <<EOF >> conftest.$ac_ext
6518#if defined (__STDC__) && __STDC__
6519# define lt_ptr_t void *
6520#else
6521# define lt_ptr_t char *
6522# define const
6523#endif
6524
6525/* The mapping between symbol names and symbols. */
6526const struct {
6527  const char *name;
6528  lt_ptr_t address;
6529}
6530lt_preloaded_symbols[[]] =
6531{
6532EOF
6533	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6534	  cat <<\EOF >> conftest.$ac_ext
6535  {0, (lt_ptr_t) 0}
6536};
6537
6538#ifdef __cplusplus
6539}
6540#endif
6541EOF
6542	  # Now try linking the two files.
6543	  mv conftest.$ac_objext conftstm.$ac_objext
6544	  lt_save_LIBS="$LIBS"
6545	  lt_save_CFLAGS="$CFLAGS"
6546	  LIBS="conftstm.$ac_objext"
6547	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6548	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6549	    pipe_works=yes
6550	  fi
6551	  LIBS="$lt_save_LIBS"
6552	  CFLAGS="$lt_save_CFLAGS"
6553	else
6554	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6555	fi
6556      else
6557	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6558      fi
6559    else
6560      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6561    fi
6562  else
6563    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6564    cat conftest.$ac_ext >&5
6565  fi
6566  rm -rf conftest* conftst*
6567
6568  # Do not use the global_symbol_pipe unless it works.
6569  if test "$pipe_works" = yes; then
6570    break
6571  else
6572    lt_cv_sys_global_symbol_pipe=
6573  fi
6574done
6575])
6576if test -z "$lt_cv_sys_global_symbol_pipe"; then
6577  lt_cv_sys_global_symbol_to_cdecl=
6578fi
6579if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6580  AC_MSG_RESULT(failed)
6581else
6582  AC_MSG_RESULT(ok)
6583fi
6584]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6585
6586
6587# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6588# ---------------------------------------
6589AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6590[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6591_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6592_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6593
6594AC_MSG_CHECKING([for $compiler option to produce PIC])
6595 ifelse([$1],[CXX],[
6596  # C++ specific cases for pic, static, wl, etc.
6597  if test "$GXX" = yes; then
6598    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6599    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6600
6601    case $host_os in
6602    aix*)
6603      # All AIX code is PIC.
6604      if test "$host_cpu" = ia64; then
6605	# AIX 5 now supports IA64 processor
6606	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6607      fi
6608      ;;
6609    amigaos*)
6610      # FIXME: we need at least 68020 code to build shared libraries, but
6611      # adding the `-m68020' flag to GCC prevents building anything better,
6612      # like `-m68040'.
6613      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6614      ;;
6615    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6616      # PIC is the default for these OSes.
6617      ;;
6618    mingw* | cygwin* | os2* | pw32*)
6619      # This hack is so that the source file can tell whether it is being
6620      # built for inclusion in a dll (and should export symbols for example).
6621      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6622      # (--disable-auto-import) libraries
6623      m4_if([$1], [GCJ], [],
6624	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6625      ;;
6626    darwin* | rhapsody*)
6627      # PIC is the default on this platform
6628      # Common symbols not allowed in MH_DYLIB files
6629      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6630      ;;
6631    *djgpp*)
6632      # DJGPP does not support shared libraries at all
6633      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6634      ;;
6635    interix[[3-9]]*)
6636      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6637      # Instead, we relocate shared libraries at runtime.
6638      ;;
6639    sysv4*MP*)
6640      if test -d /usr/nec; then
6641	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6642      fi
6643      ;;
6644    hpux*)
6645      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6646      # not for PA HP-UX.
6647      case $host_cpu in
6648      hppa*64*|ia64*)
6649	;;
6650      *)
6651	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6652	;;
6653      esac
6654      ;;
6655    *)
6656      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6657      ;;
6658    esac
6659  else
6660    case $host_os in
6661      aix[[4-9]]*)
6662	# All AIX code is PIC.
6663	if test "$host_cpu" = ia64; then
6664	  # AIX 5 now supports IA64 processor
6665	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6666	else
6667	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6668	fi
6669	;;
6670      chorus*)
6671	case $cc_basename in
6672	cxch68*)
6673	  # Green Hills C++ Compiler
6674	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
6675	  ;;
6676	esac
6677	;;
6678       darwin*)
6679         # PIC is the default on this platform
6680         # Common symbols not allowed in MH_DYLIB files
6681         case $cc_basename in
6682           xlc*)
6683           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6684           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6685           ;;
6686         esac
6687       ;;
6688      dgux*)
6689	case $cc_basename in
6690	  ec++*)
6691	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6692	    ;;
6693	  ghcx*)
6694	    # Green Hills C++ Compiler
6695	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6696	    ;;
6697	  *)
6698	    ;;
6699	esac
6700	;;
6701      freebsd* | dragonfly*)
6702	# FreeBSD uses GNU C++
6703	;;
6704      hpux9* | hpux10* | hpux11*)
6705	case $cc_basename in
6706	  CC*)
6707	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6708	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6709	    if test "$host_cpu" != ia64; then
6710	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6711	    fi
6712	    ;;
6713	  aCC*)
6714	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6715	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6716	    case $host_cpu in
6717	    hppa*64*|ia64*)
6718	      # +Z the default
6719	      ;;
6720	    *)
6721	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6722	      ;;
6723	    esac
6724	    ;;
6725	  *)
6726	    ;;
6727	esac
6728	;;
6729      interix*)
6730	# This is c89, which is MS Visual C++ (no shared libs)
6731	# Anyone wants to do a port?
6732	;;
6733      irix5* | irix6* | nonstopux*)
6734	case $cc_basename in
6735	  CC*)
6736	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6737	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6738	    # CC pic flag -KPIC is the default.
6739	    ;;
6740	  *)
6741	    ;;
6742	esac
6743	;;
6744      linux* | k*bsd*-gnu)
6745	case $cc_basename in
6746	  KCC*)
6747	    # KAI C++ Compiler
6748	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6749	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6750	    ;;
6751	  icpc* | ecpc*)
6752	    # Intel C++
6753	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6754	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6755	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6756	    ;;
6757	  pgCC* | pgcpp*)
6758	    # Portland Group C++ compiler.
6759	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6760	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6761	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6762	    ;;
6763	  cxx*)
6764	    # Compaq C++
6765	    # Make sure the PIC flag is empty.  It appears that all Alpha
6766	    # Linux and Compaq Tru64 Unix objects are PIC.
6767	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6768	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6769	    ;;
6770	  *)
6771	    case `$CC -V 2>&1 | sed 5q` in
6772	    *Sun\ C*)
6773	      # Sun C++ 5.9
6774	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6775	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6776	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6777	      ;;
6778	    esac
6779	    ;;
6780	esac
6781	;;
6782      lynxos*)
6783	;;
6784      m88k*)
6785	;;
6786      mvs*)
6787	case $cc_basename in
6788	  cxx*)
6789	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6790	    ;;
6791	  *)
6792	    ;;
6793	esac
6794	;;
6795      netbsd*)
6796	;;
6797      osf3* | osf4* | osf5*)
6798	case $cc_basename in
6799	  KCC*)
6800	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6801	    ;;
6802	  RCC*)
6803	    # Rational C++ 2.4.1
6804	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6805	    ;;
6806	  cxx*)
6807	    # Digital/Compaq C++
6808	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6809	    # Make sure the PIC flag is empty.  It appears that all Alpha
6810	    # Linux and Compaq Tru64 Unix objects are PIC.
6811	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6812	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6813	    ;;
6814	  *)
6815	    ;;
6816	esac
6817	;;
6818      psos*)
6819	;;
6820      solaris*)
6821	case $cc_basename in
6822	  CC*)
6823	    # Sun C++ 4.2, 5.x and Centerline C++
6824	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6825	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6826	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6827	    ;;
6828	  gcx*)
6829	    # Green Hills C++ Compiler
6830	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6831	    ;;
6832	  *)
6833	    ;;
6834	esac
6835	;;
6836      sunos4*)
6837	case $cc_basename in
6838	  CC*)
6839	    # Sun C++ 4.x
6840	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6841	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6842	    ;;
6843	  lcc*)
6844	    # Lucid
6845	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6846	    ;;
6847	  *)
6848	    ;;
6849	esac
6850	;;
6851      tandem*)
6852	case $cc_basename in
6853	  NCC*)
6854	    # NonStop-UX NCC 3.20
6855	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6856	    ;;
6857	  *)
6858	    ;;
6859	esac
6860	;;
6861      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6862	case $cc_basename in
6863	  CC*)
6864	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6865	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6866	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6867	    ;;
6868	esac
6869	;;
6870      vxworks*)
6871	;;
6872      *)
6873	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6874	;;
6875    esac
6876  fi
6877],
6878[
6879  if test "$GCC" = yes; then
6880    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6881    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6882
6883    case $host_os in
6884      aix*)
6885      # All AIX code is PIC.
6886      if test "$host_cpu" = ia64; then
6887	# AIX 5 now supports IA64 processor
6888	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6889      fi
6890      ;;
6891
6892    amigaos*)
6893      # FIXME: we need at least 68020 code to build shared libraries, but
6894      # adding the `-m68020' flag to GCC prevents building anything better,
6895      # like `-m68040'.
6896      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6897      ;;
6898
6899    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6900      # PIC is the default for these OSes.
6901      ;;
6902
6903    mingw* | cygwin* | pw32* | os2*)
6904      # This hack is so that the source file can tell whether it is being
6905      # built for inclusion in a dll (and should export symbols for example).
6906      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6907      # (--disable-auto-import) libraries
6908      m4_if([$1], [GCJ], [],
6909	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6910      ;;
6911
6912    darwin* | rhapsody*)
6913      # PIC is the default on this platform
6914      # Common symbols not allowed in MH_DYLIB files
6915      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6916      ;;
6917
6918    interix[[3-9]]*)
6919      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6920      # Instead, we relocate shared libraries at runtime.
6921      ;;
6922
6923    msdosdjgpp*)
6924      # Just because we use GCC doesn't mean we suddenly get shared libraries
6925      # on systems that don't support them.
6926      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6927      enable_shared=no
6928      ;;
6929
6930    sysv4*MP*)
6931      if test -d /usr/nec; then
6932	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6933      fi
6934      ;;
6935
6936    hpux*)
6937      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6938      # not for PA HP-UX.
6939      case $host_cpu in
6940      hppa*64*|ia64*)
6941	# +Z the default
6942	;;
6943      *)
6944	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6945	;;
6946      esac
6947      ;;
6948
6949    *)
6950      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6951      ;;
6952    esac
6953  else
6954    # PORTME Check for flag to pass linker flags through the system compiler.
6955    case $host_os in
6956    aix*)
6957      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6958      if test "$host_cpu" = ia64; then
6959	# AIX 5 now supports IA64 processor
6960	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6961      else
6962	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6963      fi
6964      ;;
6965      darwin*)
6966        # PIC is the default on this platform
6967        # Common symbols not allowed in MH_DYLIB files
6968       case $cc_basename in
6969         xlc*)
6970         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6971         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6972         ;;
6973       esac
6974       ;;
6975
6976    mingw* | cygwin* | pw32* | os2*)
6977      # This hack is so that the source file can tell whether it is being
6978      # built for inclusion in a dll (and should export symbols for example).
6979      m4_if([$1], [GCJ], [],
6980	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6981      ;;
6982
6983    hpux9* | hpux10* | hpux11*)
6984      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6985      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6986      # not for PA HP-UX.
6987      case $host_cpu in
6988      hppa*64*|ia64*)
6989	# +Z the default
6990	;;
6991      *)
6992	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6993	;;
6994      esac
6995      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6996      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6997      ;;
6998
6999    irix5* | irix6* | nonstopux*)
7000      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7001      # PIC (with -KPIC) is the default.
7002      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7003      ;;
7004
7005    newsos6)
7006      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7007      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7008      ;;
7009
7010    linux* | k*bsd*-gnu)
7011      case $cc_basename in
7012      icc* | ecc*)
7013	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7014	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7015	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7016        ;;
7017      pgcc* | pgf77* | pgf90* | pgf95*)
7018        # Portland Group compilers (*not* the Pentium gcc compiler,
7019	# which looks to be a dead project)
7020	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7021	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7022	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7023        ;;
7024      ccc*)
7025        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7026        # All Alpha code is PIC.
7027        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7028        ;;
7029      *)
7030        case `$CC -V 2>&1 | sed 5q` in
7031	*Sun\ C*)
7032	  # Sun C 5.9
7033	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7034	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7035	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7036	  ;;
7037	*Sun\ F*)
7038	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
7039	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7040	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7041	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
7042	  ;;
7043	esac
7044	;;
7045      esac
7046      ;;
7047
7048    osf3* | osf4* | osf5*)
7049      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7050      # All OSF/1 code is PIC.
7051      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7052      ;;
7053
7054    rdos*)
7055      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7056      ;;
7057
7058    solaris*)
7059      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7060      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7061      case $cc_basename in
7062      f77* | f90* | f95*)
7063	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
7064      *)
7065	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
7066      esac
7067      ;;
7068
7069    sunos4*)
7070      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7071      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7072      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7073      ;;
7074
7075    sysv4 | sysv4.2uw2* | sysv4.3*)
7076      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7077      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7078      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7079      ;;
7080
7081    sysv4*MP*)
7082      if test -d /usr/nec ;then
7083	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
7084	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7085      fi
7086      ;;
7087
7088    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7089      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7090      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7091      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7092      ;;
7093
7094    unicos*)
7095      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7096      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7097      ;;
7098
7099    uts4*)
7100      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7101      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7102      ;;
7103
7104    *)
7105      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7106      ;;
7107    esac
7108  fi
7109])
7110AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
7111
7112#
7113# Check to make sure the PIC flag actually works.
7114#
7115if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
7116  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
7117    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
7118    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
7119    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
7120     "" | " "*) ;;
7121     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
7122     esac],
7123    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7124     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
7125fi
7126case $host_os in
7127  # For platforms which do not support PIC, -DPIC is meaningless:
7128  *djgpp*)
7129    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7130    ;;
7131  *)
7132    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
7133    ;;
7134esac
7135
7136#
7137# Check to make sure the static flag actually works.
7138#
7139wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
7140AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
7141  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
7142  $lt_tmp_static_flag,
7143  [],
7144  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7145])
7146
7147
7148# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
7149# ------------------------------------
7150# See if the linker supports building shared libraries.
7151AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
7152[AC_REQUIRE([LT_AC_PROG_SED])dnl
7153AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7154ifelse([$1],[CXX],[
7155  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7156  case $host_os in
7157  aix[[4-9]]*)
7158    # If we're using GNU nm, then we don't want the "-C" option.
7159    # -C means demangle to AIX nm, but means don't demangle with GNU nm
7160    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7161      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7162    else
7163      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7164    fi
7165    ;;
7166  pw32*)
7167    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
7168  ;;
7169  cygwin* | mingw*)
7170    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
7171  ;;
7172  *)
7173    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7174  ;;
7175  esac
7176  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7177],[
7178  runpath_var=
7179  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7180  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7181  _LT_AC_TAGVAR(archive_cmds, $1)=
7182  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7183  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
7184  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7185  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7186  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7187  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
7188  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7189  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7190  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7191  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7192  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7193  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7194  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7195  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
7196  _LT_AC_TAGVAR(module_cmds, $1)=
7197  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
7198  _LT_AC_TAGVAR(always_export_symbols, $1)=no
7199  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7200  # include_expsyms should be a list of space-separated symbols to be *always*
7201  # included in the symbol list
7202  _LT_AC_TAGVAR(include_expsyms, $1)=
7203  # exclude_expsyms can be an extended regexp of symbols to exclude
7204  # it will be wrapped by ` (' and `)$', so one must not match beginning or
7205  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7206  # as well as any symbol that contains `d'.
7207  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7208  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7209  # platforms (ab)use it in PIC code, but their linkers get confused if
7210  # the symbol is explicitly referenced.  Since portable code cannot
7211  # rely on this symbol name, it's probably fine to never include it in
7212  # preloaded symbol tables.
7213  # Exclude shared library initialization/finalization symbols.
7214dnl Note also adjust exclude_expsyms for C++ above.
7215  extract_expsyms_cmds=
7216  # Just being paranoid about ensuring that cc_basename is set.
7217  _LT_CC_BASENAME([$compiler])
7218  case $host_os in
7219  cygwin* | mingw* | pw32*)
7220    # FIXME: the MSVC++ port hasn't been tested in a loooong time
7221    # When not using gcc, we currently assume that we are using
7222    # Microsoft Visual C++.
7223    if test "$GCC" != yes; then
7224      with_gnu_ld=no
7225    fi
7226    ;;
7227  interix*)
7228    # we just hope/assume this is gcc and not c89 (= MSVC++)
7229    with_gnu_ld=yes
7230    ;;
7231  openbsd*)
7232    with_gnu_ld=no
7233    ;;
7234  esac
7235
7236  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7237  if test "$with_gnu_ld" = yes; then
7238    # If archive_cmds runs LD, not CC, wlarc should be empty
7239    wlarc='${wl}'
7240
7241    # Set some defaults for GNU ld with shared library support. These
7242    # are reset later if shared libraries are not supported. Putting them
7243    # here allows them to be overridden if necessary.
7244    runpath_var=LD_RUN_PATH
7245    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7246    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7247    # ancient GNU ld didn't support --whole-archive et. al.
7248    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7249	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7250      else
7251  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7252    fi
7253    supports_anon_versioning=no
7254    case `$LD -v 2>/dev/null` in
7255      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7256      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7257      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7258      *\ 2.11.*) ;; # other 2.11 versions
7259      *) supports_anon_versioning=yes ;;
7260    esac
7261
7262    # See if GNU ld supports shared libraries.
7263    case $host_os in
7264    aix[[3-9]]*)
7265      # On AIX/PPC, the GNU linker is very broken
7266      if test "$host_cpu" != ia64; then
7267	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7268	cat <<EOF 1>&2
7269
7270*** Warning: the GNU linker, at least up to release 2.9.1, is reported
7271*** to be unable to reliably create shared libraries on AIX.
7272*** Therefore, libtool is disabling shared libraries support.  If you
7273*** really care for shared libraries, you may want to modify your PATH
7274*** so that a non-GNU linker is found, and then restart.
7275
7276EOF
7277      fi
7278      ;;
7279
7280    amigaos*)
7281      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7282      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7283      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7284
7285      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7286      # that the semantics of dynamic libraries on AmigaOS, at least up
7287      # to version 4, is to share data among multiple programs linked
7288      # with the same dynamic library.  Since this doesn't match the
7289      # behavior of shared libraries on other platforms, we can't use
7290      # them.
7291      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7292      ;;
7293
7294    beos*)
7295      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7296	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7297	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7298	# support --undefined.  This deserves some investigation.  FIXME
7299	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7300      else
7301	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7302      fi
7303      ;;
7304
7305    cygwin* | mingw* | pw32*)
7306      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7307      # as there is no search path for DLLs.
7308      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7309      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7310      _LT_AC_TAGVAR(always_export_symbols, $1)=no
7311      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7312      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
7313
7314      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7315        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7316	# If the export-symbols file already is a .def file (1st line
7317	# is EXPORTS), use it as is; otherwise, prepend...
7318	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7319	  cp $export_symbols $output_objdir/$soname.def;
7320	else
7321	  echo EXPORTS > $output_objdir/$soname.def;
7322	  cat $export_symbols >> $output_objdir/$soname.def;
7323	fi~
7324	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7325      else
7326	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7327      fi
7328      ;;
7329
7330    interix[[3-9]]*)
7331      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7332      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7333      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7334      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7335      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7336      # Instead, shared libraries are loaded at an image base (0x10000000 by
7337      # default) and relocated if they conflict, which is a slow very memory
7338      # consuming and fragmenting process.  To avoid this, we pick a random,
7339      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7340      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7341      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7342      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7343      ;;
7344
7345    gnu* | linux* | k*bsd*-gnu)
7346      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7347	tmp_addflag=
7348	case $cc_basename,$host_cpu in
7349	pgcc*)				# Portland Group C compiler
7350	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7351	  tmp_addflag=' $pic_flag'
7352	  ;;
7353	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
7354	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7355	  tmp_addflag=' $pic_flag -Mnomain' ;;
7356	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
7357	  tmp_addflag=' -i_dynamic' ;;
7358	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
7359	  tmp_addflag=' -i_dynamic -nofor_main' ;;
7360	ifc* | ifort*)			# Intel Fortran compiler
7361	  tmp_addflag=' -nofor_main' ;;
7362	esac
7363	case `$CC -V 2>&1 | sed 5q` in
7364	*Sun\ C*)			# Sun C 5.9
7365	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7366	  tmp_sharedflag='-G' ;;
7367	*Sun\ F*)			# Sun Fortran 8.3
7368	  tmp_sharedflag='-G' ;;
7369	*)
7370	  tmp_sharedflag='-shared' ;;
7371	esac
7372	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7373
7374	if test $supports_anon_versioning = yes; then
7375	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
7376  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7377  $echo "local: *; };" >> $output_objdir/$libname.ver~
7378	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7379	fi
7380      else
7381	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7382      fi
7383      ;;
7384
7385    netbsd*)
7386      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7387	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7388	wlarc=
7389      else
7390	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7391	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7392      fi
7393      ;;
7394
7395    solaris*)
7396      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7397	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7398	cat <<EOF 1>&2
7399
7400*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7401*** create shared libraries on Solaris systems.  Therefore, libtool
7402*** is disabling shared libraries support.  We urge you to upgrade GNU
7403*** binutils to release 2.9.1 or newer.  Another option is to modify
7404*** your PATH or compiler configuration so that the native linker is
7405*** used, and then restart.
7406
7407EOF
7408      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7409	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7410	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7411      else
7412	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7413      fi
7414      ;;
7415
7416    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7417      case `$LD -v 2>&1` in
7418        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7419	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7420	cat <<_LT_EOF 1>&2
7421
7422*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7423*** reliably create shared libraries on SCO systems.  Therefore, libtool
7424*** is disabling shared libraries support.  We urge you to upgrade GNU
7425*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7426*** your PATH or compiler configuration so that the native linker is
7427*** used, and then restart.
7428
7429_LT_EOF
7430	;;
7431	*)
7432	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7433	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
7434	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
7435	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
7436	  else
7437	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
7438	  fi
7439	;;
7440      esac
7441      ;;
7442
7443    sunos4*)
7444      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7445      wlarc=
7446      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7447      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7448      ;;
7449
7450    *)
7451      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7452	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7453	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7454      else
7455	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7456      fi
7457      ;;
7458    esac
7459
7460    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
7461      runpath_var=
7462      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7463      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7464      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7465    fi
7466  else
7467    # PORTME fill in a description of your system's linker (not GNU ld)
7468    case $host_os in
7469    aix3*)
7470      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7471      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7472      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
7473      # Note: this linker hardcodes the directories in LIBPATH if there
7474      # are no directories specified by -L.
7475      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7476      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7477	# Neither direct hardcoding nor static linking is supported with a
7478	# broken collect2.
7479	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7480      fi
7481      ;;
7482
7483    aix[[4-9]]*)
7484      if test "$host_cpu" = ia64; then
7485	# On IA64, the linker does run time linking by default, so we don't
7486	# have to do anything special.
7487	aix_use_runtimelinking=no
7488	exp_sym_flag='-Bexport'
7489	no_entry_flag=""
7490      else
7491	# If we're using GNU nm, then we don't want the "-C" option.
7492	# -C means demangle to AIX nm, but means don't demangle with GNU nm
7493	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7494	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7495	else
7496	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7497	fi
7498	aix_use_runtimelinking=no
7499
7500	# Test if we are trying to use run time linking or normal
7501	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7502	# need to do runtime linking.
7503	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7504	  for ld_flag in $LDFLAGS; do
7505  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7506  	    aix_use_runtimelinking=yes
7507  	    break
7508  	  fi
7509	  done
7510	  ;;
7511	esac
7512
7513	exp_sym_flag='-bexport'
7514	no_entry_flag='-bnoentry'
7515      fi
7516
7517      # When large executables or shared objects are built, AIX ld can
7518      # have problems creating the table of contents.  If linking a library
7519      # or program results in "error TOC overflow" add -mminimal-toc to
7520      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7521      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7522
7523      _LT_AC_TAGVAR(archive_cmds, $1)=''
7524      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7525      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7526      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7527
7528      if test "$GCC" = yes; then
7529	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7530	# We only want to do this on AIX 4.2 and lower, the check
7531	# below for broken collect2 doesn't work under 4.3+
7532	  collect2name=`${CC} -print-prog-name=collect2`
7533	  if test -f "$collect2name" && \
7534  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
7535	  then
7536  	  # We have reworked collect2
7537  	  :
7538	  else
7539  	  # We have old collect2
7540  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7541  	  # It fails to find uninstalled libraries when the uninstalled
7542  	  # path is not listed in the libpath.  Setting hardcode_minus_L
7543  	  # to unsupported forces relinking
7544  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7545  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7546  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7547	  fi
7548	  ;;
7549	esac
7550	shared_flag='-shared'
7551	if test "$aix_use_runtimelinking" = yes; then
7552	  shared_flag="$shared_flag "'${wl}-G'
7553	fi
7554      else
7555	# not using gcc
7556	if test "$host_cpu" = ia64; then
7557  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7558  	# chokes on -Wl,-G. The following line is correct:
7559	  shared_flag='-G'
7560	else
7561	  if test "$aix_use_runtimelinking" = yes; then
7562	    shared_flag='${wl}-G'
7563	  else
7564	    shared_flag='${wl}-bM:SRE'
7565	  fi
7566	fi
7567      fi
7568
7569      # It seems that -bexpall does not export symbols beginning with
7570      # underscore (_), so it is better to generate a list of symbols to export.
7571      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7572      if test "$aix_use_runtimelinking" = yes; then
7573	# Warning - without using the other runtime loading flags (-brtl),
7574	# -berok will link without error, but may produce a broken library.
7575	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7576       # Determine the default libpath from the value encoded in an empty executable.
7577       _LT_AC_SYS_LIBPATH_AIX
7578       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7579	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7580       else
7581	if test "$host_cpu" = ia64; then
7582	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7583	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7584	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7585	else
7586	 # Determine the default libpath from the value encoded in an empty executable.
7587	 _LT_AC_SYS_LIBPATH_AIX
7588	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7589	  # Warning - without using the other run time loading flags,
7590	  # -berok will link without error, but may produce a broken library.
7591	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7592	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7593	  # Exported symbols can be pulled into shared objects from archives
7594	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7595	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7596	  # This is similar to how AIX traditionally builds its shared libraries.
7597	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7598	fi
7599      fi
7600      ;;
7601
7602    amigaos*)
7603      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7604      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7605      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7606      # see comment about different semantics on the GNU ld section
7607      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7608      ;;
7609
7610    bsdi[[45]]*)
7611      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7612      ;;
7613
7614    cygwin* | mingw* | pw32*)
7615      # When not using gcc, we currently assume that we are using
7616      # Microsoft Visual C++.
7617      # hardcode_libdir_flag_spec is actually meaningless, as there is
7618      # no search path for DLLs.
7619      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7620      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7621      # Tell ltmain to make .lib files, not .a files.
7622      libext=lib
7623      # Tell ltmain to make .dll files, not .so files.
7624      shrext_cmds=".dll"
7625      # FIXME: Setting linknames here is a bad hack.
7626      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7627      # The linker will automatically build a .lib file if we build a DLL.
7628      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7629      # FIXME: Should let the user specify the lib program.
7630      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7631      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7632      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7633      ;;
7634
7635    darwin* | rhapsody*)
7636      case $host_os in
7637        rhapsody* | darwin1.[[012]])
7638         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7639         ;;
7640       *) # Darwin 1.3 on
7641         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7642           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7643         else
7644           case ${MACOSX_DEPLOYMENT_TARGET} in
7645             10.[[012]])
7646               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7647               ;;
7648             10.*)
7649               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7650               ;;
7651           esac
7652         fi
7653         ;;
7654      esac
7655      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7656      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7657      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7658      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7659      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7660      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7661    if test "$GCC" = yes ; then
7662    	output_verbose_link_cmd='echo'
7663        _LT_AC_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}"
7664        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
7665        _LT_AC_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}"
7666        _LT_AC_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}"
7667    else
7668      case $cc_basename in
7669        xlc*)
7670         output_verbose_link_cmd='echo'
7671         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
7672         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7673          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7674         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7675          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7676          ;;
7677       *)
7678         _LT_AC_TAGVAR(ld_shlibs, $1)=no
7679          ;;
7680      esac
7681    fi
7682      ;;
7683
7684    dgux*)
7685      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7686      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7687      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7688      ;;
7689
7690    freebsd1*)
7691      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7692      ;;
7693
7694    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7695    # support.  Future versions do this automatically, but an explicit c++rt0.o
7696    # does not break anything, and helps significantly (at the cost of a little
7697    # extra space).
7698    freebsd2.2*)
7699      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7700      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7701      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7702      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7703      ;;
7704
7705    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7706    freebsd2*)
7707      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7708      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7709      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7710      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7711      ;;
7712
7713    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7714    freebsd* | dragonfly*)
7715      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7716      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7717      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7718      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7719      ;;
7720
7721    hpux9*)
7722      if test "$GCC" = yes; then
7723	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7724      else
7725	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7726      fi
7727      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7728      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7729      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7730
7731      # hardcode_minus_L: Not really in the search PATH,
7732      # but as the default location of the library.
7733      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7734      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7735      ;;
7736
7737    hpux10*)
7738      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7739	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7740      else
7741	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7742      fi
7743      if test "$with_gnu_ld" = no; then
7744	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7745	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7746
7747	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7748	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7749
7750	# hardcode_minus_L: Not really in the search PATH,
7751	# but as the default location of the library.
7752	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7753      fi
7754      ;;
7755
7756    hpux11*)
7757      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7758	case $host_cpu in
7759	hppa*64*)
7760	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7761	  ;;
7762	ia64*)
7763	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7764	  ;;
7765	*)
7766	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7767	  ;;
7768	esac
7769      else
7770	case $host_cpu in
7771	hppa*64*)
7772	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7773	  ;;
7774	ia64*)
7775	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7776	  ;;
7777	*)
7778	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7779	  ;;
7780	esac
7781      fi
7782      if test "$with_gnu_ld" = no; then
7783	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7784	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7785
7786	case $host_cpu in
7787	hppa*64*|ia64*)
7788	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7789	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7790	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7791	  ;;
7792	*)
7793	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7794	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7795
7796	  # hardcode_minus_L: Not really in the search PATH,
7797	  # but as the default location of the library.
7798	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7799	  ;;
7800	esac
7801      fi
7802      ;;
7803
7804    irix5* | irix6* | nonstopux*)
7805      if test "$GCC" = yes; then
7806	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7807      else
7808	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7809	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7810      fi
7811      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7812      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7813      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7814      ;;
7815
7816    netbsd*)
7817      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7818	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7819      else
7820	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7821      fi
7822      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7823      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7824      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7825      ;;
7826
7827    newsos6)
7828      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7829      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7830      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7831      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7832      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7833      ;;
7834
7835    openbsd*)
7836      if test -f /usr/libexec/ld.so; then
7837	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7838	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7839	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7840	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7841	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7842	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7843	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7844	else
7845	  case $host_os in
7846	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7847	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7848	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7849	     ;;
7850	   *)
7851	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7852	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7853	     ;;
7854	  esac
7855        fi
7856      else
7857	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7858      fi
7859      ;;
7860
7861    os2*)
7862      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7863      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7864      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7865      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
7866      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7867      ;;
7868
7869    osf3*)
7870      if test "$GCC" = yes; then
7871	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7872	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7873      else
7874	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7875	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7876      fi
7877      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7878      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7879      ;;
7880
7881    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7882      if test "$GCC" = yes; then
7883	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7884	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7885	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7886      else
7887	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7888	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7889	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7890	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7891
7892	# Both c and cxx compiler support -rpath directly
7893	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7894      fi
7895      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7896      ;;
7897
7898    solaris*)
7899      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7900      if test "$GCC" = yes; then
7901	wlarc='${wl}'
7902	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7903	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7904	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7905      else
7906	wlarc=''
7907	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7908	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7909  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7910      fi
7911      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7912      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7913      case $host_os in
7914      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7915      *)
7916	# The compiler driver will combine and reorder linker options,
7917	# but understands `-z linker_flag'.  GCC discards it without `$wl',
7918	# but is careful enough not to reorder.
7919 	# Supported since Solaris 2.6 (maybe 2.5.1?)
7920	if test "$GCC" = yes; then
7921	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7922	else
7923	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7924	fi
7925	;;
7926      esac
7927      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7928      ;;
7929
7930    sunos4*)
7931      if test "x$host_vendor" = xsequent; then
7932	# Use $CC to link under sequent, because it throws in some extra .o
7933	# files that make .init and .fini sections work.
7934	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7935      else
7936	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7937      fi
7938      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7939      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7940      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7941      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7942      ;;
7943
7944    sysv4)
7945      case $host_vendor in
7946	sni)
7947	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7948	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7949	;;
7950	siemens)
7951	  ## LD is ld it makes a PLAMLIB
7952	  ## CC just makes a GrossModule.
7953	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7954	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7955	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7956        ;;
7957	motorola)
7958	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7959	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7960	;;
7961      esac
7962      runpath_var='LD_RUN_PATH'
7963      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7964      ;;
7965
7966    sysv4.3*)
7967      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7968      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7969      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7970      ;;
7971
7972    sysv4*MP*)
7973      if test -d /usr/nec; then
7974	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7975	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7976	runpath_var=LD_RUN_PATH
7977	hardcode_runpath_var=yes
7978	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7979      fi
7980      ;;
7981
7982    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7983      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7984      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7985      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7986      runpath_var='LD_RUN_PATH'
7987
7988      if test "$GCC" = yes; then
7989	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7990	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7991      else
7992	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7993	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7994      fi
7995      ;;
7996
7997    sysv5* | sco3.2v5* | sco5v6*)
7998      # Note: We can NOT use -z defs as we might desire, because we do not
7999      # link with -lc, and that would cause any symbols used from libc to
8000      # always be unresolved, which means just about no library would
8001      # ever link correctly.  If we're not using GNU ld we use -z text
8002      # though, which does catch some bad symbols but isn't as heavy-handed
8003      # as -z defs.
8004      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8005      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8006      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8007      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8008      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
8009      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8010      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8011      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8012      runpath_var='LD_RUN_PATH'
8013
8014      if test "$GCC" = yes; then
8015	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8016	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8017      else
8018	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8019	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8020      fi
8021      ;;
8022
8023    uts4*)
8024      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8025      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8026      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8027      ;;
8028
8029    *)
8030      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8031      ;;
8032    esac
8033  fi
8034])
8035AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8036test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8037
8038#
8039# Do we need to explicitly link libc?
8040#
8041case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
8042x|xyes)
8043  # Assume -lc should be added
8044  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8045
8046  if test "$enable_shared" = yes && test "$GCC" = yes; then
8047    case $_LT_AC_TAGVAR(archive_cmds, $1) in
8048    *'~'*)
8049      # FIXME: we may have to deal with multi-command sequences.
8050      ;;
8051    '$CC '*)
8052      # Test whether the compiler implicitly links with -lc since on some
8053      # systems, -lgcc has to come before -lc. If gcc already passes -lc
8054      # to ld, don't add -lc before -lgcc.
8055      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
8056      $rm conftest*
8057      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8058
8059      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
8060        soname=conftest
8061        lib=conftest
8062        libobjs=conftest.$ac_objext
8063        deplibs=
8064        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8065	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
8066        compiler_flags=-v
8067        linker_flags=-v
8068        verstring=
8069        output_objdir=.
8070        libname=conftest
8071        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
8072        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8073        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
8074        then
8075	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8076        else
8077	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8078        fi
8079        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
8080      else
8081        cat conftest.err 1>&5
8082      fi
8083      $rm conftest*
8084      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
8085      ;;
8086    esac
8087  fi
8088  ;;
8089esac
8090])# AC_LIBTOOL_PROG_LD_SHLIBS
8091
8092
8093# _LT_AC_FILE_LTDLL_C
8094# -------------------
8095# Be careful that the start marker always follows a newline.
8096AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
8097# /* ltdll.c starts here */
8098# #define WIN32_LEAN_AND_MEAN
8099# #include <windows.h>
8100# #undef WIN32_LEAN_AND_MEAN
8101# #include <stdio.h>
8102#
8103# #ifndef __CYGWIN__
8104# #  ifdef __CYGWIN32__
8105# #    define __CYGWIN__ __CYGWIN32__
8106# #  endif
8107# #endif
8108#
8109# #ifdef __cplusplus
8110# extern "C" {
8111# #endif
8112# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
8113# #ifdef __cplusplus
8114# }
8115# #endif
8116#
8117# #ifdef __CYGWIN__
8118# #include <cygwin/cygwin_dll.h>
8119# DECLARE_CYGWIN_DLL( DllMain );
8120# #endif
8121# HINSTANCE __hDllInstance_base;
8122#
8123# BOOL APIENTRY
8124# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
8125# {
8126#   __hDllInstance_base = hInst;
8127#   return TRUE;
8128# }
8129# /* ltdll.c ends here */
8130])# _LT_AC_FILE_LTDLL_C
8131
8132
8133# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
8134# ---------------------------------
8135AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
8136
8137
8138# old names
8139AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
8140AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
8141AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
8142AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8143AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8144AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
8145AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
8146
8147# This is just to silence aclocal about the macro not being used
8148ifelse([AC_DISABLE_FAST_INSTALL])
8149
8150AC_DEFUN([LT_AC_PROG_GCJ],
8151[AC_CHECK_TOOL(GCJ, gcj, no)
8152  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8153  AC_SUBST(GCJFLAGS)
8154])
8155
8156AC_DEFUN([LT_AC_PROG_RC],
8157[AC_CHECK_TOOL(RC, windres, no)
8158])
8159
8160
8161# Cheap backport of AS_EXECUTABLE_P and required macros
8162# from Autoconf 2.59; we should not use $as_executable_p directly.
8163
8164# _AS_TEST_PREPARE
8165# ----------------
8166m4_ifndef([_AS_TEST_PREPARE],
8167[m4_defun([_AS_TEST_PREPARE],
8168[if test -x / >/dev/null 2>&1; then
8169  as_executable_p='test -x'
8170else
8171  as_executable_p='test -f'
8172fi
8173])])# _AS_TEST_PREPARE
8174
8175# AS_EXECUTABLE_P
8176# ---------------
8177# Check whether a file is executable.
8178m4_ifndef([AS_EXECUTABLE_P],
8179[m4_defun([AS_EXECUTABLE_P],
8180[AS_REQUIRE([_AS_TEST_PREPARE])dnl
8181$as_executable_p $1[]dnl
8182])])# AS_EXECUTABLE_P
8183
8184# NOTE: This macro has been submitted for inclusion into   #
8185#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8186#  a released version of Autoconf we should remove this    #
8187#  macro and use it instead.                               #
8188# LT_AC_PROG_SED
8189# --------------
8190# Check for a fully-functional sed program, that truncates
8191# as few characters as possible.  Prefer GNU sed if found.
8192AC_DEFUN([LT_AC_PROG_SED],
8193[AC_MSG_CHECKING([for a sed that does not truncate output])
8194AC_CACHE_VAL(lt_cv_path_SED,
8195[# Loop through the user's path and test for sed and gsed.
8196# Then use that list of sed's as ones to test for truncation.
8197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8198for as_dir in $PATH
8199do
8200  IFS=$as_save_IFS
8201  test -z "$as_dir" && as_dir=.
8202  for lt_ac_prog in sed gsed; do
8203    for ac_exec_ext in '' $ac_executable_extensions; do
8204      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
8205        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8206      fi
8207    done
8208  done
8209done
8210IFS=$as_save_IFS
8211lt_ac_max=0
8212lt_ac_count=0
8213# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8214# along with /bin/sed that truncates output.
8215for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8216  test ! -f $lt_ac_sed && continue
8217  cat /dev/null > conftest.in
8218  lt_ac_count=0
8219  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8220  # Check for GNU sed and select it if it is found.
8221  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8222    lt_cv_path_SED=$lt_ac_sed
8223    break
8224  fi
8225  while true; do
8226    cat conftest.in conftest.in >conftest.tmp
8227    mv conftest.tmp conftest.in
8228    cp conftest.in conftest.nl
8229    echo >>conftest.nl
8230    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8231    cmp -s conftest.out conftest.nl || break
8232    # 10000 chars as input seems more than enough
8233    test $lt_ac_count -gt 10 && break
8234    lt_ac_count=`expr $lt_ac_count + 1`
8235    if test $lt_ac_count -gt $lt_ac_max; then
8236      lt_ac_max=$lt_ac_count
8237      lt_cv_path_SED=$lt_ac_sed
8238    fi
8239  done
8240done
8241])
8242SED=$lt_cv_path_SED
8243AC_SUBST([SED])
8244AC_MSG_RESULT([$SED])
8245])
8246
8247# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8248# 
8249# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8250#
8251# This program is free software; you can redistribute it and/or modify
8252# it under the terms of the GNU General Public License as published by
8253# the Free Software Foundation; either version 2 of the License, or
8254# (at your option) any later version.
8255#
8256# This program is distributed in the hope that it will be useful, but
8257# WITHOUT ANY WARRANTY; without even the implied warranty of
8258# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8259# General Public License for more details.
8260#
8261# You should have received a copy of the GNU General Public License
8262# along with this program; if not, write to the Free Software
8263# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8264#
8265# As a special exception to the GNU General Public License, if you
8266# distribute this file as part of a program that contains a
8267# configuration script generated by Autoconf, you may include it under
8268# the same distribution terms that you use for the rest of that program.
8269
8270# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8271# ----------------------------------
8272AC_DEFUN([PKG_PROG_PKG_CONFIG],
8273[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8274m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8275AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8276if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8277	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8278fi
8279if test -n "$PKG_CONFIG"; then
8280	_pkg_min_version=m4_default([$1], [0.9.0])
8281	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8282	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8283		AC_MSG_RESULT([yes])
8284	else
8285		AC_MSG_RESULT([no])
8286		PKG_CONFIG=""
8287	fi
8288		
8289fi[]dnl
8290])# PKG_PROG_PKG_CONFIG
8291
8292# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8293#
8294# Check to see whether a particular set of modules exists.  Similar
8295# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8296#
8297#
8298# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8299# this or PKG_CHECK_MODULES is called, or make sure to call
8300# PKG_CHECK_EXISTS manually
8301# --------------------------------------------------------------
8302AC_DEFUN([PKG_CHECK_EXISTS],
8303[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8304if test -n "$PKG_CONFIG" && \
8305    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8306  m4_ifval([$2], [$2], [:])
8307m4_ifvaln([$3], [else
8308  $3])dnl
8309fi])
8310
8311
8312# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8313# ---------------------------------------------
8314m4_define([_PKG_CONFIG],
8315[if test -n "$$1"; then
8316    pkg_cv_[]$1="$$1"
8317 elif test -n "$PKG_CONFIG"; then
8318    PKG_CHECK_EXISTS([$3],
8319                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8320		     [pkg_failed=yes])
8321 else
8322    pkg_failed=untried
8323fi[]dnl
8324])# _PKG_CONFIG
8325
8326# _PKG_SHORT_ERRORS_SUPPORTED
8327# -----------------------------
8328AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8329[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8330if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8331        _pkg_short_errors_supported=yes
8332else
8333        _pkg_short_errors_supported=no
8334fi[]dnl
8335])# _PKG_SHORT_ERRORS_SUPPORTED
8336
8337
8338# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8339# [ACTION-IF-NOT-FOUND])
8340#
8341#
8342# Note that if there is a possibility the first call to
8343# PKG_CHECK_MODULES might not happen, you should be sure to include an
8344# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8345#
8346#
8347# --------------------------------------------------------------
8348AC_DEFUN([PKG_CHECK_MODULES],
8349[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8350AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8351AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8352
8353pkg_failed=no
8354AC_MSG_CHECKING([for $1])
8355
8356_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8357_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8358
8359m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8360and $1[]_LIBS to avoid the need to call pkg-config.
8361See the pkg-config man page for more details.])
8362
8363if test $pkg_failed = yes; then
8364        _PKG_SHORT_ERRORS_SUPPORTED
8365        if test $_pkg_short_errors_supported = yes; then
8366	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8367        else 
8368	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8369        fi
8370	# Put the nasty error message in config.log where it belongs
8371	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8372
8373	ifelse([$4], , [AC_MSG_ERROR(dnl
8374[Package requirements ($2) were not met:
8375
8376$$1_PKG_ERRORS
8377
8378Consider adjusting the PKG_CONFIG_PATH environment variable if you
8379installed software in a non-standard prefix.
8380
8381_PKG_TEXT
8382])],
8383		[AC_MSG_RESULT([no])
8384                $4])
8385elif test $pkg_failed = untried; then
8386	ifelse([$4], , [AC_MSG_FAILURE(dnl
8387[The pkg-config script could not be found or is too old.  Make sure it
8388is in your PATH or set the PKG_CONFIG environment variable to the full
8389path to pkg-config.
8390
8391_PKG_TEXT
8392
8393To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8394		[$4])
8395else
8396	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8397	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8398        AC_MSG_RESULT([yes])
8399	ifelse([$3], , :, [$3])
8400fi[]dnl
8401])# PKG_CHECK_MODULES
8402
8403