aclocal.m4 revision 44dda7b2
144dda7b2Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2ff559fabSmrg
3ff559fabSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
47a3b38f7Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5ff559fabSmrg# This file is free software; the Free Software Foundation
6ff559fabSmrg# gives unlimited permission to copy and/or distribute it,
7ff559fabSmrg# with or without modifications, as long as this notice is preserved.
8ff559fabSmrg
9ff559fabSmrg# This program is distributed in the hope that it will be useful,
10ff559fabSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11ff559fabSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12ff559fabSmrg# PARTICULAR PURPOSE.
13ff559fabSmrg
147a3b38f7Smrgm4_ifndef([AC_AUTOCONF_VERSION],
157a3b38f7Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1644dda7b2Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
1744dda7b2Smrg[m4_warning([this file was generated for autoconf 2.68.
187a3b38f7SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
197a3b38f7SmrgIf you have problems, you may need to regenerate the build system entirely.
207a3b38f7SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21ff559fabSmrg
2244dda7b2Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23ff559fabSmrg#
2444dda7b2Smrg# This file is free software; the Free Software Foundation
2544dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
2644dda7b2Smrg# with or without modifications, as long as this notice is preserved.
2744dda7b2Smrg
2844dda7b2Smrg# AM_AUTOMAKE_VERSION(VERSION)
2944dda7b2Smrg# ----------------------------
3044dda7b2Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
3144dda7b2Smrg# generated from the m4 files accompanying Automake X.Y.
3244dda7b2Smrg# (This private macro should not be called outside this file.)
3344dda7b2SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
3444dda7b2Smrg[am__api_version='1.11'
3544dda7b2Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3644dda7b2Smrgdnl require some minimum version.  Point them to the right macro.
3744dda7b2Smrgm4_if([$1], [1.11.1], [],
3844dda7b2Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3944dda7b2Smrg])
4044dda7b2Smrg
4144dda7b2Smrg# _AM_AUTOCONF_VERSION(VERSION)
4244dda7b2Smrg# -----------------------------
4344dda7b2Smrg# aclocal traces this macro to find the Autoconf version.
4444dda7b2Smrg# This is a private macro too.  Using m4_define simplifies
4544dda7b2Smrg# the logic in aclocal, which can simply ignore this definition.
4644dda7b2Smrgm4_define([_AM_AUTOCONF_VERSION], [])
4744dda7b2Smrg
4844dda7b2Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
4944dda7b2Smrg# -------------------------------
5044dda7b2Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5144dda7b2Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5244dda7b2SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
5344dda7b2Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl
5444dda7b2Smrgm4_ifndef([AC_AUTOCONF_VERSION],
5544dda7b2Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5644dda7b2Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5744dda7b2Smrg
5844dda7b2Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
5944dda7b2Smrg
6044dda7b2Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61ff559fabSmrg#
6244dda7b2Smrg# This file is free software; the Free Software Foundation
6344dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
6444dda7b2Smrg# with or without modifications, as long as this notice is preserved.
657a3b38f7Smrg
6644dda7b2Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6744dda7b2Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6844dda7b2Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69ff559fabSmrg#
7044dda7b2Smrg# Of course, Automake must honor this variable whenever it calls a
7144dda7b2Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
7244dda7b2Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
7344dda7b2Smrg# depending on how configure is run.  This is pretty annoying, since
7444dda7b2Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7544dda7b2Smrg# source directory, any form will work fine, but in subdirectories a
7644dda7b2Smrg# relative path needs to be adjusted first.
77ff559fabSmrg#
7844dda7b2Smrg# $ac_aux_dir/missing
7944dda7b2Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8044dda7b2Smrg# $top_srcdir/$ac_aux_dir/missing
8144dda7b2Smrg#    fails if $ac_aux_dir is absolute,
8244dda7b2Smrg#    fails when called from a subdirectory in a VPATH build with
8344dda7b2Smrg#          a relative $ac_aux_dir
84ff559fabSmrg#
8544dda7b2Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8644dda7b2Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
8744dda7b2Smrg# harmless because $srcdir is `.', but things will broke when you
8844dda7b2Smrg# start a VPATH build or use an absolute $srcdir.
89ff559fabSmrg#
9044dda7b2Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9144dda7b2Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9244dda7b2Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9344dda7b2Smrg# and then we would define $MISSING as
9444dda7b2Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
9544dda7b2Smrg# This will work as long as MISSING is not called from configure, because
9644dda7b2Smrg# unfortunately $(top_srcdir) has no meaning in configure.
9744dda7b2Smrg# However there are other variables, like CC, which are often used in
9844dda7b2Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
99ff559fabSmrg#
10044dda7b2Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
10144dda7b2Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
10244dda7b2Smrg# configured tree to be moved without reconfiguration.
103ff559fabSmrg
10444dda7b2SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
10544dda7b2Smrg[dnl Rely on autoconf to set up CDPATH properly.
10644dda7b2SmrgAC_PREREQ([2.50])dnl
10744dda7b2Smrg# expand $ac_aux_dir to an absolute path
10844dda7b2Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
1097a3b38f7Smrg])
110ff559fabSmrg
11144dda7b2Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
112ff559fabSmrg
11344dda7b2Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
11444dda7b2Smrg# Free Software Foundation, Inc.
11544dda7b2Smrg#
11644dda7b2Smrg# This file is free software; the Free Software Foundation
11744dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
11844dda7b2Smrg# with or without modifications, as long as this notice is preserved.
119ff559fabSmrg
12044dda7b2Smrg# serial 9
121ff559fabSmrg
12244dda7b2Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
12344dda7b2Smrg# -------------------------------------
12444dda7b2Smrg# Define a conditional.
12544dda7b2SmrgAC_DEFUN([AM_CONDITIONAL],
12644dda7b2Smrg[AC_PREREQ(2.52)dnl
12744dda7b2Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
12844dda7b2Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
12944dda7b2SmrgAC_SUBST([$1_TRUE])dnl
13044dda7b2SmrgAC_SUBST([$1_FALSE])dnl
13144dda7b2Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
13244dda7b2Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
13344dda7b2Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
13444dda7b2Smrgif $2; then
13544dda7b2Smrg  $1_TRUE=
13644dda7b2Smrg  $1_FALSE='#'
13744dda7b2Smrgelse
13844dda7b2Smrg  $1_TRUE='#'
13944dda7b2Smrg  $1_FALSE=
14044dda7b2Smrgfi
14144dda7b2SmrgAC_CONFIG_COMMANDS_PRE(
14244dda7b2Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
14344dda7b2Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
14444dda7b2SmrgUsually this means the macro was only invoked conditionally.]])
14544dda7b2Smrgfi])])
146ff559fabSmrg
14744dda7b2Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
14844dda7b2Smrg# Free Software Foundation, Inc.
14944dda7b2Smrg#
15044dda7b2Smrg# This file is free software; the Free Software Foundation
15144dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
15244dda7b2Smrg# with or without modifications, as long as this notice is preserved.
153ff559fabSmrg
15444dda7b2Smrg# serial 10
155ff559fabSmrg
15644dda7b2Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
15744dda7b2Smrg# written in clear, in which case automake, when reading aclocal.m4,
15844dda7b2Smrg# will think it sees a *use*, and therefore will trigger all it's
15944dda7b2Smrg# C support machinery.  Also note that it means that autoscan, seeing
16044dda7b2Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161ff559fabSmrg
162ff559fabSmrg
16344dda7b2Smrg# _AM_DEPENDENCIES(NAME)
1647a3b38f7Smrg# ----------------------
16544dda7b2Smrg# See how the compiler implements dependency checking.
16644dda7b2Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
16744dda7b2Smrg# We try a few techniques and use that to set a single cache variable.
16844dda7b2Smrg#
16944dda7b2Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
17044dda7b2Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
17144dda7b2Smrg# dependency, and given that the user is not expected to run this macro,
17244dda7b2Smrg# just rely on AC_PROG_CC.
17344dda7b2SmrgAC_DEFUN([_AM_DEPENDENCIES],
17444dda7b2Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
17544dda7b2SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
17644dda7b2SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
17744dda7b2SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1787a3b38f7Smrg
17944dda7b2Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
18044dda7b2Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
18144dda7b2Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
18244dda7b2Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
18344dda7b2Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
18444dda7b2Smrg                   [depcc="$$1"   am_compiler_list=])
1857a3b38f7Smrg
18644dda7b2SmrgAC_CACHE_CHECK([dependency style of $depcc],
18744dda7b2Smrg               [am_cv_$1_dependencies_compiler_type],
18844dda7b2Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
18944dda7b2Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
19044dda7b2Smrg  # making bogus files that we don't know about and never remove.  For
19144dda7b2Smrg  # instance it was reported that on HP-UX the gcc test will end up
19244dda7b2Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
19344dda7b2Smrg  # in D'.
19444dda7b2Smrg  mkdir conftest.dir
19544dda7b2Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
19644dda7b2Smrg  # using a relative directory.
19744dda7b2Smrg  cp "$am_depcomp" conftest.dir
19844dda7b2Smrg  cd conftest.dir
19944dda7b2Smrg  # We will build objects and dependencies in a subdirectory because
20044dda7b2Smrg  # it helps to detect inapplicable dependency modes.  For instance
20144dda7b2Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
20244dda7b2Smrg  # side effect of compilation, but ICC will put the dependencies in
20344dda7b2Smrg  # the current directory while Tru64 will put them in the object
20444dda7b2Smrg  # directory.
20544dda7b2Smrg  mkdir sub
206ff559fabSmrg
20744dda7b2Smrg  am_cv_$1_dependencies_compiler_type=none
20844dda7b2Smrg  if test "$am_compiler_list" = ""; then
20944dda7b2Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210ff559fabSmrg  fi
21144dda7b2Smrg  am__universal=false
21244dda7b2Smrg  m4_case([$1], [CC],
21344dda7b2Smrg    [case " $depcc " in #(
21444dda7b2Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21544dda7b2Smrg     esac],
21644dda7b2Smrg    [CXX],
21744dda7b2Smrg    [case " $depcc " in #(
21844dda7b2Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21944dda7b2Smrg     esac])
220ff559fabSmrg
22144dda7b2Smrg  for depmode in $am_compiler_list; do
22244dda7b2Smrg    # Setup a source with many dependencies, because some compilers
22344dda7b2Smrg    # like to wrap large dependency lists on column 80 (with \), and
22444dda7b2Smrg    # we should not choose a depcomp mode which is confused by this.
22544dda7b2Smrg    #
22644dda7b2Smrg    # We need to recreate these files for each test, as the compiler may
22744dda7b2Smrg    # overwrite some of them when testing with obscure command lines.
22844dda7b2Smrg    # This happens at least with the AIX C compiler.
22944dda7b2Smrg    : > sub/conftest.c
23044dda7b2Smrg    for i in 1 2 3 4 5 6; do
23144dda7b2Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
23244dda7b2Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
23344dda7b2Smrg      # Solaris 8's {/usr,}/bin/sh.
23444dda7b2Smrg      touch sub/conftst$i.h
23544dda7b2Smrg    done
23644dda7b2Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237ff559fabSmrg
23844dda7b2Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
23944dda7b2Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
24044dda7b2Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
24144dda7b2Smrg    # versions had trouble with output in subdirs
24244dda7b2Smrg    am__obj=sub/conftest.${OBJEXT-o}
24344dda7b2Smrg    am__minus_obj="-o $am__obj"
24444dda7b2Smrg    case $depmode in
24544dda7b2Smrg    gcc)
24644dda7b2Smrg      # This depmode causes a compiler race in universal mode.
24744dda7b2Smrg      test "$am__universal" = false || continue
24844dda7b2Smrg      ;;
24944dda7b2Smrg    nosideeffect)
25044dda7b2Smrg      # after this tag, mechanisms are not by side-effect, so they'll
25144dda7b2Smrg      # only be used when explicitly requested
25244dda7b2Smrg      if test "x$enable_dependency_tracking" = xyes; then
25344dda7b2Smrg	continue
25444dda7b2Smrg      else
25544dda7b2Smrg	break
25644dda7b2Smrg      fi
25744dda7b2Smrg      ;;
25844dda7b2Smrg    msvisualcpp | msvcmsys)
25944dda7b2Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
26044dda7b2Smrg      # not run yet.  These depmodes are late enough in the game, and
26144dda7b2Smrg      # so weak that their functioning should not be impacted.
26244dda7b2Smrg      am__obj=conftest.${OBJEXT-o}
26344dda7b2Smrg      am__minus_obj=
26444dda7b2Smrg      ;;
26544dda7b2Smrg    none) break ;;
26644dda7b2Smrg    esac
26744dda7b2Smrg    if depmode=$depmode \
26844dda7b2Smrg       source=sub/conftest.c object=$am__obj \
26944dda7b2Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27044dda7b2Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
27144dda7b2Smrg         >/dev/null 2>conftest.err &&
27244dda7b2Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27344dda7b2Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27444dda7b2Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27544dda7b2Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27644dda7b2Smrg      # icc doesn't choke on unknown options, it will just issue warnings
27744dda7b2Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
27844dda7b2Smrg      # that says an option was ignored or not supported.
27944dda7b2Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
28044dda7b2Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
28144dda7b2Smrg      # The diagnosis changed in icc 8.0:
28244dda7b2Smrg      #   icc: Command line remark: option '-MP' not supported
28344dda7b2Smrg      if (grep 'ignoring option' conftest.err ||
28444dda7b2Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28544dda7b2Smrg        am_cv_$1_dependencies_compiler_type=$depmode
28644dda7b2Smrg        break
28744dda7b2Smrg      fi
28844dda7b2Smrg    fi
28944dda7b2Smrg  done
2907a3b38f7Smrg
29144dda7b2Smrg  cd ..
29244dda7b2Smrg  rm -rf conftest.dir
29344dda7b2Smrgelse
29444dda7b2Smrg  am_cv_$1_dependencies_compiler_type=none
29544dda7b2Smrgfi
29644dda7b2Smrg])
29744dda7b2SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
29844dda7b2SmrgAM_CONDITIONAL([am__fastdep$1], [
29944dda7b2Smrg  test "x$enable_dependency_tracking" != xno \
30044dda7b2Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
30144dda7b2Smrg])
302ff559fabSmrg
303ff559fabSmrg
30444dda7b2Smrg# AM_SET_DEPDIR
30544dda7b2Smrg# -------------
30644dda7b2Smrg# Choose a directory name for dependency files.
30744dda7b2Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
30844dda7b2SmrgAC_DEFUN([AM_SET_DEPDIR],
30944dda7b2Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
31044dda7b2SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
31144dda7b2Smrg])
312ff559fabSmrg
3137a3b38f7Smrg
31444dda7b2Smrg# AM_DEP_TRACK
31544dda7b2Smrg# ------------
31644dda7b2SmrgAC_DEFUN([AM_DEP_TRACK],
31744dda7b2Smrg[AC_ARG_ENABLE(dependency-tracking,
31844dda7b2Smrg[  --disable-dependency-tracking  speeds up one-time build
31944dda7b2Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
32044dda7b2Smrgif test "x$enable_dependency_tracking" != xno; then
32144dda7b2Smrg  am_depcomp="$ac_aux_dir/depcomp"
32244dda7b2Smrg  AMDEPBACKSLASH='\'
32344dda7b2Smrgfi
32444dda7b2SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
32544dda7b2SmrgAC_SUBST([AMDEPBACKSLASH])dnl
32644dda7b2Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
32744dda7b2Smrg])
3287a3b38f7Smrg
32944dda7b2Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
3307a3b38f7Smrg
33144dda7b2Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
33244dda7b2Smrg# Free Software Foundation, Inc.
33344dda7b2Smrg#
33444dda7b2Smrg# This file is free software; the Free Software Foundation
33544dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
33644dda7b2Smrg# with or without modifications, as long as this notice is preserved.
3377a3b38f7Smrg
33844dda7b2Smrg#serial 5
3397a3b38f7Smrg
34044dda7b2Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3417a3b38f7Smrg# ------------------------------
34244dda7b2SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
34344dda7b2Smrg[{
34444dda7b2Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
34544dda7b2Smrg  # are listed without --file.  Let's play safe and only enable the eval
34644dda7b2Smrg  # if we detect the quoting.
34744dda7b2Smrg  case $CONFIG_FILES in
34844dda7b2Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
34944dda7b2Smrg  *)   set x $CONFIG_FILES ;;
35044dda7b2Smrg  esac
35144dda7b2Smrg  shift
35244dda7b2Smrg  for mf
35344dda7b2Smrg  do
35444dda7b2Smrg    # Strip MF so we end up with the name of the file.
35544dda7b2Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
35644dda7b2Smrg    # Check whether this is an Automake generated Makefile or not.
35744dda7b2Smrg    # We used to match only the files named `Makefile.in', but
35844dda7b2Smrg    # some people rename them; so instead we look at the file content.
35944dda7b2Smrg    # Grep'ing the first line is not enough: some people post-process
36044dda7b2Smrg    # each Makefile.in and add a new line on top of each file to say so.
36144dda7b2Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
36244dda7b2Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
36344dda7b2Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
36444dda7b2Smrg      dirpart=`AS_DIRNAME("$mf")`
36544dda7b2Smrg    else
36644dda7b2Smrg      continue
36744dda7b2Smrg    fi
36844dda7b2Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
36944dda7b2Smrg    # from the Makefile without running `make'.
37044dda7b2Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
37144dda7b2Smrg    test -z "$DEPDIR" && continue
37244dda7b2Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
37344dda7b2Smrg    test -z "am__include" && continue
37444dda7b2Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
37544dda7b2Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
37644dda7b2Smrg    U=`sed -n 's/^U = //p' < "$mf"`
37744dda7b2Smrg    # Find all dependency output files, they are included files with
37844dda7b2Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
37944dda7b2Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
38044dda7b2Smrg    # expansion.
38144dda7b2Smrg    for file in `sed -n "
38244dda7b2Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
38344dda7b2Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
38444dda7b2Smrg      # Make sure the directory exists.
38544dda7b2Smrg      test -f "$dirpart/$file" && continue
38644dda7b2Smrg      fdir=`AS_DIRNAME(["$file"])`
38744dda7b2Smrg      AS_MKDIR_P([$dirpart/$fdir])
38844dda7b2Smrg      # echo "creating $dirpart/$file"
38944dda7b2Smrg      echo '# dummy' > "$dirpart/$file"
39044dda7b2Smrg    done
39144dda7b2Smrg  done
39244dda7b2Smrg}
39344dda7b2Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3947a3b38f7Smrg
3957a3b38f7Smrg
39644dda7b2Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
39744dda7b2Smrg# -----------------------------
39844dda7b2Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
39944dda7b2Smrg#
40044dda7b2Smrg# This code is only required when automatic dependency tracking
40144dda7b2Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
40244dda7b2Smrg# need in order to bootstrap the dependency handling code.
40344dda7b2SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
40444dda7b2Smrg[AC_CONFIG_COMMANDS([depfiles],
40544dda7b2Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
40644dda7b2Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407ff559fabSmrg])
4087a3b38f7Smrg
40944dda7b2Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
41044dda7b2Smrg# Free Software Foundation, Inc.
41144dda7b2Smrg#
41244dda7b2Smrg# This file is free software; the Free Software Foundation
41344dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
41444dda7b2Smrg# with or without modifications, as long as this notice is preserved.
4157a3b38f7Smrg
41644dda7b2Smrg# serial 8
4177a3b38f7Smrg
41844dda7b2Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
41944dda7b2SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
4207a3b38f7Smrg
42144dda7b2Smrg# Do all the work for Automake.                             -*- Autoconf -*-
4227a3b38f7Smrg
42344dda7b2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
42444dda7b2Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
42544dda7b2Smrg#
42644dda7b2Smrg# This file is free software; the Free Software Foundation
42744dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
42844dda7b2Smrg# with or without modifications, as long as this notice is preserved.
4297a3b38f7Smrg
43044dda7b2Smrg# serial 16
431ff559fabSmrg
43244dda7b2Smrg# This macro actually does too much.  Some checks are only needed if
43344dda7b2Smrg# your package does certain things.  But this isn't really a big deal.
434ff559fabSmrg
43544dda7b2Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
43644dda7b2Smrg# AM_INIT_AUTOMAKE([OPTIONS])
43744dda7b2Smrg# -----------------------------------------------
43844dda7b2Smrg# The call with PACKAGE and VERSION arguments is the old style
43944dda7b2Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
44044dda7b2Smrg# and VERSION should now be passed to AC_INIT and removed from
44144dda7b2Smrg# the call to AM_INIT_AUTOMAKE.
44244dda7b2Smrg# We support both call styles for the transition.  After
44344dda7b2Smrg# the next Automake release, Autoconf can make the AC_INIT
44444dda7b2Smrg# arguments mandatory, and then we can depend on a new Autoconf
44544dda7b2Smrg# release and drop the old call support.
44644dda7b2SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
44744dda7b2Smrg[AC_PREREQ([2.62])dnl
44844dda7b2Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
44944dda7b2Smrgdnl the ones we care about.
45044dda7b2Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
45144dda7b2SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
45244dda7b2SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
45344dda7b2Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
45444dda7b2Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
45544dda7b2Smrg  # is not polluted with repeated "-I."
45644dda7b2Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
45744dda7b2Smrg  # test to see if srcdir already configured
45844dda7b2Smrg  if test -f $srcdir/config.status; then
45944dda7b2Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
46044dda7b2Smrg  fi
46144dda7b2Smrgfi
462ff559fabSmrg
46344dda7b2Smrg# test whether we have cygpath
46444dda7b2Smrgif test -z "$CYGPATH_W"; then
46544dda7b2Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
46644dda7b2Smrg    CYGPATH_W='cygpath -w'
46744dda7b2Smrg  else
46844dda7b2Smrg    CYGPATH_W=echo
46944dda7b2Smrg  fi
47044dda7b2Smrgfi
47144dda7b2SmrgAC_SUBST([CYGPATH_W])
472ff559fabSmrg
47344dda7b2Smrg# Define the identity of the package.
47444dda7b2Smrgdnl Distinguish between old-style and new-style calls.
47544dda7b2Smrgm4_ifval([$2],
47644dda7b2Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
47744dda7b2Smrg AC_SUBST([PACKAGE], [$1])dnl
47844dda7b2Smrg AC_SUBST([VERSION], [$2])],
47944dda7b2Smrg[_AM_SET_OPTIONS([$1])dnl
48044dda7b2Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
48144dda7b2Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
48244dda7b2Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
48344dda7b2Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
48444dda7b2Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
485ff559fabSmrg
48644dda7b2Smrg_AM_IF_OPTION([no-define],,
48744dda7b2Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
48844dda7b2Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
489ff559fabSmrg
49044dda7b2Smrg# Some tools Automake needs.
49144dda7b2SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
49244dda7b2SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
49344dda7b2SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
49444dda7b2SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
49544dda7b2SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
49644dda7b2SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
49744dda7b2SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
49844dda7b2SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
49944dda7b2SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
50044dda7b2SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
50144dda7b2Smrg# We need awk for the "check" target.  The system "awk" is bad on
50244dda7b2Smrg# some platforms.
50344dda7b2SmrgAC_REQUIRE([AC_PROG_AWK])dnl
50444dda7b2SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
50544dda7b2SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
50644dda7b2Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
50744dda7b2Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
50844dda7b2Smrg			     [_AM_PROG_TAR([v7])])])
50944dda7b2Smrg_AM_IF_OPTION([no-dependencies],,
51044dda7b2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
51144dda7b2Smrg		  [_AM_DEPENDENCIES(CC)],
51244dda7b2Smrg		  [define([AC_PROG_CC],
51344dda7b2Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
51444dda7b2SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
51544dda7b2Smrg		  [_AM_DEPENDENCIES(CXX)],
51644dda7b2Smrg		  [define([AC_PROG_CXX],
51744dda7b2Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
51844dda7b2SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
51944dda7b2Smrg		  [_AM_DEPENDENCIES(OBJC)],
52044dda7b2Smrg		  [define([AC_PROG_OBJC],
52144dda7b2Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
52244dda7b2Smrg])
52344dda7b2Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
52444dda7b2Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
52544dda7b2Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
52644dda7b2Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
52744dda7b2SmrgAC_CONFIG_COMMANDS_PRE(dnl
52844dda7b2Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
52944dda7b2Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
5307a3b38f7Smrg])
531ff559fabSmrg
53244dda7b2Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
53344dda7b2Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
53444dda7b2Smrgdnl mangled by Autoconf and run in a shell conditional statement.
53544dda7b2Smrgm4_define([_AC_COMPILER_EXEEXT],
53644dda7b2Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
537ff559fabSmrg
538ff559fabSmrg
53944dda7b2Smrg# When config.status generates a header, we must update the stamp-h file.
54044dda7b2Smrg# This file resides in the same directory as the config header
54144dda7b2Smrg# that is generated.  The stamp files are numbered to have different names.
542ff559fabSmrg
54344dda7b2Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
54444dda7b2Smrg# loop where config.status creates the headers, so we can generate
54544dda7b2Smrg# our stamp files there.
54644dda7b2SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
54744dda7b2Smrg[# Compute $1's index in $config_headers.
54844dda7b2Smrg_am_arg=$1
54944dda7b2Smrg_am_stamp_count=1
55044dda7b2Smrgfor _am_header in $config_headers :; do
55144dda7b2Smrg  case $_am_header in
55244dda7b2Smrg    $_am_arg | $_am_arg:* )
55344dda7b2Smrg      break ;;
55444dda7b2Smrg    * )
55544dda7b2Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
55644dda7b2Smrg  esac
55744dda7b2Smrgdone
55844dda7b2Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
559ff559fabSmrg
56044dda7b2Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
56144dda7b2Smrg#
56244dda7b2Smrg# This file is free software; the Free Software Foundation
56344dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
56444dda7b2Smrg# with or without modifications, as long as this notice is preserved.
565ff559fabSmrg
56644dda7b2Smrg# AM_PROG_INSTALL_SH
56744dda7b2Smrg# ------------------
56844dda7b2Smrg# Define $install_sh.
56944dda7b2SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
57044dda7b2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
57144dda7b2Smrgif test x"${install_sh}" != xset; then
57244dda7b2Smrg  case $am_aux_dir in
57344dda7b2Smrg  *\ * | *\	*)
57444dda7b2Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
57544dda7b2Smrg  *)
57644dda7b2Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
57744dda7b2Smrg  esac
57844dda7b2Smrgfi
57944dda7b2SmrgAC_SUBST(install_sh)])
580ff559fabSmrg
58144dda7b2Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
58244dda7b2Smrg#
58344dda7b2Smrg# This file is free software; the Free Software Foundation
58444dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
58544dda7b2Smrg# with or without modifications, as long as this notice is preserved.
586ff559fabSmrg
58744dda7b2Smrg# serial 2
5887a3b38f7Smrg
58944dda7b2Smrg# Check whether the underlying file-system supports filenames
59044dda7b2Smrg# with a leading dot.  For instance MS-DOS doesn't.
59144dda7b2SmrgAC_DEFUN([AM_SET_LEADING_DOT],
59244dda7b2Smrg[rm -rf .tst 2>/dev/null
59344dda7b2Smrgmkdir .tst 2>/dev/null
59444dda7b2Smrgif test -d .tst; then
59544dda7b2Smrg  am__leading_dot=.
59644dda7b2Smrgelse
59744dda7b2Smrg  am__leading_dot=_
59844dda7b2Smrgfi
59944dda7b2Smrgrmdir .tst 2>/dev/null
60044dda7b2SmrgAC_SUBST([am__leading_dot])])
6017a3b38f7Smrg
60244dda7b2Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
60344dda7b2Smrg# From Jim Meyering
6047a3b38f7Smrg
60544dda7b2Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
60644dda7b2Smrg# Free Software Foundation, Inc.
607ff559fabSmrg#
60844dda7b2Smrg# This file is free software; the Free Software Foundation
60944dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
61044dda7b2Smrg# with or without modifications, as long as this notice is preserved.
611ff559fabSmrg
61244dda7b2Smrg# serial 5
613ff559fabSmrg
61444dda7b2Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
61544dda7b2Smrg# ----------------------------------
61644dda7b2Smrg# Control maintainer-specific portions of Makefiles.
61744dda7b2Smrg# Default is to disable them, unless `enable' is passed literally.
61844dda7b2Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
61944dda7b2Smrg# can override the default with the --enable/--disable switch.
62044dda7b2SmrgAC_DEFUN([AM_MAINTAINER_MODE],
62144dda7b2Smrg[m4_case(m4_default([$1], [disable]),
62244dda7b2Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
62344dda7b2Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
62444dda7b2Smrg       [m4_define([am_maintainer_other], [enable])
62544dda7b2Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
62644dda7b2SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
62744dda7b2Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
62844dda7b2Smrg  AC_ARG_ENABLE([maintainer-mode],
62944dda7b2Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
63044dda7b2Smrg			  (and sometimes confusing) to the casual installer],
63144dda7b2Smrg      [USE_MAINTAINER_MODE=$enableval],
63244dda7b2Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
63344dda7b2Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
63444dda7b2Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
63544dda7b2Smrg  MAINT=$MAINTAINER_MODE_TRUE
63644dda7b2Smrg  AC_SUBST([MAINT])dnl
63744dda7b2Smrg]
63844dda7b2Smrg)
639ff559fabSmrg
64044dda7b2SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
641ff559fabSmrg
64244dda7b2Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
64344dda7b2Smrg
64444dda7b2Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
645ff559fabSmrg#
64644dda7b2Smrg# This file is free software; the Free Software Foundation
64744dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
64844dda7b2Smrg# with or without modifications, as long as this notice is preserved.
649ff559fabSmrg
65044dda7b2Smrg# serial 4
651ff559fabSmrg
65244dda7b2Smrg# AM_MAKE_INCLUDE()
65344dda7b2Smrg# -----------------
65444dda7b2Smrg# Check to see how make treats includes.
65544dda7b2SmrgAC_DEFUN([AM_MAKE_INCLUDE],
65644dda7b2Smrg[am_make=${MAKE-make}
65744dda7b2Smrgcat > confinc << 'END'
65844dda7b2Smrgam__doit:
65944dda7b2Smrg	@echo this is the am__doit target
66044dda7b2Smrg.PHONY: am__doit
66144dda7b2SmrgEND
66244dda7b2Smrg# If we don't find an include directive, just comment out the code.
66344dda7b2SmrgAC_MSG_CHECKING([for style of include used by $am_make])
66444dda7b2Smrgam__include="#"
66544dda7b2Smrgam__quote=
66644dda7b2Smrg_am_result=none
66744dda7b2Smrg# First try GNU make style include.
66844dda7b2Smrgecho "include confinc" > confmf
66944dda7b2Smrg# Ignore all kinds of additional output from `make'.
67044dda7b2Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
67144dda7b2Smrg*the\ am__doit\ target*)
67244dda7b2Smrg  am__include=include
67344dda7b2Smrg  am__quote=
67444dda7b2Smrg  _am_result=GNU
67544dda7b2Smrg  ;;
67644dda7b2Smrgesac
67744dda7b2Smrg# Now try BSD make style include.
67844dda7b2Smrgif test "$am__include" = "#"; then
67944dda7b2Smrg   echo '.include "confinc"' > confmf
68044dda7b2Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
68144dda7b2Smrg   *the\ am__doit\ target*)
68244dda7b2Smrg     am__include=.include
68344dda7b2Smrg     am__quote="\""
68444dda7b2Smrg     _am_result=BSD
68544dda7b2Smrg     ;;
68644dda7b2Smrg   esac
68744dda7b2Smrgfi
68844dda7b2SmrgAC_SUBST([am__include])
68944dda7b2SmrgAC_SUBST([am__quote])
69044dda7b2SmrgAC_MSG_RESULT([$_am_result])
69144dda7b2Smrgrm -f confinc confmf
69244dda7b2Smrg])
6937a3b38f7Smrg
69444dda7b2Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
6957a3b38f7Smrg
69644dda7b2Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
69744dda7b2Smrg# Free Software Foundation, Inc.
69844dda7b2Smrg#
69944dda7b2Smrg# This file is free software; the Free Software Foundation
70044dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
70144dda7b2Smrg# with or without modifications, as long as this notice is preserved.
7027a3b38f7Smrg
70344dda7b2Smrg# serial 6
7047a3b38f7Smrg
70544dda7b2Smrg# AM_MISSING_PROG(NAME, PROGRAM)
706ff559fabSmrg# ------------------------------
70744dda7b2SmrgAC_DEFUN([AM_MISSING_PROG],
70844dda7b2Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
70944dda7b2Smrg$1=${$1-"${am_missing_run}$2"}
71044dda7b2SmrgAC_SUBST($1)])
7117a3b38f7Smrg
7127a3b38f7Smrg
71344dda7b2Smrg# AM_MISSING_HAS_RUN
71444dda7b2Smrg# ------------------
71544dda7b2Smrg# Define MISSING if not defined so far and test if it supports --run.
71644dda7b2Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
71744dda7b2SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
71844dda7b2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
71944dda7b2SmrgAC_REQUIRE_AUX_FILE([missing])dnl
72044dda7b2Smrgif test x"${MISSING+set}" != xset; then
72144dda7b2Smrg  case $am_aux_dir in
72244dda7b2Smrg  *\ * | *\	*)
72344dda7b2Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
72444dda7b2Smrg  *)
72544dda7b2Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
72644dda7b2Smrg  esac
72744dda7b2Smrgfi
72844dda7b2Smrg# Use eval to expand $SHELL
72944dda7b2Smrgif eval "$MISSING --run true"; then
73044dda7b2Smrg  am_missing_run="$MISSING --run "
73144dda7b2Smrgelse
73244dda7b2Smrg  am_missing_run=
73344dda7b2Smrg  AC_MSG_WARN([`missing' script is too old or missing])
73444dda7b2Smrgfi
73544dda7b2Smrg])
736ff559fabSmrg
73744dda7b2Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
73844dda7b2Smrg#
73944dda7b2Smrg# This file is free software; the Free Software Foundation
74044dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
74144dda7b2Smrg# with or without modifications, as long as this notice is preserved.
742ff559fabSmrg
74344dda7b2Smrg# AM_PROG_MKDIR_P
74444dda7b2Smrg# ---------------
74544dda7b2Smrg# Check for `mkdir -p'.
74644dda7b2SmrgAC_DEFUN([AM_PROG_MKDIR_P],
74744dda7b2Smrg[AC_PREREQ([2.60])dnl
74844dda7b2SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
74944dda7b2Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
75044dda7b2Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
75144dda7b2Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
75244dda7b2Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
75344dda7b2Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
75444dda7b2Smrgdnl adjustment using top_builddir (which is defined more often than
75544dda7b2Smrgdnl MKDIR_P).
75644dda7b2SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
75744dda7b2Smrgcase $mkdir_p in
75844dda7b2Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
75944dda7b2Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7607a3b38f7Smrgesac
7617a3b38f7Smrg])
762ff559fabSmrg
76344dda7b2Smrg# Helper functions for option handling.                     -*- Autoconf -*-
764ff559fabSmrg
76544dda7b2Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
76644dda7b2Smrg#
76744dda7b2Smrg# This file is free software; the Free Software Foundation
76844dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
76944dda7b2Smrg# with or without modifications, as long as this notice is preserved.
7707a3b38f7Smrg
77144dda7b2Smrg# serial 4
7727a3b38f7Smrg
77344dda7b2Smrg# _AM_MANGLE_OPTION(NAME)
77444dda7b2Smrg# -----------------------
77544dda7b2SmrgAC_DEFUN([_AM_MANGLE_OPTION],
77644dda7b2Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
777ff559fabSmrg
77844dda7b2Smrg# _AM_SET_OPTION(NAME)
77944dda7b2Smrg# ------------------------------
78044dda7b2Smrg# Set option NAME.  Presently that only means defining a flag for this option.
78144dda7b2SmrgAC_DEFUN([_AM_SET_OPTION],
78244dda7b2Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
783ff559fabSmrg
78444dda7b2Smrg# _AM_SET_OPTIONS(OPTIONS)
78544dda7b2Smrg# ----------------------------------
78644dda7b2Smrg# OPTIONS is a space-separated list of Automake options.
78744dda7b2SmrgAC_DEFUN([_AM_SET_OPTIONS],
78844dda7b2Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
789ff559fabSmrg
79044dda7b2Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
79144dda7b2Smrg# -------------------------------------------
79244dda7b2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
79344dda7b2SmrgAC_DEFUN([_AM_IF_OPTION],
79444dda7b2Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
795ff559fabSmrg
79644dda7b2Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
797ff559fabSmrg
79844dda7b2Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
79944dda7b2Smrg# Free Software Foundation, Inc.
80044dda7b2Smrg#
80144dda7b2Smrg# This file is free software; the Free Software Foundation
80244dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
80344dda7b2Smrg# with or without modifications, as long as this notice is preserved.
804ff559fabSmrg
80544dda7b2Smrg# serial 5
806ff559fabSmrg
80744dda7b2Smrg# AM_SANITY_CHECK
80844dda7b2Smrg# ---------------
80944dda7b2SmrgAC_DEFUN([AM_SANITY_CHECK],
81044dda7b2Smrg[AC_MSG_CHECKING([whether build environment is sane])
81144dda7b2Smrg# Just in case
81244dda7b2Smrgsleep 1
81344dda7b2Smrgecho timestamp > conftest.file
81444dda7b2Smrg# Reject unsafe characters in $srcdir or the absolute working directory
81544dda7b2Smrg# name.  Accept space and tab only in the latter.
81644dda7b2Smrgam_lf='
81744dda7b2Smrg'
81844dda7b2Smrgcase `pwd` in
81944dda7b2Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
82044dda7b2Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
82144dda7b2Smrgesac
82244dda7b2Smrgcase $srcdir in
82344dda7b2Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
82444dda7b2Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
82544dda7b2Smrgesac
8267a3b38f7Smrg
82744dda7b2Smrg# Do `set' in a subshell so we don't clobber the current shell's
82844dda7b2Smrg# arguments.  Must try -L first in case configure is actually a
82944dda7b2Smrg# symlink; some systems play weird games with the mod time of symlinks
83044dda7b2Smrg# (eg FreeBSD returns the mod time of the symlink's containing
83144dda7b2Smrg# directory).
83244dda7b2Smrgif (
83344dda7b2Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
83444dda7b2Smrg   if test "$[*]" = "X"; then
83544dda7b2Smrg      # -L didn't work.
83644dda7b2Smrg      set X `ls -t "$srcdir/configure" conftest.file`
83744dda7b2Smrg   fi
83844dda7b2Smrg   rm -f conftest.file
83944dda7b2Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
84044dda7b2Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8417a3b38f7Smrg
84244dda7b2Smrg      # If neither matched, then we have a broken ls.  This can happen
84344dda7b2Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
84444dda7b2Smrg      # broken ls alias from the environment.  This has actually
84544dda7b2Smrg      # happened.  Such a system could not be considered "sane".
84644dda7b2Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
84744dda7b2Smrgalias in your environment])
84844dda7b2Smrg   fi
849ff559fabSmrg
85044dda7b2Smrg   test "$[2]" = conftest.file
85144dda7b2Smrg   )
85244dda7b2Smrgthen
85344dda7b2Smrg   # Ok.
85444dda7b2Smrg   :
85544dda7b2Smrgelse
85644dda7b2Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
85744dda7b2SmrgCheck your system clock])
858ff559fabSmrgfi
85944dda7b2SmrgAC_MSG_RESULT(yes)])
8607a3b38f7Smrg
86144dda7b2Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
86244dda7b2Smrg#
86344dda7b2Smrg# This file is free software; the Free Software Foundation
86444dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
86544dda7b2Smrg# with or without modifications, as long as this notice is preserved.
866ff559fabSmrg
86744dda7b2Smrg# serial 1
868ff559fabSmrg
86944dda7b2Smrg# AM_SILENT_RULES([DEFAULT])
87044dda7b2Smrg# --------------------------
87144dda7b2Smrg# Enable less verbose build rules; with the default set to DEFAULT
87244dda7b2Smrg# (`yes' being less verbose, `no' or empty being verbose).
87344dda7b2SmrgAC_DEFUN([AM_SILENT_RULES],
87444dda7b2Smrg[AC_ARG_ENABLE([silent-rules],
87544dda7b2Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
87644dda7b2Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
87744dda7b2Smrgcase $enable_silent_rules in
87844dda7b2Smrgyes) AM_DEFAULT_VERBOSITY=0;;
87944dda7b2Smrgno)  AM_DEFAULT_VERBOSITY=1;;
88044dda7b2Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
88144dda7b2Smrgesac
88244dda7b2SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
88344dda7b2SmrgAM_BACKSLASH='\'
88444dda7b2SmrgAC_SUBST([AM_BACKSLASH])dnl
88544dda7b2Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
88644dda7b2Smrg])
8877a3b38f7Smrg
88844dda7b2Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
889ff559fabSmrg#
89044dda7b2Smrg# This file is free software; the Free Software Foundation
89144dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
89244dda7b2Smrg# with or without modifications, as long as this notice is preserved.
8937a3b38f7Smrg
89444dda7b2Smrg# AM_PROG_INSTALL_STRIP
89544dda7b2Smrg# ---------------------
89644dda7b2Smrg# One issue with vendor `install' (even GNU) is that you can't
89744dda7b2Smrg# specify the program used to strip binaries.  This is especially
89844dda7b2Smrg# annoying in cross-compiling environments, where the build's strip
89944dda7b2Smrg# is unlikely to handle the host's binaries.
90044dda7b2Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
90144dda7b2Smrg# always use install-sh in `make install-strip', and initialize
90244dda7b2Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
90344dda7b2SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
90444dda7b2Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
90544dda7b2Smrg# Installed binaries are usually stripped using `strip' when the user
90644dda7b2Smrg# run `make install-strip'.  However `strip' might not be the right
90744dda7b2Smrg# tool to use in cross-compilation environments, therefore Automake
90844dda7b2Smrg# will honor the `STRIP' environment variable to overrule this program.
90944dda7b2Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
91044dda7b2Smrgif test "$cross_compiling" != no; then
91144dda7b2Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
9127a3b38f7Smrgfi
91344dda7b2SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
91444dda7b2SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
915ff559fabSmrg
91644dda7b2Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
91744dda7b2Smrg#
91844dda7b2Smrg# This file is free software; the Free Software Foundation
91944dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
92044dda7b2Smrg# with or without modifications, as long as this notice is preserved.
921ff559fabSmrg
92244dda7b2Smrg# serial 2
923ff559fabSmrg
92444dda7b2Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
92544dda7b2Smrg# ---------------------------
92644dda7b2Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
92744dda7b2Smrg# This macro is traced by Automake.
92844dda7b2SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
929ff559fabSmrg
93044dda7b2Smrg# AM_SUBST_NOTMAKE(VARIABLE)
93144dda7b2Smrg# ---------------------------
93244dda7b2Smrg# Public sister of _AM_SUBST_NOTMAKE.
93344dda7b2SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
934ff559fabSmrg
93544dda7b2Smrg# Check how to create a tarball.                            -*- Autoconf -*-
936ff559fabSmrg
93744dda7b2Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
93844dda7b2Smrg#
93944dda7b2Smrg# This file is free software; the Free Software Foundation
94044dda7b2Smrg# gives unlimited permission to copy and/or distribute it,
94144dda7b2Smrg# with or without modifications, as long as this notice is preserved.
942ff559fabSmrg
94344dda7b2Smrg# serial 2
944ff559fabSmrg
94544dda7b2Smrg# _AM_PROG_TAR(FORMAT)
94644dda7b2Smrg# --------------------
94744dda7b2Smrg# Check how to create a tarball in format FORMAT.
94844dda7b2Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
94944dda7b2Smrg#
95044dda7b2Smrg# Substitute a variable $(am__tar) that is a command
95144dda7b2Smrg# writing to stdout a FORMAT-tarball containing the directory
95244dda7b2Smrg# $tardir.
95344dda7b2Smrg#     tardir=directory && $(am__tar) > result.tar
95444dda7b2Smrg#
95544dda7b2Smrg# Substitute a variable $(am__untar) that extract such
95644dda7b2Smrg# a tarball read from stdin.
95744dda7b2Smrg#     $(am__untar) < result.tar
95844dda7b2SmrgAC_DEFUN([_AM_PROG_TAR],
95944dda7b2Smrg[# Always define AMTAR for backward compatibility.
96044dda7b2SmrgAM_MISSING_PROG([AMTAR], [tar])
96144dda7b2Smrgm4_if([$1], [v7],
96244dda7b2Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
96344dda7b2Smrg     [m4_case([$1], [ustar],, [pax],,
96444dda7b2Smrg              [m4_fatal([Unknown tar format])])
96544dda7b2SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
96644dda7b2Smrg# Loop over all known methods to create a tar archive until one works.
96744dda7b2Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
96844dda7b2Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
96944dda7b2Smrg# Do not fold the above two line into one, because Tru64 sh and
97044dda7b2Smrg# Solaris sh will not grok spaces in the rhs of `-'.
97144dda7b2Smrgfor _am_tool in $_am_tools
97244dda7b2Smrgdo
97344dda7b2Smrg  case $_am_tool in
97444dda7b2Smrg  gnutar)
97544dda7b2Smrg    for _am_tar in tar gnutar gtar;
97644dda7b2Smrg    do
97744dda7b2Smrg      AM_RUN_LOG([$_am_tar --version]) && break
97844dda7b2Smrg    done
97944dda7b2Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
98044dda7b2Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
98144dda7b2Smrg    am__untar="$_am_tar -xf -"
98244dda7b2Smrg    ;;
98344dda7b2Smrg  plaintar)
98444dda7b2Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
98544dda7b2Smrg    # ustar tarball either.
98644dda7b2Smrg    (tar --version) >/dev/null 2>&1 && continue
98744dda7b2Smrg    am__tar='tar chf - "$$tardir"'
98844dda7b2Smrg    am__tar_='tar chf - "$tardir"'
98944dda7b2Smrg    am__untar='tar xf -'
99044dda7b2Smrg    ;;
99144dda7b2Smrg  pax)
99244dda7b2Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
99344dda7b2Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
99444dda7b2Smrg    am__untar='pax -r'
99544dda7b2Smrg    ;;
99644dda7b2Smrg  cpio)
99744dda7b2Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
99844dda7b2Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
99944dda7b2Smrg    am__untar='cpio -i -H $1 -d'
100044dda7b2Smrg    ;;
100144dda7b2Smrg  none)
100244dda7b2Smrg    am__tar=false
100344dda7b2Smrg    am__tar_=false
100444dda7b2Smrg    am__untar=false
100544dda7b2Smrg    ;;
100644dda7b2Smrg  esac
1007ff559fabSmrg
100844dda7b2Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
100944dda7b2Smrg  # and am__untar set.
101044dda7b2Smrg  test -n "${am_cv_prog_tar_$1}" && break
1011ff559fabSmrg
101244dda7b2Smrg  # tar/untar a dummy directory, and stop if the command works
101344dda7b2Smrg  rm -rf conftest.dir
101444dda7b2Smrg  mkdir conftest.dir
101544dda7b2Smrg  echo GrepMe > conftest.dir/file
101644dda7b2Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
101744dda7b2Smrg  rm -rf conftest.dir
101844dda7b2Smrg  if test -s conftest.tar; then
101944dda7b2Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
102044dda7b2Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
102144dda7b2Smrg  fi
102244dda7b2Smrgdone
102344dda7b2Smrgrm -rf conftest.dir
1024ff559fabSmrg
102544dda7b2SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
102644dda7b2SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
102744dda7b2SmrgAC_SUBST([am__tar])
102844dda7b2SmrgAC_SUBST([am__untar])
102944dda7b2Smrg]) # _AM_PROG_TAR
10307a3b38f7Smrg
103144dda7b2Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
103244dda7b2Smrgdnl
103344dda7b2Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
103444dda7b2Smrgdnl 
103544dda7b2Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
103644dda7b2Smrgdnl copy of this software and associated documentation files (the "Software"),
103744dda7b2Smrgdnl to deal in the Software without restriction, including without limitation
103844dda7b2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
103944dda7b2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the
104044dda7b2Smrgdnl Software is furnished to do so, subject to the following conditions:
104144dda7b2Smrgdnl
104244dda7b2Smrgdnl The above copyright notice and this permission notice (including the next
104344dda7b2Smrgdnl paragraph) shall be included in all copies or substantial portions of the
104444dda7b2Smrgdnl Software.
104544dda7b2Smrgdnl
104644dda7b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
104744dda7b2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
104844dda7b2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
104944dda7b2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
105044dda7b2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
105144dda7b2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
105244dda7b2Smrgdnl DEALINGS IN THE SOFTWARE.
10537a3b38f7Smrg
105444dda7b2Smrg# XORG_MACROS_VERSION(required-version)
105544dda7b2Smrg# -------------------------------------
105644dda7b2Smrg# Minimum version: 1.1.0
105744dda7b2Smrg#
105844dda7b2Smrg# If you're using a macro added in Version 1.1 or newer, include this in
105944dda7b2Smrg# your configure.ac with the minimum required version, such as:
106044dda7b2Smrg# XORG_MACROS_VERSION(1.1)
106144dda7b2Smrg#
106244dda7b2Smrg# To ensure that this macro is defined, also add:
106344dda7b2Smrg# m4_ifndef([XORG_MACROS_VERSION],
106444dda7b2Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
106544dda7b2Smrg#
106644dda7b2Smrg#
106744dda7b2Smrg# See the "minimum version" comment for each macro you use to see what 
106844dda7b2Smrg# version you require.
106944dda7b2Smrgm4_defun([XORG_MACROS_VERSION],[
107044dda7b2Smrgm4_define([vers_have], [1.10.1])
107144dda7b2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
107244dda7b2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
107344dda7b2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
107444dda7b2Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
107544dda7b2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
107644dda7b2Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
107744dda7b2Smrgm4_undefine([vers_have])
107844dda7b2Smrgm4_undefine([maj_have])
107944dda7b2Smrgm4_undefine([maj_needed])
108044dda7b2Smrg]) # XORG_MACROS_VERSION
1081ff559fabSmrg
108244dda7b2Smrg# XORG_PROG_RAWCPP()
108344dda7b2Smrg# ------------------
108444dda7b2Smrg# Minimum version: 1.0.0
108544dda7b2Smrg#
108644dda7b2Smrg# Find cpp program and necessary flags for use in pre-processing text files
108744dda7b2Smrg# such as man pages and config files
108844dda7b2SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
108944dda7b2SmrgAC_REQUIRE([AC_PROG_CPP])
109044dda7b2SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
109144dda7b2Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1092ff559fabSmrg
109344dda7b2Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
109444dda7b2Smrg# which is not the best choice for supporting other OS'es, but covers most
109544dda7b2Smrg# of the ones we need for now.
109644dda7b2SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
109744dda7b2SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
109844dda7b2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
109944dda7b2Smrg	AC_MSG_RESULT([no])
110044dda7b2Smrgelse
110144dda7b2Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
110244dda7b2Smrg		RAWCPPFLAGS=-undef
110344dda7b2Smrg		AC_MSG_RESULT([yes])
110444dda7b2Smrg	# under Cygwin unix is still defined even with -undef
110544dda7b2Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
110644dda7b2Smrg		RAWCPPFLAGS="-undef -ansi"
110744dda7b2Smrg		AC_MSG_RESULT([yes, with -ansi])
110844dda7b2Smrg	else
110944dda7b2Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
111044dda7b2Smrg	fi
111144dda7b2Smrgfi
111244dda7b2Smrgrm -f conftest.$ac_ext
11137a3b38f7Smrg
111444dda7b2SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
111544dda7b2SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
111644dda7b2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
111744dda7b2Smrg	AC_MSG_RESULT([no])
111844dda7b2Smrgelse
111944dda7b2Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
112044dda7b2Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
112144dda7b2Smrg		AC_MSG_RESULT([yes])
112244dda7b2Smrg	else
112344dda7b2Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
112444dda7b2Smrg	fi
112544dda7b2Smrgfi
112644dda7b2Smrgrm -f conftest.$ac_ext
112744dda7b2SmrgAC_SUBST(RAWCPPFLAGS)
112844dda7b2Smrg]) # XORG_PROG_RAWCPP
11297a3b38f7Smrg
113044dda7b2Smrg# XORG_MANPAGE_SECTIONS()
113144dda7b2Smrg# -----------------------
113244dda7b2Smrg# Minimum version: 1.0.0
113344dda7b2Smrg#
113444dda7b2Smrg# Determine which sections man pages go in for the different man page types
113544dda7b2Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
113644dda7b2Smrg# Not sure if there's any better way than just hardcoding by OS name.
113744dda7b2Smrg# Override default settings by setting environment variables
113844dda7b2Smrg# Added MAN_SUBSTS in version 1.8
113944dda7b2Smrg# Added AC_PROG_SED in version 1.8
11407a3b38f7Smrg
114144dda7b2SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
114244dda7b2SmrgAC_REQUIRE([AC_CANONICAL_HOST])
114344dda7b2SmrgAC_REQUIRE([AC_PROG_SED])
11447a3b38f7Smrg
114544dda7b2Smrgif test x$APP_MAN_SUFFIX = x    ; then
114644dda7b2Smrg    APP_MAN_SUFFIX=1
114744dda7b2Smrgfi
114844dda7b2Smrgif test x$APP_MAN_DIR = x    ; then
114944dda7b2Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
115044dda7b2Smrgfi
11517a3b38f7Smrg
115244dda7b2Smrgif test x$LIB_MAN_SUFFIX = x    ; then
115344dda7b2Smrg    LIB_MAN_SUFFIX=3
115444dda7b2Smrgfi
115544dda7b2Smrgif test x$LIB_MAN_DIR = x    ; then
115644dda7b2Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
115744dda7b2Smrgfi
11587a3b38f7Smrg
115944dda7b2Smrgif test x$FILE_MAN_SUFFIX = x    ; then
116044dda7b2Smrg    case $host_os in
116144dda7b2Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
116244dda7b2Smrg	*)		FILE_MAN_SUFFIX=5  ;;
116344dda7b2Smrg    esac
116444dda7b2Smrgfi
116544dda7b2Smrgif test x$FILE_MAN_DIR = x    ; then
116644dda7b2Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
116744dda7b2Smrgfi
11687a3b38f7Smrg
116944dda7b2Smrgif test x$MISC_MAN_SUFFIX = x    ; then
117044dda7b2Smrg    case $host_os in
117144dda7b2Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
117244dda7b2Smrg	*)		MISC_MAN_SUFFIX=7  ;;
117344dda7b2Smrg    esac
117444dda7b2Smrgfi
117544dda7b2Smrgif test x$MISC_MAN_DIR = x    ; then
117644dda7b2Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
117744dda7b2Smrgfi
1178ff559fabSmrg
117944dda7b2Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
118044dda7b2Smrg    case $host_os in
118144dda7b2Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
118244dda7b2Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
118344dda7b2Smrg    esac
118444dda7b2Smrgfi
118544dda7b2Smrgif test x$DRIVER_MAN_DIR = x    ; then
118644dda7b2Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
118744dda7b2Smrgfi
1188ff559fabSmrg
118944dda7b2Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
119044dda7b2Smrg    case $host_os in
119144dda7b2Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
119244dda7b2Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
119344dda7b2Smrg    esac
119444dda7b2Smrgfi
119544dda7b2Smrgif test x$ADMIN_MAN_DIR = x    ; then
119644dda7b2Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
119744dda7b2Smrgfi
1198ff559fabSmrg
1199ff559fabSmrg
120044dda7b2SmrgAC_SUBST([APP_MAN_SUFFIX])
120144dda7b2SmrgAC_SUBST([LIB_MAN_SUFFIX])
120244dda7b2SmrgAC_SUBST([FILE_MAN_SUFFIX])
120344dda7b2SmrgAC_SUBST([MISC_MAN_SUFFIX])
120444dda7b2SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
120544dda7b2SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
120644dda7b2SmrgAC_SUBST([APP_MAN_DIR])
120744dda7b2SmrgAC_SUBST([LIB_MAN_DIR])
120844dda7b2SmrgAC_SUBST([FILE_MAN_DIR])
120944dda7b2SmrgAC_SUBST([MISC_MAN_DIR])
121044dda7b2SmrgAC_SUBST([DRIVER_MAN_DIR])
121144dda7b2SmrgAC_SUBST([ADMIN_MAN_DIR])
1212ff559fabSmrg
121344dda7b2SmrgXORG_MAN_PAGE="X Version 11"
121444dda7b2SmrgAC_SUBST([XORG_MAN_PAGE])
121544dda7b2SmrgMAN_SUBSTS="\
121644dda7b2Smrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
121744dda7b2Smrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
121844dda7b2Smrg	-e 's|__xservername__|Xorg|g' \
121944dda7b2Smrg	-e 's|__xconfigfile__|xorg.conf|g' \
122044dda7b2Smrg	-e 's|__projectroot__|\$(prefix)|g' \
122144dda7b2Smrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
122244dda7b2Smrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
122344dda7b2Smrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
122444dda7b2Smrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
122544dda7b2Smrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
122644dda7b2Smrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
122744dda7b2Smrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
122844dda7b2SmrgAC_SUBST([MAN_SUBSTS])
1229ff559fabSmrg
123044dda7b2Smrg]) # XORG_MANPAGE_SECTIONS
123144dda7b2Smrg
123244dda7b2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
12337a3b38f7Smrg# ------------------------
123444dda7b2Smrg# Minimum version: 1.7.0
123544dda7b2Smrg#
123644dda7b2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
123744dda7b2Smrg# provided by xorg-sgml-doctools, if installed.
123844dda7b2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
123944dda7b2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
124044dda7b2SmrgXORG_SGML_PATH=
124144dda7b2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
124244dda7b2Smrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
124344dda7b2Smrg    [m4_ifval([$1],[:],
124444dda7b2Smrg        [if test x"$cross_compiling" != x"yes" ; then
124544dda7b2Smrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
124644dda7b2Smrg                          [XORG_SGML_PATH=$prefix/share/sgml])
124744dda7b2Smrg         fi])
124844dda7b2Smrg    ])
1249ff559fabSmrg
125044dda7b2Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
125144dda7b2Smrg# the path and the name of the doc stylesheet
125244dda7b2Smrgif test "x$XORG_SGML_PATH" != "x" ; then
125344dda7b2Smrg   AC_MSG_RESULT([$XORG_SGML_PATH])
125444dda7b2Smrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
125544dda7b2Smrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
125644dda7b2Smrgelse
125744dda7b2Smrg   AC_MSG_RESULT([no])
125844dda7b2Smrgfi
1259ff559fabSmrg
126044dda7b2SmrgAC_SUBST(XORG_SGML_PATH)
126144dda7b2SmrgAC_SUBST(STYLESHEET_SRCDIR)
126244dda7b2SmrgAC_SUBST(XSL_STYLESHEET)
126344dda7b2SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
126444dda7b2Smrg]) # XORG_CHECK_SGML_DOCTOOLS
1265ff559fabSmrg
126644dda7b2Smrg# XORG_CHECK_LINUXDOC
126744dda7b2Smrg# -------------------
126844dda7b2Smrg# Minimum version: 1.0.0
126944dda7b2Smrg#
127044dda7b2Smrg# Defines the variable MAKE_TEXT if the necessary tools and
127144dda7b2Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
127244dda7b2Smrg# Whether or not the necessary tools and files are found can be checked
127344dda7b2Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
127444dda7b2SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
127544dda7b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
127644dda7b2SmrgAC_REQUIRE([XORG_WITH_PS2PDF])
12777a3b38f7Smrg
127844dda7b2SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
1279ff559fabSmrg
128044dda7b2SmrgAC_MSG_CHECKING([whether to build documentation])
1281ff559fabSmrg
128244dda7b2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
128344dda7b2Smrg   BUILDDOC=yes
128444dda7b2Smrgelse
128544dda7b2Smrg   BUILDDOC=no
128644dda7b2Smrgfi
1287ff559fabSmrg
128844dda7b2SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1289ff559fabSmrg
129044dda7b2SmrgAC_MSG_RESULT([$BUILDDOC])
1291ff559fabSmrg
129244dda7b2SmrgAC_MSG_CHECKING([whether to build pdf documentation])
1293ff559fabSmrg
129444dda7b2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
129544dda7b2Smrg   BUILDPDFDOC=yes
1296ff559fabSmrgelse
129744dda7b2Smrg   BUILDPDFDOC=no
1298ff559fabSmrgfi
1299ff559fabSmrg
130044dda7b2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1301ff559fabSmrg
130244dda7b2SmrgAC_MSG_RESULT([$BUILDPDFDOC])
1303ff559fabSmrg
130444dda7b2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
130544dda7b2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
130644dda7b2SmrgMAKE_PDF="$PS2PDF"
130744dda7b2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1308ff559fabSmrg
130944dda7b2SmrgAC_SUBST(MAKE_TEXT)
131044dda7b2SmrgAC_SUBST(MAKE_PS)
131144dda7b2SmrgAC_SUBST(MAKE_PDF)
131244dda7b2SmrgAC_SUBST(MAKE_HTML)
131344dda7b2Smrg]) # XORG_CHECK_LINUXDOC
1314ff559fabSmrg
131544dda7b2Smrg# XORG_CHECK_DOCBOOK
131644dda7b2Smrg# -------------------
131744dda7b2Smrg# Minimum version: 1.0.0
131844dda7b2Smrg#
131944dda7b2Smrg# Checks for the ability to build output formats from SGML DocBook source.
132044dda7b2Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
132144dda7b2Smrg# indicates whether the necessary tools and files are found and, if set,
132244dda7b2Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
132344dda7b2SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
132444dda7b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1325ff559fabSmrg
132644dda7b2SmrgBUILDTXTDOC=no
132744dda7b2SmrgBUILDPDFDOC=no
132844dda7b2SmrgBUILDPSDOC=no
132944dda7b2SmrgBUILDHTMLDOC=no
1330ff559fabSmrg
133144dda7b2SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
133244dda7b2SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
133344dda7b2SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
133444dda7b2SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1335ff559fabSmrg
133644dda7b2SmrgAC_MSG_CHECKING([whether to build text documentation])
133744dda7b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
133844dda7b2Smrg   test x$BUILD_TXTDOC != xno; then
133944dda7b2Smrg	BUILDTXTDOC=yes
13407a3b38f7Smrgfi
134144dda7b2SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
134244dda7b2SmrgAC_MSG_RESULT([$BUILDTXTDOC])
1343ff559fabSmrg
134444dda7b2SmrgAC_MSG_CHECKING([whether to build PDF documentation])
134544dda7b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
134644dda7b2Smrg   test x$BUILD_PDFDOC != xno; then
134744dda7b2Smrg	BUILDPDFDOC=yes
13487a3b38f7Smrgfi
134944dda7b2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
135044dda7b2SmrgAC_MSG_RESULT([$BUILDPDFDOC])
1351ff559fabSmrg
135244dda7b2SmrgAC_MSG_CHECKING([whether to build PostScript documentation])
135344dda7b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
135444dda7b2Smrg   test x$BUILD_PSDOC != xno; then
135544dda7b2Smrg	BUILDPSDOC=yes
135644dda7b2Smrgfi
135744dda7b2SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
135844dda7b2SmrgAC_MSG_RESULT([$BUILDPSDOC])
1359ff559fabSmrg
136044dda7b2SmrgAC_MSG_CHECKING([whether to build HTML documentation])
136144dda7b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
136244dda7b2Smrg   test x$BUILD_HTMLDOC != xno; then
136344dda7b2Smrg	BUILDHTMLDOC=yes
136444dda7b2Smrgfi
136544dda7b2SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
136644dda7b2SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
1367ff559fabSmrg
136844dda7b2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
136944dda7b2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
137044dda7b2SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
137144dda7b2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1372ff559fabSmrg
137344dda7b2SmrgAC_SUBST(MAKE_TEXT)
137444dda7b2SmrgAC_SUBST(MAKE_PS)
137544dda7b2SmrgAC_SUBST(MAKE_PDF)
137644dda7b2SmrgAC_SUBST(MAKE_HTML)
137744dda7b2Smrg]) # XORG_CHECK_DOCBOOK
1378ff559fabSmrg
137944dda7b2Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
138044dda7b2Smrg# ----------------
138144dda7b2Smrg# Minimum version: 1.5.0
138244dda7b2Smrg#
138344dda7b2Smrg# Documentation tools are not always available on all platforms and sometimes
138444dda7b2Smrg# not at the appropriate level. This macro enables a module to test for the
138544dda7b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
138644dda7b2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
138744dda7b2Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
138844dda7b2Smrg# --with-xmlto assumes 'auto'.
138944dda7b2Smrg#
139044dda7b2Smrg# Interface to module:
139144dda7b2Smrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
139244dda7b2Smrg# XMLTO:	returns the path of the xmlto program found
139344dda7b2Smrg#		returns the path set by the user in the environment
139444dda7b2Smrg# --with-xmlto:	'yes' user instructs the module to use xmlto
139544dda7b2Smrg#		'no' user instructs the module not to use xmlto
139644dda7b2Smrg#
139744dda7b2Smrg# Added in version 1.10.0
139844dda7b2Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
139944dda7b2Smrg#                  xmlto for text output requires either lynx, links, or w3m browsers
140044dda7b2Smrg#
140144dda7b2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
140244dda7b2Smrg#
140344dda7b2SmrgAC_DEFUN([XORG_WITH_XMLTO],[
140444dda7b2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
140544dda7b2Smrgm4_define([_defopt], m4_default([$2], [auto]))
140644dda7b2SmrgAC_ARG_WITH(xmlto,
140744dda7b2Smrg	AS_HELP_STRING([--with-xmlto],
140844dda7b2Smrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
140944dda7b2Smrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
141044dda7b2Smrgm4_undefine([_defopt])
141144dda7b2Smrg
141244dda7b2Smrgif test "x$use_xmlto" = x"auto"; then
141344dda7b2Smrg   AC_PATH_PROG([XMLTO], [xmlto])
141444dda7b2Smrg   if test "x$XMLTO" = "x"; then
141544dda7b2Smrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
141644dda7b2Smrg	have_xmlto=no
141744dda7b2Smrg   else
141844dda7b2Smrg        have_xmlto=yes
141944dda7b2Smrg   fi
142044dda7b2Smrgelif test "x$use_xmlto" = x"yes" ; then
142144dda7b2Smrg   AC_PATH_PROG([XMLTO], [xmlto])
142244dda7b2Smrg   if test "x$XMLTO" = "x"; then
142344dda7b2Smrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
142444dda7b2Smrg   fi
142544dda7b2Smrg   have_xmlto=yes
142644dda7b2Smrgelif test "x$use_xmlto" = x"no" ; then
142744dda7b2Smrg   if test "x$XMLTO" != "x"; then
142844dda7b2Smrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
142944dda7b2Smrg   fi
143044dda7b2Smrg   have_xmlto=no
143144dda7b2Smrgelse
143244dda7b2Smrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
143344dda7b2Smrgfi
1434ff559fabSmrg
143544dda7b2Smrg# Test for a minimum version of xmlto, if provided.
143644dda7b2Smrgm4_ifval([$1],
143744dda7b2Smrg[if test "$have_xmlto" = yes; then
143844dda7b2Smrg    # scrape the xmlto version
143944dda7b2Smrg    AC_MSG_CHECKING([the xmlto version])
144044dda7b2Smrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
144144dda7b2Smrg    AC_MSG_RESULT([$xmlto_version])
144244dda7b2Smrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
144344dda7b2Smrg        [if test "x$use_xmlto" = xauto; then
144444dda7b2Smrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
144544dda7b2Smrg            have_xmlto=no
144644dda7b2Smrg        else
144744dda7b2Smrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
144844dda7b2Smrg        fi])
144944dda7b2Smrgfi])
1450ff559fabSmrg
145144dda7b2Smrg# Test for the ability of xmlto to generate a text target
145244dda7b2Smrghave_xmlto_text=no
145344dda7b2Smrgcat > conftest.xml << "EOF"
145444dda7b2SmrgEOF
145544dda7b2SmrgAS_IF([test "$have_xmlto" = yes],
145644dda7b2Smrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
145744dda7b2Smrg             [have_xmlto_text=yes],
145844dda7b2Smrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
145944dda7b2Smrgrm -f conftest.xml
146044dda7b2SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
146144dda7b2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
146244dda7b2Smrg]) # XORG_WITH_XMLTO
146344dda7b2Smrg
146444dda7b2Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
146544dda7b2Smrg# ----------------
146644dda7b2Smrg# Minimum version: 1.5.0
146744dda7b2Smrg#
146844dda7b2Smrg# Documentation tools are not always available on all platforms and sometimes
146944dda7b2Smrg# not at the appropriate level. This macro enables a module to test for the
147044dda7b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
147144dda7b2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
147244dda7b2Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
147344dda7b2Smrg# --with-asciidoc assumes 'auto'.
147444dda7b2Smrg#
147544dda7b2Smrg# Interface to module:
147644dda7b2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
147744dda7b2Smrg# ASCIIDOC:	 returns the path of the asciidoc program found
147844dda7b2Smrg#		 returns the path set by the user in the environment
147944dda7b2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
148044dda7b2Smrg#		  'no' user instructs the module not to use asciidoc
148144dda7b2Smrg#
148244dda7b2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
148344dda7b2Smrg#
148444dda7b2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
148544dda7b2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
148644dda7b2Smrgm4_define([_defopt], m4_default([$2], [auto]))
148744dda7b2SmrgAC_ARG_WITH(asciidoc,
148844dda7b2Smrg	AS_HELP_STRING([--with-asciidoc],
148944dda7b2Smrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
149044dda7b2Smrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
149144dda7b2Smrgm4_undefine([_defopt])
149244dda7b2Smrg
149344dda7b2Smrgif test "x$use_asciidoc" = x"auto"; then
149444dda7b2Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
149544dda7b2Smrg   if test "x$ASCIIDOC" = "x"; then
149644dda7b2Smrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
149744dda7b2Smrg	have_asciidoc=no
149844dda7b2Smrg   else
149944dda7b2Smrg        have_asciidoc=yes
150044dda7b2Smrg   fi
150144dda7b2Smrgelif test "x$use_asciidoc" = x"yes" ; then
150244dda7b2Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
150344dda7b2Smrg   if test "x$ASCIIDOC" = "x"; then
150444dda7b2Smrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
150544dda7b2Smrg   fi
150644dda7b2Smrg   have_asciidoc=yes
150744dda7b2Smrgelif test "x$use_asciidoc" = x"no" ; then
150844dda7b2Smrg   if test "x$ASCIIDOC" != "x"; then
150944dda7b2Smrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
151044dda7b2Smrg   fi
151144dda7b2Smrg   have_asciidoc=no
151244dda7b2Smrgelse
151344dda7b2Smrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
151444dda7b2Smrgfi
151544dda7b2Smrgm4_ifval([$1],
151644dda7b2Smrg[if test "$have_asciidoc" = yes; then
151744dda7b2Smrg    # scrape the asciidoc version
151844dda7b2Smrg    AC_MSG_CHECKING([the asciidoc version])
151944dda7b2Smrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
152044dda7b2Smrg    AC_MSG_RESULT([$asciidoc_version])
152144dda7b2Smrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
152244dda7b2Smrg        [if test "x$use_asciidoc" = xauto; then
152344dda7b2Smrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
152444dda7b2Smrg            have_asciidoc=no
152544dda7b2Smrg        else
152644dda7b2Smrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
152744dda7b2Smrg        fi])
152844dda7b2Smrgfi])
152944dda7b2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
153044dda7b2Smrg]) # XORG_WITH_ASCIIDOC
1531ff559fabSmrg
153244dda7b2Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
153344dda7b2Smrg# --------------------------------
153444dda7b2Smrg# Minimum version: 1.5.0
153544dda7b2Smrg#
153644dda7b2Smrg# Documentation tools are not always available on all platforms and sometimes
153744dda7b2Smrg# not at the appropriate level. This macro enables a module to test for the
153844dda7b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
153944dda7b2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
154044dda7b2Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
154144dda7b2Smrg# --with-doxygen assumes 'auto'.
154244dda7b2Smrg#
154344dda7b2Smrg# Interface to module:
154444dda7b2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
154544dda7b2Smrg# DOXYGEN:	 returns the path of the doxygen program found
154644dda7b2Smrg#		 returns the path set by the user in the environment
154744dda7b2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen
154844dda7b2Smrg#		  'no' user instructs the module not to use doxygen
154944dda7b2Smrg#
155044dda7b2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
155144dda7b2Smrg#
155244dda7b2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
155344dda7b2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
155444dda7b2Smrgm4_define([_defopt], m4_default([$2], [auto]))
155544dda7b2SmrgAC_ARG_WITH(doxygen,
155644dda7b2Smrg	AS_HELP_STRING([--with-doxygen],
155744dda7b2Smrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
155844dda7b2Smrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
155944dda7b2Smrgm4_undefine([_defopt])
156044dda7b2Smrg
156144dda7b2Smrgif test "x$use_doxygen" = x"auto"; then
156244dda7b2Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
156344dda7b2Smrg   if test "x$DOXYGEN" = "x"; then
156444dda7b2Smrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
156544dda7b2Smrg	have_doxygen=no
156644dda7b2Smrg   else
156744dda7b2Smrg        have_doxygen=yes
156844dda7b2Smrg   fi
156944dda7b2Smrgelif test "x$use_doxygen" = x"yes" ; then
157044dda7b2Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
157144dda7b2Smrg   if test "x$DOXYGEN" = "x"; then
157244dda7b2Smrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
157344dda7b2Smrg   fi
157444dda7b2Smrg   have_doxygen=yes
157544dda7b2Smrgelif test "x$use_doxygen" = x"no" ; then
157644dda7b2Smrg   if test "x$DOXYGEN" != "x"; then
157744dda7b2Smrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
157844dda7b2Smrg   fi
157944dda7b2Smrg   have_doxygen=no
158044dda7b2Smrgelse
158144dda7b2Smrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
158244dda7b2Smrgfi
158344dda7b2Smrgm4_ifval([$1],
158444dda7b2Smrg[if test "$have_doxygen" = yes; then
158544dda7b2Smrg    # scrape the doxygen version
158644dda7b2Smrg    AC_MSG_CHECKING([the doxygen version])
158744dda7b2Smrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
158844dda7b2Smrg    AC_MSG_RESULT([$doxygen_version])
158944dda7b2Smrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
159044dda7b2Smrg        [if test "x$use_doxygen" = xauto; then
159144dda7b2Smrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
159244dda7b2Smrg            have_doxygen=no
159344dda7b2Smrg        else
159444dda7b2Smrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
159544dda7b2Smrg        fi])
159644dda7b2Smrgfi])
159744dda7b2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
159844dda7b2Smrg]) # XORG_WITH_DOXYGEN
1599ff559fabSmrg
160044dda7b2Smrg# XORG_WITH_GROFF([DEFAULT])
160144dda7b2Smrg# ----------------
160244dda7b2Smrg# Minimum version: 1.6.0
160344dda7b2Smrg#
160444dda7b2Smrg# Documentation tools are not always available on all platforms and sometimes
160544dda7b2Smrg# not at the appropriate level. This macro enables a module to test for the
160644dda7b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
160744dda7b2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions
160844dda7b2Smrg# as whether or not to use the groff package. When DEFAULT is not specified,
160944dda7b2Smrg# --with-groff assumes 'auto'.
161044dda7b2Smrg#
161144dda7b2Smrg# Interface to module:
161244dda7b2Smrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
161344dda7b2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
161444dda7b2Smrg# HAVE_GROFF_MS: the -ms macros package
161544dda7b2Smrg# GROFF:	 returns the path of the groff program found
161644dda7b2Smrg#		 returns the path set by the user in the environment
161744dda7b2Smrg# --with-groff:	 'yes' user instructs the module to use groff
161844dda7b2Smrg#		 'no' user instructs the module not to use groff
161944dda7b2Smrg#
162044dda7b2Smrg# Added in version 1.9.0:
162144dda7b2Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
162244dda7b2Smrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
162344dda7b2Smrg#		   psselect from the psutils package.
162444dda7b2Smrg#		   the ghostcript package. Refer to the grohtml man pages
162544dda7b2Smrg#
162644dda7b2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
162744dda7b2Smrg#
162844dda7b2Smrg# OS and distros often splits groff in a basic and full package, the former
162944dda7b2Smrg# having the groff program and the later having devices, fonts and macros
163044dda7b2Smrg# Checking for the groff executable is not enough.
163144dda7b2Smrg#
163244dda7b2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't
163344dda7b2Smrg# unset HAVE_GROFF or GROFF env variables.
163444dda7b2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
163544dda7b2Smrg#
163644dda7b2SmrgAC_DEFUN([XORG_WITH_GROFF],[
163744dda7b2SmrgAC_ARG_VAR([GROFF], [Path to groff command])
163844dda7b2Smrgm4_define([_defopt], m4_default([$1], [auto]))
163944dda7b2SmrgAC_ARG_WITH(groff,
164044dda7b2Smrg	AS_HELP_STRING([--with-groff],
164144dda7b2Smrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
164244dda7b2Smrg	   [use_groff=$withval], [use_groff=]_defopt)
164344dda7b2Smrgm4_undefine([_defopt])
164444dda7b2Smrg
164544dda7b2Smrgif test "x$use_groff" = x"auto"; then
164644dda7b2Smrg   AC_PATH_PROG([GROFF], [groff])
164744dda7b2Smrg   if test "x$GROFF" = "x"; then
164844dda7b2Smrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
164944dda7b2Smrg	have_groff=no
165044dda7b2Smrg   else
165144dda7b2Smrg        have_groff=yes
165244dda7b2Smrg   fi
165344dda7b2Smrgelif test "x$use_groff" = x"yes" ; then
165444dda7b2Smrg   AC_PATH_PROG([GROFF], [groff])
165544dda7b2Smrg   if test "x$GROFF" = "x"; then
165644dda7b2Smrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
165744dda7b2Smrg   fi
165844dda7b2Smrg   have_groff=yes
165944dda7b2Smrgelif test "x$use_groff" = x"no" ; then
166044dda7b2Smrg   if test "x$GROFF" != "x"; then
166144dda7b2Smrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
166244dda7b2Smrg   fi
166344dda7b2Smrg   have_groff=no
166444dda7b2Smrgelse
166544dda7b2Smrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
166644dda7b2Smrgfi
1667ff559fabSmrg
166844dda7b2Smrg# We have groff, test for the presence of the macro packages
166944dda7b2Smrgif test "x$have_groff" = x"yes"; then
167044dda7b2Smrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
167144dda7b2Smrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
167244dda7b2Smrg        groff_ms_works=yes
167344dda7b2Smrg    else
167444dda7b2Smrg        groff_ms_works=no
167544dda7b2Smrg    fi
167644dda7b2Smrg    AC_MSG_RESULT([$groff_ms_works])
167744dda7b2Smrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
167844dda7b2Smrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
167944dda7b2Smrg        groff_mm_works=yes
168044dda7b2Smrg    else
168144dda7b2Smrg        groff_mm_works=no
168244dda7b2Smrg    fi
168344dda7b2Smrg    AC_MSG_RESULT([$groff_mm_works])
168444dda7b2Smrgfi
1685ff559fabSmrg
168644dda7b2Smrg# We have groff, test for HTML dependencies, one command per package
168744dda7b2Smrgif test "x$have_groff" = x"yes"; then
168844dda7b2Smrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
168944dda7b2Smrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
169044dda7b2Smrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
169144dda7b2Smrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
169244dda7b2Smrg      have_groff_html=yes
169344dda7b2Smrg   else
169444dda7b2Smrg      have_groff_html=no
169544dda7b2Smrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
169644dda7b2Smrg   fi
1697ff559fabSmrgfi
1698ff559fabSmrg
169944dda7b2Smrg# Set Automake conditionals for Makefiles
170044dda7b2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
170144dda7b2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
170244dda7b2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
170344dda7b2SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
170444dda7b2Smrg]) # XORG_WITH_GROFF
1705ff559fabSmrg
170644dda7b2Smrg# XORG_WITH_FOP([DEFAULT])
170744dda7b2Smrg# ----------------
170844dda7b2Smrg# Minimum version: 1.6.0
170944dda7b2Smrg#
171044dda7b2Smrg# Documentation tools are not always available on all platforms and sometimes
171144dda7b2Smrg# not at the appropriate level. This macro enables a module to test for the
171244dda7b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
171344dda7b2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions
171444dda7b2Smrg# as whether or not to use the fop package. When DEFAULT is not specified,
171544dda7b2Smrg# --with-fop assumes 'auto'.
171644dda7b2Smrg#
171744dda7b2Smrg# Interface to module:
171844dda7b2Smrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
171944dda7b2Smrg# FOP:	 	returns the path of the fop program found
172044dda7b2Smrg#		returns the path set by the user in the environment
172144dda7b2Smrg# --with-fop: 	'yes' user instructs the module to use fop
172244dda7b2Smrg#		'no' user instructs the module not to use fop
172344dda7b2Smrg#
172444dda7b2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
172544dda7b2Smrg#
172644dda7b2SmrgAC_DEFUN([XORG_WITH_FOP],[
172744dda7b2SmrgAC_ARG_VAR([FOP], [Path to fop command])
172844dda7b2Smrgm4_define([_defopt], m4_default([$1], [auto]))
172944dda7b2SmrgAC_ARG_WITH(fop,
173044dda7b2Smrg	AS_HELP_STRING([--with-fop],
173144dda7b2Smrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
173244dda7b2Smrg	   [use_fop=$withval], [use_fop=]_defopt)
173344dda7b2Smrgm4_undefine([_defopt])
173444dda7b2Smrg
173544dda7b2Smrgif test "x$use_fop" = x"auto"; then
173644dda7b2Smrg   AC_PATH_PROG([FOP], [fop])
173744dda7b2Smrg   if test "x$FOP" = "x"; then
173844dda7b2Smrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
173944dda7b2Smrg	have_fop=no
174044dda7b2Smrg   else
174144dda7b2Smrg        have_fop=yes
17427a3b38f7Smrg   fi
174344dda7b2Smrgelif test "x$use_fop" = x"yes" ; then
174444dda7b2Smrg   AC_PATH_PROG([FOP], [fop])
174544dda7b2Smrg   if test "x$FOP" = "x"; then
174644dda7b2Smrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
174744dda7b2Smrg   fi
174844dda7b2Smrg   have_fop=yes
174944dda7b2Smrgelif test "x$use_fop" = x"no" ; then
175044dda7b2Smrg   if test "x$FOP" != "x"; then
175144dda7b2Smrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
175244dda7b2Smrg   fi
175344dda7b2Smrg   have_fop=no
17547a3b38f7Smrgelse
175544dda7b2Smrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
17567a3b38f7Smrgfi
175744dda7b2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
175844dda7b2Smrg]) # XORG_WITH_FOP
1759ff559fabSmrg
176044dda7b2Smrg# XORG_WITH_PS2PDF([DEFAULT])
176144dda7b2Smrg# ----------------
176244dda7b2Smrg# Minimum version: 1.6.0
176344dda7b2Smrg#
176444dda7b2Smrg# Documentation tools are not always available on all platforms and sometimes
176544dda7b2Smrg# not at the appropriate level. This macro enables a module to test for the
176644dda7b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
176744dda7b2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
176844dda7b2Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
176944dda7b2Smrg# --with-ps2pdf assumes 'auto'.
177044dda7b2Smrg#
177144dda7b2Smrg# Interface to module:
177244dda7b2Smrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
177344dda7b2Smrg# PS2PDF:	returns the path of the ps2pdf program found
177444dda7b2Smrg#		returns the path set by the user in the environment
177544dda7b2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
177644dda7b2Smrg#		 'no' user instructs the module not to use ps2pdf
177744dda7b2Smrg#
177844dda7b2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
177944dda7b2Smrg#
178044dda7b2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[
178144dda7b2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
178244dda7b2Smrgm4_define([_defopt], m4_default([$1], [auto]))
178344dda7b2SmrgAC_ARG_WITH(ps2pdf,
178444dda7b2Smrg	AS_HELP_STRING([--with-ps2pdf],
178544dda7b2Smrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
178644dda7b2Smrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
178744dda7b2Smrgm4_undefine([_defopt])
178844dda7b2Smrg
178944dda7b2Smrgif test "x$use_ps2pdf" = x"auto"; then
179044dda7b2Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
179144dda7b2Smrg   if test "x$PS2PDF" = "x"; then
179244dda7b2Smrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
179344dda7b2Smrg	have_ps2pdf=no
179444dda7b2Smrg   else
179544dda7b2Smrg        have_ps2pdf=yes
17967a3b38f7Smrg   fi
179744dda7b2Smrgelif test "x$use_ps2pdf" = x"yes" ; then
179844dda7b2Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
179944dda7b2Smrg   if test "x$PS2PDF" = "x"; then
180044dda7b2Smrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
180144dda7b2Smrg   fi
180244dda7b2Smrg   have_ps2pdf=yes
180344dda7b2Smrgelif test "x$use_ps2pdf" = x"no" ; then
180444dda7b2Smrg   if test "x$PS2PDF" != "x"; then
180544dda7b2Smrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
180644dda7b2Smrg   fi
180744dda7b2Smrg   have_ps2pdf=no
18087a3b38f7Smrgelse
180944dda7b2Smrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
18107a3b38f7Smrgfi
181144dda7b2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
181244dda7b2Smrg]) # XORG_WITH_PS2PDF
1813ff559fabSmrg
181444dda7b2Smrg# XORG_ENABLE_DOCS (enable_docs=yes)
181544dda7b2Smrg# ----------------
181644dda7b2Smrg# Minimum version: 1.6.0
181744dda7b2Smrg#
181844dda7b2Smrg# Documentation tools are not always available on all platforms and sometimes
181944dda7b2Smrg# not at the appropriate level. This macro enables a builder to skip all
182044dda7b2Smrg# documentation targets except traditional man pages.
182144dda7b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
182244dda7b2Smrg# maximum flexibilty in controlling documentation building.
182344dda7b2Smrg# Refer to:
182444dda7b2Smrg# XORG_WITH_XMLTO         --with-xmlto
182544dda7b2Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
182644dda7b2Smrg# XORG_WITH_DOXYGEN       --with-doxygen
182744dda7b2Smrg# XORG_WITH_FOP           --with-fop
182844dda7b2Smrg# XORG_WITH_GROFF         --with-groff
182944dda7b2Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
183044dda7b2Smrg#
183144dda7b2Smrg# Interface to module:
183244dda7b2Smrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
183344dda7b2Smrg# --enable-docs: 'yes' user instructs the module to generate docs
183444dda7b2Smrg#		 'no' user instructs the module not to generate docs
183544dda7b2Smrg# parm1:	specify the default value, yes or no.
183644dda7b2Smrg#
183744dda7b2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[
183844dda7b2Smrgm4_define([default], m4_default([$1], [yes]))
183944dda7b2SmrgAC_ARG_ENABLE(docs,
184044dda7b2Smrg	AS_HELP_STRING([--enable-docs],
184144dda7b2Smrg	   [Enable building the documentation (default: ]default[)]),
184244dda7b2Smrg	   [build_docs=$enableval], [build_docs=]default)
184344dda7b2Smrgm4_undefine([default])
184444dda7b2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
184544dda7b2SmrgAC_MSG_CHECKING([whether to build documentation])
184644dda7b2SmrgAC_MSG_RESULT([$build_docs])
184744dda7b2Smrg]) # XORG_ENABLE_DOCS
184844dda7b2Smrg
184944dda7b2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
185044dda7b2Smrg# ----------------
185144dda7b2Smrg# Minimum version: 1.6.0
185244dda7b2Smrg#
185344dda7b2Smrg# This macro enables a builder to skip all developer documentation.
185444dda7b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
185544dda7b2Smrg# maximum flexibilty in controlling documentation building.
185644dda7b2Smrg# Refer to:
185744dda7b2Smrg# XORG_WITH_XMLTO         --with-xmlto
185844dda7b2Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
185944dda7b2Smrg# XORG_WITH_DOXYGEN       --with-doxygen
186044dda7b2Smrg# XORG_WITH_FOP           --with-fop
186144dda7b2Smrg# XORG_WITH_GROFF         --with-groff
186244dda7b2Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
186344dda7b2Smrg#
186444dda7b2Smrg# Interface to module:
186544dda7b2Smrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
186644dda7b2Smrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
186744dda7b2Smrg#			'no' user instructs the module not to generate developer docs
186844dda7b2Smrg# parm1:		specify the default value, yes or no.
186944dda7b2Smrg#
187044dda7b2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
187144dda7b2Smrgm4_define([devel_default], m4_default([$1], [yes]))
187244dda7b2SmrgAC_ARG_ENABLE(devel-docs,
187344dda7b2Smrg	AS_HELP_STRING([--enable-devel-docs],
187444dda7b2Smrg	   [Enable building the developer documentation (default: ]devel_default[)]),
187544dda7b2Smrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
187644dda7b2Smrgm4_undefine([devel_default])
187744dda7b2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
187844dda7b2SmrgAC_MSG_CHECKING([whether to build developer documentation])
187944dda7b2SmrgAC_MSG_RESULT([$build_devel_docs])
188044dda7b2Smrg]) # XORG_ENABLE_DEVEL_DOCS
188144dda7b2Smrg
188244dda7b2Smrg# XORG_ENABLE_SPECS (enable_specs=yes)
188344dda7b2Smrg# ----------------
188444dda7b2Smrg# Minimum version: 1.6.0
188544dda7b2Smrg#
188644dda7b2Smrg# This macro enables a builder to skip all functional specification targets.
188744dda7b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
188844dda7b2Smrg# maximum flexibilty in controlling documentation building.
188944dda7b2Smrg# Refer to:
189044dda7b2Smrg# XORG_WITH_XMLTO         --with-xmlto
189144dda7b2Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
189244dda7b2Smrg# XORG_WITH_DOXYGEN       --with-doxygen
189344dda7b2Smrg# XORG_WITH_FOP           --with-fop
189444dda7b2Smrg# XORG_WITH_GROFF         --with-groff
189544dda7b2Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
189644dda7b2Smrg#
189744dda7b2Smrg# Interface to module:
189844dda7b2Smrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
189944dda7b2Smrg# --enable-specs:	'yes' user instructs the module to generate specs
190044dda7b2Smrg#			'no' user instructs the module not to generate specs
190144dda7b2Smrg# parm1:		specify the default value, yes or no.
190244dda7b2Smrg#
190344dda7b2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[
190444dda7b2Smrgm4_define([spec_default], m4_default([$1], [yes]))
190544dda7b2SmrgAC_ARG_ENABLE(specs,
190644dda7b2Smrg	AS_HELP_STRING([--enable-specs],
190744dda7b2Smrg	   [Enable building the specs (default: ]spec_default[)]),
190844dda7b2Smrg	   [build_specs=$enableval], [build_specs=]spec_default)
190944dda7b2Smrgm4_undefine([spec_default])
191044dda7b2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
191144dda7b2SmrgAC_MSG_CHECKING([whether to build functional specifications])
191244dda7b2SmrgAC_MSG_RESULT([$build_specs])
191344dda7b2Smrg]) # XORG_ENABLE_SPECS
1914ff559fabSmrg
191544dda7b2Smrg# XORG_CHECK_MALLOC_ZERO
191644dda7b2Smrg# ----------------------
191744dda7b2Smrg# Minimum version: 1.0.0
191844dda7b2Smrg#
191944dda7b2Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
192044dda7b2Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
192144dda7b2Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
192244dda7b2SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
192344dda7b2SmrgAC_ARG_ENABLE(malloc0returnsnull,
192444dda7b2Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
192544dda7b2Smrg		       [malloc(0) returns NULL (default: auto)]),
192644dda7b2Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
192744dda7b2Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
1928ff559fabSmrg
192944dda7b2SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
193044dda7b2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
193144dda7b2Smrg	AC_RUN_IFELSE([
193244dda7b2Smrgchar *malloc();
193344dda7b2Smrgchar *realloc();
193444dda7b2Smrgchar *calloc();
193544dda7b2Smrgmain() {
193644dda7b2Smrg    char *m0, *r0, *c0, *p;
193744dda7b2Smrg    m0 = malloc(0);
193844dda7b2Smrg    p = malloc(10);
193944dda7b2Smrg    r0 = realloc(p,0);
194044dda7b2Smrg    c0 = calloc(0);
194144dda7b2Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
194244dda7b2Smrg}],
194344dda7b2Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
194444dda7b2Smrg		[MALLOC_ZERO_RETURNS_NULL=no],
194544dda7b2Smrg		[MALLOC_ZERO_RETURNS_NULL=yes])
194644dda7b2Smrgfi
194744dda7b2SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1948ff559fabSmrg
194944dda7b2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
195044dda7b2Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
195144dda7b2Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
195244dda7b2Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
195344dda7b2Smrgelse
195444dda7b2Smrg	MALLOC_ZERO_CFLAGS=""
195544dda7b2Smrg	XMALLOC_ZERO_CFLAGS=""
195644dda7b2Smrg	XTMALLOC_ZERO_CFLAGS=""
195744dda7b2Smrgfi
1958ff559fabSmrg
195944dda7b2SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
196044dda7b2SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
196144dda7b2SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
196244dda7b2Smrg]) # XORG_CHECK_MALLOC_ZERO
1963ff559fabSmrg
196444dda7b2Smrg# XORG_WITH_LINT()
196544dda7b2Smrg# ----------------
196644dda7b2Smrg# Minimum version: 1.1.0
196744dda7b2Smrg#
196844dda7b2Smrg# This macro enables the use of a tool that flags some suspicious and
196944dda7b2Smrg# non-portable constructs (likely to be bugs) in C language source code.
197044dda7b2Smrg# It will attempt to locate the tool and use appropriate options.
197144dda7b2Smrg# There are various lint type tools on different platforms.
197244dda7b2Smrg#
197344dda7b2Smrg# Interface to module:
197444dda7b2Smrg# LINT:		returns the path to the tool found on the platform
197544dda7b2Smrg#		or the value set to LINT on the configure cmd line
197644dda7b2Smrg#		also an Automake conditional
197744dda7b2Smrg# LINT_FLAGS:	an Automake variable with appropriate flags
197844dda7b2Smrg#
197944dda7b2Smrg# --with-lint:	'yes' user instructs the module to use lint
198044dda7b2Smrg#		'no' user instructs the module not to use lint (default)
198144dda7b2Smrg#
198244dda7b2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
198344dda7b2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
198444dda7b2Smrg#
198544dda7b2SmrgAC_DEFUN([XORG_WITH_LINT],[
1986ff559fabSmrg
198744dda7b2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
198844dda7b2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
198944dda7b2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
199044dda7b2Smrg		[Use a lint-style source code checker (default: disabled)])],
199144dda7b2Smrg		[use_lint=$withval], [use_lint=no])
1992ff559fabSmrg
199344dda7b2Smrg# Obtain platform specific info like program name and options
199444dda7b2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
199544dda7b2Smrgcase $host_os in
199644dda7b2Smrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
199744dda7b2Smrg	lint_name=splint
199844dda7b2Smrg	lint_options="-badflag"
199944dda7b2Smrg	;;
200044dda7b2Smrg  *freebsd* | *netbsd*)
200144dda7b2Smrg	lint_name=lint
200244dda7b2Smrg	lint_options="-u -b"
200344dda7b2Smrg	;;
200444dda7b2Smrg  *solaris*)
200544dda7b2Smrg	lint_name=lint
200644dda7b2Smrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
200744dda7b2Smrg	;;
200844dda7b2Smrgesac
2009ff559fabSmrg
201044dda7b2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
201144dda7b2Smrgif test "x$use_lint" = x"yes" ; then
201244dda7b2Smrg   AC_PATH_PROG([LINT], [$lint_name])
201344dda7b2Smrg   if test "x$LINT" = "x"; then
201444dda7b2Smrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
201544dda7b2Smrg   fi
201644dda7b2Smrgelif test "x$use_lint" = x"no" ; then
201744dda7b2Smrg   if test "x$LINT" != "x"; then
201844dda7b2Smrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
201944dda7b2Smrg   fi
20207a3b38f7Smrgelse
202144dda7b2Smrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
20227a3b38f7Smrgfi
2023ff559fabSmrg
202444dda7b2Smrg# User supplied flags override default flags
202544dda7b2Smrgif test "x$LINT_FLAGS" != "x"; then
202644dda7b2Smrg   lint_options=$LINT_FLAGS
202744dda7b2Smrgfi
2028ff559fabSmrg
202944dda7b2SmrgAC_SUBST([LINT_FLAGS],[$lint_options])
203044dda7b2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
2031ff559fabSmrg
203244dda7b2Smrg]) # XORG_WITH_LINT
2033ff559fabSmrg
203444dda7b2Smrg# XORG_LINT_LIBRARY(LIBNAME)
203544dda7b2Smrg# --------------------------
203644dda7b2Smrg# Minimum version: 1.1.0
203744dda7b2Smrg#
203844dda7b2Smrg# Sets up flags for building lint libraries for checking programs that call
203944dda7b2Smrg# functions in the library.
204044dda7b2Smrg#
204144dda7b2Smrg# Interface to module:
204244dda7b2Smrg# LINTLIB		- Automake variable with the name of lint library file to make
204344dda7b2Smrg# MAKE_LINT_LIB		- Automake conditional
204444dda7b2Smrg#
204544dda7b2Smrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
204644dda7b2Smrg#			  - 'no' user instructs the module not to create a lint library (default)
2047ff559fabSmrg
204844dda7b2SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
204944dda7b2SmrgAC_REQUIRE([XORG_WITH_LINT])
205044dda7b2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
205144dda7b2Smrg	[Create lint library (default: disabled)])],
205244dda7b2Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
2053ff559fabSmrg
205444dda7b2Smrgif test "x$make_lint_lib" = x"yes" ; then
205544dda7b2Smrg   LINTLIB=llib-l$1.ln
205644dda7b2Smrg   if test "x$LINT" = "x"; then
205744dda7b2Smrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
205844dda7b2Smrg   fi
205944dda7b2Smrgelif test "x$make_lint_lib" != x"no" ; then
206044dda7b2Smrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
206144dda7b2Smrgfi
2062ff559fabSmrg
206344dda7b2SmrgAC_SUBST(LINTLIB)
206444dda7b2SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2065ff559fabSmrg
206644dda7b2Smrg]) # XORG_LINT_LIBRARY
2067ff559fabSmrg
206844dda7b2Smrg# XORG_CWARNFLAGS
206944dda7b2Smrg# ---------------
207044dda7b2Smrg# Minimum version: 1.2.0
207144dda7b2Smrg#
207244dda7b2Smrg# Defines CWARNFLAGS to enable C compiler warnings.
207344dda7b2Smrg#
207444dda7b2SmrgAC_DEFUN([XORG_CWARNFLAGS], [
207544dda7b2SmrgAC_REQUIRE([AC_PROG_CC_C99])
207644dda7b2Smrgif  test "x$GCC" = xyes ; then
207744dda7b2Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
207844dda7b2Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
207944dda7b2Smrg-Wbad-function-cast -Wformat=2"
208044dda7b2Smrg    case `$CC -dumpversion` in
208144dda7b2Smrg    3.4.* | 4.*)
208244dda7b2Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
208344dda7b2Smrg	;;
20847a3b38f7Smrg    esac
208544dda7b2Smrgelse
208644dda7b2Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
208744dda7b2Smrg    if test "x$SUNCC" = "xyes"; then
208844dda7b2Smrg	CWARNFLAGS="-v"
208944dda7b2Smrg    fi
2090ff559fabSmrgfi
209144dda7b2SmrgAC_SUBST(CWARNFLAGS)
209244dda7b2Smrg]) # XORG_CWARNFLAGS
2093ff559fabSmrg
209444dda7b2Smrg# XORG_STRICT_OPTION
209544dda7b2Smrg# -----------------------
209644dda7b2Smrg# Minimum version: 1.3.0
209744dda7b2Smrg#
209844dda7b2Smrg# Add configure option to enable strict compilation
209944dda7b2SmrgAC_DEFUN([XORG_STRICT_OPTION], [
210044dda7b2Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
210144dda7b2SmrgAC_REQUIRE([AC_PROG_CC_C99])
210244dda7b2SmrgAC_REQUIRE([XORG_CWARNFLAGS])
2103ff559fabSmrg
210444dda7b2SmrgAC_ARG_ENABLE(strict-compilation,
210544dda7b2Smrg			  AS_HELP_STRING([--enable-strict-compilation],
210644dda7b2Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
210744dda7b2Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
210844dda7b2Smrgif test "x$STRICT_COMPILE" = "xyes"; then
210944dda7b2Smrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
211044dda7b2Smrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
211144dda7b2Smrg	if test "x$GCC" = xyes ; then
211244dda7b2Smrg		STRICT_CFLAGS="-pedantic -Werror"
211344dda7b2Smrg	elif test "x$SUNCC" = "xyes"; then
211444dda7b2Smrg		STRICT_CFLAGS="-errwarn"
211544dda7b2Smrg    elif test "x$INTELCC" = "xyes"; then
211644dda7b2Smrg		STRICT_CFLAGS="-Werror"
211744dda7b2Smrg	fi
211844dda7b2Smrgfi
211944dda7b2SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
212044dda7b2SmrgAC_SUBST([CWARNFLAGS])
212144dda7b2Smrg]) # XORG_STRICT_OPTION
2122ff559fabSmrg
212344dda7b2Smrg# XORG_DEFAULT_OPTIONS
212444dda7b2Smrg# --------------------
212544dda7b2Smrg# Minimum version: 1.3.0
212644dda7b2Smrg#
212744dda7b2Smrg# Defines default options for X.Org modules.
212844dda7b2Smrg#
212944dda7b2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
213044dda7b2SmrgAC_REQUIRE([AC_PROG_INSTALL])
213144dda7b2SmrgXORG_CWARNFLAGS
213244dda7b2SmrgXORG_STRICT_OPTION
213344dda7b2SmrgXORG_RELEASE_VERSION
213444dda7b2SmrgXORG_CHANGELOG
213544dda7b2SmrgXORG_INSTALL
213644dda7b2SmrgXORG_MANPAGE_SECTIONS
213744dda7b2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
213844dda7b2Smrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
213944dda7b2Smrg]) # XORG_DEFAULT_OPTIONS
2140ff559fabSmrg
214144dda7b2Smrg# XORG_INSTALL()
214244dda7b2Smrg# ----------------
214344dda7b2Smrg# Minimum version: 1.4.0
214444dda7b2Smrg#
214544dda7b2Smrg# Defines the variable INSTALL_CMD as the command to copy
214644dda7b2Smrg# INSTALL from $prefix/share/util-macros.
214744dda7b2Smrg#
214844dda7b2SmrgAC_DEFUN([XORG_INSTALL], [
214944dda7b2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
215044dda7b2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
215144dda7b2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
215244dda7b2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
215344dda7b2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
215444dda7b2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
215544dda7b2SmrgAC_SUBST([INSTALL_CMD])
215644dda7b2Smrg]) # XORG_INSTALL
215744dda7b2Smrgdnl Copyright 2005 Red Hat, Inc
215844dda7b2Smrgdnl
215944dda7b2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
216044dda7b2Smrgdnl documentation for any purpose is hereby granted without fee, provided that
216144dda7b2Smrgdnl the above copyright notice appear in all copies and that both that
216244dda7b2Smrgdnl copyright notice and this permission notice appear in supporting
216344dda7b2Smrgdnl documentation.
216444dda7b2Smrgdnl
216544dda7b2Smrgdnl The above copyright notice and this permission notice shall be included
216644dda7b2Smrgdnl in all copies or substantial portions of the Software.
216744dda7b2Smrgdnl
216844dda7b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
216944dda7b2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
217044dda7b2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
217144dda7b2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
217244dda7b2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
217344dda7b2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
217444dda7b2Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
217544dda7b2Smrgdnl
217644dda7b2Smrgdnl Except as contained in this notice, the name of the copyright holders shall
217744dda7b2Smrgdnl not be used in advertising or otherwise to promote the sale, use or
217844dda7b2Smrgdnl other dealings in this Software without prior written authorization
217944dda7b2Smrgdnl from the copyright holders.
218044dda7b2Smrgdnl
2181ff559fabSmrg
218244dda7b2Smrg# XORG_RELEASE_VERSION
218344dda7b2Smrg# --------------------
218444dda7b2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
218544dda7b2Smrg 
218644dda7b2SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
218744dda7b2Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
218844dda7b2Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
218944dda7b2Smrg		[Major version of this package])
219044dda7b2Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
219144dda7b2Smrg	if test "x$PVM" = "x"; then
219244dda7b2Smrg		PVM="0"
219344dda7b2Smrg	fi
219444dda7b2Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
219544dda7b2Smrg		[$PVM],
219644dda7b2Smrg		[Minor version of this package])
219744dda7b2Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
219844dda7b2Smrg	if test "x$PVP" = "x"; then
219944dda7b2Smrg		PVP="0"
220044dda7b2Smrg	fi
220144dda7b2Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
220244dda7b2Smrg		[$PVP],
220344dda7b2Smrg		[Patch version of this package])
220444dda7b2Smrg])
2205ff559fabSmrg
220644dda7b2Smrg# XORG_CHANGELOG()
220744dda7b2Smrg# ----------------
220844dda7b2Smrg# Minimum version: 1.2.0
220944dda7b2Smrg#
221044dda7b2Smrg# Defines the variable CHANGELOG_CMD as the command to generate
221144dda7b2Smrg# ChangeLog from git.
221244dda7b2Smrg#
221344dda7b2Smrg#
221444dda7b2SmrgAC_DEFUN([XORG_CHANGELOG], [
221544dda7b2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
221644dda7b2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
221744dda7b2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
221844dda7b2Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
221944dda7b2SmrgAC_SUBST([CHANGELOG_CMD])
222044dda7b2Smrg]) # XORG_CHANGELOG
2221ff559fabSmrg
222244dda7b2Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
222344dda7b2Smrg# 
222444dda7b2Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
222544dda7b2Smrg#
222644dda7b2Smrg# This program is free software; you can redistribute it and/or modify
222744dda7b2Smrg# it under the terms of the GNU General Public License as published by
222844dda7b2Smrg# the Free Software Foundation; either version 2 of the License, or
222944dda7b2Smrg# (at your option) any later version.
223044dda7b2Smrg#
223144dda7b2Smrg# This program is distributed in the hope that it will be useful, but
223244dda7b2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
223344dda7b2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
223444dda7b2Smrg# General Public License for more details.
223544dda7b2Smrg#
223644dda7b2Smrg# You should have received a copy of the GNU General Public License
223744dda7b2Smrg# along with this program; if not, write to the Free Software
223844dda7b2Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
223944dda7b2Smrg#
224044dda7b2Smrg# As a special exception to the GNU General Public License, if you
224144dda7b2Smrg# distribute this file as part of a program that contains a
224244dda7b2Smrg# configuration script generated by Autoconf, you may include it under
224344dda7b2Smrg# the same distribution terms that you use for the rest of that program.
22447a3b38f7Smrg
224544dda7b2Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
224644dda7b2Smrg# ----------------------------------
224744dda7b2SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
224844dda7b2Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
224944dda7b2Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
225044dda7b2SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
225144dda7b2Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
225244dda7b2Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
225344dda7b2Smrgfi
225444dda7b2Smrgif test -n "$PKG_CONFIG"; then
225544dda7b2Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
225644dda7b2Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
225744dda7b2Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
225844dda7b2Smrg		AC_MSG_RESULT([yes])
225944dda7b2Smrg	else
226044dda7b2Smrg		AC_MSG_RESULT([no])
226144dda7b2Smrg		PKG_CONFIG=""
226244dda7b2Smrg	fi
226344dda7b2Smrg		
226444dda7b2Smrgfi[]dnl
226544dda7b2Smrg])# PKG_PROG_PKG_CONFIG
2266ff559fabSmrg
226744dda7b2Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
226844dda7b2Smrg#
226944dda7b2Smrg# Check to see whether a particular set of modules exists.  Similar
227044dda7b2Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
227144dda7b2Smrg#
227244dda7b2Smrg#
227344dda7b2Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
227444dda7b2Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
227544dda7b2Smrg# PKG_CHECK_EXISTS manually
227644dda7b2Smrg# --------------------------------------------------------------
227744dda7b2SmrgAC_DEFUN([PKG_CHECK_EXISTS],
227844dda7b2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
227944dda7b2Smrgif test -n "$PKG_CONFIG" && \
228044dda7b2Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
228144dda7b2Smrg  m4_ifval([$2], [$2], [:])
228244dda7b2Smrgm4_ifvaln([$3], [else
228344dda7b2Smrg  $3])dnl
228444dda7b2Smrgfi])
2285ff559fabSmrg
22867a3b38f7Smrg
228744dda7b2Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
228844dda7b2Smrg# ---------------------------------------------
228944dda7b2Smrgm4_define([_PKG_CONFIG],
229044dda7b2Smrg[if test -n "$$1"; then
229144dda7b2Smrg    pkg_cv_[]$1="$$1"
229244dda7b2Smrg elif test -n "$PKG_CONFIG"; then
229344dda7b2Smrg    PKG_CHECK_EXISTS([$3],
229444dda7b2Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
229544dda7b2Smrg		     [pkg_failed=yes])
229644dda7b2Smrg else
229744dda7b2Smrg    pkg_failed=untried
229844dda7b2Smrgfi[]dnl
229944dda7b2Smrg])# _PKG_CONFIG
23007a3b38f7Smrg
230144dda7b2Smrg# _PKG_SHORT_ERRORS_SUPPORTED
230244dda7b2Smrg# -----------------------------
230344dda7b2SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
230444dda7b2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
230544dda7b2Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
230644dda7b2Smrg        _pkg_short_errors_supported=yes
230744dda7b2Smrgelse
230844dda7b2Smrg        _pkg_short_errors_supported=no
230944dda7b2Smrgfi[]dnl
231044dda7b2Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
23117a3b38f7Smrg
2312ff559fabSmrg
231344dda7b2Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
231444dda7b2Smrg# [ACTION-IF-NOT-FOUND])
231544dda7b2Smrg#
231644dda7b2Smrg#
231744dda7b2Smrg# Note that if there is a possibility the first call to
231844dda7b2Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
231944dda7b2Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
232044dda7b2Smrg#
232144dda7b2Smrg#
232244dda7b2Smrg# --------------------------------------------------------------
232344dda7b2SmrgAC_DEFUN([PKG_CHECK_MODULES],
232444dda7b2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
232544dda7b2SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
232644dda7b2SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2327ff559fabSmrg
232844dda7b2Smrgpkg_failed=no
232944dda7b2SmrgAC_MSG_CHECKING([for $1])
2330ff559fabSmrg
233144dda7b2Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
233244dda7b2Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
23337a3b38f7Smrg
233444dda7b2Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
233544dda7b2Smrgand $1[]_LIBS to avoid the need to call pkg-config.
233644dda7b2SmrgSee the pkg-config man page for more details.])
23377a3b38f7Smrg
233844dda7b2Smrgif test $pkg_failed = yes; then
233944dda7b2Smrg        _PKG_SHORT_ERRORS_SUPPORTED
234044dda7b2Smrg        if test $_pkg_short_errors_supported = yes; then
234144dda7b2Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
234244dda7b2Smrg        else 
234344dda7b2Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
234444dda7b2Smrg        fi
234544dda7b2Smrg	# Put the nasty error message in config.log where it belongs
234644dda7b2Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
23477a3b38f7Smrg
234844dda7b2Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
234944dda7b2Smrg[Package requirements ($2) were not met:
23507a3b38f7Smrg
235144dda7b2Smrg$$1_PKG_ERRORS
2352ff559fabSmrg
235344dda7b2SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
235444dda7b2Smrginstalled software in a non-standard prefix.
23557a3b38f7Smrg
235644dda7b2Smrg_PKG_TEXT
235744dda7b2Smrg])],
235844dda7b2Smrg		[AC_MSG_RESULT([no])
235944dda7b2Smrg                $4])
236044dda7b2Smrgelif test $pkg_failed = untried; then
236144dda7b2Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
236244dda7b2Smrg[The pkg-config script could not be found or is too old.  Make sure it
236344dda7b2Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
236444dda7b2Smrgpath to pkg-config.
23657a3b38f7Smrg
236644dda7b2Smrg_PKG_TEXT
236744dda7b2Smrg
236844dda7b2SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
236944dda7b2Smrg		[$4])
2370ff559fabSmrgelse
237144dda7b2Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
237244dda7b2Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
237344dda7b2Smrg        AC_MSG_RESULT([yes])
237444dda7b2Smrg	ifelse([$3], , :, [$3])
237544dda7b2Smrgfi[]dnl
237644dda7b2Smrg])# PKG_CHECK_MODULES
2377ff559fabSmrg
237844dda7b2Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
237944dda7b2Smrg#
238044dda7b2Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
238144dda7b2Smrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
238244dda7b2Smrg#                 Inc.
238344dda7b2Smrg#   Written by Gordon Matzigkeit, 1996
238444dda7b2Smrg#
238544dda7b2Smrg# This file is free software; the Free Software Foundation gives
238644dda7b2Smrg# unlimited permission to copy and/or distribute it, with or without
238744dda7b2Smrg# modifications, as long as this notice is preserved.
2388ff559fabSmrg
238944dda7b2Smrgm4_define([_LT_COPYING], [dnl
239044dda7b2Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
239144dda7b2Smrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
239244dda7b2Smrg#                 Inc.
239344dda7b2Smrg#   Written by Gordon Matzigkeit, 1996
239444dda7b2Smrg#
239544dda7b2Smrg#   This file is part of GNU Libtool.
239644dda7b2Smrg#
239744dda7b2Smrg# GNU Libtool is free software; you can redistribute it and/or
239844dda7b2Smrg# modify it under the terms of the GNU General Public License as
239944dda7b2Smrg# published by the Free Software Foundation; either version 2 of
240044dda7b2Smrg# the License, or (at your option) any later version.
240144dda7b2Smrg#
240244dda7b2Smrg# As a special exception to the GNU General Public License,
240344dda7b2Smrg# if you distribute this file as part of a program or library that
240444dda7b2Smrg# is built using GNU Libtool, you may include this file under the
240544dda7b2Smrg# same distribution terms that you use for the rest of that program.
240644dda7b2Smrg#
240744dda7b2Smrg# GNU Libtool is distributed in the hope that it will be useful,
240844dda7b2Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
240944dda7b2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
241044dda7b2Smrg# GNU General Public License for more details.
241144dda7b2Smrg#
241244dda7b2Smrg# You should have received a copy of the GNU General Public License
241344dda7b2Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
241444dda7b2Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
241544dda7b2Smrg# obtained by writing to the Free Software Foundation, Inc.,
241644dda7b2Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
241744dda7b2Smrg])
2418ff559fabSmrg
241944dda7b2Smrg# serial 57 LT_INIT
2420ff559fabSmrg
2421ff559fabSmrg
242244dda7b2Smrg# LT_PREREQ(VERSION)
242344dda7b2Smrg# ------------------
242444dda7b2Smrg# Complain and exit if this libtool version is less that VERSION.
242544dda7b2Smrgm4_defun([LT_PREREQ],
242644dda7b2Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
242744dda7b2Smrg       [m4_default([$3],
242844dda7b2Smrg		   [m4_fatal([Libtool version $1 or higher is required],
242944dda7b2Smrg		             63)])],
243044dda7b2Smrg       [$2])])
2431ff559fabSmrg
2432ff559fabSmrg
243344dda7b2Smrg# _LT_CHECK_BUILDDIR
243444dda7b2Smrg# ------------------
243544dda7b2Smrg# Complain if the absolute build directory name contains unusual characters
243644dda7b2Smrgm4_defun([_LT_CHECK_BUILDDIR],
243744dda7b2Smrg[case `pwd` in
243844dda7b2Smrg  *\ * | *\	*)
243944dda7b2Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
244044dda7b2Smrgesac
244144dda7b2Smrg])
2442ff559fabSmrg
2443ff559fabSmrg
244444dda7b2Smrg# LT_INIT([OPTIONS])
244544dda7b2Smrg# ------------------
244644dda7b2SmrgAC_DEFUN([LT_INIT],
244744dda7b2Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
244844dda7b2SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
244944dda7b2SmrgAC_BEFORE([$0], [LT_LANG])dnl
245044dda7b2SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
245144dda7b2SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
245244dda7b2Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
2453ff559fabSmrg
245444dda7b2Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
245544dda7b2Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
245644dda7b2Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
245744dda7b2Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
245844dda7b2Smrgdnl unless we require an AC_DEFUNed macro:
245944dda7b2SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
246044dda7b2SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
246144dda7b2SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
246244dda7b2SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
246344dda7b2Smrgm4_require([_LT_PROG_LTMAIN])dnl
2464ff559fabSmrg
246544dda7b2Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2466ff559fabSmrg
246744dda7b2Smrgdnl Parse OPTIONS
246844dda7b2Smrg_LT_SET_OPTIONS([$0], [$1])
2469ff559fabSmrg
247044dda7b2Smrg# This can be used to rebuild libtool when needed
247144dda7b2SmrgLIBTOOL_DEPS="$ltmain"
2472ff559fabSmrg
247344dda7b2Smrg# Always use our own libtool.
247444dda7b2SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
247544dda7b2SmrgAC_SUBST(LIBTOOL)dnl
2476ff559fabSmrg
247744dda7b2Smrg_LT_SETUP
247844dda7b2Smrg
247944dda7b2Smrg# Only expand once:
248044dda7b2Smrgm4_define([LT_INIT])
248144dda7b2Smrg])# LT_INIT
248244dda7b2Smrg
248344dda7b2Smrg# Old names:
248444dda7b2SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
248544dda7b2SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
248644dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
248744dda7b2Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
248844dda7b2Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
248944dda7b2Smrg
249044dda7b2Smrg
249144dda7b2Smrg# _LT_CC_BASENAME(CC)
249244dda7b2Smrg# -------------------
249344dda7b2Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
249444dda7b2Smrgm4_defun([_LT_CC_BASENAME],
249544dda7b2Smrg[for cc_temp in $1""; do
249644dda7b2Smrg  case $cc_temp in
249744dda7b2Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
249844dda7b2Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
249944dda7b2Smrg    \-*) ;;
250044dda7b2Smrg    *) break;;
25017a3b38f7Smrg  esac
250244dda7b2Smrgdone
250344dda7b2Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
250444dda7b2Smrg])
2505ff559fabSmrg
2506ff559fabSmrg
250744dda7b2Smrg# _LT_FILEUTILS_DEFAULTS
250844dda7b2Smrg# ----------------------
250944dda7b2Smrg# It is okay to use these file commands and assume they have been set
251044dda7b2Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
251144dda7b2Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
251244dda7b2Smrg[: ${CP="cp -f"}
251344dda7b2Smrg: ${MV="mv -f"}
251444dda7b2Smrg: ${RM="rm -f"}
251544dda7b2Smrg])# _LT_FILEUTILS_DEFAULTS
25167a3b38f7Smrg
25177a3b38f7Smrg
251844dda7b2Smrg# _LT_SETUP
251944dda7b2Smrg# ---------
252044dda7b2Smrgm4_defun([_LT_SETUP],
252144dda7b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
252244dda7b2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
252344dda7b2SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
252444dda7b2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
25257a3b38f7Smrg
252644dda7b2Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
252744dda7b2Smrg_LT_DECL([], [host], [0])dnl
252844dda7b2Smrg_LT_DECL([], [host_os], [0])dnl
252944dda7b2Smrgdnl
253044dda7b2Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
253144dda7b2Smrg_LT_DECL([], [build], [0])dnl
253244dda7b2Smrg_LT_DECL([], [build_os], [0])dnl
253344dda7b2Smrgdnl
253444dda7b2SmrgAC_REQUIRE([AC_PROG_CC])dnl
253544dda7b2SmrgAC_REQUIRE([LT_PATH_LD])dnl
253644dda7b2SmrgAC_REQUIRE([LT_PATH_NM])dnl
253744dda7b2Smrgdnl
253844dda7b2SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
253944dda7b2Smrgtest -z "$LN_S" && LN_S="ln -s"
254044dda7b2Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
254144dda7b2Smrgdnl
254244dda7b2SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
254344dda7b2Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
254444dda7b2Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
254544dda7b2Smrgdnl
254644dda7b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
254744dda7b2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
254844dda7b2Smrgm4_require([_LT_CMD_RELOAD])dnl
254944dda7b2Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
255044dda7b2Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
255144dda7b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2552ff559fabSmrg
255344dda7b2Smrg_LT_CONFIG_LIBTOOL_INIT([
255444dda7b2Smrg# See if we are running on zsh, and set the options which allow our
255544dda7b2Smrg# commands through without removal of \ escapes INIT.
255644dda7b2Smrgif test -n "\${ZSH_VERSION+set}" ; then
255744dda7b2Smrg   setopt NO_GLOB_SUBST
255844dda7b2Smrgfi
255944dda7b2Smrg])
256044dda7b2Smrgif test -n "${ZSH_VERSION+set}" ; then
256144dda7b2Smrg   setopt NO_GLOB_SUBST
256244dda7b2Smrgfi
2563ff559fabSmrg
256444dda7b2Smrg_LT_CHECK_OBJDIR
2565ff559fabSmrg
256644dda7b2Smrgm4_require([_LT_TAG_COMPILER])dnl
2567ff559fabSmrg
256844dda7b2Smrgcase $host_os in
256944dda7b2Smrgaix3*)
257044dda7b2Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
257144dda7b2Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
257244dda7b2Smrg  # vanish in a puff of smoke.
257344dda7b2Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
257444dda7b2Smrg    COLLECT_NAMES=
257544dda7b2Smrg    export COLLECT_NAMES
257644dda7b2Smrg  fi
25777a3b38f7Smrg  ;;
257844dda7b2Smrgesac
2579ff559fabSmrg
258044dda7b2Smrg# Global variables:
258144dda7b2Smrgofile=libtool
258244dda7b2Smrgcan_build_shared=yes
2583ff559fabSmrg
258444dda7b2Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
258544dda7b2Smrg# which needs '.lib').
258644dda7b2Smrglibext=a
2587ff559fabSmrg
258844dda7b2Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
2589ff559fabSmrg
259044dda7b2Smrgold_CC="$CC"
259144dda7b2Smrgold_CFLAGS="$CFLAGS"
2592ff559fabSmrg
259344dda7b2Smrg# Set sane defaults for various variables
259444dda7b2Smrgtest -z "$CC" && CC=cc
259544dda7b2Smrgtest -z "$LTCC" && LTCC=$CC
259644dda7b2Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
259744dda7b2Smrgtest -z "$LD" && LD=ld
259844dda7b2Smrgtest -z "$ac_objext" && ac_objext=o
2599ff559fabSmrg
260044dda7b2Smrg_LT_CC_BASENAME([$compiler])
260144dda7b2Smrg
260244dda7b2Smrg# Only perform the check for file, if the check method requires it
260344dda7b2Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
260444dda7b2Smrgcase $deplibs_check_method in
260544dda7b2Smrgfile_magic*)
260644dda7b2Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
260744dda7b2Smrg    _LT_PATH_MAGIC
260844dda7b2Smrg  fi
26097a3b38f7Smrg  ;;
261044dda7b2Smrgesac
2611ff559fabSmrg
261244dda7b2Smrg# Use C for the default configuration in the libtool script
261344dda7b2SmrgLT_SUPPORTED_TAG([CC])
261444dda7b2Smrg_LT_LANG_C_CONFIG
261544dda7b2Smrg_LT_LANG_DEFAULT_CONFIG
261644dda7b2Smrg_LT_CONFIG_COMMANDS
261744dda7b2Smrg])# _LT_SETUP
2618ff559fabSmrg
2619ff559fabSmrg
262044dda7b2Smrg# _LT_PREPARE_SED_QUOTE_VARS
262144dda7b2Smrg# --------------------------
262244dda7b2Smrg# Define a few sed substitution that help us do robust quoting.
262344dda7b2Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
262444dda7b2Smrg[# Backslashify metacharacters that are still active within
262544dda7b2Smrg# double-quoted strings.
262644dda7b2Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2627ff559fabSmrg
262844dda7b2Smrg# Same as above, but do not quote variable references.
262944dda7b2Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2630ff559fabSmrg
263144dda7b2Smrg# Sed substitution to delay expansion of an escaped shell variable in a
263244dda7b2Smrg# double_quote_subst'ed string.
263344dda7b2Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2634ff559fabSmrg
263544dda7b2Smrg# Sed substitution to delay expansion of an escaped single quote.
263644dda7b2Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2637ff559fabSmrg
263844dda7b2Smrg# Sed substitution to avoid accidental globbing in evaled expressions
263944dda7b2Smrgno_glob_subst='s/\*/\\\*/g'
264044dda7b2Smrg])
2641ff559fabSmrg
264244dda7b2Smrg# _LT_PROG_LTMAIN
264344dda7b2Smrg# ---------------
264444dda7b2Smrg# Note that this code is called both from `configure', and `config.status'
264544dda7b2Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
264644dda7b2Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
264744dda7b2Smrg# so we pass a copy along to make sure it has a sensible value anyway.
264844dda7b2Smrgm4_defun([_LT_PROG_LTMAIN],
264944dda7b2Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
265044dda7b2Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
265144dda7b2Smrgltmain="$ac_aux_dir/ltmain.sh"
265244dda7b2Smrg])# _LT_PROG_LTMAIN
2653ff559fabSmrg
2654ff559fabSmrg
2655ff559fabSmrg
265644dda7b2Smrg# So that we can recreate a full libtool script including additional
265744dda7b2Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
265844dda7b2Smrg# in macros and then make a single call at the end using the `libtool'
265944dda7b2Smrg# label.
26607a3b38f7Smrg
2661ff559fabSmrg
266244dda7b2Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
266344dda7b2Smrg# ----------------------------------------
266444dda7b2Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
266544dda7b2Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
266644dda7b2Smrg[m4_ifval([$1],
266744dda7b2Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
266844dda7b2Smrg                     [$1
266944dda7b2Smrg])])])
2670ff559fabSmrg
267144dda7b2Smrg# Initialize.
267244dda7b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
2673ff559fabSmrg
2674ff559fabSmrg
267544dda7b2Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
267644dda7b2Smrg# ------------------------------
267744dda7b2Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
267844dda7b2Smrgm4_define([_LT_CONFIG_LIBTOOL],
267944dda7b2Smrg[m4_ifval([$1],
268044dda7b2Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
268144dda7b2Smrg                     [$1
268244dda7b2Smrg])])])
2683ff559fabSmrg
268444dda7b2Smrg# Initialize.
268544dda7b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2686ff559fabSmrg
2687ff559fabSmrg
268844dda7b2Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
268944dda7b2Smrg# -----------------------------------------------------
269044dda7b2Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
269144dda7b2Smrg[_LT_CONFIG_LIBTOOL([$1])
269244dda7b2Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
269344dda7b2Smrg])
2694ff559fabSmrg
2695ff559fabSmrg
269644dda7b2Smrg# _LT_FORMAT_COMMENT([COMMENT])
269744dda7b2Smrg# -----------------------------
269844dda7b2Smrg# Add leading comment marks to the start of each line, and a trailing
269944dda7b2Smrg# full-stop to the whole comment if one is not present already.
270044dda7b2Smrgm4_define([_LT_FORMAT_COMMENT],
270144dda7b2Smrg[m4_ifval([$1], [
270244dda7b2Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
270344dda7b2Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
270444dda7b2Smrg)])
2705ff559fabSmrg
2706ff559fabSmrg
27077a3b38f7Smrg
27087a3b38f7Smrg
2709ff559fabSmrg
271044dda7b2Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
271144dda7b2Smrg# -------------------------------------------------------------------
271244dda7b2Smrg# CONFIGNAME is the name given to the value in the libtool script.
271344dda7b2Smrg# VARNAME is the (base) name used in the configure script.
271444dda7b2Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
271544dda7b2Smrg# VARNAME.  Any other value will be used directly.
271644dda7b2Smrgm4_define([_LT_DECL],
271744dda7b2Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
271844dda7b2Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
271944dda7b2Smrg	[m4_ifval([$1], [$1], [$2])])
272044dda7b2Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
272144dda7b2Smrg    m4_ifval([$4],
272244dda7b2Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
272344dda7b2Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
272444dda7b2Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
272544dda7b2Smrg])
2726ff559fabSmrg
27277a3b38f7Smrg
272844dda7b2Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
272944dda7b2Smrg# --------------------------------------------------------
273044dda7b2Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
27317a3b38f7Smrg
2732ff559fabSmrg
273344dda7b2Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
273444dda7b2Smrg# ------------------------------------------------
273544dda7b2Smrgm4_define([lt_decl_tag_varnames],
273644dda7b2Smrg[_lt_decl_filter([tagged?], [yes], $@)])
2737ff559fabSmrg
2738ff559fabSmrg
273944dda7b2Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
274044dda7b2Smrg# ---------------------------------------------------------
274144dda7b2Smrgm4_define([_lt_decl_filter],
274244dda7b2Smrg[m4_case([$#],
274344dda7b2Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
274444dda7b2Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
274544dda7b2Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
274644dda7b2Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
274744dda7b2Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
274844dda7b2Smrg])
27497a3b38f7Smrg
2750ff559fabSmrg
275144dda7b2Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
275244dda7b2Smrg# --------------------------------------------------
275344dda7b2Smrgm4_define([lt_decl_quote_varnames],
275444dda7b2Smrg[_lt_decl_filter([value], [1], $@)])
2755ff559fabSmrg
27567a3b38f7Smrg
275744dda7b2Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
275844dda7b2Smrg# ---------------------------------------------------
275944dda7b2Smrgm4_define([lt_decl_dquote_varnames],
276044dda7b2Smrg[_lt_decl_filter([value], [2], $@)])
27617a3b38f7Smrg
2762ff559fabSmrg
276344dda7b2Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
276444dda7b2Smrg# ---------------------------------------------------
276544dda7b2Smrgm4_define([lt_decl_varnames_tagged],
276644dda7b2Smrg[m4_assert([$# <= 2])dnl
276744dda7b2Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
276844dda7b2Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
276944dda7b2Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
277044dda7b2Smrgm4_define([_lt_decl_varnames_tagged],
277144dda7b2Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
27727a3b38f7Smrg
27737a3b38f7Smrg
277444dda7b2Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
277544dda7b2Smrg# ------------------------------------------------
277644dda7b2Smrgm4_define([lt_decl_all_varnames],
277744dda7b2Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
277844dda7b2Smrg     m4_if([$2], [],
277944dda7b2Smrg	   m4_quote(lt_decl_varnames),
278044dda7b2Smrg	m4_quote(m4_shift($@))))[]dnl
278144dda7b2Smrg])
278244dda7b2Smrgm4_define([_lt_decl_all_varnames],
278344dda7b2Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
278444dda7b2Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
278544dda7b2Smrg])
27867a3b38f7Smrg
27877a3b38f7Smrg
278844dda7b2Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
278944dda7b2Smrg# ------------------------------------
279044dda7b2Smrg# Quote a variable value, and forward it to `config.status' so that its
279144dda7b2Smrg# declaration there will have the same value as in `configure'.  VARNAME
279244dda7b2Smrg# must have a single quote delimited value for this to work.
279344dda7b2Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
279444dda7b2Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2795ff559fabSmrg
2796ff559fabSmrg
279744dda7b2Smrg# _LT_CONFIG_STATUS_DECLARATIONS
279844dda7b2Smrg# ------------------------------
279944dda7b2Smrg# We delimit libtool config variables with single quotes, so when
280044dda7b2Smrg# we write them to config.status, we have to be sure to quote all
280144dda7b2Smrg# embedded single quotes properly.  In configure, this macro expands
280244dda7b2Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
280344dda7b2Smrg#
280444dda7b2Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
280544dda7b2Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
280644dda7b2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
280744dda7b2Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2808ff559fabSmrg
2809ff559fabSmrg
281044dda7b2Smrg# _LT_LIBTOOL_TAGS
281144dda7b2Smrg# ----------------
281244dda7b2Smrg# Output comment and list of tags supported by the script
281344dda7b2Smrgm4_defun([_LT_LIBTOOL_TAGS],
281444dda7b2Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
281544dda7b2Smrgavailable_tags="_LT_TAGS"dnl
281644dda7b2Smrg])
2817ff559fabSmrg
2818ff559fabSmrg
281944dda7b2Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
282044dda7b2Smrg# -----------------------------------
282144dda7b2Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
282244dda7b2Smrg# expand to a commented shell variable setting:
282344dda7b2Smrg#
282444dda7b2Smrg#    # Some comment about what VAR is for.
282544dda7b2Smrg#    visible_name=$lt_internal_name
282644dda7b2Smrgm4_define([_LT_LIBTOOL_DECLARE],
282744dda7b2Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
282844dda7b2Smrg					   [description])))[]dnl
282944dda7b2Smrgm4_pushdef([_libtool_name],
283044dda7b2Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
283144dda7b2Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
283244dda7b2Smrg    [0], [_libtool_name=[$]$1],
283344dda7b2Smrg    [1], [_libtool_name=$lt_[]$1],
283444dda7b2Smrg    [2], [_libtool_name=$lt_[]$1],
283544dda7b2Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
283644dda7b2Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
283744dda7b2Smrg])
2838ff559fabSmrg
2839ff559fabSmrg
284044dda7b2Smrg# _LT_LIBTOOL_CONFIG_VARS
284144dda7b2Smrg# -----------------------
284244dda7b2Smrg# Produce commented declarations of non-tagged libtool config variables
284344dda7b2Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
284444dda7b2Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
284544dda7b2Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
284644dda7b2Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
284744dda7b2Smrg[m4_foreach([_lt_var],
284844dda7b2Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
284944dda7b2Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2850ff559fabSmrg
2851ff559fabSmrg
285244dda7b2Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
285344dda7b2Smrg# -------------------------
285444dda7b2Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
285544dda7b2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
285644dda7b2Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2857ff559fabSmrg
2858ff559fabSmrg
285944dda7b2Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
286044dda7b2Smrg# ------------------------------
286144dda7b2Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2862ff559fabSmrg
2863ff559fabSmrg
286444dda7b2Smrg# _LT_CONFIG_COMMANDS
286544dda7b2Smrg# -------------------
286644dda7b2Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
286744dda7b2Smrg# variables for single and double quote escaping we saved from calls
286844dda7b2Smrg# to _LT_DECL, we can put quote escaped variables declarations
286944dda7b2Smrg# into `config.status', and then the shell code to quote escape them in
287044dda7b2Smrg# for loops in `config.status'.  Finally, any additional code accumulated
287144dda7b2Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
287244dda7b2Smrgm4_defun([_LT_CONFIG_COMMANDS],
287344dda7b2Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
287444dda7b2Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
287544dda7b2Smrg	dnl instead of duplicating it all over again into config.status,
287644dda7b2Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
287744dda7b2Smrg	dnl needs to know what name is stored there:
287844dda7b2Smrg        [AC_CONFIG_COMMANDS([libtool],
287944dda7b2Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
288044dda7b2Smrg    dnl If the libtool generation code is destined for config.status,
288144dda7b2Smrg    dnl expand the accumulated commands and init code now:
288244dda7b2Smrg    [AC_CONFIG_COMMANDS([libtool],
288344dda7b2Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
288444dda7b2Smrg])#_LT_CONFIG_COMMANDS
2885ff559fabSmrg
2886ff559fabSmrg
288744dda7b2Smrg# Initialize.
288844dda7b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
288944dda7b2Smrg[
2890ff559fabSmrg
289144dda7b2Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
289244dda7b2Smrg# if CDPATH is set.
289344dda7b2Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2894ff559fabSmrg
289544dda7b2Smrgsed_quote_subst='$sed_quote_subst'
289644dda7b2Smrgdouble_quote_subst='$double_quote_subst'
289744dda7b2Smrgdelay_variable_subst='$delay_variable_subst'
289844dda7b2Smrg_LT_CONFIG_STATUS_DECLARATIONS
289944dda7b2SmrgLTCC='$LTCC'
290044dda7b2SmrgLTCFLAGS='$LTCFLAGS'
290144dda7b2Smrgcompiler='$compiler_DEFAULT'
2902ff559fabSmrg
290344dda7b2Smrg# A function that is used when there is no print builtin or printf.
290444dda7b2Smrgfunc_fallback_echo ()
290544dda7b2Smrg{
290644dda7b2Smrg  eval 'cat <<_LTECHO_EOF
290744dda7b2Smrg\$[]1
290844dda7b2Smrg_LTECHO_EOF'
290944dda7b2Smrg}
2910ff559fabSmrg
291144dda7b2Smrg# Quote evaled strings.
291244dda7b2Smrgfor var in lt_decl_all_varnames([[ \
291344dda7b2Smrg]], lt_decl_quote_varnames); do
291444dda7b2Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
291544dda7b2Smrg    *[[\\\\\\\`\\"\\\$]]*)
291644dda7b2Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
291744dda7b2Smrg      ;;
291844dda7b2Smrg    *)
291944dda7b2Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
292044dda7b2Smrg      ;;
292144dda7b2Smrg    esac
292244dda7b2Smrgdone
2923ff559fabSmrg
292444dda7b2Smrg# Double-quote double-evaled strings.
292544dda7b2Smrgfor var in lt_decl_all_varnames([[ \
292644dda7b2Smrg]], lt_decl_dquote_varnames); do
292744dda7b2Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
292844dda7b2Smrg    *[[\\\\\\\`\\"\\\$]]*)
292944dda7b2Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
293044dda7b2Smrg      ;;
293144dda7b2Smrg    *)
293244dda7b2Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
293344dda7b2Smrg      ;;
293444dda7b2Smrg    esac
293544dda7b2Smrgdone
2936ff559fabSmrg
293744dda7b2Smrg_LT_OUTPUT_LIBTOOL_INIT
29387a3b38f7Smrg])
2939ff559fabSmrg
294044dda7b2Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
294144dda7b2Smrg# ------------------------------------
294244dda7b2Smrg# Generate a child script FILE with all initialization necessary to
294344dda7b2Smrg# reuse the environment learned by the parent script, and make the
294444dda7b2Smrg# file executable.  If COMMENT is supplied, it is inserted after the
294544dda7b2Smrg# `#!' sequence but before initialization text begins.  After this
294644dda7b2Smrg# macro, additional text can be appended to FILE to form the body of
294744dda7b2Smrg# the child script.  The macro ends with non-zero status if the
294844dda7b2Smrg# file could not be fully written (such as if the disk is full).
294944dda7b2Smrgm4_ifdef([AS_INIT_GENERATED],
295044dda7b2Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
295144dda7b2Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
295244dda7b2Smrg[m4_require([AS_PREPARE])]dnl
295344dda7b2Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
295444dda7b2Smrg[lt_write_fail=0
295544dda7b2Smrgcat >$1 <<_ASEOF || lt_write_fail=1
295644dda7b2Smrg#! $SHELL
295744dda7b2Smrg# Generated by $as_me.
295844dda7b2Smrg$2
295944dda7b2SmrgSHELL=\${CONFIG_SHELL-$SHELL}
296044dda7b2Smrgexport SHELL
296144dda7b2Smrg_ASEOF
296244dda7b2Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
296344dda7b2SmrgAS_SHELL_SANITIZE
296444dda7b2Smrg_AS_PREPARE
296544dda7b2Smrgexec AS_MESSAGE_FD>&1
296644dda7b2Smrg_ASEOF
296744dda7b2Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
296844dda7b2Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2969ff559fabSmrg
297044dda7b2Smrg# LT_OUTPUT
297144dda7b2Smrg# ---------
297244dda7b2Smrg# This macro allows early generation of the libtool script (before
297344dda7b2Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
297444dda7b2Smrg# tests.
297544dda7b2SmrgAC_DEFUN([LT_OUTPUT],
297644dda7b2Smrg[: ${CONFIG_LT=./config.lt}
297744dda7b2SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
297844dda7b2Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
297944dda7b2Smrg[# Run this file to recreate a libtool stub with the current configuration.])
2980ff559fabSmrg
298144dda7b2Smrgcat >>"$CONFIG_LT" <<\_LTEOF
298244dda7b2Smrglt_cl_silent=false
298344dda7b2Smrgexec AS_MESSAGE_LOG_FD>>config.log
298444dda7b2Smrg{
298544dda7b2Smrg  echo
298644dda7b2Smrg  AS_BOX([Running $as_me.])
298744dda7b2Smrg} >&AS_MESSAGE_LOG_FD
29887a3b38f7Smrg
298944dda7b2Smrglt_cl_help="\
299044dda7b2Smrg\`$as_me' creates a local libtool stub from the current configuration,
299144dda7b2Smrgfor use in further configure time tests before the real libtool is
299244dda7b2Smrggenerated.
2993ff559fabSmrg
299444dda7b2SmrgUsage: $[0] [[OPTIONS]]
2995ff559fabSmrg
299644dda7b2Smrg  -h, --help      print this help, then exit
299744dda7b2Smrg  -V, --version   print version number, then exit
299844dda7b2Smrg  -q, --quiet     do not print progress messages
299944dda7b2Smrg  -d, --debug     don't remove temporary files
3000ff559fabSmrg
300144dda7b2SmrgReport bugs to <bug-libtool@gnu.org>."
3002ff559fabSmrg
300344dda7b2Smrglt_cl_version="\
300444dda7b2Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
300544dda7b2Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
300644dda7b2Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
3007ff559fabSmrg
300844dda7b2SmrgCopyright (C) 2010 Free Software Foundation, Inc.
300944dda7b2SmrgThis config.lt script is free software; the Free Software Foundation
301044dda7b2Smrggives unlimited permision to copy, distribute and modify it."
3011ff559fabSmrg
301244dda7b2Smrgwhile test $[#] != 0
301344dda7b2Smrgdo
301444dda7b2Smrg  case $[1] in
301544dda7b2Smrg    --version | --v* | -V )
301644dda7b2Smrg      echo "$lt_cl_version"; exit 0 ;;
301744dda7b2Smrg    --help | --h* | -h )
301844dda7b2Smrg      echo "$lt_cl_help"; exit 0 ;;
301944dda7b2Smrg    --debug | --d* | -d )
302044dda7b2Smrg      debug=: ;;
302144dda7b2Smrg    --quiet | --q* | --silent | --s* | -q )
302244dda7b2Smrg      lt_cl_silent=: ;;
3023ff559fabSmrg
302444dda7b2Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
302544dda7b2SmrgTry \`$[0] --help' for more information.]) ;;
3026ff559fabSmrg
302744dda7b2Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
302844dda7b2SmrgTry \`$[0] --help' for more information.]) ;;
302944dda7b2Smrg  esac
303044dda7b2Smrg  shift
303144dda7b2Smrgdone
3032ff559fabSmrg
303344dda7b2Smrgif $lt_cl_silent; then
303444dda7b2Smrg  exec AS_MESSAGE_FD>/dev/null
30357a3b38f7Smrgfi
303644dda7b2Smrg_LTEOF
3037ff559fabSmrg
303844dda7b2Smrgcat >>"$CONFIG_LT" <<_LTEOF
303944dda7b2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
304044dda7b2Smrg_LTEOF
3041ff559fabSmrg
304244dda7b2Smrgcat >>"$CONFIG_LT" <<\_LTEOF
304344dda7b2SmrgAC_MSG_NOTICE([creating $ofile])
304444dda7b2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
304544dda7b2SmrgAS_EXIT(0)
304644dda7b2Smrg_LTEOF
304744dda7b2Smrgchmod +x "$CONFIG_LT"
3048ff559fabSmrg
304944dda7b2Smrg# configure is writing to config.log, but config.lt does its own redirection,
305044dda7b2Smrg# appending to config.log, which fails on DOS, as config.log is still kept
305144dda7b2Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
305244dda7b2Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
305344dda7b2Smrglt_cl_success=:
305444dda7b2Smrgtest "$silent" = yes &&
305544dda7b2Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
305644dda7b2Smrgexec AS_MESSAGE_LOG_FD>/dev/null
305744dda7b2Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
305844dda7b2Smrgexec AS_MESSAGE_LOG_FD>>config.log
305944dda7b2Smrg$lt_cl_success || AS_EXIT(1)
306044dda7b2Smrg])# LT_OUTPUT
3061ff559fabSmrg
3062ff559fabSmrg
306344dda7b2Smrg# _LT_CONFIG(TAG)
306444dda7b2Smrg# ---------------
306544dda7b2Smrg# If TAG is the built-in tag, create an initial libtool script with a
306644dda7b2Smrg# default configuration from the untagged config vars.  Otherwise add code
306744dda7b2Smrg# to config.status for appending the configuration named by TAG from the
306844dda7b2Smrg# matching tagged config vars.
306944dda7b2Smrgm4_defun([_LT_CONFIG],
307044dda7b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
307144dda7b2Smrg_LT_CONFIG_SAVE_COMMANDS([
307244dda7b2Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
307344dda7b2Smrg  m4_if(_LT_TAG, [C], [
307444dda7b2Smrg    # See if we are running on zsh, and set the options which allow our
307544dda7b2Smrg    # commands through without removal of \ escapes.
307644dda7b2Smrg    if test -n "${ZSH_VERSION+set}" ; then
307744dda7b2Smrg      setopt NO_GLOB_SUBST
307844dda7b2Smrg    fi
3079ff559fabSmrg
308044dda7b2Smrg    cfgfile="${ofile}T"
308144dda7b2Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
308244dda7b2Smrg    $RM "$cfgfile"
3083ff559fabSmrg
308444dda7b2Smrg    cat <<_LT_EOF >> "$cfgfile"
308544dda7b2Smrg#! $SHELL
3086ff559fabSmrg
308744dda7b2Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
308844dda7b2Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
308944dda7b2Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
309044dda7b2Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
309144dda7b2Smrg#
309244dda7b2Smrg_LT_COPYING
309344dda7b2Smrg_LT_LIBTOOL_TAGS
3094ff559fabSmrg
309544dda7b2Smrg# ### BEGIN LIBTOOL CONFIG
309644dda7b2Smrg_LT_LIBTOOL_CONFIG_VARS
309744dda7b2Smrg_LT_LIBTOOL_TAG_VARS
309844dda7b2Smrg# ### END LIBTOOL CONFIG
3099ff559fabSmrg
310044dda7b2Smrg_LT_EOF
3101ff559fabSmrg
310244dda7b2Smrg  case $host_os in
310344dda7b2Smrg  aix3*)
310444dda7b2Smrg    cat <<\_LT_EOF >> "$cfgfile"
310544dda7b2Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
310644dda7b2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
310744dda7b2Smrg# vanish in a puff of smoke.
310844dda7b2Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
310944dda7b2Smrg  COLLECT_NAMES=
311044dda7b2Smrg  export COLLECT_NAMES
311144dda7b2Smrgfi
311244dda7b2Smrg_LT_EOF
311344dda7b2Smrg    ;;
311444dda7b2Smrg  esac
31157a3b38f7Smrg
311644dda7b2Smrg  _LT_PROG_LTMAIN
3117ff559fabSmrg
311844dda7b2Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
311944dda7b2Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
312044dda7b2Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
312144dda7b2Smrg  # is reportedly fixed, but why not run on old versions too?
312244dda7b2Smrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
312344dda7b2Smrg    || (rm -f "$cfgfile"; exit 1)
3124ff559fabSmrg
312544dda7b2Smrg  _LT_PROG_XSI_SHELLFNS
3126ff559fabSmrg
312744dda7b2Smrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
312844dda7b2Smrg    || (rm -f "$cfgfile"; exit 1)
3129ff559fabSmrg
313044dda7b2Smrg  mv -f "$cfgfile" "$ofile" ||
313144dda7b2Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
313244dda7b2Smrg  chmod +x "$ofile"
313344dda7b2Smrg],
313444dda7b2Smrg[cat <<_LT_EOF >> "$ofile"
3135ff559fabSmrg
313644dda7b2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
313744dda7b2Smrgdnl in a comment (ie after a #).
313844dda7b2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
313944dda7b2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
314044dda7b2Smrg# ### END LIBTOOL TAG CONFIG: $1
31417a3b38f7Smrg_LT_EOF
314244dda7b2Smrg])dnl /m4_if
314344dda7b2Smrg],
314444dda7b2Smrg[m4_if([$1], [], [
314544dda7b2Smrg    PACKAGE='$PACKAGE'
314644dda7b2Smrg    VERSION='$VERSION'
314744dda7b2Smrg    TIMESTAMP='$TIMESTAMP'
314844dda7b2Smrg    RM='$RM'
314944dda7b2Smrg    ofile='$ofile'], [])
315044dda7b2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
315144dda7b2Smrg])# _LT_CONFIG
3152ff559fabSmrg
3153ff559fabSmrg
315444dda7b2Smrg# LT_SUPPORTED_TAG(TAG)
315544dda7b2Smrg# ---------------------
315644dda7b2Smrg# Trace this macro to discover what tags are supported by the libtool
315744dda7b2Smrg# --tag option, using:
315844dda7b2Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
315944dda7b2SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
3160ff559fabSmrg
3161ff559fabSmrg
316244dda7b2Smrg# C support is built-in for now
316344dda7b2Smrgm4_define([_LT_LANG_C_enabled], [])
316444dda7b2Smrgm4_define([_LT_TAGS], [])
3165ff559fabSmrg
3166ff559fabSmrg
316744dda7b2Smrg# LT_LANG(LANG)
316844dda7b2Smrg# -------------
316944dda7b2Smrg# Enable libtool support for the given language if not already enabled.
317044dda7b2SmrgAC_DEFUN([LT_LANG],
317144dda7b2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
317244dda7b2Smrgm4_case([$1],
317344dda7b2Smrg  [C],			[_LT_LANG(C)],
317444dda7b2Smrg  [C++],		[_LT_LANG(CXX)],
317544dda7b2Smrg  [Java],		[_LT_LANG(GCJ)],
317644dda7b2Smrg  [Fortran 77],		[_LT_LANG(F77)],
317744dda7b2Smrg  [Fortran],		[_LT_LANG(FC)],
317844dda7b2Smrg  [Windows Resource],	[_LT_LANG(RC)],
317944dda7b2Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
318044dda7b2Smrg    [_LT_LANG($1)],
318144dda7b2Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
318244dda7b2Smrg])# LT_LANG
3183ff559fabSmrg
3184ff559fabSmrg
318544dda7b2Smrg# _LT_LANG(LANGNAME)
318644dda7b2Smrg# ------------------
318744dda7b2Smrgm4_defun([_LT_LANG],
318844dda7b2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
318944dda7b2Smrg  [LT_SUPPORTED_TAG([$1])dnl
319044dda7b2Smrg  m4_append([_LT_TAGS], [$1 ])dnl
319144dda7b2Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
319244dda7b2Smrg  _LT_LANG_$1_CONFIG($1)])dnl
319344dda7b2Smrg])# _LT_LANG
3194ff559fabSmrg
3195ff559fabSmrg
319644dda7b2Smrg# _LT_LANG_DEFAULT_CONFIG
319744dda7b2Smrg# -----------------------
319844dda7b2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
319944dda7b2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
320044dda7b2Smrg  [LT_LANG(CXX)],
320144dda7b2Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3202ff559fabSmrg
320344dda7b2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
320444dda7b2Smrg  [LT_LANG(F77)],
320544dda7b2Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3206ff559fabSmrg
320744dda7b2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
320844dda7b2Smrg  [LT_LANG(FC)],
320944dda7b2Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
321044dda7b2Smrg
321144dda7b2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
321244dda7b2Smrgdnl pulling things in needlessly.
321344dda7b2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
321444dda7b2Smrg  [LT_LANG(GCJ)],
321544dda7b2Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
321644dda7b2Smrg    [LT_LANG(GCJ)],
321744dda7b2Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
321844dda7b2Smrg      [LT_LANG(GCJ)],
321944dda7b2Smrg      [m4_ifdef([AC_PROG_GCJ],
322044dda7b2Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
322144dda7b2Smrg       m4_ifdef([A][M_PROG_GCJ],
322244dda7b2Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
322344dda7b2Smrg       m4_ifdef([LT_PROG_GCJ],
322444dda7b2Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
322544dda7b2Smrg
322644dda7b2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
322744dda7b2Smrg  [LT_LANG(RC)],
322844dda7b2Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
322944dda7b2Smrg])# _LT_LANG_DEFAULT_CONFIG
323044dda7b2Smrg
323144dda7b2Smrg# Obsolete macros:
323244dda7b2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
323344dda7b2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
323444dda7b2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
323544dda7b2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
323644dda7b2SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
323744dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
323844dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
323944dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
324044dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
324144dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
324244dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
324344dda7b2Smrg
324444dda7b2Smrg
324544dda7b2Smrg# _LT_TAG_COMPILER
324644dda7b2Smrg# ----------------
324744dda7b2Smrgm4_defun([_LT_TAG_COMPILER],
324844dda7b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl
324944dda7b2Smrg
325044dda7b2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
325144dda7b2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
325244dda7b2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
325344dda7b2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
325444dda7b2Smrg
325544dda7b2Smrg# If no C compiler was specified, use CC.
325644dda7b2SmrgLTCC=${LTCC-"$CC"}
325744dda7b2Smrg
325844dda7b2Smrg# If no C compiler flags were specified, use CFLAGS.
325944dda7b2SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
326044dda7b2Smrg
326144dda7b2Smrg# Allow CC to be a program name with arguments.
326244dda7b2Smrgcompiler=$CC
326344dda7b2Smrg])# _LT_TAG_COMPILER
326444dda7b2Smrg
326544dda7b2Smrg
326644dda7b2Smrg# _LT_COMPILER_BOILERPLATE
326744dda7b2Smrg# ------------------------
326844dda7b2Smrg# Check for compiler boilerplate output or warnings with
326944dda7b2Smrg# the simple compiler test code.
327044dda7b2Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
327144dda7b2Smrg[m4_require([_LT_DECL_SED])dnl
327244dda7b2Smrgac_outfile=conftest.$ac_objext
327344dda7b2Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
327444dda7b2Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
327544dda7b2Smrg_lt_compiler_boilerplate=`cat conftest.err`
327644dda7b2Smrg$RM conftest*
327744dda7b2Smrg])# _LT_COMPILER_BOILERPLATE
327844dda7b2Smrg
327944dda7b2Smrg
328044dda7b2Smrg# _LT_LINKER_BOILERPLATE
328144dda7b2Smrg# ----------------------
328244dda7b2Smrg# Check for linker boilerplate output or warnings with
328344dda7b2Smrg# the simple link test code.
328444dda7b2Smrgm4_defun([_LT_LINKER_BOILERPLATE],
328544dda7b2Smrg[m4_require([_LT_DECL_SED])dnl
328644dda7b2Smrgac_outfile=conftest.$ac_objext
328744dda7b2Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
328844dda7b2Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
328944dda7b2Smrg_lt_linker_boilerplate=`cat conftest.err`
329044dda7b2Smrg$RM -r conftest*
329144dda7b2Smrg])# _LT_LINKER_BOILERPLATE
329244dda7b2Smrg
329344dda7b2Smrg# _LT_REQUIRED_DARWIN_CHECKS
329444dda7b2Smrg# -------------------------
329544dda7b2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
329644dda7b2Smrg  case $host_os in
329744dda7b2Smrg    rhapsody* | darwin*)
329844dda7b2Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
329944dda7b2Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
330044dda7b2Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
330144dda7b2Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
330244dda7b2Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
330344dda7b2Smrg    _LT_DECL([], [DSYMUTIL], [1],
330444dda7b2Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
330544dda7b2Smrg    _LT_DECL([], [NMEDIT], [1],
330644dda7b2Smrg      [Tool to change global to local symbols on Mac OS X])
330744dda7b2Smrg    _LT_DECL([], [LIPO], [1],
330844dda7b2Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
330944dda7b2Smrg    _LT_DECL([], [OTOOL], [1],
331044dda7b2Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
331144dda7b2Smrg    _LT_DECL([], [OTOOL64], [1],
331244dda7b2Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
331344dda7b2Smrg
331444dda7b2Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
331544dda7b2Smrg      [lt_cv_apple_cc_single_mod=no
331644dda7b2Smrg      if test -z "${LT_MULTI_MODULE}"; then
331744dda7b2Smrg	# By default we will add the -single_module flag. You can override
331844dda7b2Smrg	# by either setting the environment variable LT_MULTI_MODULE
331944dda7b2Smrg	# non-empty at configure time, or by adding -multi_module to the
332044dda7b2Smrg	# link flags.
332144dda7b2Smrg	rm -rf libconftest.dylib*
332244dda7b2Smrg	echo "int foo(void){return 1;}" > conftest.c
332344dda7b2Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
332444dda7b2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
332544dda7b2Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
332644dda7b2Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
332744dda7b2Smrg        _lt_result=$?
332844dda7b2Smrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
332944dda7b2Smrg	  lt_cv_apple_cc_single_mod=yes
33307a3b38f7Smrg	else
333144dda7b2Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
33327a3b38f7Smrg	fi
333344dda7b2Smrg	rm -rf libconftest.dylib*
333444dda7b2Smrg	rm -f conftest.*
333544dda7b2Smrg      fi])
333644dda7b2Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
333744dda7b2Smrg      [lt_cv_ld_exported_symbols_list],
333844dda7b2Smrg      [lt_cv_ld_exported_symbols_list=no
333944dda7b2Smrg      save_LDFLAGS=$LDFLAGS
334044dda7b2Smrg      echo "_main" > conftest.sym
334144dda7b2Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
334244dda7b2Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
334344dda7b2Smrg	[lt_cv_ld_exported_symbols_list=yes],
334444dda7b2Smrg	[lt_cv_ld_exported_symbols_list=no])
334544dda7b2Smrg	LDFLAGS="$save_LDFLAGS"
334644dda7b2Smrg    ])
334744dda7b2Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
334844dda7b2Smrg      [lt_cv_ld_force_load=no
334944dda7b2Smrg      cat > conftest.c << _LT_EOF
335044dda7b2Smrgint forced_loaded() { return 2;}
335144dda7b2Smrg_LT_EOF
335244dda7b2Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
335344dda7b2Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
335444dda7b2Smrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
335544dda7b2Smrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
335644dda7b2Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
335744dda7b2Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
335844dda7b2Smrg      cat > conftest.c << _LT_EOF
335944dda7b2Smrgint main() { return 0;}
336044dda7b2Smrg_LT_EOF
336144dda7b2Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
336244dda7b2Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
336344dda7b2Smrg      _lt_result=$?
336444dda7b2Smrg      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
336544dda7b2Smrg	lt_cv_ld_force_load=yes
336644dda7b2Smrg      else
336744dda7b2Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
336844dda7b2Smrg      fi
336944dda7b2Smrg        rm -f conftest.err libconftest.a conftest conftest.c
337044dda7b2Smrg        rm -rf conftest.dSYM
337144dda7b2Smrg    ])
337244dda7b2Smrg    case $host_os in
337344dda7b2Smrg    rhapsody* | darwin1.[[012]])
337444dda7b2Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
337544dda7b2Smrg    darwin1.*)
337644dda7b2Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
337744dda7b2Smrg    darwin*) # darwin 5.x on
337844dda7b2Smrg      # if running on 10.5 or later, the deployment target defaults
337944dda7b2Smrg      # to the OS version, if on x86, and 10.4, the deployment
338044dda7b2Smrg      # target defaults to 10.4. Don't you love it?
338144dda7b2Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
338244dda7b2Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
338344dda7b2Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
338444dda7b2Smrg	10.[[012]]*)
338544dda7b2Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
338644dda7b2Smrg	10.*)
338744dda7b2Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
338844dda7b2Smrg      esac
338944dda7b2Smrg    ;;
339044dda7b2Smrg  esac
339144dda7b2Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
339244dda7b2Smrg      _lt_dar_single_mod='$single_module'
339344dda7b2Smrg    fi
339444dda7b2Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
339544dda7b2Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
339644dda7b2Smrg    else
339744dda7b2Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
339844dda7b2Smrg    fi
339944dda7b2Smrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
340044dda7b2Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
340144dda7b2Smrg    else
340244dda7b2Smrg      _lt_dsymutil=
340344dda7b2Smrg    fi
340444dda7b2Smrg    ;;
340544dda7b2Smrg  esac
340644dda7b2Smrg])
340744dda7b2Smrg
340844dda7b2Smrg
340944dda7b2Smrg# _LT_DARWIN_LINKER_FEATURES
341044dda7b2Smrg# --------------------------
341144dda7b2Smrg# Checks for linker and compiler features on darwin
341244dda7b2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
341344dda7b2Smrg[
341444dda7b2Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
341544dda7b2Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
341644dda7b2Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
341744dda7b2Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
341844dda7b2Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
341944dda7b2Smrg  if test "$lt_cv_ld_force_load" = "yes"; then
342044dda7b2Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
342144dda7b2Smrg  else
342244dda7b2Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
342344dda7b2Smrg  fi
342444dda7b2Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
342544dda7b2Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
342644dda7b2Smrg  case $cc_basename in
342744dda7b2Smrg     ifort*) _lt_dar_can_shared=yes ;;
342844dda7b2Smrg     *) _lt_dar_can_shared=$GCC ;;
342944dda7b2Smrg  esac
343044dda7b2Smrg  if test "$_lt_dar_can_shared" = "yes"; then
343144dda7b2Smrg    output_verbose_link_cmd=func_echo_all
343244dda7b2Smrg    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
343344dda7b2Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
343444dda7b2Smrg    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
343544dda7b2Smrg    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
343644dda7b2Smrg    m4_if([$1], [CXX],
343744dda7b2Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
343844dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
343944dda7b2Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
344044dda7b2Smrg    fi
344144dda7b2Smrg],[])
344244dda7b2Smrg  else
344344dda7b2Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
344444dda7b2Smrg  fi
344544dda7b2Smrg])
344644dda7b2Smrg
344744dda7b2Smrg# _LT_SYS_MODULE_PATH_AIX
344844dda7b2Smrg# -----------------------
344944dda7b2Smrg# Links a minimal program and checks the executable
345044dda7b2Smrg# for the system default hardcoded library path. In most cases,
345144dda7b2Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
345244dda7b2Smrg# the location of the communication and MPI libs are included too.
345344dda7b2Smrg# If we don't find anything, use the default library path according
345444dda7b2Smrg# to the aix ld manual.
345544dda7b2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
345644dda7b2Smrg[m4_require([_LT_DECL_SED])dnl
345744dda7b2SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
345844dda7b2Smrglt_aix_libpath_sed='
345944dda7b2Smrg    /Import File Strings/,/^$/ {
346044dda7b2Smrg	/^0/ {
346144dda7b2Smrg	    s/^0  *\(.*\)$/\1/
346244dda7b2Smrg	    p
346344dda7b2Smrg	}
346444dda7b2Smrg    }'
346544dda7b2Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
346644dda7b2Smrg# Check for a 64-bit object if we didn't find anything.
346744dda7b2Smrgif test -z "$aix_libpath"; then
346844dda7b2Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
346944dda7b2Smrgfi],[])
347044dda7b2Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
347144dda7b2Smrg])# _LT_SYS_MODULE_PATH_AIX
347244dda7b2Smrg
347344dda7b2Smrg
347444dda7b2Smrg# _LT_SHELL_INIT(ARG)
347544dda7b2Smrg# -------------------
347644dda7b2Smrgm4_define([_LT_SHELL_INIT],
347744dda7b2Smrg[m4_divert_text([M4SH-INIT], [$1
347844dda7b2Smrg])])# _LT_SHELL_INIT
347944dda7b2Smrg
348044dda7b2Smrg
348144dda7b2Smrg
348244dda7b2Smrg# _LT_PROG_ECHO_BACKSLASH
348344dda7b2Smrg# -----------------------
348444dda7b2Smrg# Find how we can fake an echo command that does not interpret backslash.
348544dda7b2Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
348644dda7b2Smrg# of the generated configure script which will find a shell with a builtin
348744dda7b2Smrg# printf (which we can use as an echo command).
348844dda7b2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
348944dda7b2Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
349044dda7b2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
349144dda7b2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
349244dda7b2Smrg
349344dda7b2SmrgAC_MSG_CHECKING([how to print strings])
349444dda7b2Smrg# Test print first, because it will be a builtin if present.
349544dda7b2Smrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \
349644dda7b2Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
349744dda7b2Smrg  ECHO='print -r --'
349844dda7b2Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
349944dda7b2Smrg  ECHO='printf %s\n'
350044dda7b2Smrgelse
350144dda7b2Smrg  # Use this function as a fallback that always works.
350244dda7b2Smrg  func_fallback_echo ()
350344dda7b2Smrg  {
350444dda7b2Smrg    eval 'cat <<_LTECHO_EOF
350544dda7b2Smrg$[]1
350644dda7b2Smrg_LTECHO_EOF'
350744dda7b2Smrg  }
350844dda7b2Smrg  ECHO='func_fallback_echo'
350944dda7b2Smrgfi
351044dda7b2Smrg
351144dda7b2Smrg# func_echo_all arg...
351244dda7b2Smrg# Invoke $ECHO with all args, space-separated.
351344dda7b2Smrgfunc_echo_all ()
351444dda7b2Smrg{
351544dda7b2Smrg    $ECHO "$*" 
351644dda7b2Smrg}
351744dda7b2Smrg
351844dda7b2Smrgcase "$ECHO" in
351944dda7b2Smrg  printf*) AC_MSG_RESULT([printf]) ;;
352044dda7b2Smrg  print*) AC_MSG_RESULT([print -r]) ;;
352144dda7b2Smrg  *) AC_MSG_RESULT([cat]) ;;
352244dda7b2Smrgesac
352344dda7b2Smrg
352444dda7b2Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
352544dda7b2Smrg[_AS_DETECT_SUGGESTED([
352644dda7b2Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
352744dda7b2Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
352844dda7b2Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
352944dda7b2Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
353044dda7b2Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
353144dda7b2Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
353244dda7b2Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
353344dda7b2Smrg
353444dda7b2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
353544dda7b2Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
353644dda7b2Smrg])# _LT_PROG_ECHO_BACKSLASH
353744dda7b2Smrg
353844dda7b2Smrg
353944dda7b2Smrg# _LT_ENABLE_LOCK
354044dda7b2Smrg# ---------------
354144dda7b2Smrgm4_defun([_LT_ENABLE_LOCK],
354244dda7b2Smrg[AC_ARG_ENABLE([libtool-lock],
354344dda7b2Smrg  [AS_HELP_STRING([--disable-libtool-lock],
354444dda7b2Smrg    [avoid locking (might break parallel builds)])])
354544dda7b2Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
354644dda7b2Smrg
354744dda7b2Smrg# Some flags need to be propagated to the compiler or linker for good
354844dda7b2Smrg# libtool support.
354944dda7b2Smrgcase $host in
355044dda7b2Smrgia64-*-hpux*)
355144dda7b2Smrg  # Find out which ABI we are using.
355244dda7b2Smrg  echo 'int i;' > conftest.$ac_ext
355344dda7b2Smrg  if AC_TRY_EVAL(ac_compile); then
355444dda7b2Smrg    case `/usr/bin/file conftest.$ac_objext` in
355544dda7b2Smrg      *ELF-32*)
355644dda7b2Smrg	HPUX_IA64_MODE="32"
3557ff559fabSmrg	;;
355844dda7b2Smrg      *ELF-64*)
355944dda7b2Smrg	HPUX_IA64_MODE="64"
356044dda7b2Smrg	;;
356144dda7b2Smrg    esac
356244dda7b2Smrg  fi
356344dda7b2Smrg  rm -rf conftest*
356444dda7b2Smrg  ;;
356544dda7b2Smrg*-*-irix6*)
356644dda7b2Smrg  # Find out which ABI we are using.
356744dda7b2Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
356844dda7b2Smrg  if AC_TRY_EVAL(ac_compile); then
356944dda7b2Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
357044dda7b2Smrg      case `/usr/bin/file conftest.$ac_objext` in
357144dda7b2Smrg	*32-bit*)
357244dda7b2Smrg	  LD="${LD-ld} -melf32bsmip"
357344dda7b2Smrg	  ;;
357444dda7b2Smrg	*N32*)
357544dda7b2Smrg	  LD="${LD-ld} -melf32bmipn32"
357644dda7b2Smrg	  ;;
357744dda7b2Smrg	*64-bit*)
357844dda7b2Smrg	  LD="${LD-ld} -melf64bmip"
357944dda7b2Smrg	;;
358044dda7b2Smrg      esac
358144dda7b2Smrg    else
358244dda7b2Smrg      case `/usr/bin/file conftest.$ac_objext` in
358344dda7b2Smrg	*32-bit*)
358444dda7b2Smrg	  LD="${LD-ld} -32"
358544dda7b2Smrg	  ;;
358644dda7b2Smrg	*N32*)
358744dda7b2Smrg	  LD="${LD-ld} -n32"
358844dda7b2Smrg	  ;;
358944dda7b2Smrg	*64-bit*)
359044dda7b2Smrg	  LD="${LD-ld} -64"
359144dda7b2Smrg	  ;;
359244dda7b2Smrg      esac
359344dda7b2Smrg    fi
359444dda7b2Smrg  fi
359544dda7b2Smrg  rm -rf conftest*
359644dda7b2Smrg  ;;
359744dda7b2Smrg
359844dda7b2Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
359944dda7b2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
360044dda7b2Smrg  # Find out which ABI we are using.
360144dda7b2Smrg  echo 'int i;' > conftest.$ac_ext
360244dda7b2Smrg  if AC_TRY_EVAL(ac_compile); then
360344dda7b2Smrg    case `/usr/bin/file conftest.o` in
360444dda7b2Smrg      *32-bit*)
360544dda7b2Smrg	case $host in
360644dda7b2Smrg	  x86_64-*kfreebsd*-gnu)
360744dda7b2Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
36087a3b38f7Smrg	    ;;
360944dda7b2Smrg	  x86_64-*linux*)
361044dda7b2Smrg	    LD="${LD-ld} -m elf_i386"
36117a3b38f7Smrg	    ;;
361244dda7b2Smrg	  ppc64-*linux*|powerpc64-*linux*)
361344dda7b2Smrg	    LD="${LD-ld} -m elf32ppclinux"
36147a3b38f7Smrg	    ;;
361544dda7b2Smrg	  s390x-*linux*)
361644dda7b2Smrg	    LD="${LD-ld} -m elf_s390"
36177a3b38f7Smrg	    ;;
361844dda7b2Smrg	  sparc64-*linux*)
361944dda7b2Smrg	    LD="${LD-ld} -m elf32_sparc"
36207a3b38f7Smrg	    ;;
36217a3b38f7Smrg	esac
3622ff559fabSmrg	;;
362344dda7b2Smrg      *64-bit*)
362444dda7b2Smrg	case $host in
362544dda7b2Smrg	  x86_64-*kfreebsd*-gnu)
362644dda7b2Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
36277a3b38f7Smrg	    ;;
362844dda7b2Smrg	  x86_64-*linux*)
362944dda7b2Smrg	    LD="${LD-ld} -m elf_x86_64"
36307a3b38f7Smrg	    ;;
363144dda7b2Smrg	  ppc*-*linux*|powerpc*-*linux*)
363244dda7b2Smrg	    LD="${LD-ld} -m elf64ppc"
36337a3b38f7Smrg	    ;;
363444dda7b2Smrg	  s390*-*linux*|s390*-*tpf*)
363544dda7b2Smrg	    LD="${LD-ld} -m elf64_s390"
36367a3b38f7Smrg	    ;;
363744dda7b2Smrg	  sparc*-*linux*)
363844dda7b2Smrg	    LD="${LD-ld} -m elf64_sparc"
36397a3b38f7Smrg	    ;;
36407a3b38f7Smrg	esac
3641ff559fabSmrg	;;
364244dda7b2Smrg    esac
364344dda7b2Smrg  fi
364444dda7b2Smrg  rm -rf conftest*
364544dda7b2Smrg  ;;
364644dda7b2Smrg
364744dda7b2Smrg*-*-sco3.2v5*)
364844dda7b2Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
364944dda7b2Smrg  SAVE_CFLAGS="$CFLAGS"
365044dda7b2Smrg  CFLAGS="$CFLAGS -belf"
365144dda7b2Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
365244dda7b2Smrg    [AC_LANG_PUSH(C)
365344dda7b2Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
365444dda7b2Smrg     AC_LANG_POP])
365544dda7b2Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
365644dda7b2Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
365744dda7b2Smrg    CFLAGS="$SAVE_CFLAGS"
365844dda7b2Smrg  fi
365944dda7b2Smrg  ;;
366044dda7b2Smrgsparc*-*solaris*)
366144dda7b2Smrg  # Find out which ABI we are using.
366244dda7b2Smrg  echo 'int i;' > conftest.$ac_ext
366344dda7b2Smrg  if AC_TRY_EVAL(ac_compile); then
366444dda7b2Smrg    case `/usr/bin/file conftest.o` in
366544dda7b2Smrg    *64-bit*)
366644dda7b2Smrg      case $lt_cv_prog_gnu_ld in
366744dda7b2Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
3668ff559fabSmrg      *)
366944dda7b2Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
367044dda7b2Smrg	  LD="${LD-ld} -64"
367144dda7b2Smrg	fi
3672ff559fabSmrg	;;
367344dda7b2Smrg      esac
367444dda7b2Smrg      ;;
367544dda7b2Smrg    esac
367644dda7b2Smrg  fi
367744dda7b2Smrg  rm -rf conftest*
367844dda7b2Smrg  ;;
367944dda7b2Smrgesac
368044dda7b2Smrg
368144dda7b2Smrgneed_locks="$enable_libtool_lock"
368244dda7b2Smrg])# _LT_ENABLE_LOCK
368344dda7b2Smrg
368444dda7b2Smrg
368544dda7b2Smrg# _LT_CMD_OLD_ARCHIVE
368644dda7b2Smrg# -------------------
368744dda7b2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
368844dda7b2Smrg[AC_CHECK_TOOL(AR, ar, false)
368944dda7b2Smrgtest -z "$AR" && AR=ar
369044dda7b2Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
369144dda7b2Smrg_LT_DECL([], [AR], [1], [The archiver])
369244dda7b2Smrg_LT_DECL([], [AR_FLAGS], [1])
369344dda7b2Smrg
369444dda7b2SmrgAC_CHECK_TOOL(STRIP, strip, :)
369544dda7b2Smrgtest -z "$STRIP" && STRIP=:
369644dda7b2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
369744dda7b2Smrg
369844dda7b2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
369944dda7b2Smrgtest -z "$RANLIB" && RANLIB=:
370044dda7b2Smrg_LT_DECL([], [RANLIB], [1],
370144dda7b2Smrg    [Commands used to install an old-style archive])
370244dda7b2Smrg
370344dda7b2Smrg# Determine commands to create old-style static archives.
370444dda7b2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
370544dda7b2Smrgold_postinstall_cmds='chmod 644 $oldlib'
370644dda7b2Smrgold_postuninstall_cmds=
370744dda7b2Smrg
370844dda7b2Smrgif test -n "$RANLIB"; then
370944dda7b2Smrg  case $host_os in
371044dda7b2Smrg  openbsd*)
371144dda7b2Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
371244dda7b2Smrg    ;;
371344dda7b2Smrg  *)
371444dda7b2Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
371544dda7b2Smrg    ;;
371644dda7b2Smrg  esac
371744dda7b2Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
371844dda7b2Smrgfi
371944dda7b2Smrg
372044dda7b2Smrgcase $host_os in
372144dda7b2Smrg  darwin*)
372244dda7b2Smrg    lock_old_archive_extraction=yes ;;
372344dda7b2Smrg  *)
372444dda7b2Smrg    lock_old_archive_extraction=no ;;
372544dda7b2Smrgesac
372644dda7b2Smrg_LT_DECL([], [old_postinstall_cmds], [2])
372744dda7b2Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
372844dda7b2Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
372944dda7b2Smrg    [Commands used to build an old-style archive])
373044dda7b2Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
373144dda7b2Smrg    [Whether to use a lock for old archive extraction])
373244dda7b2Smrg])# _LT_CMD_OLD_ARCHIVE
373344dda7b2Smrg
373444dda7b2Smrg
373544dda7b2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
373644dda7b2Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
373744dda7b2Smrg# ----------------------------------------------------------------
373844dda7b2Smrg# Check whether the given compiler option works
373944dda7b2SmrgAC_DEFUN([_LT_COMPILER_OPTION],
374044dda7b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
374144dda7b2Smrgm4_require([_LT_DECL_SED])dnl
374244dda7b2SmrgAC_CACHE_CHECK([$1], [$2],
374344dda7b2Smrg  [$2=no
374444dda7b2Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
374544dda7b2Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
374644dda7b2Smrg   lt_compiler_flag="$3"
374744dda7b2Smrg   # Insert the option either (1) after the last *FLAGS variable, or
374844dda7b2Smrg   # (2) before a word containing "conftest.", or (3) at the end.
374944dda7b2Smrg   # Note that $ac_compile itself does not contain backslashes and begins
375044dda7b2Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
375144dda7b2Smrg   # The option is referenced via a variable to avoid confusing sed.
375244dda7b2Smrg   lt_compile=`echo "$ac_compile" | $SED \
375344dda7b2Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
375444dda7b2Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
375544dda7b2Smrg   -e 's:$: $lt_compiler_flag:'`
375644dda7b2Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
375744dda7b2Smrg   (eval "$lt_compile" 2>conftest.err)
375844dda7b2Smrg   ac_status=$?
375944dda7b2Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
376044dda7b2Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
376144dda7b2Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
376244dda7b2Smrg     # The compiler can only warn and ignore the option if not recognized
376344dda7b2Smrg     # So say no if there are warnings other than the usual output.
376444dda7b2Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
376544dda7b2Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
376644dda7b2Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
376744dda7b2Smrg       $2=yes
376844dda7b2Smrg     fi
376944dda7b2Smrg   fi
377044dda7b2Smrg   $RM conftest*
377144dda7b2Smrg])
377244dda7b2Smrg
377344dda7b2Smrgif test x"[$]$2" = xyes; then
377444dda7b2Smrg    m4_if([$5], , :, [$5])
377544dda7b2Smrgelse
377644dda7b2Smrg    m4_if([$6], , :, [$6])
377744dda7b2Smrgfi
377844dda7b2Smrg])# _LT_COMPILER_OPTION
377944dda7b2Smrg
378044dda7b2Smrg# Old name:
378144dda7b2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
378244dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
378344dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
378444dda7b2Smrg
378544dda7b2Smrg
378644dda7b2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
378744dda7b2Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
378844dda7b2Smrg# ----------------------------------------------------
378944dda7b2Smrg# Check whether the given linker option works
379044dda7b2SmrgAC_DEFUN([_LT_LINKER_OPTION],
379144dda7b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
379244dda7b2Smrgm4_require([_LT_DECL_SED])dnl
379344dda7b2SmrgAC_CACHE_CHECK([$1], [$2],
379444dda7b2Smrg  [$2=no
379544dda7b2Smrg   save_LDFLAGS="$LDFLAGS"
379644dda7b2Smrg   LDFLAGS="$LDFLAGS $3"
379744dda7b2Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
379844dda7b2Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
379944dda7b2Smrg     # The linker can only warn and ignore the option if not recognized
380044dda7b2Smrg     # So say no if there are warnings
380144dda7b2Smrg     if test -s conftest.err; then
380244dda7b2Smrg       # Append any errors to the config.log.
380344dda7b2Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
380444dda7b2Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
380544dda7b2Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
380644dda7b2Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
380744dda7b2Smrg         $2=yes
380844dda7b2Smrg       fi
380944dda7b2Smrg     else
381044dda7b2Smrg       $2=yes
381144dda7b2Smrg     fi
381244dda7b2Smrg   fi
381344dda7b2Smrg   $RM -r conftest*
381444dda7b2Smrg   LDFLAGS="$save_LDFLAGS"
381544dda7b2Smrg])
381644dda7b2Smrg
381744dda7b2Smrgif test x"[$]$2" = xyes; then
381844dda7b2Smrg    m4_if([$4], , :, [$4])
381944dda7b2Smrgelse
382044dda7b2Smrg    m4_if([$5], , :, [$5])
382144dda7b2Smrgfi
382244dda7b2Smrg])# _LT_LINKER_OPTION
382344dda7b2Smrg
382444dda7b2Smrg# Old name:
382544dda7b2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
382644dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
382744dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
382844dda7b2Smrg
382944dda7b2Smrg
383044dda7b2Smrg# LT_CMD_MAX_LEN
383144dda7b2Smrg#---------------
383244dda7b2SmrgAC_DEFUN([LT_CMD_MAX_LEN],
383344dda7b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
383444dda7b2Smrg# find the maximum length of command line arguments
383544dda7b2SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
383644dda7b2SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
383744dda7b2Smrg  i=0
383844dda7b2Smrg  teststring="ABCD"
383944dda7b2Smrg
384044dda7b2Smrg  case $build_os in
384144dda7b2Smrg  msdosdjgpp*)
384244dda7b2Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
384344dda7b2Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
384444dda7b2Smrg    # during glob expansion).  Even if it were fixed, the result of this
384544dda7b2Smrg    # check would be larger than it should be.
384644dda7b2Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
384744dda7b2Smrg    ;;
384844dda7b2Smrg
384944dda7b2Smrg  gnu*)
385044dda7b2Smrg    # Under GNU Hurd, this test is not required because there is
385144dda7b2Smrg    # no limit to the length of command line arguments.
385244dda7b2Smrg    # Libtool will interpret -1 as no limit whatsoever
385344dda7b2Smrg    lt_cv_sys_max_cmd_len=-1;
385444dda7b2Smrg    ;;
385544dda7b2Smrg
385644dda7b2Smrg  cygwin* | mingw* | cegcc*)
385744dda7b2Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
385844dda7b2Smrg    # about 5 minutes as the teststring grows exponentially.
385944dda7b2Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
386044dda7b2Smrg    # you end up with a "frozen" computer, even though with patience
386144dda7b2Smrg    # the test eventually succeeds (with a max line length of 256k).
386244dda7b2Smrg    # Instead, let's just punt: use the minimum linelength reported by
386344dda7b2Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
386444dda7b2Smrg    lt_cv_sys_max_cmd_len=8192;
386544dda7b2Smrg    ;;
386644dda7b2Smrg
386744dda7b2Smrg  mint*)
386844dda7b2Smrg    # On MiNT this can take a long time and run out of memory.
386944dda7b2Smrg    lt_cv_sys_max_cmd_len=8192;
387044dda7b2Smrg    ;;
387144dda7b2Smrg
387244dda7b2Smrg  amigaos*)
387344dda7b2Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
387444dda7b2Smrg    # So we just punt and use a minimum line length of 8192.
387544dda7b2Smrg    lt_cv_sys_max_cmd_len=8192;
387644dda7b2Smrg    ;;
387744dda7b2Smrg
387844dda7b2Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
387944dda7b2Smrg    # This has been around since 386BSD, at least.  Likely further.
388044dda7b2Smrg    if test -x /sbin/sysctl; then
388144dda7b2Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
388244dda7b2Smrg    elif test -x /usr/sbin/sysctl; then
388344dda7b2Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
388444dda7b2Smrg    else
388544dda7b2Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
388644dda7b2Smrg    fi
388744dda7b2Smrg    # And add a safety zone
388844dda7b2Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
388944dda7b2Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
389044dda7b2Smrg    ;;
389144dda7b2Smrg
389244dda7b2Smrg  interix*)
389344dda7b2Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
389444dda7b2Smrg    lt_cv_sys_max_cmd_len=196608
389544dda7b2Smrg    ;;
389644dda7b2Smrg
389744dda7b2Smrg  osf*)
389844dda7b2Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
389944dda7b2Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
390044dda7b2Smrg    # nice to cause kernel panics so lets avoid the loop below.
390144dda7b2Smrg    # First set a reasonable default.
390244dda7b2Smrg    lt_cv_sys_max_cmd_len=16384
390344dda7b2Smrg    #
390444dda7b2Smrg    if test -x /sbin/sysconfig; then
390544dda7b2Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
390644dda7b2Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
390744dda7b2Smrg      esac
390844dda7b2Smrg    fi
390944dda7b2Smrg    ;;
391044dda7b2Smrg  sco3.2v5*)
391144dda7b2Smrg    lt_cv_sys_max_cmd_len=102400
391244dda7b2Smrg    ;;
391344dda7b2Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
391444dda7b2Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
391544dda7b2Smrg    if test -n "$kargmax"; then
391644dda7b2Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
391744dda7b2Smrg    else
391844dda7b2Smrg      lt_cv_sys_max_cmd_len=32768
391944dda7b2Smrg    fi
392044dda7b2Smrg    ;;
392144dda7b2Smrg  *)
392244dda7b2Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
392344dda7b2Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
392444dda7b2Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
392544dda7b2Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
392644dda7b2Smrg    else
392744dda7b2Smrg      # Make teststring a little bigger before we do anything with it.
392844dda7b2Smrg      # a 1K string should be a reasonable start.
392944dda7b2Smrg      for i in 1 2 3 4 5 6 7 8 ; do
393044dda7b2Smrg        teststring=$teststring$teststring
393144dda7b2Smrg      done
393244dda7b2Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
393344dda7b2Smrg      # If test is not a shell built-in, we'll probably end up computing a
393444dda7b2Smrg      # maximum length that is only half of the actual maximum length, but
393544dda7b2Smrg      # we can't tell.
393644dda7b2Smrg      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
393744dda7b2Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
393844dda7b2Smrg	      test $i != 17 # 1/2 MB should be enough
393944dda7b2Smrg      do
394044dda7b2Smrg        i=`expr $i + 1`
394144dda7b2Smrg        teststring=$teststring$teststring
394244dda7b2Smrg      done
394344dda7b2Smrg      # Only check the string length outside the loop.
394444dda7b2Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
394544dda7b2Smrg      teststring=
394644dda7b2Smrg      # Add a significant safety factor because C++ compilers can tack on
394744dda7b2Smrg      # massive amounts of additional arguments before passing them to the
394844dda7b2Smrg      # linker.  It appears as though 1/2 is a usable value.
394944dda7b2Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
395044dda7b2Smrg    fi
395144dda7b2Smrg    ;;
395244dda7b2Smrg  esac
395344dda7b2Smrg])
395444dda7b2Smrgif test -n $lt_cv_sys_max_cmd_len ; then
395544dda7b2Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
395644dda7b2Smrgelse
395744dda7b2Smrg  AC_MSG_RESULT(none)
395844dda7b2Smrgfi
395944dda7b2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
396044dda7b2Smrg_LT_DECL([], [max_cmd_len], [0],
396144dda7b2Smrg    [What is the maximum length of a command?])
396244dda7b2Smrg])# LT_CMD_MAX_LEN
396344dda7b2Smrg
396444dda7b2Smrg# Old name:
396544dda7b2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
396644dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
396744dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
396844dda7b2Smrg
396944dda7b2Smrg
397044dda7b2Smrg# _LT_HEADER_DLFCN
397144dda7b2Smrg# ----------------
397244dda7b2Smrgm4_defun([_LT_HEADER_DLFCN],
397344dda7b2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
397444dda7b2Smrg])# _LT_HEADER_DLFCN
397544dda7b2Smrg
397644dda7b2Smrg
397744dda7b2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
397844dda7b2Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
397944dda7b2Smrg# ----------------------------------------------------------------
398044dda7b2Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
398144dda7b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl
398244dda7b2Smrgif test "$cross_compiling" = yes; then :
398344dda7b2Smrg  [$4]
398444dda7b2Smrgelse
398544dda7b2Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
398644dda7b2Smrg  lt_status=$lt_dlunknown
398744dda7b2Smrg  cat > conftest.$ac_ext <<_LT_EOF
398844dda7b2Smrg[#line $LINENO "configure"
398944dda7b2Smrg#include "confdefs.h"
399044dda7b2Smrg
399144dda7b2Smrg#if HAVE_DLFCN_H
399244dda7b2Smrg#include <dlfcn.h>
399344dda7b2Smrg#endif
399444dda7b2Smrg
399544dda7b2Smrg#include <stdio.h>
399644dda7b2Smrg
399744dda7b2Smrg#ifdef RTLD_GLOBAL
399844dda7b2Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
399944dda7b2Smrg#else
400044dda7b2Smrg#  ifdef DL_GLOBAL
400144dda7b2Smrg#    define LT_DLGLOBAL		DL_GLOBAL
400244dda7b2Smrg#  else
400344dda7b2Smrg#    define LT_DLGLOBAL		0
400444dda7b2Smrg#  endif
400544dda7b2Smrg#endif
400644dda7b2Smrg
400744dda7b2Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
400844dda7b2Smrg   find out it does not work in some platform. */
400944dda7b2Smrg#ifndef LT_DLLAZY_OR_NOW
401044dda7b2Smrg#  ifdef RTLD_LAZY
401144dda7b2Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
401244dda7b2Smrg#  else
401344dda7b2Smrg#    ifdef DL_LAZY
401444dda7b2Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
401544dda7b2Smrg#    else
401644dda7b2Smrg#      ifdef RTLD_NOW
401744dda7b2Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
401844dda7b2Smrg#      else
401944dda7b2Smrg#        ifdef DL_NOW
402044dda7b2Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
402144dda7b2Smrg#        else
402244dda7b2Smrg#          define LT_DLLAZY_OR_NOW	0
402344dda7b2Smrg#        endif
402444dda7b2Smrg#      endif
402544dda7b2Smrg#    endif
402644dda7b2Smrg#  endif
402744dda7b2Smrg#endif
402844dda7b2Smrg
402944dda7b2Smrg/* When -fvisbility=hidden is used, assume the code has been annotated
403044dda7b2Smrg   correspondingly for the symbols needed.  */
403144dda7b2Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
403244dda7b2Smrgvoid fnord () __attribute__((visibility("default")));
403344dda7b2Smrg#endif
403444dda7b2Smrg
403544dda7b2Smrgvoid fnord () { int i=42; }
403644dda7b2Smrgint main ()
403744dda7b2Smrg{
403844dda7b2Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
403944dda7b2Smrg  int status = $lt_dlunknown;
404044dda7b2Smrg
404144dda7b2Smrg  if (self)
404244dda7b2Smrg    {
404344dda7b2Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
404444dda7b2Smrg      else
404544dda7b2Smrg        {
404644dda7b2Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
404744dda7b2Smrg          else puts (dlerror ());
404844dda7b2Smrg	}
404944dda7b2Smrg      /* dlclose (self); */
405044dda7b2Smrg    }
405144dda7b2Smrg  else
405244dda7b2Smrg    puts (dlerror ());
405344dda7b2Smrg
405444dda7b2Smrg  return status;
405544dda7b2Smrg}]
405644dda7b2Smrg_LT_EOF
405744dda7b2Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
405844dda7b2Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
405944dda7b2Smrg    lt_status=$?
406044dda7b2Smrg    case x$lt_status in
406144dda7b2Smrg      x$lt_dlno_uscore) $1 ;;
406244dda7b2Smrg      x$lt_dlneed_uscore) $2 ;;
406344dda7b2Smrg      x$lt_dlunknown|x*) $3 ;;
4064ff559fabSmrg    esac
406544dda7b2Smrg  else :
406644dda7b2Smrg    # compilation failed
406744dda7b2Smrg    $3
40687a3b38f7Smrg  fi
406944dda7b2Smrgfi
407044dda7b2Smrgrm -fr conftest*
407144dda7b2Smrg])# _LT_TRY_DLOPEN_SELF
4072ff559fabSmrg
4073ff559fabSmrg
407444dda7b2Smrg# LT_SYS_DLOPEN_SELF
407544dda7b2Smrg# ------------------
407644dda7b2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
407744dda7b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl
407844dda7b2Smrgif test "x$enable_dlopen" != xyes; then
407944dda7b2Smrg  enable_dlopen=unknown
408044dda7b2Smrg  enable_dlopen_self=unknown
408144dda7b2Smrg  enable_dlopen_self_static=unknown
408244dda7b2Smrgelse
408344dda7b2Smrg  lt_cv_dlopen=no
408444dda7b2Smrg  lt_cv_dlopen_libs=
4085ff559fabSmrg
408644dda7b2Smrg  case $host_os in
408744dda7b2Smrg  beos*)
408844dda7b2Smrg    lt_cv_dlopen="load_add_on"
408944dda7b2Smrg    lt_cv_dlopen_libs=
409044dda7b2Smrg    lt_cv_dlopen_self=yes
409144dda7b2Smrg    ;;
4092ff559fabSmrg
409344dda7b2Smrg  mingw* | pw32* | cegcc*)
409444dda7b2Smrg    lt_cv_dlopen="LoadLibrary"
409544dda7b2Smrg    lt_cv_dlopen_libs=
409644dda7b2Smrg    ;;
4097ff559fabSmrg
409844dda7b2Smrg  cygwin*)
409944dda7b2Smrg    lt_cv_dlopen="dlopen"
410044dda7b2Smrg    lt_cv_dlopen_libs=
410144dda7b2Smrg    ;;
4102ff559fabSmrg
410344dda7b2Smrg  darwin*)
410444dda7b2Smrg  # if libdl is installed we need to link against it
410544dda7b2Smrg    AC_CHECK_LIB([dl], [dlopen],
410644dda7b2Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
410744dda7b2Smrg    lt_cv_dlopen="dyld"
410844dda7b2Smrg    lt_cv_dlopen_libs=
410944dda7b2Smrg    lt_cv_dlopen_self=yes
411044dda7b2Smrg    ])
411144dda7b2Smrg    ;;
41127a3b38f7Smrg
411344dda7b2Smrg  *)
411444dda7b2Smrg    AC_CHECK_FUNC([shl_load],
411544dda7b2Smrg	  [lt_cv_dlopen="shl_load"],
411644dda7b2Smrg      [AC_CHECK_LIB([dld], [shl_load],
411744dda7b2Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
411844dda7b2Smrg	[AC_CHECK_FUNC([dlopen],
411944dda7b2Smrg	      [lt_cv_dlopen="dlopen"],
412044dda7b2Smrg	  [AC_CHECK_LIB([dl], [dlopen],
412144dda7b2Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
412244dda7b2Smrg	    [AC_CHECK_LIB([svld], [dlopen],
412344dda7b2Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
412444dda7b2Smrg	      [AC_CHECK_LIB([dld], [dld_link],
412544dda7b2Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
412644dda7b2Smrg	      ])
412744dda7b2Smrg	    ])
412844dda7b2Smrg	  ])
412944dda7b2Smrg	])
413044dda7b2Smrg      ])
413144dda7b2Smrg    ;;
413244dda7b2Smrg  esac
41337a3b38f7Smrg
413444dda7b2Smrg  if test "x$lt_cv_dlopen" != xno; then
413544dda7b2Smrg    enable_dlopen=yes
413644dda7b2Smrg  else
413744dda7b2Smrg    enable_dlopen=no
413844dda7b2Smrg  fi
41397a3b38f7Smrg
414044dda7b2Smrg  case $lt_cv_dlopen in
414144dda7b2Smrg  dlopen)
414244dda7b2Smrg    save_CPPFLAGS="$CPPFLAGS"
414344dda7b2Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
41447a3b38f7Smrg
414544dda7b2Smrg    save_LDFLAGS="$LDFLAGS"
414644dda7b2Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
41477a3b38f7Smrg
414844dda7b2Smrg    save_LIBS="$LIBS"
414944dda7b2Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
41507a3b38f7Smrg
415144dda7b2Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
415244dda7b2Smrg	  lt_cv_dlopen_self, [dnl
415344dda7b2Smrg	  _LT_TRY_DLOPEN_SELF(
415444dda7b2Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
415544dda7b2Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
415644dda7b2Smrg    ])
41577a3b38f7Smrg
415844dda7b2Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
415944dda7b2Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
416044dda7b2Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
416144dda7b2Smrg	  lt_cv_dlopen_self_static, [dnl
416244dda7b2Smrg	  _LT_TRY_DLOPEN_SELF(
416344dda7b2Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
416444dda7b2Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
416544dda7b2Smrg      ])
416644dda7b2Smrg    fi
41677a3b38f7Smrg
416844dda7b2Smrg    CPPFLAGS="$save_CPPFLAGS"
416944dda7b2Smrg    LDFLAGS="$save_LDFLAGS"
417044dda7b2Smrg    LIBS="$save_LIBS"
417144dda7b2Smrg    ;;
417244dda7b2Smrg  esac
41737a3b38f7Smrg
417444dda7b2Smrg  case $lt_cv_dlopen_self in
417544dda7b2Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
417644dda7b2Smrg  *) enable_dlopen_self=unknown ;;
417744dda7b2Smrg  esac
41787a3b38f7Smrg
417944dda7b2Smrg  case $lt_cv_dlopen_self_static in
418044dda7b2Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
418144dda7b2Smrg  *) enable_dlopen_self_static=unknown ;;
418244dda7b2Smrg  esac
418344dda7b2Smrgfi
418444dda7b2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
418544dda7b2Smrg	 [Whether dlopen is supported])
418644dda7b2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
418744dda7b2Smrg	 [Whether dlopen of programs is supported])
418844dda7b2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
418944dda7b2Smrg	 [Whether dlopen of statically linked programs is supported])
419044dda7b2Smrg])# LT_SYS_DLOPEN_SELF
41917a3b38f7Smrg
419244dda7b2Smrg# Old name:
419344dda7b2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
419444dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
419544dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
41967a3b38f7Smrg
41977a3b38f7Smrg
419844dda7b2Smrg# _LT_COMPILER_C_O([TAGNAME])
419944dda7b2Smrg# ---------------------------
420044dda7b2Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
420144dda7b2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
420244dda7b2Smrgm4_defun([_LT_COMPILER_C_O],
420344dda7b2Smrg[m4_require([_LT_DECL_SED])dnl
420444dda7b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
420544dda7b2Smrgm4_require([_LT_TAG_COMPILER])dnl
420644dda7b2SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
420744dda7b2Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
420844dda7b2Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
420944dda7b2Smrg   $RM -r conftest 2>/dev/null
421044dda7b2Smrg   mkdir conftest
421144dda7b2Smrg   cd conftest
421244dda7b2Smrg   mkdir out
421344dda7b2Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
42147a3b38f7Smrg
421544dda7b2Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
421644dda7b2Smrg   # Insert the option either (1) after the last *FLAGS variable, or
421744dda7b2Smrg   # (2) before a word containing "conftest.", or (3) at the end.
421844dda7b2Smrg   # Note that $ac_compile itself does not contain backslashes and begins
421944dda7b2Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
422044dda7b2Smrg   lt_compile=`echo "$ac_compile" | $SED \
422144dda7b2Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
422244dda7b2Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
422344dda7b2Smrg   -e 's:$: $lt_compiler_flag:'`
422444dda7b2Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
422544dda7b2Smrg   (eval "$lt_compile" 2>out/conftest.err)
422644dda7b2Smrg   ac_status=$?
422744dda7b2Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
422844dda7b2Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
422944dda7b2Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
423044dda7b2Smrg   then
423144dda7b2Smrg     # The compiler can only warn and ignore the option if not recognized
423244dda7b2Smrg     # So say no if there are warnings
423344dda7b2Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
423444dda7b2Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
423544dda7b2Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
423644dda7b2Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
423744dda7b2Smrg     fi
423844dda7b2Smrg   fi
423944dda7b2Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
424044dda7b2Smrg   $RM conftest*
424144dda7b2Smrg   # SGI C++ compiler will create directory out/ii_files/ for
424244dda7b2Smrg   # template instantiation
424344dda7b2Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
424444dda7b2Smrg   $RM out/* && rmdir out
424544dda7b2Smrg   cd ..
424644dda7b2Smrg   $RM -r conftest
424744dda7b2Smrg   $RM conftest*
424844dda7b2Smrg])
424944dda7b2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
425044dda7b2Smrg	[Does compiler simultaneously support -c and -o options?])
425144dda7b2Smrg])# _LT_COMPILER_C_O
42527a3b38f7Smrg
42537a3b38f7Smrg
425444dda7b2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
425544dda7b2Smrg# ----------------------------------
425644dda7b2Smrg# Check to see if we can do hard links to lock some files if needed
425744dda7b2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
425844dda7b2Smrg[m4_require([_LT_ENABLE_LOCK])dnl
425944dda7b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
426044dda7b2Smrg_LT_COMPILER_C_O([$1])
42617a3b38f7Smrg
426244dda7b2Smrghard_links="nottested"
426344dda7b2Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
426444dda7b2Smrg  # do not overwrite the value of need_locks provided by the user
426544dda7b2Smrg  AC_MSG_CHECKING([if we can lock with hard links])
426644dda7b2Smrg  hard_links=yes
426744dda7b2Smrg  $RM conftest*
426844dda7b2Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
426944dda7b2Smrg  touch conftest.a
427044dda7b2Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
427144dda7b2Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
427244dda7b2Smrg  AC_MSG_RESULT([$hard_links])
427344dda7b2Smrg  if test "$hard_links" = no; then
427444dda7b2Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
427544dda7b2Smrg    need_locks=warn
427644dda7b2Smrg  fi
427744dda7b2Smrgelse
427844dda7b2Smrg  need_locks=no
427944dda7b2Smrgfi
428044dda7b2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
428144dda7b2Smrg])# _LT_COMPILER_FILE_LOCKS
42827a3b38f7Smrg
42837a3b38f7Smrg
428444dda7b2Smrg# _LT_CHECK_OBJDIR
428544dda7b2Smrg# ----------------
428644dda7b2Smrgm4_defun([_LT_CHECK_OBJDIR],
428744dda7b2Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
428844dda7b2Smrg[rm -f .libs 2>/dev/null
428944dda7b2Smrgmkdir .libs 2>/dev/null
429044dda7b2Smrgif test -d .libs; then
429144dda7b2Smrg  lt_cv_objdir=.libs
429244dda7b2Smrgelse
429344dda7b2Smrg  # MS-DOS does not allow filenames that begin with a dot.
429444dda7b2Smrg  lt_cv_objdir=_libs
429544dda7b2Smrgfi
429644dda7b2Smrgrmdir .libs 2>/dev/null])
429744dda7b2Smrgobjdir=$lt_cv_objdir
429844dda7b2Smrg_LT_DECL([], [objdir], [0],
429944dda7b2Smrg         [The name of the directory that contains temporary libtool files])dnl
430044dda7b2Smrgm4_pattern_allow([LT_OBJDIR])dnl
430144dda7b2SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
430244dda7b2Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
430344dda7b2Smrg])# _LT_CHECK_OBJDIR
43047a3b38f7Smrg
43057a3b38f7Smrg
430644dda7b2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
430744dda7b2Smrg# --------------------------------------
430844dda7b2Smrg# Check hardcoding attributes.
430944dda7b2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
431044dda7b2Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
431144dda7b2Smrg_LT_TAGVAR(hardcode_action, $1)=
431244dda7b2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
431344dda7b2Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
431444dda7b2Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4315ff559fabSmrg
431644dda7b2Smrg  # We can hardcode non-existent directories.
431744dda7b2Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
431844dda7b2Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
431944dda7b2Smrg     # have to relink, otherwise we might link with an installed library
432044dda7b2Smrg     # when we should be linking with a yet-to-be-installed one
432144dda7b2Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
432244dda7b2Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
432344dda7b2Smrg    # Linking always hardcodes the temporary library directory.
432444dda7b2Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
432544dda7b2Smrg  else
432644dda7b2Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
432744dda7b2Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
432844dda7b2Smrg  fi
432944dda7b2Smrgelse
433044dda7b2Smrg  # We cannot hardcode anything, or else we can only hardcode existing
433144dda7b2Smrg  # directories.
433244dda7b2Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
43337a3b38f7Smrgfi
433444dda7b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4335ff559fabSmrg
433644dda7b2Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
433744dda7b2Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
433844dda7b2Smrg  # Fast installation is not supported
433944dda7b2Smrg  enable_fast_install=no
434044dda7b2Smrgelif test "$shlibpath_overrides_runpath" = yes ||
434144dda7b2Smrg     test "$enable_shared" = no; then
434244dda7b2Smrg  # Fast installation is not necessary
434344dda7b2Smrg  enable_fast_install=needless
434444dda7b2Smrgfi
434544dda7b2Smrg_LT_TAGDECL([], [hardcode_action], [0],
434644dda7b2Smrg    [How to hardcode a shared library path into an executable])
434744dda7b2Smrg])# _LT_LINKER_HARDCODE_LIBPATH
4348ff559fabSmrg
4349ff559fabSmrg
435044dda7b2Smrg# _LT_CMD_STRIPLIB
435144dda7b2Smrg# ----------------
435244dda7b2Smrgm4_defun([_LT_CMD_STRIPLIB],
435344dda7b2Smrg[m4_require([_LT_DECL_EGREP])
435444dda7b2Smrgstriplib=
435544dda7b2Smrgold_striplib=
435644dda7b2SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
435744dda7b2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
435844dda7b2Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
435944dda7b2Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
436044dda7b2Smrg  AC_MSG_RESULT([yes])
436144dda7b2Smrgelse
436244dda7b2Smrg# FIXME - insert some real tests, host_os isn't really good enough
43637a3b38f7Smrg  case $host_os in
436444dda7b2Smrg  darwin*)
436544dda7b2Smrg    if test -n "$STRIP" ; then
436644dda7b2Smrg      striplib="$STRIP -x"
436744dda7b2Smrg      old_striplib="$STRIP -S"
436844dda7b2Smrg      AC_MSG_RESULT([yes])
436944dda7b2Smrg    else
437044dda7b2Smrg      AC_MSG_RESULT([no])
43717a3b38f7Smrg    fi
43727a3b38f7Smrg    ;;
437344dda7b2Smrg  *)
437444dda7b2Smrg    AC_MSG_RESULT([no])
4375ff559fabSmrg    ;;
4376ff559fabSmrg  esac
437744dda7b2Smrgfi
437844dda7b2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
437944dda7b2Smrg_LT_DECL([], [striplib], [1])
438044dda7b2Smrg])# _LT_CMD_STRIPLIB
4381ff559fabSmrg
4382ff559fabSmrg
438344dda7b2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
438444dda7b2Smrg# -----------------------------
438544dda7b2Smrg# PORTME Fill in your ld.so characteristics
438644dda7b2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
438744dda7b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
438844dda7b2Smrgm4_require([_LT_DECL_EGREP])dnl
438944dda7b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
439044dda7b2Smrgm4_require([_LT_DECL_OBJDUMP])dnl
439144dda7b2Smrgm4_require([_LT_DECL_SED])dnl
439244dda7b2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
439344dda7b2SmrgAC_MSG_CHECKING([dynamic linker characteristics])
439444dda7b2Smrgm4_if([$1],
439544dda7b2Smrg	[], [
439644dda7b2Smrgif test "$GCC" = yes; then
439744dda7b2Smrg  case $host_os in
439844dda7b2Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
439944dda7b2Smrg    *) lt_awk_arg="/^libraries:/" ;;
440044dda7b2Smrg  esac
440144dda7b2Smrg  case $host_os in
440244dda7b2Smrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
440344dda7b2Smrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
440444dda7b2Smrg  esac
440544dda7b2Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
440644dda7b2Smrg  case $lt_search_path_spec in
440744dda7b2Smrg  *\;*)
440844dda7b2Smrg    # if the path contains ";" then we assume it to be the separator
440944dda7b2Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
441044dda7b2Smrg    # assumed that no part of a normal pathname contains ";" but that should
441144dda7b2Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
441244dda7b2Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
441344dda7b2Smrg    ;;
441444dda7b2Smrg  *)
441544dda7b2Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
441644dda7b2Smrg    ;;
441744dda7b2Smrg  esac
441844dda7b2Smrg  # Ok, now we have the path, separated by spaces, we can step through it
441944dda7b2Smrg  # and add multilib dir if necessary.
442044dda7b2Smrg  lt_tmp_lt_search_path_spec=
442144dda7b2Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
442244dda7b2Smrg  for lt_sys_path in $lt_search_path_spec; do
442344dda7b2Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
442444dda7b2Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
44257a3b38f7Smrg    else
442644dda7b2Smrg      test -d "$lt_sys_path" && \
442744dda7b2Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
44287a3b38f7Smrg    fi
442944dda7b2Smrg  done
443044dda7b2Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
443144dda7b2SmrgBEGIN {RS=" "; FS="/|\n";} {
443244dda7b2Smrg  lt_foo="";
443344dda7b2Smrg  lt_count=0;
443444dda7b2Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
443544dda7b2Smrg    if ($lt_i != "" && $lt_i != ".") {
443644dda7b2Smrg      if ($lt_i == "..") {
443744dda7b2Smrg        lt_count++;
443844dda7b2Smrg      } else {
443944dda7b2Smrg        if (lt_count == 0) {
444044dda7b2Smrg          lt_foo="/" $lt_i lt_foo;
444144dda7b2Smrg        } else {
444244dda7b2Smrg          lt_count--;
444344dda7b2Smrg        }
444444dda7b2Smrg      }
444544dda7b2Smrg    }
444644dda7b2Smrg  }
444744dda7b2Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
444844dda7b2Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
444944dda7b2Smrg}'`
445044dda7b2Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
445144dda7b2Smrg  # for these hosts.
445244dda7b2Smrg  case $host_os in
445344dda7b2Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
445444dda7b2Smrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
445544dda7b2Smrg  esac
445644dda7b2Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
445744dda7b2Smrgelse
445844dda7b2Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
445944dda7b2Smrgfi])
446044dda7b2Smrglibrary_names_spec=
446144dda7b2Smrglibname_spec='lib$name'
446244dda7b2Smrgsoname_spec=
446344dda7b2Smrgshrext_cmds=".so"
446444dda7b2Smrgpostinstall_cmds=
446544dda7b2Smrgpostuninstall_cmds=
446644dda7b2Smrgfinish_cmds=
446744dda7b2Smrgfinish_eval=
446844dda7b2Smrgshlibpath_var=
446944dda7b2Smrgshlibpath_overrides_runpath=unknown
447044dda7b2Smrgversion_type=none
447144dda7b2Smrgdynamic_linker="$host_os ld.so"
447244dda7b2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
447344dda7b2Smrgneed_lib_prefix=unknown
447444dda7b2Smrghardcode_into_libs=no
4475ff559fabSmrg
447644dda7b2Smrg# when you set need_version to no, make sure it does not cause -set_version
447744dda7b2Smrg# flags to be left without arguments
447844dda7b2Smrgneed_version=unknown
4479ff559fabSmrg
448044dda7b2Smrgcase $host_os in
448144dda7b2Smrgaix3*)
448244dda7b2Smrg  version_type=linux
448344dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
448444dda7b2Smrg  shlibpath_var=LIBPATH
448544dda7b2Smrg
448644dda7b2Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
448744dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
448844dda7b2Smrg  ;;
448944dda7b2Smrg
449044dda7b2Smrgaix[[4-9]]*)
449144dda7b2Smrg  version_type=linux
449244dda7b2Smrg  need_lib_prefix=no
449344dda7b2Smrg  need_version=no
449444dda7b2Smrg  hardcode_into_libs=yes
449544dda7b2Smrg  if test "$host_cpu" = ia64; then
449644dda7b2Smrg    # AIX 5 supports IA64
449744dda7b2Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
449844dda7b2Smrg    shlibpath_var=LD_LIBRARY_PATH
449944dda7b2Smrg  else
450044dda7b2Smrg    # With GCC up to 2.95.x, collect2 would create an import file
450144dda7b2Smrg    # for dependence libraries.  The import file would start with
450244dda7b2Smrg    # the line `#! .'.  This would cause the generated library to
450344dda7b2Smrg    # depend on `.', always an invalid library.  This was fixed in
450444dda7b2Smrg    # development snapshots of GCC prior to 3.0.
450544dda7b2Smrg    case $host_os in
450644dda7b2Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
450744dda7b2Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
450844dda7b2Smrg	   echo ' yes '
450944dda7b2Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
451044dda7b2Smrg	:
45117a3b38f7Smrg      else
451244dda7b2Smrg	can_build_shared=no
45137a3b38f7Smrg      fi
45147a3b38f7Smrg      ;;
451544dda7b2Smrg    esac
451644dda7b2Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
451744dda7b2Smrg    # soname into executable. Probably we can add versioning support to
451844dda7b2Smrg    # collect2, so additional links can be useful in future.
451944dda7b2Smrg    if test "$aix_use_runtimelinking" = yes; then
452044dda7b2Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
452144dda7b2Smrg      # instead of lib<name>.a to let people know that these are not
452244dda7b2Smrg      # typical AIX shared libraries.
452344dda7b2Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
452444dda7b2Smrg    else
452544dda7b2Smrg      # We preserve .a as extension for shared libraries through AIX4.2
452644dda7b2Smrg      # and later when we are not doing run time linking.
452744dda7b2Smrg      library_names_spec='${libname}${release}.a $libname.a'
452844dda7b2Smrg      soname_spec='${libname}${release}${shared_ext}$major'
452944dda7b2Smrg    fi
453044dda7b2Smrg    shlibpath_var=LIBPATH
453144dda7b2Smrg  fi
453244dda7b2Smrg  ;;
4533ff559fabSmrg
453444dda7b2Smrgamigaos*)
453544dda7b2Smrg  case $host_cpu in
453644dda7b2Smrg  powerpc)
453744dda7b2Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
453844dda7b2Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
453944dda7b2Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
454044dda7b2Smrg    ;;
454144dda7b2Smrg  m68k)
454244dda7b2Smrg    library_names_spec='$libname.ixlibrary $libname.a'
454344dda7b2Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
454444dda7b2Smrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
454544dda7b2Smrg    ;;
454644dda7b2Smrg  esac
454744dda7b2Smrg  ;;
4548ff559fabSmrg
454944dda7b2Smrgbeos*)
455044dda7b2Smrg  library_names_spec='${libname}${shared_ext}'
455144dda7b2Smrg  dynamic_linker="$host_os ld.so"
455244dda7b2Smrg  shlibpath_var=LIBRARY_PATH
455344dda7b2Smrg  ;;
4554ff559fabSmrg
455544dda7b2Smrgbsdi[[45]]*)
455644dda7b2Smrg  version_type=linux
455744dda7b2Smrg  need_version=no
455844dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
455944dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
456044dda7b2Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
456144dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
456244dda7b2Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
456344dda7b2Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
456444dda7b2Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
456544dda7b2Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
456644dda7b2Smrg  # libtool to hard-code these into programs
456744dda7b2Smrg  ;;
456844dda7b2Smrg
456944dda7b2Smrgcygwin* | mingw* | pw32* | cegcc*)
457044dda7b2Smrg  version_type=windows
457144dda7b2Smrg  shrext_cmds=".dll"
457244dda7b2Smrg  need_version=no
457344dda7b2Smrg  need_lib_prefix=no
457444dda7b2Smrg
457544dda7b2Smrg  case $GCC,$host_os in
457644dda7b2Smrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
457744dda7b2Smrg    library_names_spec='$libname.dll.a'
457844dda7b2Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
457944dda7b2Smrg    postinstall_cmds='base_file=`basename \${file}`~
458044dda7b2Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
458144dda7b2Smrg      dldir=$destdir/`dirname \$dlpath`~
458244dda7b2Smrg      test -d \$dldir || mkdir -p \$dldir~
458344dda7b2Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
458444dda7b2Smrg      chmod a+x \$dldir/$dlname~
458544dda7b2Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
458644dda7b2Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
458744dda7b2Smrg      fi'
458844dda7b2Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
458944dda7b2Smrg      dlpath=$dir/\$dldll~
459044dda7b2Smrg       $RM \$dlpath'
459144dda7b2Smrg    shlibpath_overrides_runpath=yes
459244dda7b2Smrg
459344dda7b2Smrg    case $host_os in
459444dda7b2Smrg    cygwin*)
459544dda7b2Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
459644dda7b2Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
459744dda7b2Smrgm4_if([$1], [],[
459844dda7b2Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
459944dda7b2Smrg      ;;
460044dda7b2Smrg    mingw* | cegcc*)
460144dda7b2Smrg      # MinGW DLLs use traditional 'lib' prefix
460244dda7b2Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
460344dda7b2Smrg      ;;
460444dda7b2Smrg    pw32*)
460544dda7b2Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
460644dda7b2Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
46077a3b38f7Smrg      ;;
460844dda7b2Smrg    esac
460944dda7b2Smrg    ;;
4610ff559fabSmrg
461144dda7b2Smrg  *)
461244dda7b2Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
461344dda7b2Smrg    ;;
461444dda7b2Smrg  esac
461544dda7b2Smrg  dynamic_linker='Win32 ld.exe'
461644dda7b2Smrg  # FIXME: first we should search . and the directory the executable is in
461744dda7b2Smrg  shlibpath_var=PATH
461844dda7b2Smrg  ;;
4619ff559fabSmrg
462044dda7b2Smrgdarwin* | rhapsody*)
462144dda7b2Smrg  dynamic_linker="$host_os dyld"
462244dda7b2Smrg  version_type=darwin
462344dda7b2Smrg  need_lib_prefix=no
462444dda7b2Smrg  need_version=no
462544dda7b2Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
462644dda7b2Smrg  soname_spec='${libname}${release}${major}$shared_ext'
462744dda7b2Smrg  shlibpath_overrides_runpath=yes
462844dda7b2Smrg  shlibpath_var=DYLD_LIBRARY_PATH
462944dda7b2Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
463044dda7b2Smrgm4_if([$1], [],[
463144dda7b2Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
463244dda7b2Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
463344dda7b2Smrg  ;;
4634ff559fabSmrg
463544dda7b2Smrgdgux*)
463644dda7b2Smrg  version_type=linux
463744dda7b2Smrg  need_lib_prefix=no
463844dda7b2Smrg  need_version=no
463944dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
464044dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
464144dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
464244dda7b2Smrg  ;;
464344dda7b2Smrg
464444dda7b2Smrgfreebsd1*)
464544dda7b2Smrg  dynamic_linker=no
464644dda7b2Smrg  ;;
464744dda7b2Smrg
464844dda7b2Smrgfreebsd* | dragonfly*)
464944dda7b2Smrg  # DragonFly does not have aout.  When/if they implement a new
465044dda7b2Smrg  # versioning mechanism, adjust this.
465144dda7b2Smrg  if test -x /usr/bin/objformat; then
465244dda7b2Smrg    objformat=`/usr/bin/objformat`
465344dda7b2Smrg  else
465444dda7b2Smrg    case $host_os in
465544dda7b2Smrg    freebsd[[123]]*) objformat=aout ;;
465644dda7b2Smrg    *) objformat=elf ;;
465744dda7b2Smrg    esac
465844dda7b2Smrg  fi
465944dda7b2Smrg  version_type=freebsd-$objformat
466044dda7b2Smrg  case $version_type in
466144dda7b2Smrg    freebsd-elf*)
466244dda7b2Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
466344dda7b2Smrg      need_version=no
466444dda7b2Smrg      need_lib_prefix=no
46657a3b38f7Smrg      ;;
466644dda7b2Smrg    freebsd-*)
466744dda7b2Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
466844dda7b2Smrg      need_version=yes
466944dda7b2Smrg      ;;
467044dda7b2Smrg  esac
467144dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
467244dda7b2Smrg  case $host_os in
467344dda7b2Smrg  freebsd2*)
467444dda7b2Smrg    shlibpath_overrides_runpath=yes
467544dda7b2Smrg    ;;
467644dda7b2Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
467744dda7b2Smrg    shlibpath_overrides_runpath=yes
467844dda7b2Smrg    hardcode_into_libs=yes
467944dda7b2Smrg    ;;
468044dda7b2Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
468144dda7b2Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
468244dda7b2Smrg    shlibpath_overrides_runpath=no
468344dda7b2Smrg    hardcode_into_libs=yes
468444dda7b2Smrg    ;;
468544dda7b2Smrg  *) # from 4.6 on, and DragonFly
468644dda7b2Smrg    shlibpath_overrides_runpath=yes
468744dda7b2Smrg    hardcode_into_libs=yes
468844dda7b2Smrg    ;;
468944dda7b2Smrg  esac
469044dda7b2Smrg  ;;
469144dda7b2Smrg
469244dda7b2Smrggnu*)
469344dda7b2Smrg  version_type=linux
469444dda7b2Smrg  need_lib_prefix=no
469544dda7b2Smrg  need_version=no
469644dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
469744dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
469844dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
469944dda7b2Smrg  hardcode_into_libs=yes
470044dda7b2Smrg  ;;
4701ff559fabSmrg
470244dda7b2Smrghaiku*)
470344dda7b2Smrg  version_type=linux
470444dda7b2Smrg  need_lib_prefix=no
470544dda7b2Smrg  need_version=no
470644dda7b2Smrg  dynamic_linker="$host_os runtime_loader"
470744dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
470844dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
470944dda7b2Smrg  shlibpath_var=LIBRARY_PATH
471044dda7b2Smrg  shlibpath_overrides_runpath=yes
471144dda7b2Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
471244dda7b2Smrg  hardcode_into_libs=yes
471344dda7b2Smrg  ;;
471444dda7b2Smrg
471544dda7b2Smrghpux9* | hpux10* | hpux11*)
471644dda7b2Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
471744dda7b2Smrg  # link against other versions.
471844dda7b2Smrg  version_type=sunos
471944dda7b2Smrg  need_lib_prefix=no
472044dda7b2Smrg  need_version=no
472144dda7b2Smrg  case $host_cpu in
472244dda7b2Smrg  ia64*)
472344dda7b2Smrg    shrext_cmds='.so'
472444dda7b2Smrg    hardcode_into_libs=yes
472544dda7b2Smrg    dynamic_linker="$host_os dld.so"
472644dda7b2Smrg    shlibpath_var=LD_LIBRARY_PATH
472744dda7b2Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
472844dda7b2Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
472944dda7b2Smrg    soname_spec='${libname}${release}${shared_ext}$major'
473044dda7b2Smrg    if test "X$HPUX_IA64_MODE" = X32; then
473144dda7b2Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
473244dda7b2Smrg    else
473344dda7b2Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
473444dda7b2Smrg    fi
473544dda7b2Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
473644dda7b2Smrg    ;;
473744dda7b2Smrg  hppa*64*)
473844dda7b2Smrg    shrext_cmds='.sl'
473944dda7b2Smrg    hardcode_into_libs=yes
474044dda7b2Smrg    dynamic_linker="$host_os dld.sl"
474144dda7b2Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
474244dda7b2Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
474344dda7b2Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
474444dda7b2Smrg    soname_spec='${libname}${release}${shared_ext}$major'
474544dda7b2Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
474644dda7b2Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
474744dda7b2Smrg    ;;
474844dda7b2Smrg  *)
474944dda7b2Smrg    shrext_cmds='.sl'
475044dda7b2Smrg    dynamic_linker="$host_os dld.sl"
475144dda7b2Smrg    shlibpath_var=SHLIB_PATH
475244dda7b2Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
475344dda7b2Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
475444dda7b2Smrg    soname_spec='${libname}${release}${shared_ext}$major'
475544dda7b2Smrg    ;;
475644dda7b2Smrg  esac
475744dda7b2Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
475844dda7b2Smrg  postinstall_cmds='chmod 555 $lib'
475944dda7b2Smrg  # or fails outright, so override atomically:
476044dda7b2Smrg  install_override_mode=555
476144dda7b2Smrg  ;;
476244dda7b2Smrg
476344dda7b2Smrginterix[[3-9]]*)
476444dda7b2Smrg  version_type=linux
476544dda7b2Smrg  need_lib_prefix=no
476644dda7b2Smrg  need_version=no
476744dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
476844dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
476944dda7b2Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
477044dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
477144dda7b2Smrg  shlibpath_overrides_runpath=no
477244dda7b2Smrg  hardcode_into_libs=yes
477344dda7b2Smrg  ;;
4774ff559fabSmrg
477544dda7b2Smrgirix5* | irix6* | nonstopux*)
477644dda7b2Smrg  case $host_os in
477744dda7b2Smrg    nonstopux*) version_type=nonstopux ;;
47787a3b38f7Smrg    *)
477944dda7b2Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
478044dda7b2Smrg		version_type=linux
478144dda7b2Smrg	else
478244dda7b2Smrg		version_type=irix
478344dda7b2Smrg	fi ;;
478444dda7b2Smrg  esac
478544dda7b2Smrg  need_lib_prefix=no
478644dda7b2Smrg  need_version=no
478744dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
478844dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
478944dda7b2Smrg  case $host_os in
479044dda7b2Smrg  irix5* | nonstopux*)
479144dda7b2Smrg    libsuff= shlibsuff=
479244dda7b2Smrg    ;;
479344dda7b2Smrg  *)
479444dda7b2Smrg    case $LD in # libtool.m4 will add one of these switches to LD
479544dda7b2Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
479644dda7b2Smrg      libsuff= shlibsuff= libmagic=32-bit;;
479744dda7b2Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
479844dda7b2Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
479944dda7b2Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
480044dda7b2Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
480144dda7b2Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
48027a3b38f7Smrg    esac
480344dda7b2Smrg    ;;
480444dda7b2Smrg  esac
480544dda7b2Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
480644dda7b2Smrg  shlibpath_overrides_runpath=no
480744dda7b2Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
480844dda7b2Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
480944dda7b2Smrg  hardcode_into_libs=yes
481044dda7b2Smrg  ;;
4811ff559fabSmrg
481244dda7b2Smrg# No shared lib support for Linux oldld, aout, or coff.
481344dda7b2Smrglinux*oldld* | linux*aout* | linux*coff*)
481444dda7b2Smrg  dynamic_linker=no
481544dda7b2Smrg  ;;
4816ff559fabSmrg
481744dda7b2Smrg# This must be Linux ELF.
481844dda7b2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
481944dda7b2Smrg  version_type=linux
482044dda7b2Smrg  need_lib_prefix=no
482144dda7b2Smrg  need_version=no
482244dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
482344dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
482444dda7b2Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
482544dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
482644dda7b2Smrg  shlibpath_overrides_runpath=no
4827ff559fabSmrg
482844dda7b2Smrg  # Some binutils ld are patched to set DT_RUNPATH
482944dda7b2Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
483044dda7b2Smrg    [lt_cv_shlibpath_overrides_runpath=no
483144dda7b2Smrg    save_LDFLAGS=$LDFLAGS
483244dda7b2Smrg    save_libdir=$libdir
483344dda7b2Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
483444dda7b2Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
483544dda7b2Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
483644dda7b2Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
483744dda7b2Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
483844dda7b2Smrg    LDFLAGS=$save_LDFLAGS
483944dda7b2Smrg    libdir=$save_libdir
484044dda7b2Smrg    ])
484144dda7b2Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4842ff559fabSmrg
484344dda7b2Smrg  # This implies no fast_install, which is unacceptable.
484444dda7b2Smrg  # Some rework will be needed to allow for fast_install
484544dda7b2Smrg  # before this can be enabled.
484644dda7b2Smrg  hardcode_into_libs=yes
4847ff559fabSmrg
484844dda7b2Smrg  # Append ld.so.conf contents to the search path
484944dda7b2Smrg  if test -f /etc/ld.so.conf; then
485044dda7b2Smrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
485144dda7b2Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
485244dda7b2Smrg  fi
4853ff559fabSmrg
485444dda7b2Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
485544dda7b2Smrg  # powerpc, because MkLinux only supported shared libraries with the
485644dda7b2Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
485744dda7b2Smrg  # most powerpc-linux boxes support dynamic linking these days and
485844dda7b2Smrg  # people can always --disable-shared, the test was removed, and we
485944dda7b2Smrg  # assume the GNU/Linux dynamic linker is in use.
486044dda7b2Smrg  dynamic_linker='GNU/Linux ld.so'
486144dda7b2Smrg  ;;
4862ff559fabSmrg
486344dda7b2Smrgnetbsd*)
486444dda7b2Smrg  version_type=sunos
486544dda7b2Smrg  need_lib_prefix=no
486644dda7b2Smrg  need_version=no
486744dda7b2Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
486844dda7b2Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
486944dda7b2Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
487044dda7b2Smrg    dynamic_linker='NetBSD (a.out) ld.so'
487144dda7b2Smrg  else
487244dda7b2Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
487344dda7b2Smrg    soname_spec='${libname}${release}${shared_ext}$major'
487444dda7b2Smrg    dynamic_linker='NetBSD ld.elf_so'
487544dda7b2Smrg  fi
487644dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
487744dda7b2Smrg  shlibpath_overrides_runpath=yes
487844dda7b2Smrg  hardcode_into_libs=yes
487944dda7b2Smrg  ;;
4880ff559fabSmrg
488144dda7b2Smrgnewsos6)
488244dda7b2Smrg  version_type=linux
488344dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
488444dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
488544dda7b2Smrg  shlibpath_overrides_runpath=yes
488644dda7b2Smrg  ;;
4887ff559fabSmrg
488844dda7b2Smrg*nto* | *qnx*)
488944dda7b2Smrg  version_type=qnx
489044dda7b2Smrg  need_lib_prefix=no
489144dda7b2Smrg  need_version=no
489244dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
489344dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
489444dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
489544dda7b2Smrg  shlibpath_overrides_runpath=no
489644dda7b2Smrg  hardcode_into_libs=yes
489744dda7b2Smrg  dynamic_linker='ldqnx.so'
489844dda7b2Smrg  ;;
489944dda7b2Smrg
490044dda7b2Smrgopenbsd*)
490144dda7b2Smrg  version_type=sunos
490244dda7b2Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
490344dda7b2Smrg  need_lib_prefix=no
490444dda7b2Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
490544dda7b2Smrg  case $host_os in
490644dda7b2Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
490744dda7b2Smrg    *)				need_version=no  ;;
490844dda7b2Smrg  esac
490944dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
491044dda7b2Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
491144dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
491244dda7b2Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
491344dda7b2Smrg    case $host_os in
491444dda7b2Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
491544dda7b2Smrg	shlibpath_overrides_runpath=no
491644dda7b2Smrg	;;
491744dda7b2Smrg      *)
491844dda7b2Smrg	shlibpath_overrides_runpath=yes
491944dda7b2Smrg	;;
49207a3b38f7Smrg      esac
492144dda7b2Smrg  else
492244dda7b2Smrg    shlibpath_overrides_runpath=yes
492344dda7b2Smrg  fi
492444dda7b2Smrg  ;;
4925ff559fabSmrg
492644dda7b2Smrgos2*)
492744dda7b2Smrg  libname_spec='$name'
492844dda7b2Smrg  shrext_cmds=".dll"
492944dda7b2Smrg  need_lib_prefix=no
493044dda7b2Smrg  library_names_spec='$libname${shared_ext} $libname.a'
493144dda7b2Smrg  dynamic_linker='OS/2 ld.exe'
493244dda7b2Smrg  shlibpath_var=LIBPATH
493344dda7b2Smrg  ;;
4934ff559fabSmrg
493544dda7b2Smrgosf3* | osf4* | osf5*)
493644dda7b2Smrg  version_type=osf
493744dda7b2Smrg  need_lib_prefix=no
493844dda7b2Smrg  need_version=no
493944dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
494044dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
494144dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
494244dda7b2Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
494344dda7b2Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
494444dda7b2Smrg  ;;
4945ff559fabSmrg
494644dda7b2Smrgrdos*)
494744dda7b2Smrg  dynamic_linker=no
494844dda7b2Smrg  ;;
4949ff559fabSmrg
495044dda7b2Smrgsolaris*)
495144dda7b2Smrg  version_type=linux
495244dda7b2Smrg  need_lib_prefix=no
495344dda7b2Smrg  need_version=no
495444dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
495544dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
495644dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
495744dda7b2Smrg  shlibpath_overrides_runpath=yes
495844dda7b2Smrg  hardcode_into_libs=yes
495944dda7b2Smrg  # ldd complains unless libraries are executable
496044dda7b2Smrg  postinstall_cmds='chmod +x $lib'
496144dda7b2Smrg  ;;
4962ff559fabSmrg
496344dda7b2Smrgsunos4*)
496444dda7b2Smrg  version_type=sunos
496544dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
496644dda7b2Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
496744dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
496844dda7b2Smrg  shlibpath_overrides_runpath=yes
496944dda7b2Smrg  if test "$with_gnu_ld" = yes; then
497044dda7b2Smrg    need_lib_prefix=no
497144dda7b2Smrg  fi
497244dda7b2Smrg  need_version=yes
497344dda7b2Smrg  ;;
4974ff559fabSmrg
497544dda7b2Smrgsysv4 | sysv4.3*)
497644dda7b2Smrg  version_type=linux
497744dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
497844dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
497944dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
498044dda7b2Smrg  case $host_vendor in
498144dda7b2Smrg    sni)
498244dda7b2Smrg      shlibpath_overrides_runpath=no
498344dda7b2Smrg      need_lib_prefix=no
498444dda7b2Smrg      runpath_var=LD_RUN_PATH
49857a3b38f7Smrg      ;;
498644dda7b2Smrg    siemens)
498744dda7b2Smrg      need_lib_prefix=no
4988ff559fabSmrg      ;;
498944dda7b2Smrg    motorola)
499044dda7b2Smrg      need_lib_prefix=no
499144dda7b2Smrg      need_version=no
499244dda7b2Smrg      shlibpath_overrides_runpath=no
499344dda7b2Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4994ff559fabSmrg      ;;
499544dda7b2Smrg  esac
499644dda7b2Smrg  ;;
4997ff559fabSmrg
499844dda7b2Smrgsysv4*MP*)
499944dda7b2Smrg  if test -d /usr/nec ;then
500044dda7b2Smrg    version_type=linux
500144dda7b2Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
500244dda7b2Smrg    soname_spec='$libname${shared_ext}.$major'
500344dda7b2Smrg    shlibpath_var=LD_LIBRARY_PATH
500444dda7b2Smrg  fi
500544dda7b2Smrg  ;;
5006ff559fabSmrg
500744dda7b2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
500844dda7b2Smrg  version_type=freebsd-elf
500944dda7b2Smrg  need_lib_prefix=no
501044dda7b2Smrg  need_version=no
501144dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
501244dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
501344dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
501444dda7b2Smrg  shlibpath_overrides_runpath=yes
501544dda7b2Smrg  hardcode_into_libs=yes
501644dda7b2Smrg  if test "$with_gnu_ld" = yes; then
501744dda7b2Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
501844dda7b2Smrg  else
501944dda7b2Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
502044dda7b2Smrg    case $host_os in
502144dda7b2Smrg      sco3.2v5*)
502244dda7b2Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
502344dda7b2Smrg	;;
502444dda7b2Smrg    esac
502544dda7b2Smrg  fi
502644dda7b2Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
502744dda7b2Smrg  ;;
5028ff559fabSmrg
502944dda7b2Smrgtpf*)
503044dda7b2Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
503144dda7b2Smrg  version_type=linux
503244dda7b2Smrg  need_lib_prefix=no
503344dda7b2Smrg  need_version=no
503444dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
503544dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
503644dda7b2Smrg  shlibpath_overrides_runpath=no
503744dda7b2Smrg  hardcode_into_libs=yes
503844dda7b2Smrg  ;;
5039ff559fabSmrg
504044dda7b2Smrguts4*)
504144dda7b2Smrg  version_type=linux
504244dda7b2Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
504344dda7b2Smrg  soname_spec='${libname}${release}${shared_ext}$major'
504444dda7b2Smrg  shlibpath_var=LD_LIBRARY_PATH
504544dda7b2Smrg  ;;
5046ff559fabSmrg
504744dda7b2Smrg*)
504844dda7b2Smrg  dynamic_linker=no
504944dda7b2Smrg  ;;
505044dda7b2Smrgesac
505144dda7b2SmrgAC_MSG_RESULT([$dynamic_linker])
505244dda7b2Smrgtest "$dynamic_linker" = no && can_build_shared=no
5053ff559fabSmrg
505444dda7b2Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
505544dda7b2Smrgif test "$GCC" = yes; then
505644dda7b2Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
505744dda7b2Smrgfi
5058ff559fabSmrg
505944dda7b2Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
506044dda7b2Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
506144dda7b2Smrgfi
506244dda7b2Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
506344dda7b2Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
506444dda7b2Smrgfi
5065ff559fabSmrg
506644dda7b2Smrg_LT_DECL([], [variables_saved_for_relink], [1],
506744dda7b2Smrg    [Variables whose values should be saved in libtool wrapper scripts and
506844dda7b2Smrg    restored at link time])
506944dda7b2Smrg_LT_DECL([], [need_lib_prefix], [0],
507044dda7b2Smrg    [Do we need the "lib" prefix for modules?])
507144dda7b2Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
507244dda7b2Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
507344dda7b2Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
507444dda7b2Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
507544dda7b2Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
507644dda7b2Smrg    [Is shlibpath searched before the hard-coded library search path?])
507744dda7b2Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
507844dda7b2Smrg_LT_DECL([], [library_names_spec], [1],
507944dda7b2Smrg    [[List of archive names.  First name is the real one, the rest are links.
508044dda7b2Smrg    The last name is the one that the linker finds with -lNAME]])
508144dda7b2Smrg_LT_DECL([], [soname_spec], [1],
508244dda7b2Smrg    [[The coded name of the library, if different from the real name]])
508344dda7b2Smrg_LT_DECL([], [install_override_mode], [1],
508444dda7b2Smrg    [Permission mode override for installation of shared libraries])
508544dda7b2Smrg_LT_DECL([], [postinstall_cmds], [2],
508644dda7b2Smrg    [Command to use after installation of a shared archive])
508744dda7b2Smrg_LT_DECL([], [postuninstall_cmds], [2],
508844dda7b2Smrg    [Command to use after uninstallation of a shared archive])
508944dda7b2Smrg_LT_DECL([], [finish_cmds], [2],
509044dda7b2Smrg    [Commands used to finish a libtool library installation in a directory])
509144dda7b2Smrg_LT_DECL([], [finish_eval], [1],
509244dda7b2Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
509344dda7b2Smrg    not shown]])
509444dda7b2Smrg_LT_DECL([], [hardcode_into_libs], [0],
509544dda7b2Smrg    [Whether we should hardcode library paths into libraries])
509644dda7b2Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
509744dda7b2Smrg    [Compile-time system search path for libraries])
509844dda7b2Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
509944dda7b2Smrg    [Run-time system search path for libraries])
510044dda7b2Smrg])# _LT_SYS_DYNAMIC_LINKER
5101ff559fabSmrg
5102ff559fabSmrg
510344dda7b2Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
510444dda7b2Smrg# --------------------------
510544dda7b2Smrg# find a file program which can recognize shared library
510644dda7b2SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
510744dda7b2Smrg[m4_require([_LT_DECL_EGREP])dnl
510844dda7b2SmrgAC_MSG_CHECKING([for $1])
510944dda7b2SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
511044dda7b2Smrg[case $MAGIC_CMD in
511144dda7b2Smrg[[\\/*] |  ?:[\\/]*])
511244dda7b2Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
511344dda7b2Smrg  ;;
511444dda7b2Smrg*)
511544dda7b2Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
511644dda7b2Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
511744dda7b2Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
511844dda7b2Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
511944dda7b2Smrgdnl not every word.  This closes a longstanding sh security hole.
512044dda7b2Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
512144dda7b2Smrg  for ac_dir in $ac_dummy; do
512244dda7b2Smrg    IFS="$lt_save_ifs"
512344dda7b2Smrg    test -z "$ac_dir" && ac_dir=.
512444dda7b2Smrg    if test -f $ac_dir/$1; then
512544dda7b2Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
512644dda7b2Smrg      if test -n "$file_magic_test_file"; then
512744dda7b2Smrg	case $deplibs_check_method in
512844dda7b2Smrg	"file_magic "*)
512944dda7b2Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
513044dda7b2Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
513144dda7b2Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
513244dda7b2Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
513344dda7b2Smrg	    :
513444dda7b2Smrg	  else
513544dda7b2Smrg	    cat <<_LT_EOF 1>&2
5136ff559fabSmrg
513744dda7b2Smrg*** Warning: the command libtool uses to detect shared libraries,
513844dda7b2Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
513944dda7b2Smrg*** The result is that libtool may fail to recognize shared libraries
514044dda7b2Smrg*** as such.  This will affect the creation of libtool libraries that
514144dda7b2Smrg*** depend on shared libraries, but programs linked with such libtool
514244dda7b2Smrg*** libraries will work regardless of this problem.  Nevertheless, you
514344dda7b2Smrg*** may want to report the problem to your system manager and/or to
514444dda7b2Smrg*** bug-libtool@gnu.org
514544dda7b2Smrg
514644dda7b2Smrg_LT_EOF
514744dda7b2Smrg	  fi ;;
514844dda7b2Smrg	esac
51497a3b38f7Smrg      fi
515044dda7b2Smrg      break
515144dda7b2Smrg    fi
515244dda7b2Smrg  done
515344dda7b2Smrg  IFS="$lt_save_ifs"
515444dda7b2Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
515544dda7b2Smrg  ;;
515644dda7b2Smrgesac])
515744dda7b2SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
515844dda7b2Smrgif test -n "$MAGIC_CMD"; then
515944dda7b2Smrg  AC_MSG_RESULT($MAGIC_CMD)
516044dda7b2Smrgelse
516144dda7b2Smrg  AC_MSG_RESULT(no)
516244dda7b2Smrgfi
516344dda7b2Smrg_LT_DECL([], [MAGIC_CMD], [0],
516444dda7b2Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
516544dda7b2Smrg])# _LT_PATH_TOOL_PREFIX
516644dda7b2Smrg
516744dda7b2Smrg# Old name:
516844dda7b2SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
516944dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
517044dda7b2Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5171ff559fabSmrg
5172ff559fabSmrg
517344dda7b2Smrg# _LT_PATH_MAGIC
517444dda7b2Smrg# --------------
517544dda7b2Smrg# find a file program which can recognize a shared library
517644dda7b2Smrgm4_defun([_LT_PATH_MAGIC],
517744dda7b2Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
517844dda7b2Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
517944dda7b2Smrg  if test -n "$ac_tool_prefix"; then
518044dda7b2Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
518144dda7b2Smrg  else
518244dda7b2Smrg    MAGIC_CMD=:
518344dda7b2Smrg  fi
518444dda7b2Smrgfi
518544dda7b2Smrg])# _LT_PATH_MAGIC
5186ff559fabSmrg
5187ff559fabSmrg
518844dda7b2Smrg# LT_PATH_LD
518944dda7b2Smrg# ----------
519044dda7b2Smrg# find the pathname to the GNU or non-GNU linker
519144dda7b2SmrgAC_DEFUN([LT_PATH_LD],
519244dda7b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl
519344dda7b2SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
519444dda7b2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
519544dda7b2Smrgm4_require([_LT_DECL_SED])dnl
519644dda7b2Smrgm4_require([_LT_DECL_EGREP])dnl
519744dda7b2Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5198ff559fabSmrg
519944dda7b2SmrgAC_ARG_WITH([gnu-ld],
520044dda7b2Smrg    [AS_HELP_STRING([--with-gnu-ld],
520144dda7b2Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
520244dda7b2Smrg    [test "$withval" = no || with_gnu_ld=yes],
520344dda7b2Smrg    [with_gnu_ld=no])dnl
5204ff559fabSmrg
520544dda7b2Smrgac_prog=ld
520644dda7b2Smrgif test "$GCC" = yes; then
520744dda7b2Smrg  # Check if gcc -print-prog-name=ld gives a path.
520844dda7b2Smrg  AC_MSG_CHECKING([for ld used by $CC])
520944dda7b2Smrg  case $host in
521044dda7b2Smrg  *-*-mingw*)
521144dda7b2Smrg    # gcc leaves a trailing carriage return which upsets mingw
521244dda7b2Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
521344dda7b2Smrg  *)
521444dda7b2Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
521544dda7b2Smrg  esac
521644dda7b2Smrg  case $ac_prog in
521744dda7b2Smrg    # Accept absolute paths.
521844dda7b2Smrg    [[\\/]]* | ?:[[\\/]]*)
521944dda7b2Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
522044dda7b2Smrg      # Canonicalize the pathname of ld
522144dda7b2Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
522244dda7b2Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
522344dda7b2Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
522444dda7b2Smrg      done
522544dda7b2Smrg      test -z "$LD" && LD="$ac_prog"
52267a3b38f7Smrg      ;;
522744dda7b2Smrg  "")
522844dda7b2Smrg    # If it fails, then pretend we aren't using GCC.
522944dda7b2Smrg    ac_prog=ld
523044dda7b2Smrg    ;;
523144dda7b2Smrg  *)
523244dda7b2Smrg    # If it is relative, then search for the first ld in PATH.
523344dda7b2Smrg    with_gnu_ld=unknown
523444dda7b2Smrg    ;;
523544dda7b2Smrg  esac
523644dda7b2Smrgelif test "$with_gnu_ld" = yes; then
523744dda7b2Smrg  AC_MSG_CHECKING([for GNU ld])
523844dda7b2Smrgelse
523944dda7b2Smrg  AC_MSG_CHECKING([for non-GNU ld])
524044dda7b2Smrgfi
524144dda7b2SmrgAC_CACHE_VAL(lt_cv_path_LD,
524244dda7b2Smrg[if test -z "$LD"; then
524344dda7b2Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
524444dda7b2Smrg  for ac_dir in $PATH; do
524544dda7b2Smrg    IFS="$lt_save_ifs"
524644dda7b2Smrg    test -z "$ac_dir" && ac_dir=.
524744dda7b2Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
524844dda7b2Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
524944dda7b2Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
525044dda7b2Smrg      # but apparently some variants of GNU ld only accept -v.
525144dda7b2Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
525244dda7b2Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
525344dda7b2Smrg      *GNU* | *'with BFD'*)
525444dda7b2Smrg	test "$with_gnu_ld" != no && break
52557a3b38f7Smrg	;;
525644dda7b2Smrg      *)
525744dda7b2Smrg	test "$with_gnu_ld" != yes && break
52587a3b38f7Smrg	;;
52597a3b38f7Smrg      esac
526044dda7b2Smrg    fi
526144dda7b2Smrg  done
526244dda7b2Smrg  IFS="$lt_save_ifs"
526344dda7b2Smrgelse
526444dda7b2Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
526544dda7b2Smrgfi])
526644dda7b2SmrgLD="$lt_cv_path_LD"
526744dda7b2Smrgif test -n "$LD"; then
526844dda7b2Smrg  AC_MSG_RESULT($LD)
526944dda7b2Smrgelse
527044dda7b2Smrg  AC_MSG_RESULT(no)
527144dda7b2Smrgfi
527244dda7b2Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
527344dda7b2Smrg_LT_PATH_LD_GNU
527444dda7b2SmrgAC_SUBST([LD])
5275ff559fabSmrg
527644dda7b2Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
527744dda7b2Smrg])# LT_PATH_LD
5278ff559fabSmrg
527944dda7b2Smrg# Old names:
528044dda7b2SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
528144dda7b2SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
528244dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
528344dda7b2Smrgdnl AC_DEFUN([AM_PROG_LD], [])
528444dda7b2Smrgdnl AC_DEFUN([AC_PROG_LD], [])
528544dda7b2Smrg
528644dda7b2Smrg
528744dda7b2Smrg# _LT_PATH_LD_GNU
528844dda7b2Smrg#- --------------
528944dda7b2Smrgm4_defun([_LT_PATH_LD_GNU],
529044dda7b2Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
529144dda7b2Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
529244dda7b2Smrgcase `$LD -v 2>&1 </dev/null` in
529344dda7b2Smrg*GNU* | *'with BFD'*)
529444dda7b2Smrg  lt_cv_prog_gnu_ld=yes
529544dda7b2Smrg  ;;
529644dda7b2Smrg*)
529744dda7b2Smrg  lt_cv_prog_gnu_ld=no
529844dda7b2Smrg  ;;
529944dda7b2Smrgesac])
530044dda7b2Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
530144dda7b2Smrg])# _LT_PATH_LD_GNU
530244dda7b2Smrg
530344dda7b2Smrg
530444dda7b2Smrg# _LT_CMD_RELOAD
530544dda7b2Smrg# --------------
530644dda7b2Smrg# find reload flag for linker
530744dda7b2Smrg#   -- PORTME Some linkers may need a different reload flag.
530844dda7b2Smrgm4_defun([_LT_CMD_RELOAD],
530944dda7b2Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
531044dda7b2Smrg  lt_cv_ld_reload_flag,
531144dda7b2Smrg  [lt_cv_ld_reload_flag='-r'])
531244dda7b2Smrgreload_flag=$lt_cv_ld_reload_flag
531344dda7b2Smrgcase $reload_flag in
531444dda7b2Smrg"" | " "*) ;;
531544dda7b2Smrg*) reload_flag=" $reload_flag" ;;
531644dda7b2Smrgesac
531744dda7b2Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
531844dda7b2Smrgcase $host_os in
531944dda7b2Smrg  darwin*)
532044dda7b2Smrg    if test "$GCC" = yes; then
532144dda7b2Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
532244dda7b2Smrg    else
532344dda7b2Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
532444dda7b2Smrg    fi
532544dda7b2Smrg    ;;
532644dda7b2Smrgesac
532744dda7b2Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
532844dda7b2Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
532944dda7b2Smrg])# _LT_CMD_RELOAD
5330ff559fabSmrg
5331ff559fabSmrg
533244dda7b2Smrg# _LT_CHECK_MAGIC_METHOD
533344dda7b2Smrg# ----------------------
533444dda7b2Smrg# how to check for library dependencies
533544dda7b2Smrg#  -- PORTME fill in with the dynamic library characteristics
533644dda7b2Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
533744dda7b2Smrg[m4_require([_LT_DECL_EGREP])
533844dda7b2Smrgm4_require([_LT_DECL_OBJDUMP])
533944dda7b2SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
534044dda7b2Smrglt_cv_deplibs_check_method,
534144dda7b2Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
534244dda7b2Smrglt_cv_file_magic_test_file=
534344dda7b2Smrglt_cv_deplibs_check_method='unknown'
534444dda7b2Smrg# Need to set the preceding variable on all platforms that support
534544dda7b2Smrg# interlibrary dependencies.
534644dda7b2Smrg# 'none' -- dependencies not supported.
534744dda7b2Smrg# `unknown' -- same as none, but documents that we really don't know.
534844dda7b2Smrg# 'pass_all' -- all dependencies passed with no checks.
534944dda7b2Smrg# 'test_compile' -- check by making test program.
535044dda7b2Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
535144dda7b2Smrg# which responds to the $file_magic_cmd with a given extended regex.
535244dda7b2Smrg# If you have `file' or equivalent on your system and you're not sure
535344dda7b2Smrg# whether `pass_all' will *always* work, you probably want this one.
5354ff559fabSmrg
535544dda7b2Smrgcase $host_os in
535644dda7b2Smrgaix[[4-9]]*)
535744dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
535844dda7b2Smrg  ;;
5359ff559fabSmrg
536044dda7b2Smrgbeos*)
536144dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
536244dda7b2Smrg  ;;
5363ff559fabSmrg
536444dda7b2Smrgbsdi[[45]]*)
536544dda7b2Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
536644dda7b2Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
536744dda7b2Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
536844dda7b2Smrg  ;;
5369ff559fabSmrg
537044dda7b2Smrgcygwin*)
537144dda7b2Smrg  # func_win32_libid is a shell function defined in ltmain.sh
537244dda7b2Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
537344dda7b2Smrg  lt_cv_file_magic_cmd='func_win32_libid'
537444dda7b2Smrg  ;;
5375ff559fabSmrg
537644dda7b2Smrgmingw* | pw32*)
537744dda7b2Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
537844dda7b2Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
537944dda7b2Smrg  # unless we find 'file', for example because we are cross-compiling.
538044dda7b2Smrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
538144dda7b2Smrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
538244dda7b2Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
538344dda7b2Smrg    lt_cv_file_magic_cmd='func_win32_libid'
538444dda7b2Smrg  else
538544dda7b2Smrg    # Keep this pattern in sync with the one in func_win32_libid.
538644dda7b2Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
538744dda7b2Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
53887a3b38f7Smrg  fi
538944dda7b2Smrg  ;;
5390ff559fabSmrg
539144dda7b2Smrgcegcc*)
539244dda7b2Smrg  # use the weaker test based on 'objdump'. See mingw*.
539344dda7b2Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
539444dda7b2Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
539544dda7b2Smrg  ;;
5396ff559fabSmrg
539744dda7b2Smrgdarwin* | rhapsody*)
539844dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
539944dda7b2Smrg  ;;
5400ff559fabSmrg
540144dda7b2Smrgfreebsd* | dragonfly*)
540244dda7b2Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
540344dda7b2Smrg    case $host_cpu in
540444dda7b2Smrg    i*86 )
540544dda7b2Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
540644dda7b2Smrg      # Let's accept both of them until this is cleared up.
540744dda7b2Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
540844dda7b2Smrg      lt_cv_file_magic_cmd=/usr/bin/file
540944dda7b2Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
54107a3b38f7Smrg      ;;
54117a3b38f7Smrg    esac
541244dda7b2Smrg  else
541344dda7b2Smrg    lt_cv_deplibs_check_method=pass_all
54147a3b38f7Smrg  fi
54157a3b38f7Smrg  ;;
5416ff559fabSmrg
541744dda7b2Smrggnu*)
541844dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
541944dda7b2Smrg  ;;
54207a3b38f7Smrg
542144dda7b2Smrghaiku*)
542244dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
542344dda7b2Smrg  ;;
54247a3b38f7Smrg
542544dda7b2Smrghpux10.20* | hpux11*)
542644dda7b2Smrg  lt_cv_file_magic_cmd=/usr/bin/file
542744dda7b2Smrg  case $host_cpu in
542844dda7b2Smrg  ia64*)
542944dda7b2Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
543044dda7b2Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
543144dda7b2Smrg    ;;
543244dda7b2Smrg  hppa*64*)
543344dda7b2Smrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
543444dda7b2Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
543544dda7b2Smrg    ;;
543644dda7b2Smrg  *)
543744dda7b2Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
543844dda7b2Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
543944dda7b2Smrg    ;;
544044dda7b2Smrg  esac
544144dda7b2Smrg  ;;
5442ff559fabSmrg
544344dda7b2Smrginterix[[3-9]]*)
544444dda7b2Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
544544dda7b2Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
544644dda7b2Smrg  ;;
5447ff559fabSmrg
544844dda7b2Smrgirix5* | irix6* | nonstopux*)
544944dda7b2Smrg  case $LD in
545044dda7b2Smrg  *-32|*"-32 ") libmagic=32-bit;;
545144dda7b2Smrg  *-n32|*"-n32 ") libmagic=N32;;
545244dda7b2Smrg  *-64|*"-64 ") libmagic=64-bit;;
545344dda7b2Smrg  *) libmagic=never-match;;
545444dda7b2Smrg  esac
545544dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
545644dda7b2Smrg  ;;
5457ff559fabSmrg
545844dda7b2Smrg# This must be Linux ELF.
545944dda7b2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
546044dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
546144dda7b2Smrg  ;;
5462ff559fabSmrg
546344dda7b2Smrgnetbsd*)
546444dda7b2Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
546544dda7b2Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
546644dda7b2Smrg  else
546744dda7b2Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
546844dda7b2Smrg  fi
546944dda7b2Smrg  ;;
5470ff559fabSmrg
547144dda7b2Smrgnewos6*)
547244dda7b2Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
547344dda7b2Smrg  lt_cv_file_magic_cmd=/usr/bin/file
547444dda7b2Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
547544dda7b2Smrg  ;;
5476ff559fabSmrg
547744dda7b2Smrg*nto* | *qnx*)
547844dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
547944dda7b2Smrg  ;;
5480ff559fabSmrg
548144dda7b2Smrgopenbsd*)
548244dda7b2Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
548344dda7b2Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
548444dda7b2Smrg  else
548544dda7b2Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
548644dda7b2Smrg  fi
548744dda7b2Smrg  ;;
54887a3b38f7Smrg
548944dda7b2Smrgosf3* | osf4* | osf5*)
549044dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
549144dda7b2Smrg  ;;
54927a3b38f7Smrg
549344dda7b2Smrgrdos*)
549444dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
549544dda7b2Smrg  ;;
54967a3b38f7Smrg
549744dda7b2Smrgsolaris*)
549844dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
549944dda7b2Smrg  ;;
5500ff559fabSmrg
550144dda7b2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
550244dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
550344dda7b2Smrg  ;;
550444dda7b2Smrg
550544dda7b2Smrgsysv4 | sysv4.3*)
550644dda7b2Smrg  case $host_vendor in
550744dda7b2Smrg  motorola)
550844dda7b2Smrg    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]]'
550944dda7b2Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
551044dda7b2Smrg    ;;
551144dda7b2Smrg  ncr)
551244dda7b2Smrg    lt_cv_deplibs_check_method=pass_all
551344dda7b2Smrg    ;;
551444dda7b2Smrg  sequent)
551544dda7b2Smrg    lt_cv_file_magic_cmd='/bin/file'
551644dda7b2Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
551744dda7b2Smrg    ;;
551844dda7b2Smrg  sni)
551944dda7b2Smrg    lt_cv_file_magic_cmd='/bin/file'
552044dda7b2Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
552144dda7b2Smrg    lt_cv_file_magic_test_file=/lib/libc.so
552244dda7b2Smrg    ;;
552344dda7b2Smrg  siemens)
552444dda7b2Smrg    lt_cv_deplibs_check_method=pass_all
552544dda7b2Smrg    ;;
552644dda7b2Smrg  pc)
552744dda7b2Smrg    lt_cv_deplibs_check_method=pass_all
55287a3b38f7Smrg    ;;
55297a3b38f7Smrg  esac
553044dda7b2Smrg  ;;
5531ff559fabSmrg
553244dda7b2Smrgtpf*)
553344dda7b2Smrg  lt_cv_deplibs_check_method=pass_all
553444dda7b2Smrg  ;;
553544dda7b2Smrgesac
553644dda7b2Smrg])
553744dda7b2Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
553844dda7b2Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
553944dda7b2Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
5540ff559fabSmrg
554144dda7b2Smrg_LT_DECL([], [deplibs_check_method], [1],
554244dda7b2Smrg    [Method to check whether dependent libraries are shared objects])
554344dda7b2Smrg_LT_DECL([], [file_magic_cmd], [1],
554444dda7b2Smrg    [Command to use when deplibs_check_method == "file_magic"])
554544dda7b2Smrg])# _LT_CHECK_MAGIC_METHOD
5546ff559fabSmrg
5547ff559fabSmrg
554844dda7b2Smrg# LT_PATH_NM
554944dda7b2Smrg# ----------
555044dda7b2Smrg# find the pathname to a BSD- or MS-compatible name lister
555144dda7b2SmrgAC_DEFUN([LT_PATH_NM],
555244dda7b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl
555344dda7b2SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
555444dda7b2Smrg[if test -n "$NM"; then
555544dda7b2Smrg  # Let the user override the test.
555644dda7b2Smrg  lt_cv_path_NM="$NM"
55577a3b38f7Smrgelse
555844dda7b2Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
555944dda7b2Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
556044dda7b2Smrg    lt_nm_to_check="$lt_nm_to_check nm"
556144dda7b2Smrg  fi
556244dda7b2Smrg  for lt_tmp_nm in $lt_nm_to_check; do
556344dda7b2Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
556444dda7b2Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
556544dda7b2Smrg      IFS="$lt_save_ifs"
556644dda7b2Smrg      test -z "$ac_dir" && ac_dir=.
556744dda7b2Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
556844dda7b2Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
556944dda7b2Smrg	# Check to see if the nm accepts a BSD-compat flag.
557044dda7b2Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
557144dda7b2Smrg	#   nm: unknown option "B" ignored
557244dda7b2Smrg	# Tru64's nm complains that /dev/null is an invalid object file
557344dda7b2Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
557444dda7b2Smrg	*/dev/null* | *'Invalid file or object type'*)
557544dda7b2Smrg	  lt_cv_path_NM="$tmp_nm -B"
557644dda7b2Smrg	  break
557744dda7b2Smrg	  ;;
557844dda7b2Smrg	*)
557944dda7b2Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
558044dda7b2Smrg	  */dev/null*)
558144dda7b2Smrg	    lt_cv_path_NM="$tmp_nm -p"
558244dda7b2Smrg	    break
558344dda7b2Smrg	    ;;
558444dda7b2Smrg	  *)
558544dda7b2Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
558644dda7b2Smrg	    continue # so that we can try to find one that supports BSD flags
558744dda7b2Smrg	    ;;
558844dda7b2Smrg	  esac
558944dda7b2Smrg	  ;;
559044dda7b2Smrg	esac
559144dda7b2Smrg      fi
559244dda7b2Smrg    done
559344dda7b2Smrg    IFS="$lt_save_ifs"
559444dda7b2Smrg  done
559544dda7b2Smrg  : ${lt_cv_path_NM=no}
559644dda7b2Smrgfi])
559744dda7b2Smrgif test "$lt_cv_path_NM" != "no"; then
559844dda7b2Smrg  NM="$lt_cv_path_NM"
559944dda7b2Smrgelse
560044dda7b2Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
560144dda7b2Smrg  if test -n "$DUMPBIN"; then :
560244dda7b2Smrg    # Let the user override the test.
560344dda7b2Smrg  else
560444dda7b2Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
560544dda7b2Smrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
560644dda7b2Smrg    *COFF*)
560744dda7b2Smrg      DUMPBIN="$DUMPBIN -symbols"
560844dda7b2Smrg      ;;
560944dda7b2Smrg    *)
561044dda7b2Smrg      DUMPBIN=:
561144dda7b2Smrg      ;;
561244dda7b2Smrg    esac
561344dda7b2Smrg  fi
561444dda7b2Smrg  AC_SUBST([DUMPBIN])
561544dda7b2Smrg  if test "$DUMPBIN" != ":"; then
561644dda7b2Smrg    NM="$DUMPBIN"
561744dda7b2Smrg  fi
56187a3b38f7Smrgfi
561944dda7b2Smrgtest -z "$NM" && NM=nm
562044dda7b2SmrgAC_SUBST([NM])
562144dda7b2Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
562244dda7b2Smrg
562344dda7b2SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
562444dda7b2Smrg  [lt_cv_nm_interface="BSD nm"
562544dda7b2Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
562644dda7b2Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
562744dda7b2Smrg  (eval "$ac_compile" 2>conftest.err)
562844dda7b2Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
562944dda7b2Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
563044dda7b2Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
563144dda7b2Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
563244dda7b2Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
563344dda7b2Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
563444dda7b2Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
563544dda7b2Smrg    lt_cv_nm_interface="MS dumpbin"
563644dda7b2Smrg  fi
563744dda7b2Smrg  rm -f conftest*])
563844dda7b2Smrg])# LT_PATH_NM
5639ff559fabSmrg
564044dda7b2Smrg# Old names:
564144dda7b2SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
564244dda7b2SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
56437a3b38f7Smrgdnl aclocal-1.4 backwards compatibility:
564444dda7b2Smrgdnl AC_DEFUN([AM_PROG_NM], [])
564544dda7b2Smrgdnl AC_DEFUN([AC_PROG_NM], [])
5646ff559fabSmrg
5647ff559fabSmrg
564844dda7b2Smrg# LT_LIB_M
564944dda7b2Smrg# --------
565044dda7b2Smrg# check for math library
565144dda7b2SmrgAC_DEFUN([LT_LIB_M],
565244dda7b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
565344dda7b2SmrgLIBM=
565444dda7b2Smrgcase $host in
565544dda7b2Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
565644dda7b2Smrg  # These system don't have libm, or don't need it
565744dda7b2Smrg  ;;
565844dda7b2Smrg*-ncr-sysv4.3*)
565944dda7b2Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
566044dda7b2Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
566144dda7b2Smrg  ;;
566244dda7b2Smrg*)
566344dda7b2Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
566444dda7b2Smrg  ;;
566544dda7b2Smrgesac
566644dda7b2SmrgAC_SUBST([LIBM])
566744dda7b2Smrg])# LT_LIB_M
566844dda7b2Smrg
566944dda7b2Smrg# Old name:
567044dda7b2SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
567144dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
567244dda7b2Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
56737a3b38f7Smrg
5674ff559fabSmrg
567544dda7b2Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
567644dda7b2Smrg# -------------------------------
567744dda7b2Smrgm4_defun([_LT_COMPILER_NO_RTTI],
567844dda7b2Smrg[m4_require([_LT_TAG_COMPILER])dnl
5679ff559fabSmrg
568044dda7b2Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
56817a3b38f7Smrg
568244dda7b2Smrgif test "$GCC" = yes; then
568344dda7b2Smrg  case $cc_basename in
568444dda7b2Smrg  nvcc*)
568544dda7b2Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
568644dda7b2Smrg  *)
568744dda7b2Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
568844dda7b2Smrg  esac
56897a3b38f7Smrg
569044dda7b2Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
569144dda7b2Smrg    lt_cv_prog_compiler_rtti_exceptions,
569244dda7b2Smrg    [-fno-rtti -fno-exceptions], [],
569344dda7b2Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
569444dda7b2Smrgfi
569544dda7b2Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
569644dda7b2Smrg	[Compiler flag to turn off builtin functions])
569744dda7b2Smrg])# _LT_COMPILER_NO_RTTI
56987a3b38f7Smrg
56997a3b38f7Smrg
570044dda7b2Smrg# _LT_CMD_GLOBAL_SYMBOLS
570144dda7b2Smrg# ----------------------
570244dda7b2Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
570344dda7b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
570444dda7b2SmrgAC_REQUIRE([AC_PROG_CC])dnl
570544dda7b2SmrgAC_REQUIRE([AC_PROG_AWK])dnl
570644dda7b2SmrgAC_REQUIRE([LT_PATH_NM])dnl
570744dda7b2SmrgAC_REQUIRE([LT_PATH_LD])dnl
570844dda7b2Smrgm4_require([_LT_DECL_SED])dnl
570944dda7b2Smrgm4_require([_LT_DECL_EGREP])dnl
571044dda7b2Smrgm4_require([_LT_TAG_COMPILER])dnl
57117a3b38f7Smrg
571244dda7b2Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
571344dda7b2SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
571444dda7b2SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
571544dda7b2Smrg[
571644dda7b2Smrg# These are sane defaults that work on at least a few old systems.
571744dda7b2Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5718ff559fabSmrg
571944dda7b2Smrg# Character class describing NM global symbol codes.
572044dda7b2Smrgsymcode='[[BCDEGRST]]'
5721ff559fabSmrg
572244dda7b2Smrg# Regexp to match symbols that can be accessed directly from C.
572344dda7b2Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5724ff559fabSmrg
572544dda7b2Smrg# Define system-specific variables.
572644dda7b2Smrgcase $host_os in
572744dda7b2Smrgaix*)
572844dda7b2Smrg  symcode='[[BCDT]]'
572944dda7b2Smrg  ;;
573044dda7b2Smrgcygwin* | mingw* | pw32* | cegcc*)
573144dda7b2Smrg  symcode='[[ABCDGISTW]]'
573244dda7b2Smrg  ;;
573344dda7b2Smrghpux*)
573444dda7b2Smrg  if test "$host_cpu" = ia64; then
573544dda7b2Smrg    symcode='[[ABCDEGRST]]'
573644dda7b2Smrg  fi
573744dda7b2Smrg  ;;
573844dda7b2Smrgirix* | nonstopux*)
573944dda7b2Smrg  symcode='[[BCDEGRST]]'
574044dda7b2Smrg  ;;
574144dda7b2Smrgosf*)
574244dda7b2Smrg  symcode='[[BCDEGQRST]]'
574344dda7b2Smrg  ;;
574444dda7b2Smrgsolaris*)
574544dda7b2Smrg  symcode='[[BDRT]]'
574644dda7b2Smrg  ;;
574744dda7b2Smrgsco3.2v5*)
574844dda7b2Smrg  symcode='[[DT]]'
574944dda7b2Smrg  ;;
575044dda7b2Smrgsysv4.2uw2*)
575144dda7b2Smrg  symcode='[[DT]]'
575244dda7b2Smrg  ;;
575344dda7b2Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
575444dda7b2Smrg  symcode='[[ABDT]]'
575544dda7b2Smrg  ;;
575644dda7b2Smrgsysv4)
575744dda7b2Smrg  symcode='[[DFNSTU]]'
575844dda7b2Smrg  ;;
575944dda7b2Smrgesac
5760ff559fabSmrg
576144dda7b2Smrg# If we're using GNU nm, then use its standard symbol codes.
576244dda7b2Smrgcase `$NM -V 2>&1` in
576344dda7b2Smrg*GNU* | *'with BFD'*)
576444dda7b2Smrg  symcode='[[ABCDGIRSTW]]' ;;
576544dda7b2Smrgesac
5766ff559fabSmrg
576744dda7b2Smrg# Transform an extracted symbol line into a proper C declaration.
576844dda7b2Smrg# Some systems (esp. on ia64) link data and code symbols differently,
576944dda7b2Smrg# so use this general approach.
577044dda7b2Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5771ff559fabSmrg
577244dda7b2Smrg# Transform an extracted symbol line into symbol name and symbol address
577344dda7b2Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
577444dda7b2Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
5775ff559fabSmrg
577644dda7b2Smrg# Handle CRLF in mingw tool chain
577744dda7b2Smrgopt_cr=
577844dda7b2Smrgcase $build_os in
577944dda7b2Smrgmingw*)
578044dda7b2Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
578144dda7b2Smrg  ;;
578244dda7b2Smrgesac
57837a3b38f7Smrg
578444dda7b2Smrg# Try without a prefix underscore, then with it.
578544dda7b2Smrgfor ac_symprfx in "" "_"; do
5786ff559fabSmrg
578744dda7b2Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
578844dda7b2Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
5789ff559fabSmrg
579044dda7b2Smrg  # Write the raw and C identifiers.
579144dda7b2Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
579244dda7b2Smrg    # Fake it for dumpbin and say T for any non-static function
579344dda7b2Smrg    # and D for any global variable.
579444dda7b2Smrg    # Also find C++ and __fastcall symbols from MSVC++,
579544dda7b2Smrg    # which start with @ or ?.
579644dda7b2Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
579744dda7b2Smrg"     {last_section=section; section=\$ 3};"\
579844dda7b2Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
579944dda7b2Smrg"     \$ 0!~/External *\|/{next};"\
580044dda7b2Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
580144dda7b2Smrg"     {if(hide[section]) next};"\
580244dda7b2Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
580344dda7b2Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
580444dda7b2Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
580544dda7b2Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
580644dda7b2Smrg"     ' prfx=^$ac_symprfx]"
580744dda7b2Smrg  else
580844dda7b2Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
580944dda7b2Smrg  fi
5810ff559fabSmrg
581144dda7b2Smrg  # Check to see that the pipe works correctly.
581244dda7b2Smrg  pipe_works=no
58137a3b38f7Smrg
581444dda7b2Smrg  rm -f conftest*
581544dda7b2Smrg  cat > conftest.$ac_ext <<_LT_EOF
581644dda7b2Smrg#ifdef __cplusplus
581744dda7b2Smrgextern "C" {
581844dda7b2Smrg#endif
581944dda7b2Smrgchar nm_test_var;
582044dda7b2Smrgvoid nm_test_func(void);
582144dda7b2Smrgvoid nm_test_func(void){}
582244dda7b2Smrg#ifdef __cplusplus
582344dda7b2Smrg}
582444dda7b2Smrg#endif
582544dda7b2Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
582644dda7b2Smrg_LT_EOF
5827ff559fabSmrg
582844dda7b2Smrg  if AC_TRY_EVAL(ac_compile); then
582944dda7b2Smrg    # Now try to grab the symbols.
583044dda7b2Smrg    nlist=conftest.nm
583144dda7b2Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
583244dda7b2Smrg      # Try sorting and uniquifying the output.
583344dda7b2Smrg      if sort "$nlist" | uniq > "$nlist"T; then
583444dda7b2Smrg	mv -f "$nlist"T "$nlist"
583544dda7b2Smrg      else
583644dda7b2Smrg	rm -f "$nlist"T
583744dda7b2Smrg      fi
5838ff559fabSmrg
583944dda7b2Smrg      # Make sure that we snagged all the symbols we need.
584044dda7b2Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
584144dda7b2Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
584244dda7b2Smrg	  cat <<_LT_EOF > conftest.$ac_ext
584344dda7b2Smrg#ifdef __cplusplus
584444dda7b2Smrgextern "C" {
584544dda7b2Smrg#endif
58467a3b38f7Smrg
584744dda7b2Smrg_LT_EOF
584844dda7b2Smrg	  # Now generate the symbol file.
584944dda7b2Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
58507a3b38f7Smrg
585144dda7b2Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
5852ff559fabSmrg
585344dda7b2Smrg/* The mapping between symbol names and symbols.  */
585444dda7b2Smrgconst struct {
585544dda7b2Smrg  const char *name;
585644dda7b2Smrg  void       *address;
585744dda7b2Smrg}
585844dda7b2Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
585944dda7b2Smrg{
586044dda7b2Smrg  { "@PROGRAM@", (void *) 0 },
586144dda7b2Smrg_LT_EOF
586244dda7b2Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
586344dda7b2Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
586444dda7b2Smrg  {0, (void *) 0}
586544dda7b2Smrg};
58667a3b38f7Smrg
586744dda7b2Smrg/* This works around a problem in FreeBSD linker */
586844dda7b2Smrg#ifdef FREEBSD_WORKAROUND
586944dda7b2Smrgstatic const void *lt_preloaded_setup() {
587044dda7b2Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
587144dda7b2Smrg}
587244dda7b2Smrg#endif
5873ff559fabSmrg
587444dda7b2Smrg#ifdef __cplusplus
587544dda7b2Smrg}
587644dda7b2Smrg#endif
587744dda7b2Smrg_LT_EOF
587844dda7b2Smrg	  # Now try linking the two files.
587944dda7b2Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
588044dda7b2Smrg	  lt_save_LIBS="$LIBS"
588144dda7b2Smrg	  lt_save_CFLAGS="$CFLAGS"
588244dda7b2Smrg	  LIBS="conftstm.$ac_objext"
588344dda7b2Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
588444dda7b2Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
588544dda7b2Smrg	    pipe_works=yes
588644dda7b2Smrg	  fi
588744dda7b2Smrg	  LIBS="$lt_save_LIBS"
588844dda7b2Smrg	  CFLAGS="$lt_save_CFLAGS"
58897a3b38f7Smrg	else
589044dda7b2Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
58917a3b38f7Smrg	fi
589244dda7b2Smrg      else
589344dda7b2Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
589444dda7b2Smrg      fi
589544dda7b2Smrg    else
589644dda7b2Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
589744dda7b2Smrg    fi
589844dda7b2Smrg  else
589944dda7b2Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
590044dda7b2Smrg    cat conftest.$ac_ext >&5
590144dda7b2Smrg  fi
590244dda7b2Smrg  rm -rf conftest* conftst*
5903ff559fabSmrg
590444dda7b2Smrg  # Do not use the global_symbol_pipe unless it works.
590544dda7b2Smrg  if test "$pipe_works" = yes; then
590644dda7b2Smrg    break
590744dda7b2Smrg  else
590844dda7b2Smrg    lt_cv_sys_global_symbol_pipe=
590944dda7b2Smrg  fi
591044dda7b2Smrgdone
591144dda7b2Smrg])
591244dda7b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
591344dda7b2Smrg  lt_cv_sys_global_symbol_to_cdecl=
591444dda7b2Smrgfi
591544dda7b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
591644dda7b2Smrg  AC_MSG_RESULT(failed)
591744dda7b2Smrgelse
591844dda7b2Smrg  AC_MSG_RESULT(ok)
591944dda7b2Smrgfi
5920ff559fabSmrg
592144dda7b2Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
592244dda7b2Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
592344dda7b2Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
592444dda7b2Smrg    [Transform the output of nm in a proper C declaration])
592544dda7b2Smrg_LT_DECL([global_symbol_to_c_name_address],
592644dda7b2Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
592744dda7b2Smrg    [Transform the output of nm in a C name address pair])
592844dda7b2Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
592944dda7b2Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
593044dda7b2Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
593144dda7b2Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
5932ff559fabSmrg
5933ff559fabSmrg
593444dda7b2Smrg# _LT_COMPILER_PIC([TAGNAME])
593544dda7b2Smrg# ---------------------------
593644dda7b2Smrgm4_defun([_LT_COMPILER_PIC],
593744dda7b2Smrg[m4_require([_LT_TAG_COMPILER])dnl
593844dda7b2Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
593944dda7b2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
594044dda7b2Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
5941ff559fabSmrg
594244dda7b2SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
594344dda7b2Smrgm4_if([$1], [CXX], [
594444dda7b2Smrg  # C++ specific cases for pic, static, wl, etc.
594544dda7b2Smrg  if test "$GXX" = yes; then
594644dda7b2Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
594744dda7b2Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5948ff559fabSmrg
594944dda7b2Smrg    case $host_os in
595044dda7b2Smrg    aix*)
595144dda7b2Smrg      # All AIX code is PIC.
595244dda7b2Smrg      if test "$host_cpu" = ia64; then
595344dda7b2Smrg	# AIX 5 now supports IA64 processor
595444dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
595544dda7b2Smrg      fi
595644dda7b2Smrg      ;;
59577a3b38f7Smrg
595844dda7b2Smrg    amigaos*)
595944dda7b2Smrg      case $host_cpu in
596044dda7b2Smrg      powerpc)
596144dda7b2Smrg            # see comment about AmigaOS4 .so support
596244dda7b2Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
59637a3b38f7Smrg        ;;
596444dda7b2Smrg      m68k)
596544dda7b2Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
596644dda7b2Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
596744dda7b2Smrg            # like `-m68040'.
596844dda7b2Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
59697a3b38f7Smrg        ;;
597044dda7b2Smrg      esac
597144dda7b2Smrg      ;;
5972ff559fabSmrg
597344dda7b2Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
597444dda7b2Smrg      # PIC is the default for these OSes.
597544dda7b2Smrg      ;;
597644dda7b2Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
597744dda7b2Smrg      # This hack is so that the source file can tell whether it is being
597844dda7b2Smrg      # built for inclusion in a dll (and should export symbols for example).
597944dda7b2Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
598044dda7b2Smrg      # (--disable-auto-import) libraries
598144dda7b2Smrg      m4_if([$1], [GCJ], [],
598244dda7b2Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
598344dda7b2Smrg      ;;
598444dda7b2Smrg    darwin* | rhapsody*)
598544dda7b2Smrg      # PIC is the default on this platform
598644dda7b2Smrg      # Common symbols not allowed in MH_DYLIB files
598744dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
598844dda7b2Smrg      ;;
598944dda7b2Smrg    *djgpp*)
599044dda7b2Smrg      # DJGPP does not support shared libraries at all
599144dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
599244dda7b2Smrg      ;;
599344dda7b2Smrg    haiku*)
599444dda7b2Smrg      # PIC is the default for Haiku.
599544dda7b2Smrg      # The "-static" flag exists, but is broken.
599644dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
599744dda7b2Smrg      ;;
599844dda7b2Smrg    interix[[3-9]]*)
599944dda7b2Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
600044dda7b2Smrg      # Instead, we relocate shared libraries at runtime.
600144dda7b2Smrg      ;;
600244dda7b2Smrg    sysv4*MP*)
600344dda7b2Smrg      if test -d /usr/nec; then
600444dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
600544dda7b2Smrg      fi
600644dda7b2Smrg      ;;
600744dda7b2Smrg    hpux*)
600844dda7b2Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
600944dda7b2Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
601044dda7b2Smrg      # sets the default TLS model and affects inlining.
601144dda7b2Smrg      case $host_cpu in
601244dda7b2Smrg      hppa*64*)
60137a3b38f7Smrg	;;
601444dda7b2Smrg      *)
601544dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
601644dda7b2Smrg	;;
601744dda7b2Smrg      esac
601844dda7b2Smrg      ;;
601944dda7b2Smrg    *qnx* | *nto*)
602044dda7b2Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
602144dda7b2Smrg      # it will coredump.
602244dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
602344dda7b2Smrg      ;;
602444dda7b2Smrg    *)
602544dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
602644dda7b2Smrg      ;;
602744dda7b2Smrg    esac
602844dda7b2Smrg  else
602944dda7b2Smrg    case $host_os in
603044dda7b2Smrg      aix[[4-9]]*)
603144dda7b2Smrg	# All AIX code is PIC.
603244dda7b2Smrg	if test "$host_cpu" = ia64; then
603344dda7b2Smrg	  # AIX 5 now supports IA64 processor
603444dda7b2Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
603544dda7b2Smrg	else
603644dda7b2Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
603744dda7b2Smrg	fi
603844dda7b2Smrg	;;
603944dda7b2Smrg      chorus*)
604044dda7b2Smrg	case $cc_basename in
604144dda7b2Smrg	cxch68*)
604244dda7b2Smrg	  # Green Hills C++ Compiler
604344dda7b2Smrg	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
604444dda7b2Smrg	  ;;
604544dda7b2Smrg	esac
604644dda7b2Smrg	;;
604744dda7b2Smrg      dgux*)
604844dda7b2Smrg	case $cc_basename in
604944dda7b2Smrg	  ec++*)
605044dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
60517a3b38f7Smrg	    ;;
605244dda7b2Smrg	  ghcx*)
605344dda7b2Smrg	    # Green Hills C++ Compiler
605444dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
60557a3b38f7Smrg	    ;;
605644dda7b2Smrg	  *)
60577a3b38f7Smrg	    ;;
605844dda7b2Smrg	esac
605944dda7b2Smrg	;;
606044dda7b2Smrg      freebsd* | dragonfly*)
606144dda7b2Smrg	# FreeBSD uses GNU C++
606244dda7b2Smrg	;;
606344dda7b2Smrg      hpux9* | hpux10* | hpux11*)
606444dda7b2Smrg	case $cc_basename in
606544dda7b2Smrg	  CC*)
606644dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
606744dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
606844dda7b2Smrg	    if test "$host_cpu" != ia64; then
606944dda7b2Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
607044dda7b2Smrg	    fi
60717a3b38f7Smrg	    ;;
607244dda7b2Smrg	  aCC*)
607344dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
607444dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
607544dda7b2Smrg	    case $host_cpu in
607644dda7b2Smrg	    hppa*64*|ia64*)
607744dda7b2Smrg	      # +Z the default
60787a3b38f7Smrg	      ;;
607944dda7b2Smrg	    *)
608044dda7b2Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
60817a3b38f7Smrg	      ;;
60827a3b38f7Smrg	    esac
608344dda7b2Smrg	    ;;
608444dda7b2Smrg	  *)
608544dda7b2Smrg	    ;;
608644dda7b2Smrg	esac
608744dda7b2Smrg	;;
608844dda7b2Smrg      interix*)
608944dda7b2Smrg	# This is c89, which is MS Visual C++ (no shared libs)
609044dda7b2Smrg	# Anyone wants to do a port?
609144dda7b2Smrg	;;
609244dda7b2Smrg      irix5* | irix6* | nonstopux*)
609344dda7b2Smrg	case $cc_basename in
609444dda7b2Smrg	  CC*)
609544dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
609644dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
609744dda7b2Smrg	    # CC pic flag -KPIC is the default.
609844dda7b2Smrg	    ;;
609944dda7b2Smrg	  *)
610044dda7b2Smrg	    ;;
610144dda7b2Smrg	esac
610244dda7b2Smrg	;;
610344dda7b2Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
610444dda7b2Smrg	case $cc_basename in
610544dda7b2Smrg	  KCC*)
610644dda7b2Smrg	    # KAI C++ Compiler
610744dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
610844dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
610944dda7b2Smrg	    ;;
611044dda7b2Smrg	  ecpc* )
611144dda7b2Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
611244dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
611344dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
611444dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
611544dda7b2Smrg	    ;;
611644dda7b2Smrg	  icpc* )
611744dda7b2Smrg	    # Intel C++, used to be incompatible with GCC.
611844dda7b2Smrg	    # ICC 10 doesn't accept -KPIC any more.
611944dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
612044dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
612144dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
612244dda7b2Smrg	    ;;
612344dda7b2Smrg	  pgCC* | pgcpp*)
612444dda7b2Smrg	    # Portland Group C++ compiler
612544dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
612644dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
612744dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
612844dda7b2Smrg	    ;;
61297a3b38f7Smrg	  cxx*)
61307a3b38f7Smrg	    # Compaq C++
613144dda7b2Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
613244dda7b2Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
613344dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
613444dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
61357a3b38f7Smrg	    ;;
613644dda7b2Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
613744dda7b2Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
613844dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
613944dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
614044dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
61417a3b38f7Smrg	    ;;
61427a3b38f7Smrg	  *)
61437a3b38f7Smrg	    case `$CC -V 2>&1 | sed 5q` in
61447a3b38f7Smrg	    *Sun\ C*)
61457a3b38f7Smrg	      # Sun C++ 5.9
614644dda7b2Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
614744dda7b2Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
614844dda7b2Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
61497a3b38f7Smrg	      ;;
61507a3b38f7Smrg	    esac
61517a3b38f7Smrg	    ;;
61527a3b38f7Smrg	esac
61537a3b38f7Smrg	;;
615444dda7b2Smrg      lynxos*)
615544dda7b2Smrg	;;
615644dda7b2Smrg      m88k*)
615744dda7b2Smrg	;;
615844dda7b2Smrg      mvs*)
615944dda7b2Smrg	case $cc_basename in
616044dda7b2Smrg	  cxx*)
616144dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
616244dda7b2Smrg	    ;;
616344dda7b2Smrg	  *)
616444dda7b2Smrg	    ;;
616544dda7b2Smrg	esac
616644dda7b2Smrg	;;
616744dda7b2Smrg      netbsd*)
616844dda7b2Smrg	;;
616944dda7b2Smrg      *qnx* | *nto*)
617044dda7b2Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
617144dda7b2Smrg        # it will coredump.
617244dda7b2Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
617344dda7b2Smrg        ;;
617444dda7b2Smrg      osf3* | osf4* | osf5*)
617544dda7b2Smrg	case $cc_basename in
617644dda7b2Smrg	  KCC*)
617744dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
617844dda7b2Smrg	    ;;
617944dda7b2Smrg	  RCC*)
618044dda7b2Smrg	    # Rational C++ 2.4.1
618144dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
618244dda7b2Smrg	    ;;
618344dda7b2Smrg	  cxx*)
618444dda7b2Smrg	    # Digital/Compaq C++
618544dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
618644dda7b2Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
618744dda7b2Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
618844dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
618944dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
619044dda7b2Smrg	    ;;
619144dda7b2Smrg	  *)
619244dda7b2Smrg	    ;;
619344dda7b2Smrg	esac
619444dda7b2Smrg	;;
619544dda7b2Smrg      psos*)
61967a3b38f7Smrg	;;
619744dda7b2Smrg      solaris*)
619844dda7b2Smrg	case $cc_basename in
619944dda7b2Smrg	  CC* | sunCC*)
620044dda7b2Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
620144dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
620244dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
620344dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
620444dda7b2Smrg	    ;;
620544dda7b2Smrg	  gcx*)
620644dda7b2Smrg	    # Green Hills C++ Compiler
620744dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
620844dda7b2Smrg	    ;;
620944dda7b2Smrg	  *)
621044dda7b2Smrg	    ;;
621144dda7b2Smrg	esac
62127a3b38f7Smrg	;;
621344dda7b2Smrg      sunos4*)
621444dda7b2Smrg	case $cc_basename in
621544dda7b2Smrg	  CC*)
621644dda7b2Smrg	    # Sun C++ 4.x
621744dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
621844dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
621944dda7b2Smrg	    ;;
622044dda7b2Smrg	  lcc*)
622144dda7b2Smrg	    # Lucid
622244dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
62237a3b38f7Smrg	    ;;
62247a3b38f7Smrg	  *)
62257a3b38f7Smrg	    ;;
62267a3b38f7Smrg	esac
62277a3b38f7Smrg	;;
622844dda7b2Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
622944dda7b2Smrg	case $cc_basename in
623044dda7b2Smrg	  CC*)
623144dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
623244dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
623344dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
623444dda7b2Smrg	    ;;
623544dda7b2Smrg	esac
62367a3b38f7Smrg	;;
623744dda7b2Smrg      tandem*)
623844dda7b2Smrg	case $cc_basename in
623944dda7b2Smrg	  NCC*)
624044dda7b2Smrg	    # NonStop-UX NCC 3.20
624144dda7b2Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
624244dda7b2Smrg	    ;;
624344dda7b2Smrg	  *)
624444dda7b2Smrg	    ;;
624544dda7b2Smrg	esac
62467a3b38f7Smrg	;;
624744dda7b2Smrg      vxworks*)
62487a3b38f7Smrg	;;
624944dda7b2Smrg      *)
625044dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
62517a3b38f7Smrg	;;
625244dda7b2Smrg    esac
625344dda7b2Smrg  fi
625444dda7b2Smrg],
625544dda7b2Smrg[
625644dda7b2Smrg  if test "$GCC" = yes; then
625744dda7b2Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
625844dda7b2Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6259ff559fabSmrg
626044dda7b2Smrg    case $host_os in
626144dda7b2Smrg      aix*)
626244dda7b2Smrg      # All AIX code is PIC.
626344dda7b2Smrg      if test "$host_cpu" = ia64; then
626444dda7b2Smrg	# AIX 5 now supports IA64 processor
626544dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
626644dda7b2Smrg      fi
626744dda7b2Smrg      ;;
6268ff559fabSmrg
626944dda7b2Smrg    amigaos*)
627044dda7b2Smrg      case $host_cpu in
627144dda7b2Smrg      powerpc)
627244dda7b2Smrg            # see comment about AmigaOS4 .so support
627344dda7b2Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
627444dda7b2Smrg        ;;
627544dda7b2Smrg      m68k)
627644dda7b2Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
627744dda7b2Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
627844dda7b2Smrg            # like `-m68040'.
627944dda7b2Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
628044dda7b2Smrg        ;;
628144dda7b2Smrg      esac
628244dda7b2Smrg      ;;
62837a3b38f7Smrg
628444dda7b2Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
628544dda7b2Smrg      # PIC is the default for these OSes.
628644dda7b2Smrg      ;;
62877a3b38f7Smrg
628844dda7b2Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
628944dda7b2Smrg      # This hack is so that the source file can tell whether it is being
629044dda7b2Smrg      # built for inclusion in a dll (and should export symbols for example).
629144dda7b2Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
629244dda7b2Smrg      # (--disable-auto-import) libraries
629344dda7b2Smrg      m4_if([$1], [GCJ], [],
629444dda7b2Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
629544dda7b2Smrg      ;;
62967a3b38f7Smrg
629744dda7b2Smrg    darwin* | rhapsody*)
629844dda7b2Smrg      # PIC is the default on this platform
629944dda7b2Smrg      # Common symbols not allowed in MH_DYLIB files
630044dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
630144dda7b2Smrg      ;;
6302ff559fabSmrg
630344dda7b2Smrg    haiku*)
630444dda7b2Smrg      # PIC is the default for Haiku.
630544dda7b2Smrg      # The "-static" flag exists, but is broken.
630644dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
630744dda7b2Smrg      ;;
6308ff559fabSmrg
630944dda7b2Smrg    hpux*)
631044dda7b2Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
631144dda7b2Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
631244dda7b2Smrg      # sets the default TLS model and affects inlining.
631344dda7b2Smrg      case $host_cpu in
631444dda7b2Smrg      hppa*64*)
631544dda7b2Smrg	# +Z the default
631644dda7b2Smrg	;;
631744dda7b2Smrg      *)
631844dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
631944dda7b2Smrg	;;
632044dda7b2Smrg      esac
632144dda7b2Smrg      ;;
6322ff559fabSmrg
632344dda7b2Smrg    interix[[3-9]]*)
632444dda7b2Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
632544dda7b2Smrg      # Instead, we relocate shared libraries at runtime.
632644dda7b2Smrg      ;;
63277a3b38f7Smrg
632844dda7b2Smrg    msdosdjgpp*)
632944dda7b2Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
633044dda7b2Smrg      # on systems that don't support them.
633144dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
633244dda7b2Smrg      enable_shared=no
633344dda7b2Smrg      ;;
6334ff559fabSmrg
633544dda7b2Smrg    *nto* | *qnx*)
633644dda7b2Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
633744dda7b2Smrg      # it will coredump.
633844dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
633944dda7b2Smrg      ;;
6340ff559fabSmrg
634144dda7b2Smrg    sysv4*MP*)
634244dda7b2Smrg      if test -d /usr/nec; then
634344dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
634444dda7b2Smrg      fi
634544dda7b2Smrg      ;;
6346ff559fabSmrg
634744dda7b2Smrg    *)
634844dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
634944dda7b2Smrg      ;;
635044dda7b2Smrg    esac
63517a3b38f7Smrg
635244dda7b2Smrg    case $cc_basename in
635344dda7b2Smrg    nvcc*) # Cuda Compiler Driver 2.2
635444dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
635544dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
635644dda7b2Smrg      ;;
635744dda7b2Smrg    esac
635844dda7b2Smrg  else
635944dda7b2Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
636044dda7b2Smrg    case $host_os in
636144dda7b2Smrg    aix*)
636244dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
636344dda7b2Smrg      if test "$host_cpu" = ia64; then
636444dda7b2Smrg	# AIX 5 now supports IA64 processor
636544dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
636644dda7b2Smrg      else
636744dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
636844dda7b2Smrg      fi
636944dda7b2Smrg      ;;
63707a3b38f7Smrg
637144dda7b2Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
637244dda7b2Smrg      # This hack is so that the source file can tell whether it is being
637344dda7b2Smrg      # built for inclusion in a dll (and should export symbols for example).
637444dda7b2Smrg      m4_if([$1], [GCJ], [],
637544dda7b2Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
637644dda7b2Smrg      ;;
63777a3b38f7Smrg
637844dda7b2Smrg    hpux9* | hpux10* | hpux11*)
637944dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
638044dda7b2Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
638144dda7b2Smrg      # not for PA HP-UX.
638244dda7b2Smrg      case $host_cpu in
638344dda7b2Smrg      hppa*64*|ia64*)
638444dda7b2Smrg	# +Z the default
638544dda7b2Smrg	;;
638644dda7b2Smrg      *)
638744dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
638844dda7b2Smrg	;;
638944dda7b2Smrg      esac
639044dda7b2Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
639144dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
639244dda7b2Smrg      ;;
6393ff559fabSmrg
639444dda7b2Smrg    irix5* | irix6* | nonstopux*)
639544dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
639644dda7b2Smrg      # PIC (with -KPIC) is the default.
639744dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
639844dda7b2Smrg      ;;
6399ff559fabSmrg
640044dda7b2Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
64017a3b38f7Smrg      case $cc_basename in
640244dda7b2Smrg      # old Intel for x86_64 which still supported -KPIC.
640344dda7b2Smrg      ecc*)
640444dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
640544dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
640644dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
640744dda7b2Smrg        ;;
640844dda7b2Smrg      # icc used to be incompatible with GCC.
640944dda7b2Smrg      # ICC 10 doesn't accept -KPIC any more.
641044dda7b2Smrg      icc* | ifort*)
641144dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
641244dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
641344dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
641444dda7b2Smrg        ;;
641544dda7b2Smrg      # Lahey Fortran 8.1.
641644dda7b2Smrg      lf95*)
641744dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
641844dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
641944dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
642044dda7b2Smrg	;;
642144dda7b2Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
642244dda7b2Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
642344dda7b2Smrg	# which looks to be a dead project)
642444dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
642544dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
642644dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
642744dda7b2Smrg        ;;
642844dda7b2Smrg      ccc*)
642944dda7b2Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
643044dda7b2Smrg        # All Alpha code is PIC.
643144dda7b2Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
643244dda7b2Smrg        ;;
643344dda7b2Smrg      xl* | bgxl* | bgf* | mpixl*)
643444dda7b2Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
643544dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
643644dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
643744dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
643844dda7b2Smrg	;;
643944dda7b2Smrg      *)
644044dda7b2Smrg	case `$CC -V 2>&1 | sed 5q` in
644144dda7b2Smrg	*Sun\ F* | *Sun*Fortran*)
644244dda7b2Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
644344dda7b2Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
644444dda7b2Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
644544dda7b2Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
64467a3b38f7Smrg	  ;;
644744dda7b2Smrg	*Sun\ C*)
644844dda7b2Smrg	  # Sun C 5.9
644944dda7b2Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
645044dda7b2Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
645144dda7b2Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
64527a3b38f7Smrg	  ;;
645344dda7b2Smrg	esac
645444dda7b2Smrg	;;
64557a3b38f7Smrg      esac
64567a3b38f7Smrg      ;;
6457ff559fabSmrg
645844dda7b2Smrg    newsos6)
645944dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
646044dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
646144dda7b2Smrg      ;;
6462ff559fabSmrg
646344dda7b2Smrg    *nto* | *qnx*)
646444dda7b2Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
646544dda7b2Smrg      # it will coredump.
646644dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
64677a3b38f7Smrg      ;;
6468ff559fabSmrg
646944dda7b2Smrg    osf3* | osf4* | osf5*)
647044dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
647144dda7b2Smrg      # All OSF/1 code is PIC.
647244dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
647344dda7b2Smrg      ;;
6474ff559fabSmrg
647544dda7b2Smrg    rdos*)
647644dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
647744dda7b2Smrg      ;;
6478ff559fabSmrg
647944dda7b2Smrg    solaris*)
648044dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
648144dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
648244dda7b2Smrg      case $cc_basename in
648344dda7b2Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
648444dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
64857a3b38f7Smrg      *)
648644dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
648744dda7b2Smrg      esac
648844dda7b2Smrg      ;;
6489ff559fabSmrg
649044dda7b2Smrg    sunos4*)
649144dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
649244dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
649344dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
649444dda7b2Smrg      ;;
64957a3b38f7Smrg
649644dda7b2Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
649744dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
649844dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
649944dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
650044dda7b2Smrg      ;;
65017a3b38f7Smrg
650244dda7b2Smrg    sysv4*MP*)
650344dda7b2Smrg      if test -d /usr/nec ;then
650444dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
650544dda7b2Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
650644dda7b2Smrg      fi
650744dda7b2Smrg      ;;
65087a3b38f7Smrg
650944dda7b2Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
651044dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
651144dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
651244dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
651344dda7b2Smrg      ;;
65147a3b38f7Smrg
651544dda7b2Smrg    unicos*)
651644dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
651744dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
651844dda7b2Smrg      ;;
6519ff559fabSmrg
652044dda7b2Smrg    uts4*)
652144dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
652244dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
652344dda7b2Smrg      ;;
6524ff559fabSmrg
652544dda7b2Smrg    *)
652644dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
652744dda7b2Smrg      ;;
652844dda7b2Smrg    esac
652944dda7b2Smrg  fi
653044dda7b2Smrg])
653144dda7b2Smrgcase $host_os in
653244dda7b2Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
653344dda7b2Smrg  *djgpp*)
653444dda7b2Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
653544dda7b2Smrg    ;;
653644dda7b2Smrg  *)
653744dda7b2Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
653844dda7b2Smrg    ;;
653944dda7b2Smrgesac
654044dda7b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
654144dda7b2Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
654244dda7b2Smrg	[How to pass a linker flag through the compiler])
6543ff559fabSmrg
654444dda7b2Smrg#
654544dda7b2Smrg# Check to make sure the PIC flag actually works.
654644dda7b2Smrg#
654744dda7b2Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
654844dda7b2Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
654944dda7b2Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
655044dda7b2Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
655144dda7b2Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
655244dda7b2Smrg     "" | " "*) ;;
655344dda7b2Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
655444dda7b2Smrg     esac],
655544dda7b2Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
655644dda7b2Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
655744dda7b2Smrgfi
655844dda7b2Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
655944dda7b2Smrg	[Additional compiler flags for building library objects])
6560ff559fabSmrg
656144dda7b2Smrg#
656244dda7b2Smrg# Check to make sure the static flag actually works.
656344dda7b2Smrg#
656444dda7b2Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
656544dda7b2Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
656644dda7b2Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
656744dda7b2Smrg  $lt_tmp_static_flag,
656844dda7b2Smrg  [],
656944dda7b2Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
657044dda7b2Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
657144dda7b2Smrg	[Compiler flag to prevent dynamic linking])
657244dda7b2Smrg])# _LT_COMPILER_PIC
65737a3b38f7Smrg
65747a3b38f7Smrg
657544dda7b2Smrg# _LT_LINKER_SHLIBS([TAGNAME])
657644dda7b2Smrg# ----------------------------
657744dda7b2Smrg# See if the linker supports building shared libraries.
657844dda7b2Smrgm4_defun([_LT_LINKER_SHLIBS],
657944dda7b2Smrg[AC_REQUIRE([LT_PATH_LD])dnl
658044dda7b2SmrgAC_REQUIRE([LT_PATH_NM])dnl
658144dda7b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
658244dda7b2Smrgm4_require([_LT_DECL_EGREP])dnl
658344dda7b2Smrgm4_require([_LT_DECL_SED])dnl
658444dda7b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
658544dda7b2Smrgm4_require([_LT_TAG_COMPILER])dnl
658644dda7b2SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
658744dda7b2Smrgm4_if([$1], [CXX], [
658844dda7b2Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
658944dda7b2Smrg  case $host_os in
659044dda7b2Smrg  aix[[4-9]]*)
659144dda7b2Smrg    # If we're using GNU nm, then we don't want the "-C" option.
659244dda7b2Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
659344dda7b2Smrg    # Also, AIX nm treats weak defined symbols like other global defined
659444dda7b2Smrg    # symbols, whereas GNU nm marks them as "W".
659544dda7b2Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
659644dda7b2Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
659744dda7b2Smrg    else
659844dda7b2Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
659944dda7b2Smrg    fi
660044dda7b2Smrg    ;;
660144dda7b2Smrg  pw32*)
660244dda7b2Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
660344dda7b2Smrg  ;;
660444dda7b2Smrg  cygwin* | mingw* | cegcc*)
660544dda7b2Smrg    _LT_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'
660644dda7b2Smrg  ;;
660744dda7b2Smrg  *)
660844dda7b2Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
660944dda7b2Smrg  ;;
661044dda7b2Smrg  esac
661144dda7b2Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
661244dda7b2Smrg], [
661344dda7b2Smrg  runpath_var=
661444dda7b2Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
661544dda7b2Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
661644dda7b2Smrg  _LT_TAGVAR(archive_cmds, $1)=
661744dda7b2Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
661844dda7b2Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
661944dda7b2Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
662044dda7b2Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
662144dda7b2Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
662244dda7b2Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
662344dda7b2Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
662444dda7b2Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
662544dda7b2Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
662644dda7b2Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
662744dda7b2Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
662844dda7b2Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
662944dda7b2Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
663044dda7b2Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
663144dda7b2Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
663244dda7b2Smrg  _LT_TAGVAR(module_cmds, $1)=
663344dda7b2Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
663444dda7b2Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
663544dda7b2Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
663644dda7b2Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
663744dda7b2Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
663844dda7b2Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
663944dda7b2Smrg  # included in the symbol list
664044dda7b2Smrg  _LT_TAGVAR(include_expsyms, $1)=
664144dda7b2Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
664244dda7b2Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
664344dda7b2Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
664444dda7b2Smrg  # as well as any symbol that contains `d'.
664544dda7b2Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
664644dda7b2Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
664744dda7b2Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
664844dda7b2Smrg  # the symbol is explicitly referenced.  Since portable code cannot
664944dda7b2Smrg  # rely on this symbol name, it's probably fine to never include it in
665044dda7b2Smrg  # preloaded symbol tables.
665144dda7b2Smrg  # Exclude shared library initialization/finalization symbols.
665244dda7b2Smrgdnl Note also adjust exclude_expsyms for C++ above.
665344dda7b2Smrg  extract_expsyms_cmds=
665444dda7b2Smrg
665544dda7b2Smrg  case $host_os in
665644dda7b2Smrg  cygwin* | mingw* | pw32* | cegcc*)
665744dda7b2Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
665844dda7b2Smrg    # When not using gcc, we currently assume that we are using
665944dda7b2Smrg    # Microsoft Visual C++.
666044dda7b2Smrg    if test "$GCC" != yes; then
666144dda7b2Smrg      with_gnu_ld=no
666244dda7b2Smrg    fi
666344dda7b2Smrg    ;;
666444dda7b2Smrg  interix*)
666544dda7b2Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
666644dda7b2Smrg    with_gnu_ld=yes
666744dda7b2Smrg    ;;
666844dda7b2Smrg  openbsd*)
666944dda7b2Smrg    with_gnu_ld=no
667044dda7b2Smrg    ;;
667144dda7b2Smrg  esac
66727a3b38f7Smrg
667344dda7b2Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
66747a3b38f7Smrg
667544dda7b2Smrg  # On some targets, GNU ld is compatible enough with the native linker
667644dda7b2Smrg  # that we're better off using the native interface for both.
667744dda7b2Smrg  lt_use_gnu_ld_interface=no
667844dda7b2Smrg  if test "$with_gnu_ld" = yes; then
667944dda7b2Smrg    case $host_os in
668044dda7b2Smrg      aix*)
668144dda7b2Smrg	# The AIX port of GNU ld has always aspired to compatibility
668244dda7b2Smrg	# with the native linker.  However, as the warning in the GNU ld
668344dda7b2Smrg	# block says, versions before 2.19.5* couldn't really create working
668444dda7b2Smrg	# shared libraries, regardless of the interface used.
668544dda7b2Smrg	case `$LD -v 2>&1` in
668644dda7b2Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
668744dda7b2Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
668844dda7b2Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
668944dda7b2Smrg	  *)
669044dda7b2Smrg	    lt_use_gnu_ld_interface=yes
669144dda7b2Smrg	    ;;
669244dda7b2Smrg	esac
669344dda7b2Smrg	;;
669444dda7b2Smrg      *)
669544dda7b2Smrg	lt_use_gnu_ld_interface=yes
669644dda7b2Smrg	;;
669744dda7b2Smrg    esac
669844dda7b2Smrg  fi
66997a3b38f7Smrg
670044dda7b2Smrg  if test "$lt_use_gnu_ld_interface" = yes; then
670144dda7b2Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
670244dda7b2Smrg    wlarc='${wl}'
67037a3b38f7Smrg
670444dda7b2Smrg    # Set some defaults for GNU ld with shared library support. These
670544dda7b2Smrg    # are reset later if shared libraries are not supported. Putting them
670644dda7b2Smrg    # here allows them to be overridden if necessary.
670744dda7b2Smrg    runpath_var=LD_RUN_PATH
670844dda7b2Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
670944dda7b2Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
671044dda7b2Smrg    # ancient GNU ld didn't support --whole-archive et. al.
671144dda7b2Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
671244dda7b2Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
671344dda7b2Smrg    else
671444dda7b2Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
671544dda7b2Smrg    fi
671644dda7b2Smrg    supports_anon_versioning=no
671744dda7b2Smrg    case `$LD -v 2>&1` in
671844dda7b2Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
671944dda7b2Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
672044dda7b2Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
672144dda7b2Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
672244dda7b2Smrg      *\ 2.11.*) ;; # other 2.11 versions
672344dda7b2Smrg      *) supports_anon_versioning=yes ;;
672444dda7b2Smrg    esac
67257a3b38f7Smrg
672644dda7b2Smrg    # See if GNU ld supports shared libraries.
672744dda7b2Smrg    case $host_os in
672844dda7b2Smrg    aix[[3-9]]*)
672944dda7b2Smrg      # On AIX/PPC, the GNU linker is very broken
673044dda7b2Smrg      if test "$host_cpu" != ia64; then
673144dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
673244dda7b2Smrg	cat <<_LT_EOF 1>&2
67337a3b38f7Smrg
673444dda7b2Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
673544dda7b2Smrg*** to be unable to reliably create shared libraries on AIX.
673644dda7b2Smrg*** Therefore, libtool is disabling shared libraries support.  If you
673744dda7b2Smrg*** really care for shared libraries, you may want to install binutils
673844dda7b2Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
673944dda7b2Smrg*** You will then need to restart the configuration process.
67407a3b38f7Smrg
674144dda7b2Smrg_LT_EOF
674244dda7b2Smrg      fi
674344dda7b2Smrg      ;;
67447a3b38f7Smrg
674544dda7b2Smrg    amigaos*)
674644dda7b2Smrg      case $host_cpu in
674744dda7b2Smrg      powerpc)
674844dda7b2Smrg            # see comment about AmigaOS4 .so support
674944dda7b2Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
675044dda7b2Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
675144dda7b2Smrg        ;;
675244dda7b2Smrg      m68k)
675344dda7b2Smrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
675444dda7b2Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
675544dda7b2Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
675644dda7b2Smrg        ;;
675744dda7b2Smrg      esac
675844dda7b2Smrg      ;;
67597a3b38f7Smrg
676044dda7b2Smrg    beos*)
676144dda7b2Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
676244dda7b2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
676344dda7b2Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
676444dda7b2Smrg	# support --undefined.  This deserves some investigation.  FIXME
676544dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
676644dda7b2Smrg      else
676744dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
676844dda7b2Smrg      fi
676944dda7b2Smrg      ;;
67707a3b38f7Smrg
677144dda7b2Smrg    cygwin* | mingw* | pw32* | cegcc*)
677244dda7b2Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
677344dda7b2Smrg      # as there is no search path for DLLs.
677444dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
677544dda7b2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
677644dda7b2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
677744dda7b2Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
677844dda7b2Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
677944dda7b2Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
67807a3b38f7Smrg
678144dda7b2Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
678244dda7b2Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
678344dda7b2Smrg	# If the export-symbols file already is a .def file (1st line
678444dda7b2Smrg	# is EXPORTS), use it as is; otherwise, prepend...
678544dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
678644dda7b2Smrg	  cp $export_symbols $output_objdir/$soname.def;
678744dda7b2Smrg	else
678844dda7b2Smrg	  echo EXPORTS > $output_objdir/$soname.def;
678944dda7b2Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
679044dda7b2Smrg	fi~
679144dda7b2Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
679244dda7b2Smrg      else
679344dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
679444dda7b2Smrg      fi
67957a3b38f7Smrg      ;;
67967a3b38f7Smrg
679744dda7b2Smrg    haiku*)
679844dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
679944dda7b2Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
680044dda7b2Smrg      ;;
6801ff559fabSmrg
680244dda7b2Smrg    interix[[3-9]]*)
680344dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
680444dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
680544dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
680644dda7b2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
680744dda7b2Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
680844dda7b2Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
680944dda7b2Smrg      # default) and relocated if they conflict, which is a slow very memory
681044dda7b2Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
681144dda7b2Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
681244dda7b2Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
681344dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
681444dda7b2Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
68157a3b38f7Smrg      ;;
68167a3b38f7Smrg
681744dda7b2Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
681844dda7b2Smrg      tmp_diet=no
681944dda7b2Smrg      if test "$host_os" = linux-dietlibc; then
682044dda7b2Smrg	case $cc_basename in
682144dda7b2Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
682244dda7b2Smrg	esac
682344dda7b2Smrg      fi
682444dda7b2Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
682544dda7b2Smrg	 && test "$tmp_diet" = no
682644dda7b2Smrg      then
682744dda7b2Smrg	tmp_addflag=
682844dda7b2Smrg	tmp_sharedflag='-shared'
682944dda7b2Smrg	case $cc_basename,$host_cpu in
683044dda7b2Smrg        pgcc*)				# Portland Group C compiler
683144dda7b2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
683244dda7b2Smrg	  tmp_addflag=' $pic_flag'
683344dda7b2Smrg	  ;;
683444dda7b2Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
683544dda7b2Smrg					# Portland Group f77 and f90 compilers
683644dda7b2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
683744dda7b2Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
683844dda7b2Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
683944dda7b2Smrg	  tmp_addflag=' -i_dynamic' ;;
684044dda7b2Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
684144dda7b2Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
684244dda7b2Smrg	ifc* | ifort*)			# Intel Fortran compiler
684344dda7b2Smrg	  tmp_addflag=' -nofor_main' ;;
684444dda7b2Smrg	lf95*)				# Lahey Fortran 8.1
684544dda7b2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
684644dda7b2Smrg	  tmp_sharedflag='--shared' ;;
684744dda7b2Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
684844dda7b2Smrg	  tmp_sharedflag='-qmkshrobj'
684944dda7b2Smrg	  tmp_addflag= ;;
685044dda7b2Smrg	nvcc*)	# Cuda Compiler Driver 2.2
685144dda7b2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
685244dda7b2Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
685344dda7b2Smrg	  ;;
685444dda7b2Smrg	esac
685544dda7b2Smrg	case `$CC -V 2>&1 | sed 5q` in
685644dda7b2Smrg	*Sun\ C*)			# Sun C 5.9
685744dda7b2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
685844dda7b2Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
685944dda7b2Smrg	  tmp_sharedflag='-G' ;;
686044dda7b2Smrg	*Sun\ F*)			# Sun Fortran 8.3
686144dda7b2Smrg	  tmp_sharedflag='-G' ;;
686244dda7b2Smrg	esac
686344dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6864ff559fabSmrg
686544dda7b2Smrg        if test "x$supports_anon_versioning" = xyes; then
686644dda7b2Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
686744dda7b2Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
686844dda7b2Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
686944dda7b2Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
687044dda7b2Smrg        fi
68717a3b38f7Smrg
687244dda7b2Smrg	case $cc_basename in
687344dda7b2Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
687444dda7b2Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
687544dda7b2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
687644dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
687744dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
687844dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
687944dda7b2Smrg	  if test "x$supports_anon_versioning" = xyes; then
688044dda7b2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
688144dda7b2Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
688244dda7b2Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
688344dda7b2Smrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
688444dda7b2Smrg	  fi
688544dda7b2Smrg	  ;;
688644dda7b2Smrg	esac
688744dda7b2Smrg      else
688844dda7b2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
688944dda7b2Smrg      fi
689044dda7b2Smrg      ;;
68917a3b38f7Smrg
689244dda7b2Smrg    netbsd*)
689344dda7b2Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
689444dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
689544dda7b2Smrg	wlarc=
689644dda7b2Smrg      else
689744dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
689844dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
689944dda7b2Smrg      fi
690044dda7b2Smrg      ;;
6901ff559fabSmrg
690244dda7b2Smrg    solaris*)
690344dda7b2Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
690444dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
690544dda7b2Smrg	cat <<_LT_EOF 1>&2
6906ff559fabSmrg
690744dda7b2Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
690844dda7b2Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
690944dda7b2Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
691044dda7b2Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
691144dda7b2Smrg*** your PATH or compiler configuration so that the native linker is
691244dda7b2Smrg*** used, and then restart.
6913ff559fabSmrg
691444dda7b2Smrg_LT_EOF
691544dda7b2Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
691644dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
691744dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
691844dda7b2Smrg      else
691944dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
692044dda7b2Smrg      fi
692144dda7b2Smrg      ;;
6922ff559fabSmrg
692344dda7b2Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
692444dda7b2Smrg      case `$LD -v 2>&1` in
692544dda7b2Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
692644dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
692744dda7b2Smrg	cat <<_LT_EOF 1>&2
6928ff559fabSmrg
692944dda7b2Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
693044dda7b2Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
693144dda7b2Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
693244dda7b2Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
693344dda7b2Smrg*** your PATH or compiler configuration so that the native linker is
693444dda7b2Smrg*** used, and then restart.
6935ff559fabSmrg
693644dda7b2Smrg_LT_EOF
693744dda7b2Smrg	;;
693844dda7b2Smrg	*)
693944dda7b2Smrg	  # For security reasons, it is highly recommended that you always
694044dda7b2Smrg	  # use absolute paths for naming shared libraries, and exclude the
694144dda7b2Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
694244dda7b2Smrg	  # requires that you compile everything twice, which is a pain.
694344dda7b2Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
694444dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
694544dda7b2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
694644dda7b2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
694744dda7b2Smrg	  else
694844dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
694944dda7b2Smrg	  fi
695044dda7b2Smrg	;;
695144dda7b2Smrg      esac
695244dda7b2Smrg      ;;
69537a3b38f7Smrg
695444dda7b2Smrg    sunos4*)
695544dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
695644dda7b2Smrg      wlarc=
695744dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
695844dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
695944dda7b2Smrg      ;;
6960ff559fabSmrg
696144dda7b2Smrg    *)
696244dda7b2Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
696344dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
696444dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
696544dda7b2Smrg      else
696644dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
696744dda7b2Smrg      fi
696844dda7b2Smrg      ;;
696944dda7b2Smrg    esac
6970ff559fabSmrg
697144dda7b2Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
697244dda7b2Smrg      runpath_var=
697344dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
697444dda7b2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
697544dda7b2Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
697644dda7b2Smrg    fi
697744dda7b2Smrg  else
697844dda7b2Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
697944dda7b2Smrg    case $host_os in
698044dda7b2Smrg    aix3*)
698144dda7b2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
698244dda7b2Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
698344dda7b2Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
698444dda7b2Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
698544dda7b2Smrg      # are no directories specified by -L.
698644dda7b2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
698744dda7b2Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
698844dda7b2Smrg	# Neither direct hardcoding nor static linking is supported with a
698944dda7b2Smrg	# broken collect2.
699044dda7b2Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
699144dda7b2Smrg      fi
699244dda7b2Smrg      ;;
6993ff559fabSmrg
699444dda7b2Smrg    aix[[4-9]]*)
699544dda7b2Smrg      if test "$host_cpu" = ia64; then
699644dda7b2Smrg	# On IA64, the linker does run time linking by default, so we don't
699744dda7b2Smrg	# have to do anything special.
699844dda7b2Smrg	aix_use_runtimelinking=no
699944dda7b2Smrg	exp_sym_flag='-Bexport'
700044dda7b2Smrg	no_entry_flag=""
700144dda7b2Smrg      else
700244dda7b2Smrg	# If we're using GNU nm, then we don't want the "-C" option.
700344dda7b2Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
700444dda7b2Smrg	# Also, AIX nm treats weak defined symbols like other global
700544dda7b2Smrg	# defined symbols, whereas GNU nm marks them as "W".
700644dda7b2Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
700744dda7b2Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
700844dda7b2Smrg	else
700944dda7b2Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
701044dda7b2Smrg	fi
701144dda7b2Smrg	aix_use_runtimelinking=no
7012ff559fabSmrg
701344dda7b2Smrg	# Test if we are trying to use run time linking or normal
701444dda7b2Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
701544dda7b2Smrg	# need to do runtime linking.
701644dda7b2Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
701744dda7b2Smrg	  for ld_flag in $LDFLAGS; do
701844dda7b2Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
701944dda7b2Smrg	    aix_use_runtimelinking=yes
702044dda7b2Smrg	    break
702144dda7b2Smrg	  fi
702244dda7b2Smrg	  done
702344dda7b2Smrg	  ;;
702444dda7b2Smrg	esac
7025ff559fabSmrg
702644dda7b2Smrg	exp_sym_flag='-bexport'
702744dda7b2Smrg	no_entry_flag='-bnoentry'
702844dda7b2Smrg      fi
70297a3b38f7Smrg
703044dda7b2Smrg      # When large executables or shared objects are built, AIX ld can
703144dda7b2Smrg      # have problems creating the table of contents.  If linking a library
703244dda7b2Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
703344dda7b2Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
703444dda7b2Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
70357a3b38f7Smrg
703644dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)=''
703744dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
703844dda7b2Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
703944dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
704044dda7b2Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
704144dda7b2Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
70427a3b38f7Smrg
704344dda7b2Smrg      if test "$GCC" = yes; then
704444dda7b2Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
704544dda7b2Smrg	# We only want to do this on AIX 4.2 and lower, the check
704644dda7b2Smrg	# below for broken collect2 doesn't work under 4.3+
704744dda7b2Smrg	  collect2name=`${CC} -print-prog-name=collect2`
704844dda7b2Smrg	  if test -f "$collect2name" &&
704944dda7b2Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
705044dda7b2Smrg	  then
705144dda7b2Smrg	  # We have reworked collect2
705244dda7b2Smrg	  :
705344dda7b2Smrg	  else
705444dda7b2Smrg	  # We have old collect2
705544dda7b2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
705644dda7b2Smrg	  # It fails to find uninstalled libraries when the uninstalled
705744dda7b2Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
705844dda7b2Smrg	  # to unsupported forces relinking
705944dda7b2Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
706044dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
706144dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
706244dda7b2Smrg	  fi
706344dda7b2Smrg	  ;;
706444dda7b2Smrg	esac
706544dda7b2Smrg	shared_flag='-shared'
706644dda7b2Smrg	if test "$aix_use_runtimelinking" = yes; then
706744dda7b2Smrg	  shared_flag="$shared_flag "'${wl}-G'
706844dda7b2Smrg	fi
706944dda7b2Smrg      else
707044dda7b2Smrg	# not using gcc
707144dda7b2Smrg	if test "$host_cpu" = ia64; then
707244dda7b2Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
707344dda7b2Smrg	# chokes on -Wl,-G. The following line is correct:
707444dda7b2Smrg	  shared_flag='-G'
707544dda7b2Smrg	else
707644dda7b2Smrg	  if test "$aix_use_runtimelinking" = yes; then
707744dda7b2Smrg	    shared_flag='${wl}-G'
707844dda7b2Smrg	  else
707944dda7b2Smrg	    shared_flag='${wl}-bM:SRE'
708044dda7b2Smrg	  fi
708144dda7b2Smrg	fi
708244dda7b2Smrg      fi
70837a3b38f7Smrg
708444dda7b2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
708544dda7b2Smrg      # It seems that -bexpall does not export symbols beginning with
708644dda7b2Smrg      # underscore (_), so it is better to generate a list of symbols to export.
708744dda7b2Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
708844dda7b2Smrg      if test "$aix_use_runtimelinking" = yes; then
708944dda7b2Smrg	# Warning - without using the other runtime loading flags (-brtl),
709044dda7b2Smrg	# -berok will link without error, but may produce a broken library.
709144dda7b2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
709244dda7b2Smrg        # Determine the default libpath from the value encoded in an
709344dda7b2Smrg        # empty executable.
709444dda7b2Smrg        _LT_SYS_MODULE_PATH_AIX
709544dda7b2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
709644dda7b2Smrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
709744dda7b2Smrg      else
709844dda7b2Smrg	if test "$host_cpu" = ia64; then
709944dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
710044dda7b2Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
710144dda7b2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
710244dda7b2Smrg	else
710344dda7b2Smrg	 # Determine the default libpath from the value encoded in an
710444dda7b2Smrg	 # empty executable.
710544dda7b2Smrg	 _LT_SYS_MODULE_PATH_AIX
710644dda7b2Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
710744dda7b2Smrg	  # Warning - without using the other run time loading flags,
710844dda7b2Smrg	  # -berok will link without error, but may produce a broken library.
710944dda7b2Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
711044dda7b2Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
711144dda7b2Smrg	  if test "$with_gnu_ld" = yes; then
711244dda7b2Smrg	    # We only use this code for GNU lds that support --whole-archive.
711344dda7b2Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
711444dda7b2Smrg	  else
711544dda7b2Smrg	    # Exported symbols can be pulled into shared objects from archives
711644dda7b2Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
711744dda7b2Smrg	  fi
711844dda7b2Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
711944dda7b2Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
712044dda7b2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
712144dda7b2Smrg	fi
712244dda7b2Smrg      fi
712344dda7b2Smrg      ;;
71247a3b38f7Smrg
712544dda7b2Smrg    amigaos*)
712644dda7b2Smrg      case $host_cpu in
712744dda7b2Smrg      powerpc)
712844dda7b2Smrg            # see comment about AmigaOS4 .so support
712944dda7b2Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
713044dda7b2Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
713144dda7b2Smrg        ;;
713244dda7b2Smrg      m68k)
713344dda7b2Smrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
713444dda7b2Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
713544dda7b2Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
713644dda7b2Smrg        ;;
713744dda7b2Smrg      esac
713844dda7b2Smrg      ;;
71397a3b38f7Smrg
714044dda7b2Smrg    bsdi[[45]]*)
714144dda7b2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
714244dda7b2Smrg      ;;
7143ff559fabSmrg
714444dda7b2Smrg    cygwin* | mingw* | pw32* | cegcc*)
714544dda7b2Smrg      # When not using gcc, we currently assume that we are using
714644dda7b2Smrg      # Microsoft Visual C++.
714744dda7b2Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
714844dda7b2Smrg      # no search path for DLLs.
714944dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
715044dda7b2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
715144dda7b2Smrg      # Tell ltmain to make .lib files, not .a files.
715244dda7b2Smrg      libext=lib
715344dda7b2Smrg      # Tell ltmain to make .dll files, not .so files.
715444dda7b2Smrg      shrext_cmds=".dll"
715544dda7b2Smrg      # FIXME: Setting linknames here is a bad hack.
715644dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
715744dda7b2Smrg      # The linker will automatically build a .lib file if we build a DLL.
715844dda7b2Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
715944dda7b2Smrg      # FIXME: Should let the user specify the lib program.
716044dda7b2Smrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
716144dda7b2Smrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
716244dda7b2Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
716344dda7b2Smrg      ;;
71647a3b38f7Smrg
716544dda7b2Smrg    darwin* | rhapsody*)
716644dda7b2Smrg      _LT_DARWIN_LINKER_FEATURES($1)
716744dda7b2Smrg      ;;
71687a3b38f7Smrg
716944dda7b2Smrg    dgux*)
717044dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
717144dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
717244dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
717344dda7b2Smrg      ;;
7174ff559fabSmrg
717544dda7b2Smrg    freebsd1*)
717644dda7b2Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
717744dda7b2Smrg      ;;
7178ff559fabSmrg
717944dda7b2Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
718044dda7b2Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
718144dda7b2Smrg    # does not break anything, and helps significantly (at the cost of a little
718244dda7b2Smrg    # extra space).
718344dda7b2Smrg    freebsd2.2*)
718444dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
718544dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
718644dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
718744dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
718844dda7b2Smrg      ;;
7189ff559fabSmrg
719044dda7b2Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
719144dda7b2Smrg    freebsd2*)
719244dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
719344dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
719444dda7b2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
719544dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
719644dda7b2Smrg      ;;
71977a3b38f7Smrg
719844dda7b2Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
719944dda7b2Smrg    freebsd* | dragonfly*)
720044dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
720144dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
720244dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
720344dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
720444dda7b2Smrg      ;;
72057a3b38f7Smrg
720644dda7b2Smrg    hpux9*)
720744dda7b2Smrg      if test "$GCC" = yes; then
720844dda7b2Smrg	_LT_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'
720944dda7b2Smrg      else
721044dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
721144dda7b2Smrg      fi
721244dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
721344dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
721444dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
72157a3b38f7Smrg
721644dda7b2Smrg      # hardcode_minus_L: Not really in the search PATH,
721744dda7b2Smrg      # but as the default location of the library.
721844dda7b2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
721944dda7b2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
722044dda7b2Smrg      ;;
72217a3b38f7Smrg
722244dda7b2Smrg    hpux10*)
722344dda7b2Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
722444dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
722544dda7b2Smrg      else
722644dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
722744dda7b2Smrg      fi
722844dda7b2Smrg      if test "$with_gnu_ld" = no; then
722944dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
723044dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
723144dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
723244dda7b2Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
723344dda7b2Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
723444dda7b2Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
723544dda7b2Smrg	# hardcode_minus_L: Not really in the search PATH,
723644dda7b2Smrg	# but as the default location of the library.
723744dda7b2Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
723844dda7b2Smrg      fi
723944dda7b2Smrg      ;;
7240ff559fabSmrg
724144dda7b2Smrg    hpux11*)
724244dda7b2Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
724344dda7b2Smrg	case $host_cpu in
724444dda7b2Smrg	hppa*64*)
724544dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
724644dda7b2Smrg	  ;;
724744dda7b2Smrg	ia64*)
724844dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
724944dda7b2Smrg	  ;;
725044dda7b2Smrg	*)
725144dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
725244dda7b2Smrg	  ;;
725344dda7b2Smrg	esac
725444dda7b2Smrg      else
725544dda7b2Smrg	case $host_cpu in
725644dda7b2Smrg	hppa*64*)
725744dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
725844dda7b2Smrg	  ;;
725944dda7b2Smrg	ia64*)
726044dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
726144dda7b2Smrg	  ;;
726244dda7b2Smrg	*)
726344dda7b2Smrg	m4_if($1, [], [
726444dda7b2Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
726544dda7b2Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
726644dda7b2Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
726744dda7b2Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
726844dda7b2Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
726944dda7b2Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
727044dda7b2Smrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
727144dda7b2Smrg	  ;;
727244dda7b2Smrg	esac
727344dda7b2Smrg      fi
727444dda7b2Smrg      if test "$with_gnu_ld" = no; then
727544dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
727644dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
72777a3b38f7Smrg
727844dda7b2Smrg	case $host_cpu in
727944dda7b2Smrg	hppa*64*|ia64*)
728044dda7b2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
728144dda7b2Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
728244dda7b2Smrg	  ;;
728344dda7b2Smrg	*)
728444dda7b2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
728544dda7b2Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
728644dda7b2Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
72877a3b38f7Smrg
728844dda7b2Smrg	  # hardcode_minus_L: Not really in the search PATH,
728944dda7b2Smrg	  # but as the default location of the library.
729044dda7b2Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
729144dda7b2Smrg	  ;;
729244dda7b2Smrg	esac
729344dda7b2Smrg      fi
729444dda7b2Smrg      ;;
72957a3b38f7Smrg
729644dda7b2Smrg    irix5* | irix6* | nonstopux*)
729744dda7b2Smrg      if test "$GCC" = yes; then
729844dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
729944dda7b2Smrg	# Try to use the -exported_symbol ld option, if it does not
730044dda7b2Smrg	# work, assume that -exports_file does not work either and
730144dda7b2Smrg	# implicitly export all symbols.
730244dda7b2Smrg        save_LDFLAGS="$LDFLAGS"
730344dda7b2Smrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
730444dda7b2Smrg        AC_LINK_IFELSE(int foo(void) {},
730544dda7b2Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
730644dda7b2Smrg        )
730744dda7b2Smrg        LDFLAGS="$save_LDFLAGS"
730844dda7b2Smrg      else
730944dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
731044dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
731144dda7b2Smrg      fi
731244dda7b2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
731344dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
731444dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
731544dda7b2Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
731644dda7b2Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
731744dda7b2Smrg      ;;
73187a3b38f7Smrg
731944dda7b2Smrg    netbsd*)
732044dda7b2Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
732144dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
732244dda7b2Smrg      else
732344dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
732444dda7b2Smrg      fi
732544dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
732644dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
732744dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
732844dda7b2Smrg      ;;
73297a3b38f7Smrg
733044dda7b2Smrg    newsos6)
733144dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
733244dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
733344dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
733444dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
733544dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
733644dda7b2Smrg      ;;
73377a3b38f7Smrg
733844dda7b2Smrg    *nto* | *qnx*)
733944dda7b2Smrg      ;;
73407a3b38f7Smrg
734144dda7b2Smrg    openbsd*)
734244dda7b2Smrg      if test -f /usr/libexec/ld.so; then
734344dda7b2Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
734444dda7b2Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
734544dda7b2Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
734644dda7b2Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
734744dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
734844dda7b2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
734944dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
735044dda7b2Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
735144dda7b2Smrg	else
735244dda7b2Smrg	  case $host_os in
735344dda7b2Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
735444dda7b2Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
735544dda7b2Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
735644dda7b2Smrg	     ;;
735744dda7b2Smrg	   *)
735844dda7b2Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
735944dda7b2Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
736044dda7b2Smrg	     ;;
736144dda7b2Smrg	  esac
7362ff559fabSmrg	fi
736344dda7b2Smrg      else
736444dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
736544dda7b2Smrg      fi
736644dda7b2Smrg      ;;
73677a3b38f7Smrg
736844dda7b2Smrg    os2*)
736944dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
737044dda7b2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
737144dda7b2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
737244dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
737344dda7b2Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
737444dda7b2Smrg      ;;
73757a3b38f7Smrg
737644dda7b2Smrg    osf3*)
737744dda7b2Smrg      if test "$GCC" = yes; then
737844dda7b2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
737944dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
738044dda7b2Smrg      else
738144dda7b2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
738244dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
738344dda7b2Smrg      fi
738444dda7b2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
738544dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
738644dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
738744dda7b2Smrg      ;;
73887a3b38f7Smrg
738944dda7b2Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
739044dda7b2Smrg      if test "$GCC" = yes; then
739144dda7b2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
739244dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
739344dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
739444dda7b2Smrg      else
739544dda7b2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
739644dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
739744dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
739844dda7b2Smrg	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
73997a3b38f7Smrg
740044dda7b2Smrg	# Both c and cxx compiler support -rpath directly
740144dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
740244dda7b2Smrg      fi
740344dda7b2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
740444dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
740544dda7b2Smrg      ;;
74067a3b38f7Smrg
740744dda7b2Smrg    solaris*)
740844dda7b2Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
740944dda7b2Smrg      if test "$GCC" = yes; then
741044dda7b2Smrg	wlarc='${wl}'
741144dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
741244dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
741344dda7b2Smrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
741444dda7b2Smrg      else
741544dda7b2Smrg	case `$CC -V 2>&1` in
741644dda7b2Smrg	*"Compilers 5.0"*)
741744dda7b2Smrg	  wlarc=''
741844dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
741944dda7b2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
742044dda7b2Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
742144dda7b2Smrg	  ;;
742244dda7b2Smrg	*)
742344dda7b2Smrg	  wlarc='${wl}'
742444dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
742544dda7b2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
742644dda7b2Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
742744dda7b2Smrg	  ;;
742844dda7b2Smrg	esac
742944dda7b2Smrg      fi
743044dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
743144dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
743244dda7b2Smrg      case $host_os in
743344dda7b2Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
743444dda7b2Smrg      *)
743544dda7b2Smrg	# The compiler driver will combine and reorder linker options,
743644dda7b2Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
743744dda7b2Smrg	# but is careful enough not to reorder.
743844dda7b2Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
743944dda7b2Smrg	if test "$GCC" = yes; then
744044dda7b2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
744144dda7b2Smrg	else
744244dda7b2Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
744344dda7b2Smrg	fi
744444dda7b2Smrg	;;
744544dda7b2Smrg      esac
744644dda7b2Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
744744dda7b2Smrg      ;;
7448ff559fabSmrg
744944dda7b2Smrg    sunos4*)
745044dda7b2Smrg      if test "x$host_vendor" = xsequent; then
745144dda7b2Smrg	# Use $CC to link under sequent, because it throws in some extra .o
745244dda7b2Smrg	# files that make .init and .fini sections work.
745344dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
745444dda7b2Smrg      else
745544dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
745644dda7b2Smrg      fi
745744dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
745844dda7b2Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
745944dda7b2Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
746044dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
746144dda7b2Smrg      ;;
7462ff559fabSmrg
746344dda7b2Smrg    sysv4)
746444dda7b2Smrg      case $host_vendor in
746544dda7b2Smrg	sni)
746644dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
746744dda7b2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
746844dda7b2Smrg	;;
746944dda7b2Smrg	siemens)
747044dda7b2Smrg	  ## LD is ld it makes a PLAMLIB
747144dda7b2Smrg	  ## CC just makes a GrossModule.
747244dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
747344dda7b2Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
747444dda7b2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
747544dda7b2Smrg        ;;
747644dda7b2Smrg	motorola)
747744dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
747844dda7b2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
747944dda7b2Smrg	;;
748044dda7b2Smrg      esac
748144dda7b2Smrg      runpath_var='LD_RUN_PATH'
748244dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
748344dda7b2Smrg      ;;
7484ff559fabSmrg
748544dda7b2Smrg    sysv4.3*)
748644dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
748744dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
748844dda7b2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
748944dda7b2Smrg      ;;
7490ff559fabSmrg
749144dda7b2Smrg    sysv4*MP*)
749244dda7b2Smrg      if test -d /usr/nec; then
749344dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
749444dda7b2Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
749544dda7b2Smrg	runpath_var=LD_RUN_PATH
749644dda7b2Smrg	hardcode_runpath_var=yes
749744dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
749844dda7b2Smrg      fi
749944dda7b2Smrg      ;;
7500ff559fabSmrg
750144dda7b2Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
750244dda7b2Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
750344dda7b2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
750444dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
750544dda7b2Smrg      runpath_var='LD_RUN_PATH'
7506ff559fabSmrg
750744dda7b2Smrg      if test "$GCC" = yes; then
750844dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
750944dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
751044dda7b2Smrg      else
751144dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
751244dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
751344dda7b2Smrg      fi
751444dda7b2Smrg      ;;
7515ff559fabSmrg
751644dda7b2Smrg    sysv5* | sco3.2v5* | sco5v6*)
751744dda7b2Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
751844dda7b2Smrg      # link with -lc, and that would cause any symbols used from libc to
751944dda7b2Smrg      # always be unresolved, which means just about no library would
752044dda7b2Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
752144dda7b2Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
752244dda7b2Smrg      # as -z defs.
752344dda7b2Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
752444dda7b2Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
752544dda7b2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
752644dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
752744dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
752844dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
752944dda7b2Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
753044dda7b2Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
753144dda7b2Smrg      runpath_var='LD_RUN_PATH'
75327a3b38f7Smrg
753344dda7b2Smrg      if test "$GCC" = yes; then
753444dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
753544dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
753644dda7b2Smrg      else
753744dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
753844dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
753944dda7b2Smrg      fi
754044dda7b2Smrg      ;;
75417a3b38f7Smrg
754244dda7b2Smrg    uts4*)
754344dda7b2Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
754444dda7b2Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
754544dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
754644dda7b2Smrg      ;;
75477a3b38f7Smrg
754844dda7b2Smrg    *)
754944dda7b2Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
755044dda7b2Smrg      ;;
755144dda7b2Smrg    esac
75527a3b38f7Smrg
755344dda7b2Smrg    if test x$host_vendor = xsni; then
755444dda7b2Smrg      case $host in
755544dda7b2Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
755644dda7b2Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
755744dda7b2Smrg	;;
755844dda7b2Smrg      esac
755944dda7b2Smrg    fi
756044dda7b2Smrg  fi
756144dda7b2Smrg])
756244dda7b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
756344dda7b2Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
75647a3b38f7Smrg
756544dda7b2Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
75667a3b38f7Smrg
756744dda7b2Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
756844dda7b2Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
756944dda7b2Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
757044dda7b2Smrg    [The commands to extract the exported symbol list from a shared archive])
75717a3b38f7Smrg
757244dda7b2Smrg#
757344dda7b2Smrg# Do we need to explicitly link libc?
757444dda7b2Smrg#
757544dda7b2Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
757644dda7b2Smrgx|xyes)
757744dda7b2Smrg  # Assume -lc should be added
757844dda7b2Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
75797a3b38f7Smrg
758044dda7b2Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
758144dda7b2Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
758244dda7b2Smrg    *'~'*)
758344dda7b2Smrg      # FIXME: we may have to deal with multi-command sequences.
758444dda7b2Smrg      ;;
758544dda7b2Smrg    '$CC '*)
758644dda7b2Smrg      # Test whether the compiler implicitly links with -lc since on some
758744dda7b2Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
758844dda7b2Smrg      # to ld, don't add -lc before -lgcc.
758944dda7b2Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
759044dda7b2Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
759144dda7b2Smrg	[$RM conftest*
759244dda7b2Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
759344dda7b2Smrg
759444dda7b2Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
759544dda7b2Smrg	  soname=conftest
759644dda7b2Smrg	  lib=conftest
759744dda7b2Smrg	  libobjs=conftest.$ac_objext
759844dda7b2Smrg	  deplibs=
759944dda7b2Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
760044dda7b2Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
760144dda7b2Smrg	  compiler_flags=-v
760244dda7b2Smrg	  linker_flags=-v
760344dda7b2Smrg	  verstring=
760444dda7b2Smrg	  output_objdir=.
760544dda7b2Smrg	  libname=conftest
760644dda7b2Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
760744dda7b2Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
760844dda7b2Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
760944dda7b2Smrg	  then
761044dda7b2Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
761144dda7b2Smrg	  else
761244dda7b2Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
761344dda7b2Smrg	  fi
761444dda7b2Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
761544dda7b2Smrg	else
761644dda7b2Smrg	  cat conftest.err 1>&5
761744dda7b2Smrg	fi
761844dda7b2Smrg	$RM conftest*
761944dda7b2Smrg	])
762044dda7b2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
762144dda7b2Smrg      ;;
762244dda7b2Smrg    esac
762344dda7b2Smrg  fi
762444dda7b2Smrg  ;;
762544dda7b2Smrgesac
76267a3b38f7Smrg
762744dda7b2Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
762844dda7b2Smrg    [Whether or not to add -lc for building shared libraries])
762944dda7b2Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
763044dda7b2Smrg    [enable_shared_with_static_runtimes], [0],
763144dda7b2Smrg    [Whether or not to disallow shared libs when runtime libs are static])
763244dda7b2Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
763344dda7b2Smrg    [Compiler flag to allow reflexive dlopens])
763444dda7b2Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
763544dda7b2Smrg    [Compiler flag to generate shared objects directly from archives])
763644dda7b2Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
763744dda7b2Smrg    [Whether the compiler copes with passing no objects directly])
763844dda7b2Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
763944dda7b2Smrg    [Create an old-style archive from a shared archive])
764044dda7b2Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
764144dda7b2Smrg    [Create a temporary old-style archive to link instead of a shared archive])
764244dda7b2Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
764344dda7b2Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
764444dda7b2Smrg_LT_TAGDECL([], [module_cmds], [2],
764544dda7b2Smrg    [Commands used to build a loadable module if different from building
764644dda7b2Smrg    a shared archive.])
764744dda7b2Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
764844dda7b2Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
764944dda7b2Smrg    [Whether we are building with GNU ld or not])
765044dda7b2Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
765144dda7b2Smrg    [Flag that allows shared libraries with undefined symbols to be built])
765244dda7b2Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
765344dda7b2Smrg    [Flag that enforces no undefined symbols])
765444dda7b2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
765544dda7b2Smrg    [Flag to hardcode $libdir into a binary during linking.
765644dda7b2Smrg    This must work even if $libdir does not exist])
765744dda7b2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
765844dda7b2Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
765944dda7b2Smrg    during linking.  This must work even if $libdir does not exist]])
766044dda7b2Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
766144dda7b2Smrg    [Whether we need a single "-rpath" flag with a separated argument])
766244dda7b2Smrg_LT_TAGDECL([], [hardcode_direct], [0],
766344dda7b2Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
766444dda7b2Smrg    DIR into the resulting binary])
766544dda7b2Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
766644dda7b2Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
766744dda7b2Smrg    DIR into the resulting binary and the resulting library dependency is
766844dda7b2Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
766944dda7b2Smrg    library is relocated])
767044dda7b2Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
767144dda7b2Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
767244dda7b2Smrg    into the resulting binary])
767344dda7b2Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
767444dda7b2Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
767544dda7b2Smrg    into the resulting binary])
767644dda7b2Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
767744dda7b2Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
767844dda7b2Smrg    into the library and all subsequent libraries and executables linked
767944dda7b2Smrg    against it])
768044dda7b2Smrg_LT_TAGDECL([], [inherit_rpath], [0],
768144dda7b2Smrg    [Set to yes if linker adds runtime paths of dependent libraries
768244dda7b2Smrg    to runtime path list])
768344dda7b2Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
768444dda7b2Smrg    [Whether libtool must link a program against all its dependency libraries])
768544dda7b2Smrg_LT_TAGDECL([], [fix_srcfile_path], [1],
768644dda7b2Smrg    [Fix the shell variable $srcfile for the compiler])
768744dda7b2Smrg_LT_TAGDECL([], [always_export_symbols], [0],
768844dda7b2Smrg    [Set to "yes" if exported symbols are required])
768944dda7b2Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
769044dda7b2Smrg    [The commands to list exported symbols])
769144dda7b2Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
769244dda7b2Smrg    [Symbols that should not be listed in the preloaded symbols])
769344dda7b2Smrg_LT_TAGDECL([], [include_expsyms], [1],
769444dda7b2Smrg    [Symbols that must always be exported])
769544dda7b2Smrg_LT_TAGDECL([], [prelink_cmds], [2],
769644dda7b2Smrg    [Commands necessary for linking programs (against libraries) with templates])
769744dda7b2Smrg_LT_TAGDECL([], [file_list_spec], [1],
769844dda7b2Smrg    [Specify filename containing input files])
769944dda7b2Smrgdnl FIXME: Not yet implemented
770044dda7b2Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
770144dda7b2Smrgdnl    [Compiler flag to generate thread safe objects])
770244dda7b2Smrg])# _LT_LINKER_SHLIBS
77037a3b38f7Smrg
77047a3b38f7Smrg
770544dda7b2Smrg# _LT_LANG_C_CONFIG([TAG])
770644dda7b2Smrg# ------------------------
770744dda7b2Smrg# Ensure that the configuration variables for a C compiler are suitably
770844dda7b2Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
770944dda7b2Smrg# the compiler configuration to `libtool'.
771044dda7b2Smrgm4_defun([_LT_LANG_C_CONFIG],
771144dda7b2Smrg[m4_require([_LT_DECL_EGREP])dnl
771244dda7b2Smrglt_save_CC="$CC"
771344dda7b2SmrgAC_LANG_PUSH(C)
77147a3b38f7Smrg
771544dda7b2Smrg# Source file extension for C test sources.
771644dda7b2Smrgac_ext=c
77177a3b38f7Smrg
771844dda7b2Smrg# Object file extension for compiled C test sources.
77197a3b38f7Smrgobjext=o
77207a3b38f7Smrg_LT_TAGVAR(objext, $1)=$objext
77217a3b38f7Smrg
77227a3b38f7Smrg# Code to be used in simple compile tests
772344dda7b2Smrglt_simple_compile_test_code="int some_variable = 0;"
77247a3b38f7Smrg
77257a3b38f7Smrg# Code to be used in simple link tests
772644dda7b2Smrglt_simple_link_test_code='int main(){return(0);}'
77277a3b38f7Smrg
77287a3b38f7Smrg_LT_TAG_COMPILER
772944dda7b2Smrg# Save the default compiler, since it gets overwritten when the other
773044dda7b2Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
773144dda7b2Smrgcompiler_DEFAULT=$CC
77327a3b38f7Smrg
77337a3b38f7Smrg# save warnings/boilerplate of simple test code
77347a3b38f7Smrg_LT_COMPILER_BOILERPLATE
77357a3b38f7Smrg_LT_LINKER_BOILERPLATE
77367a3b38f7Smrg
77377a3b38f7Smrgif test -n "$compiler"; then
773844dda7b2Smrg  _LT_COMPILER_NO_RTTI($1)
773944dda7b2Smrg  _LT_COMPILER_PIC($1)
774044dda7b2Smrg  _LT_COMPILER_C_O($1)
774144dda7b2Smrg  _LT_COMPILER_FILE_LOCKS($1)
774244dda7b2Smrg  _LT_LINKER_SHLIBS($1)
774344dda7b2Smrg  _LT_SYS_DYNAMIC_LINKER($1)
774444dda7b2Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
774544dda7b2Smrg  LT_SYS_DLOPEN_SELF
774644dda7b2Smrg  _LT_CMD_STRIPLIB
77477a3b38f7Smrg
774844dda7b2Smrg  # Report which library types will actually be built
774944dda7b2Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
775044dda7b2Smrg  AC_MSG_RESULT([$can_build_shared])
77517a3b38f7Smrg
775244dda7b2Smrg  AC_MSG_CHECKING([whether to build shared libraries])
775344dda7b2Smrg  test "$can_build_shared" = "no" && enable_shared=no
77547a3b38f7Smrg
775544dda7b2Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
775644dda7b2Smrg  # are all built from PIC.
775744dda7b2Smrg  case $host_os in
775844dda7b2Smrg  aix3*)
775944dda7b2Smrg    test "$enable_shared" = yes && enable_static=no
776044dda7b2Smrg    if test -n "$RANLIB"; then
776144dda7b2Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
776244dda7b2Smrg      postinstall_cmds='$RANLIB $lib'
776344dda7b2Smrg    fi
776444dda7b2Smrg    ;;
77657a3b38f7Smrg
776644dda7b2Smrg  aix[[4-9]]*)
776744dda7b2Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
776844dda7b2Smrg      test "$enable_shared" = yes && enable_static=no
776944dda7b2Smrg    fi
777044dda7b2Smrg    ;;
77717a3b38f7Smrg  esac
777244dda7b2Smrg  AC_MSG_RESULT([$enable_shared])
77737a3b38f7Smrg
777444dda7b2Smrg  AC_MSG_CHECKING([whether to build static libraries])
777544dda7b2Smrg  # Make sure either enable_shared or enable_static is yes.
777644dda7b2Smrg  test "$enable_shared" = yes || enable_static=yes
777744dda7b2Smrg  AC_MSG_RESULT([$enable_static])
77787a3b38f7Smrg
777944dda7b2Smrg  _LT_CONFIG($1)
778044dda7b2Smrgfi
778144dda7b2SmrgAC_LANG_POP
778244dda7b2SmrgCC="$lt_save_CC"
778344dda7b2Smrg])# _LT_LANG_C_CONFIG
77847a3b38f7Smrg
77857a3b38f7Smrg
778644dda7b2Smrg# _LT_LANG_CXX_CONFIG([TAG])
778744dda7b2Smrg# --------------------------
778844dda7b2Smrg# Ensure that the configuration variables for a C++ compiler are suitably
778944dda7b2Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
779044dda7b2Smrg# the compiler configuration to `libtool'.
779144dda7b2Smrgm4_defun([_LT_LANG_CXX_CONFIG],
779244dda7b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
779344dda7b2Smrgm4_require([_LT_DECL_EGREP])dnl
779444dda7b2Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
779544dda7b2Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
779644dda7b2Smrg    (test "X$CXX" != "Xg++"))) ; then
779744dda7b2Smrg  AC_PROG_CXXCPP
779844dda7b2Smrgelse
779944dda7b2Smrg  _lt_caught_CXX_error=yes
780044dda7b2Smrgfi
78017a3b38f7Smrg
780244dda7b2SmrgAC_LANG_PUSH(C++)
780344dda7b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
780444dda7b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
780544dda7b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no
780644dda7b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
780744dda7b2Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
780844dda7b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
780944dda7b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no
781044dda7b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
781144dda7b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
781244dda7b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
781344dda7b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
781444dda7b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
781544dda7b2Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
781644dda7b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
781744dda7b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no
781844dda7b2Smrg_LT_TAGVAR(module_cmds, $1)=
781944dda7b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
782044dda7b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
782144dda7b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
782244dda7b2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
782344dda7b2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
782444dda7b2Smrg_LT_TAGVAR(no_undefined_flag, $1)=
782544dda7b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
782644dda7b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
78277a3b38f7Smrg
782844dda7b2Smrg# Source file extension for C++ test sources.
782944dda7b2Smrgac_ext=cpp
78307a3b38f7Smrg
783144dda7b2Smrg# Object file extension for compiled C++ test sources.
783244dda7b2Smrgobjext=o
783344dda7b2Smrg_LT_TAGVAR(objext, $1)=$objext
78347a3b38f7Smrg
783544dda7b2Smrg# No sense in running all these tests if we already determined that
783644dda7b2Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
783744dda7b2Smrg# are currently assumed to apply to all compilers on this platform,
783844dda7b2Smrg# and will be corrupted by setting them based on a non-working compiler.
783944dda7b2Smrgif test "$_lt_caught_CXX_error" != yes; then
784044dda7b2Smrg  # Code to be used in simple compile tests
784144dda7b2Smrg  lt_simple_compile_test_code="int some_variable = 0;"
78427a3b38f7Smrg
784344dda7b2Smrg  # Code to be used in simple link tests
784444dda7b2Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
78457a3b38f7Smrg
784644dda7b2Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
784744dda7b2Smrg  _LT_TAG_COMPILER
78487a3b38f7Smrg
784944dda7b2Smrg  # save warnings/boilerplate of simple test code
785044dda7b2Smrg  _LT_COMPILER_BOILERPLATE
785144dda7b2Smrg  _LT_LINKER_BOILERPLATE
78527a3b38f7Smrg
785344dda7b2Smrg  # Allow CC to be a program name with arguments.
785444dda7b2Smrg  lt_save_CC=$CC
785544dda7b2Smrg  lt_save_LD=$LD
785644dda7b2Smrg  lt_save_GCC=$GCC
785744dda7b2Smrg  GCC=$GXX
785844dda7b2Smrg  lt_save_with_gnu_ld=$with_gnu_ld
785944dda7b2Smrg  lt_save_path_LD=$lt_cv_path_LD
786044dda7b2Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
786144dda7b2Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
786244dda7b2Smrg  else
786344dda7b2Smrg    $as_unset lt_cv_prog_gnu_ld
786444dda7b2Smrg  fi
786544dda7b2Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
786644dda7b2Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
786744dda7b2Smrg  else
786844dda7b2Smrg    $as_unset lt_cv_path_LD
786944dda7b2Smrg  fi
787044dda7b2Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
787144dda7b2Smrg  CC=${CXX-"c++"}
787244dda7b2Smrg  compiler=$CC
787344dda7b2Smrg  _LT_TAGVAR(compiler, $1)=$CC
787444dda7b2Smrg  _LT_CC_BASENAME([$compiler])
78757a3b38f7Smrg
787644dda7b2Smrg  if test -n "$compiler"; then
787744dda7b2Smrg    # We don't want -fno-exception when compiling C++ code, so set the
787844dda7b2Smrg    # no_builtin_flag separately
787944dda7b2Smrg    if test "$GXX" = yes; then
788044dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
788144dda7b2Smrg    else
788244dda7b2Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
788344dda7b2Smrg    fi
78847a3b38f7Smrg
788544dda7b2Smrg    if test "$GXX" = yes; then
788644dda7b2Smrg      # Set up default GNU C++ configuration
78877a3b38f7Smrg
788844dda7b2Smrg      LT_PATH_LD
78897a3b38f7Smrg
789044dda7b2Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
789144dda7b2Smrg      # archiving commands below assume that GNU ld is being used.
789244dda7b2Smrg      if test "$with_gnu_ld" = yes; then
789344dda7b2Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
789444dda7b2Smrg        _LT_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'
78957a3b38f7Smrg
789644dda7b2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
789744dda7b2Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
78987a3b38f7Smrg
789944dda7b2Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
790044dda7b2Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
790144dda7b2Smrg        #     investigate it a little bit more. (MM)
790244dda7b2Smrg        wlarc='${wl}'
79037a3b38f7Smrg
790444dda7b2Smrg        # ancient GNU ld didn't support --whole-archive et. al.
790544dda7b2Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
790644dda7b2Smrg	  $GREP 'no-whole-archive' > /dev/null; then
790744dda7b2Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
790844dda7b2Smrg        else
790944dda7b2Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
791044dda7b2Smrg        fi
791144dda7b2Smrg      else
791244dda7b2Smrg        with_gnu_ld=no
791344dda7b2Smrg        wlarc=
79147a3b38f7Smrg
791544dda7b2Smrg        # A generic and very simple default shared library creation
791644dda7b2Smrg        # command for GNU C++ for the case where it uses the native
791744dda7b2Smrg        # linker, instead of GNU ld.  If possible, this setting should
791844dda7b2Smrg        # overridden to take advantage of the native linker features on
791944dda7b2Smrg        # the platform it is being used on.
792044dda7b2Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
792144dda7b2Smrg      fi
79227a3b38f7Smrg
792344dda7b2Smrg      # Commands to make compiler produce verbose output that lists
792444dda7b2Smrg      # what "hidden" libraries, object files and flags are used when
792544dda7b2Smrg      # linking a shared library.
792644dda7b2Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
79277a3b38f7Smrg
792844dda7b2Smrg    else
792944dda7b2Smrg      GXX=no
793044dda7b2Smrg      with_gnu_ld=no
793144dda7b2Smrg      wlarc=
793244dda7b2Smrg    fi
79337a3b38f7Smrg
793444dda7b2Smrg    # PORTME: fill in a description of your system's C++ link characteristics
793544dda7b2Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
793644dda7b2Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
793744dda7b2Smrg    case $host_os in
793844dda7b2Smrg      aix3*)
793944dda7b2Smrg        # FIXME: insert proper C++ library support
794044dda7b2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
794144dda7b2Smrg        ;;
794244dda7b2Smrg      aix[[4-9]]*)
794344dda7b2Smrg        if test "$host_cpu" = ia64; then
794444dda7b2Smrg          # On IA64, the linker does run time linking by default, so we don't
794544dda7b2Smrg          # have to do anything special.
794644dda7b2Smrg          aix_use_runtimelinking=no
794744dda7b2Smrg          exp_sym_flag='-Bexport'
794844dda7b2Smrg          no_entry_flag=""
794944dda7b2Smrg        else
795044dda7b2Smrg          aix_use_runtimelinking=no
79517a3b38f7Smrg
795244dda7b2Smrg          # Test if we are trying to use run time linking or normal
795344dda7b2Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
795444dda7b2Smrg          # need to do runtime linking.
795544dda7b2Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
795644dda7b2Smrg	    for ld_flag in $LDFLAGS; do
795744dda7b2Smrg	      case $ld_flag in
795844dda7b2Smrg	      *-brtl*)
795944dda7b2Smrg	        aix_use_runtimelinking=yes
796044dda7b2Smrg	        break
796144dda7b2Smrg	        ;;
796244dda7b2Smrg	      esac
796344dda7b2Smrg	    done
796444dda7b2Smrg	    ;;
796544dda7b2Smrg          esac
79667a3b38f7Smrg
796744dda7b2Smrg          exp_sym_flag='-bexport'
796844dda7b2Smrg          no_entry_flag='-bnoentry'
796944dda7b2Smrg        fi
79707a3b38f7Smrg
797144dda7b2Smrg        # When large executables or shared objects are built, AIX ld can
797244dda7b2Smrg        # have problems creating the table of contents.  If linking a library
797344dda7b2Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
797444dda7b2Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
797544dda7b2Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
79767a3b38f7Smrg
797744dda7b2Smrg        _LT_TAGVAR(archive_cmds, $1)=''
797844dda7b2Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
797944dda7b2Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
798044dda7b2Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
798144dda7b2Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
798244dda7b2Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
79837a3b38f7Smrg
798444dda7b2Smrg        if test "$GXX" = yes; then
798544dda7b2Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
798644dda7b2Smrg          # We only want to do this on AIX 4.2 and lower, the check
798744dda7b2Smrg          # below for broken collect2 doesn't work under 4.3+
798844dda7b2Smrg	  collect2name=`${CC} -print-prog-name=collect2`
798944dda7b2Smrg	  if test -f "$collect2name" &&
799044dda7b2Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
799144dda7b2Smrg	  then
799244dda7b2Smrg	    # We have reworked collect2
799344dda7b2Smrg	    :
799444dda7b2Smrg	  else
799544dda7b2Smrg	    # We have old collect2
799644dda7b2Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
799744dda7b2Smrg	    # It fails to find uninstalled libraries when the uninstalled
799844dda7b2Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
799944dda7b2Smrg	    # to unsupported forces relinking
800044dda7b2Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
800144dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
800244dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
800344dda7b2Smrg	  fi
800444dda7b2Smrg          esac
800544dda7b2Smrg          shared_flag='-shared'
800644dda7b2Smrg	  if test "$aix_use_runtimelinking" = yes; then
800744dda7b2Smrg	    shared_flag="$shared_flag "'${wl}-G'
800844dda7b2Smrg	  fi
800944dda7b2Smrg        else
801044dda7b2Smrg          # not using gcc
801144dda7b2Smrg          if test "$host_cpu" = ia64; then
801244dda7b2Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
801344dda7b2Smrg	  # chokes on -Wl,-G. The following line is correct:
801444dda7b2Smrg	  shared_flag='-G'
801544dda7b2Smrg          else
801644dda7b2Smrg	    if test "$aix_use_runtimelinking" = yes; then
801744dda7b2Smrg	      shared_flag='${wl}-G'
801844dda7b2Smrg	    else
801944dda7b2Smrg	      shared_flag='${wl}-bM:SRE'
802044dda7b2Smrg	    fi
802144dda7b2Smrg          fi
802244dda7b2Smrg        fi
80237a3b38f7Smrg
802444dda7b2Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
802544dda7b2Smrg        # It seems that -bexpall does not export symbols beginning with
802644dda7b2Smrg        # underscore (_), so it is better to generate a list of symbols to
802744dda7b2Smrg	# export.
802844dda7b2Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
802944dda7b2Smrg        if test "$aix_use_runtimelinking" = yes; then
803044dda7b2Smrg          # Warning - without using the other runtime loading flags (-brtl),
803144dda7b2Smrg          # -berok will link without error, but may produce a broken library.
803244dda7b2Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
803344dda7b2Smrg          # Determine the default libpath from the value encoded in an empty
803444dda7b2Smrg          # executable.
803544dda7b2Smrg          _LT_SYS_MODULE_PATH_AIX
803644dda7b2Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
80377a3b38f7Smrg
803844dda7b2Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
803944dda7b2Smrg        else
804044dda7b2Smrg          if test "$host_cpu" = ia64; then
804144dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
804244dda7b2Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
804344dda7b2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
804444dda7b2Smrg          else
804544dda7b2Smrg	    # Determine the default libpath from the value encoded in an
804644dda7b2Smrg	    # empty executable.
804744dda7b2Smrg	    _LT_SYS_MODULE_PATH_AIX
804844dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
804944dda7b2Smrg	    # Warning - without using the other run time loading flags,
805044dda7b2Smrg	    # -berok will link without error, but may produce a broken library.
805144dda7b2Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
805244dda7b2Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
805344dda7b2Smrg	    if test "$with_gnu_ld" = yes; then
805444dda7b2Smrg	      # We only use this code for GNU lds that support --whole-archive.
805544dda7b2Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
805644dda7b2Smrg	    else
805744dda7b2Smrg	      # Exported symbols can be pulled into shared objects from archives
805844dda7b2Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
805944dda7b2Smrg	    fi
806044dda7b2Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
806144dda7b2Smrg	    # This is similar to how AIX traditionally builds its shared
806244dda7b2Smrg	    # libraries.
806344dda7b2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
806444dda7b2Smrg          fi
806544dda7b2Smrg        fi
806644dda7b2Smrg        ;;
80677a3b38f7Smrg
806844dda7b2Smrg      beos*)
806944dda7b2Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
807044dda7b2Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
807144dda7b2Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
807244dda7b2Smrg	  # support --undefined.  This deserves some investigation.  FIXME
807344dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
807444dda7b2Smrg	else
807544dda7b2Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
807644dda7b2Smrg	fi
807744dda7b2Smrg	;;
80787a3b38f7Smrg
807944dda7b2Smrg      chorus*)
808044dda7b2Smrg        case $cc_basename in
808144dda7b2Smrg          *)
808244dda7b2Smrg	  # FIXME: insert proper C++ library support
808344dda7b2Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
808444dda7b2Smrg	  ;;
808544dda7b2Smrg        esac
808644dda7b2Smrg        ;;
80877a3b38f7Smrg
808844dda7b2Smrg      cygwin* | mingw* | pw32* | cegcc*)
808944dda7b2Smrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
809044dda7b2Smrg        # as there is no search path for DLLs.
809144dda7b2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
809244dda7b2Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
809344dda7b2Smrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
809444dda7b2Smrg        _LT_TAGVAR(always_export_symbols, $1)=no
809544dda7b2Smrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
80967a3b38f7Smrg
809744dda7b2Smrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
809844dda7b2Smrg          _LT_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'
809944dda7b2Smrg          # If the export-symbols file already is a .def file (1st line
810044dda7b2Smrg          # is EXPORTS), use it as is; otherwise, prepend...
810144dda7b2Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
810244dda7b2Smrg	    cp $export_symbols $output_objdir/$soname.def;
810344dda7b2Smrg          else
810444dda7b2Smrg	    echo EXPORTS > $output_objdir/$soname.def;
810544dda7b2Smrg	    cat $export_symbols >> $output_objdir/$soname.def;
810644dda7b2Smrg          fi~
810744dda7b2Smrg          $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'
810844dda7b2Smrg        else
810944dda7b2Smrg          _LT_TAGVAR(ld_shlibs, $1)=no
811044dda7b2Smrg        fi
811144dda7b2Smrg        ;;
811244dda7b2Smrg      darwin* | rhapsody*)
811344dda7b2Smrg        _LT_DARWIN_LINKER_FEATURES($1)
811444dda7b2Smrg	;;
81157a3b38f7Smrg
811644dda7b2Smrg      dgux*)
811744dda7b2Smrg        case $cc_basename in
811844dda7b2Smrg          ec++*)
811944dda7b2Smrg	    # FIXME: insert proper C++ library support
812044dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
812144dda7b2Smrg	    ;;
812244dda7b2Smrg          ghcx*)
812344dda7b2Smrg	    # Green Hills C++ Compiler
812444dda7b2Smrg	    # FIXME: insert proper C++ library support
812544dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
812644dda7b2Smrg	    ;;
812744dda7b2Smrg          *)
812844dda7b2Smrg	    # FIXME: insert proper C++ library support
812944dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
813044dda7b2Smrg	    ;;
813144dda7b2Smrg        esac
813244dda7b2Smrg        ;;
81337a3b38f7Smrg
813444dda7b2Smrg      freebsd[[12]]*)
813544dda7b2Smrg        # C++ shared libraries reported to be fairly broken before
813644dda7b2Smrg	# switch to ELF
813744dda7b2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
813844dda7b2Smrg        ;;
81397a3b38f7Smrg
814044dda7b2Smrg      freebsd-elf*)
814144dda7b2Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
814244dda7b2Smrg        ;;
81437a3b38f7Smrg
814444dda7b2Smrg      freebsd* | dragonfly*)
814544dda7b2Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
814644dda7b2Smrg        # conventions
814744dda7b2Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
814844dda7b2Smrg        ;;
81497a3b38f7Smrg
815044dda7b2Smrg      gnu*)
815144dda7b2Smrg        ;;
81527a3b38f7Smrg
815344dda7b2Smrg      haiku*)
815444dda7b2Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
815544dda7b2Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
815644dda7b2Smrg        ;;
81577a3b38f7Smrg
815844dda7b2Smrg      hpux9*)
815944dda7b2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
816044dda7b2Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
816144dda7b2Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
816244dda7b2Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
816344dda7b2Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
816444dda7b2Smrg				             # but as the default
816544dda7b2Smrg				             # location of the library.
81667a3b38f7Smrg
816744dda7b2Smrg        case $cc_basename in
816844dda7b2Smrg          CC*)
816944dda7b2Smrg            # FIXME: insert proper C++ library support
817044dda7b2Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
817144dda7b2Smrg            ;;
817244dda7b2Smrg          aCC*)
817344dda7b2Smrg            _LT_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'
817444dda7b2Smrg            # Commands to make compiler produce verbose output that lists
817544dda7b2Smrg            # what "hidden" libraries, object files and flags are used when
817644dda7b2Smrg            # linking a shared library.
817744dda7b2Smrg            #
817844dda7b2Smrg            # There doesn't appear to be a way to prevent this compiler from
817944dda7b2Smrg            # explicitly linking system object files so we need to strip them
818044dda7b2Smrg            # from the output so that they don't get included in the library
818144dda7b2Smrg            # dependencies.
818244dda7b2Smrg            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
818344dda7b2Smrg            ;;
818444dda7b2Smrg          *)
818544dda7b2Smrg            if test "$GXX" = yes; then
818644dda7b2Smrg              _LT_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'
818744dda7b2Smrg            else
818844dda7b2Smrg              # FIXME: insert proper C++ library support
818944dda7b2Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
819044dda7b2Smrg            fi
819144dda7b2Smrg            ;;
819244dda7b2Smrg        esac
819344dda7b2Smrg        ;;
81947a3b38f7Smrg
819544dda7b2Smrg      hpux10*|hpux11*)
819644dda7b2Smrg        if test $with_gnu_ld = no; then
819744dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
819844dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
81997a3b38f7Smrg
820044dda7b2Smrg          case $host_cpu in
820144dda7b2Smrg            hppa*64*|ia64*)
820244dda7b2Smrg              ;;
820344dda7b2Smrg            *)
820444dda7b2Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
820544dda7b2Smrg              ;;
820644dda7b2Smrg          esac
820744dda7b2Smrg        fi
820844dda7b2Smrg        case $host_cpu in
820944dda7b2Smrg          hppa*64*|ia64*)
821044dda7b2Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
821144dda7b2Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
821244dda7b2Smrg            ;;
821344dda7b2Smrg          *)
821444dda7b2Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
821544dda7b2Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
821644dda7b2Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
821744dda7b2Smrg					         # but as the default
821844dda7b2Smrg					         # location of the library.
821944dda7b2Smrg            ;;
822044dda7b2Smrg        esac
82217a3b38f7Smrg
822244dda7b2Smrg        case $cc_basename in
822344dda7b2Smrg          CC*)
822444dda7b2Smrg	    # FIXME: insert proper C++ library support
822544dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
822644dda7b2Smrg	    ;;
822744dda7b2Smrg          aCC*)
822844dda7b2Smrg	    case $host_cpu in
822944dda7b2Smrg	      hppa*64*)
823044dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
823144dda7b2Smrg	        ;;
823244dda7b2Smrg	      ia64*)
823344dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
823444dda7b2Smrg	        ;;
823544dda7b2Smrg	      *)
823644dda7b2Smrg	        _LT_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'
823744dda7b2Smrg	        ;;
823844dda7b2Smrg	    esac
823944dda7b2Smrg	    # Commands to make compiler produce verbose output that lists
824044dda7b2Smrg	    # what "hidden" libraries, object files and flags are used when
824144dda7b2Smrg	    # linking a shared library.
824244dda7b2Smrg	    #
824344dda7b2Smrg	    # There doesn't appear to be a way to prevent this compiler from
824444dda7b2Smrg	    # explicitly linking system object files so we need to strip them
824544dda7b2Smrg	    # from the output so that they don't get included in the library
824644dda7b2Smrg	    # dependencies.
824744dda7b2Smrg	    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; func_echo_all "$list"'
824844dda7b2Smrg	    ;;
824944dda7b2Smrg          *)
825044dda7b2Smrg	    if test "$GXX" = yes; then
825144dda7b2Smrg	      if test $with_gnu_ld = no; then
825244dda7b2Smrg	        case $host_cpu in
825344dda7b2Smrg	          hppa*64*)
825444dda7b2Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
825544dda7b2Smrg	            ;;
825644dda7b2Smrg	          ia64*)
825744dda7b2Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
825844dda7b2Smrg	            ;;
825944dda7b2Smrg	          *)
826044dda7b2Smrg	            _LT_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'
826144dda7b2Smrg	            ;;
826244dda7b2Smrg	        esac
826344dda7b2Smrg	      fi
826444dda7b2Smrg	    else
826544dda7b2Smrg	      # FIXME: insert proper C++ library support
826644dda7b2Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
826744dda7b2Smrg	    fi
826844dda7b2Smrg	    ;;
826944dda7b2Smrg        esac
827044dda7b2Smrg        ;;
82717a3b38f7Smrg
827244dda7b2Smrg      interix[[3-9]]*)
827344dda7b2Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
827444dda7b2Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
827544dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
827644dda7b2Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
827744dda7b2Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
827844dda7b2Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
827944dda7b2Smrg	# default) and relocated if they conflict, which is a slow very memory
828044dda7b2Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
828144dda7b2Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
828244dda7b2Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
828344dda7b2Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
828444dda7b2Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
828544dda7b2Smrg	;;
828644dda7b2Smrg      irix5* | irix6*)
828744dda7b2Smrg        case $cc_basename in
828844dda7b2Smrg          CC*)
828944dda7b2Smrg	    # SGI C++
829044dda7b2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
82917a3b38f7Smrg
829244dda7b2Smrg	    # Archives containing C++ object files must be created using
829344dda7b2Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
829444dda7b2Smrg	    # necessary to make sure instantiated templates are included
829544dda7b2Smrg	    # in the archive.
829644dda7b2Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
829744dda7b2Smrg	    ;;
829844dda7b2Smrg          *)
829944dda7b2Smrg	    if test "$GXX" = yes; then
830044dda7b2Smrg	      if test "$with_gnu_ld" = no; then
830144dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
830244dda7b2Smrg	      else
830344dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
830444dda7b2Smrg	      fi
830544dda7b2Smrg	    fi
830644dda7b2Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
830744dda7b2Smrg	    ;;
830844dda7b2Smrg        esac
830944dda7b2Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
831044dda7b2Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
831144dda7b2Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
831244dda7b2Smrg        ;;
83137a3b38f7Smrg
831444dda7b2Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
831544dda7b2Smrg        case $cc_basename in
831644dda7b2Smrg          KCC*)
831744dda7b2Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
83187a3b38f7Smrg
831944dda7b2Smrg	    # KCC will only create a shared library if the output file
832044dda7b2Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
832144dda7b2Smrg	    # to its proper name (with version) after linking.
832244dda7b2Smrg	    _LT_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'
832344dda7b2Smrg	    _LT_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'
832444dda7b2Smrg	    # Commands to make compiler produce verbose output that lists
832544dda7b2Smrg	    # what "hidden" libraries, object files and flags are used when
832644dda7b2Smrg	    # linking a shared library.
832744dda7b2Smrg	    #
832844dda7b2Smrg	    # There doesn't appear to be a way to prevent this compiler from
832944dda7b2Smrg	    # explicitly linking system object files so we need to strip them
833044dda7b2Smrg	    # from the output so that they don't get included in the library
833144dda7b2Smrg	    # dependencies.
833244dda7b2Smrg	    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; func_echo_all "$list"'
83337a3b38f7Smrg
833444dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
833544dda7b2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
83367a3b38f7Smrg
833744dda7b2Smrg	    # Archives containing C++ object files must be created using
833844dda7b2Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
833944dda7b2Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
834044dda7b2Smrg	    ;;
834144dda7b2Smrg	  icpc* | ecpc* )
834244dda7b2Smrg	    # Intel C++
834344dda7b2Smrg	    with_gnu_ld=yes
834444dda7b2Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
834544dda7b2Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
834644dda7b2Smrg	    # earlier do not add the objects themselves.
834744dda7b2Smrg	    case `$CC -V 2>&1` in
834844dda7b2Smrg	      *"Version 7."*)
834944dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
835044dda7b2Smrg		_LT_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'
835144dda7b2Smrg		;;
835244dda7b2Smrg	      *)  # Version 8.0 or newer
835344dda7b2Smrg	        tmp_idyn=
835444dda7b2Smrg	        case $host_cpu in
835544dda7b2Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
835644dda7b2Smrg		esac
835744dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
835844dda7b2Smrg		_LT_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'
835944dda7b2Smrg		;;
836044dda7b2Smrg	    esac
836144dda7b2Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
836244dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
836344dda7b2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
836444dda7b2Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
836544dda7b2Smrg	    ;;
836644dda7b2Smrg          pgCC* | pgcpp*)
836744dda7b2Smrg            # Portland Group C++ compiler
836844dda7b2Smrg	    case `$CC -V` in
836944dda7b2Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
837044dda7b2Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
837144dda7b2Smrg		rm -rf $tpldir~
837244dda7b2Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
837344dda7b2Smrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
837444dda7b2Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
837544dda7b2Smrg		rm -rf $tpldir~
837644dda7b2Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
837744dda7b2Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
837844dda7b2Smrg		$RANLIB $oldlib'
837944dda7b2Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
838044dda7b2Smrg		rm -rf $tpldir~
838144dda7b2Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
838244dda7b2Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
838344dda7b2Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
838444dda7b2Smrg		rm -rf $tpldir~
838544dda7b2Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
838644dda7b2Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
838744dda7b2Smrg	      ;;
838844dda7b2Smrg	    *) # Version 6 and above use weak symbols
838944dda7b2Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
839044dda7b2Smrg	      _LT_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'
839144dda7b2Smrg	      ;;
839244dda7b2Smrg	    esac
83937a3b38f7Smrg
839444dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
839544dda7b2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
839644dda7b2Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
839744dda7b2Smrg            ;;
839844dda7b2Smrg	  cxx*)
839944dda7b2Smrg	    # Compaq C++
840044dda7b2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
840144dda7b2Smrg	    _LT_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'
84027a3b38f7Smrg
840344dda7b2Smrg	    runpath_var=LD_RUN_PATH
840444dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
840544dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
84067a3b38f7Smrg
840744dda7b2Smrg	    # Commands to make compiler produce verbose output that lists
840844dda7b2Smrg	    # what "hidden" libraries, object files and flags are used when
840944dda7b2Smrg	    # linking a shared library.
841044dda7b2Smrg	    #
841144dda7b2Smrg	    # There doesn't appear to be a way to prevent this compiler from
841244dda7b2Smrg	    # explicitly linking system object files so we need to strip them
841344dda7b2Smrg	    # from the output so that they don't get included in the library
841444dda7b2Smrg	    # dependencies.
841544dda7b2Smrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
841644dda7b2Smrg	    ;;
841744dda7b2Smrg	  xl* | mpixl* | bgxl*)
841844dda7b2Smrg	    # IBM XL 8.0 on PPC, with GNU ld
841944dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
842044dda7b2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
842144dda7b2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
842244dda7b2Smrg	    if test "x$supports_anon_versioning" = xyes; then
842344dda7b2Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
842444dda7b2Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
842544dda7b2Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
842644dda7b2Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
842744dda7b2Smrg	    fi
842844dda7b2Smrg	    ;;
842944dda7b2Smrg	  *)
843044dda7b2Smrg	    case `$CC -V 2>&1 | sed 5q` in
843144dda7b2Smrg	    *Sun\ C*)
843244dda7b2Smrg	      # Sun C++ 5.9
843344dda7b2Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
843444dda7b2Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
843544dda7b2Smrg	      _LT_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'
843644dda7b2Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
843744dda7b2Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
843844dda7b2Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
84397a3b38f7Smrg
844044dda7b2Smrg	      # Not sure whether something based on
844144dda7b2Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
844244dda7b2Smrg	      # would be better.
844344dda7b2Smrg	      output_verbose_link_cmd='func_echo_all'
84447a3b38f7Smrg
844544dda7b2Smrg	      # Archives containing C++ object files must be created using
844644dda7b2Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
844744dda7b2Smrg	      # necessary to make sure instantiated templates are included
844844dda7b2Smrg	      # in the archive.
844944dda7b2Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
845044dda7b2Smrg	      ;;
845144dda7b2Smrg	    esac
845244dda7b2Smrg	    ;;
845344dda7b2Smrg	esac
845444dda7b2Smrg	;;
84557a3b38f7Smrg
845644dda7b2Smrg      lynxos*)
845744dda7b2Smrg        # FIXME: insert proper C++ library support
845844dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
845944dda7b2Smrg	;;
84607a3b38f7Smrg
846144dda7b2Smrg      m88k*)
846244dda7b2Smrg        # FIXME: insert proper C++ library support
846344dda7b2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
846444dda7b2Smrg	;;
84657a3b38f7Smrg
846644dda7b2Smrg      mvs*)
846744dda7b2Smrg        case $cc_basename in
846844dda7b2Smrg          cxx*)
846944dda7b2Smrg	    # FIXME: insert proper C++ library support
847044dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
847144dda7b2Smrg	    ;;
847244dda7b2Smrg	  *)
847344dda7b2Smrg	    # FIXME: insert proper C++ library support
847444dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
847544dda7b2Smrg	    ;;
847644dda7b2Smrg	esac
847744dda7b2Smrg	;;
84787a3b38f7Smrg
847944dda7b2Smrg      netbsd*)
848044dda7b2Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
848144dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
848244dda7b2Smrg	  wlarc=
848344dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
848444dda7b2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
848544dda7b2Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
848644dda7b2Smrg	fi
848744dda7b2Smrg	# Workaround some broken pre-1.5 toolchains
848844dda7b2Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
848944dda7b2Smrg	;;
84907a3b38f7Smrg
849144dda7b2Smrg      *nto* | *qnx*)
849244dda7b2Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
849344dda7b2Smrg	;;
84947a3b38f7Smrg
849544dda7b2Smrg      openbsd2*)
849644dda7b2Smrg        # C++ shared libraries are fairly broken
849744dda7b2Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
849844dda7b2Smrg	;;
84997a3b38f7Smrg
850044dda7b2Smrg      openbsd*)
850144dda7b2Smrg	if test -f /usr/libexec/ld.so; then
850244dda7b2Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
850344dda7b2Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
850444dda7b2Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
850544dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
850644dda7b2Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
850744dda7b2Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
850844dda7b2Smrg	    _LT_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'
850944dda7b2Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
851044dda7b2Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
851144dda7b2Smrg	  fi
851244dda7b2Smrg	  output_verbose_link_cmd=func_echo_all
851344dda7b2Smrg	else
851444dda7b2Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
85157a3b38f7Smrg	fi
851644dda7b2Smrg	;;
85177a3b38f7Smrg
851844dda7b2Smrg      osf3* | osf4* | osf5*)
851944dda7b2Smrg        case $cc_basename in
852044dda7b2Smrg          KCC*)
852144dda7b2Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
85227a3b38f7Smrg
852344dda7b2Smrg	    # KCC will only create a shared library if the output file
852444dda7b2Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
852544dda7b2Smrg	    # to its proper name (with version) after linking.
852644dda7b2Smrg	    _LT_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'
85277a3b38f7Smrg
852844dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
852944dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
85307a3b38f7Smrg
853144dda7b2Smrg	    # Archives containing C++ object files must be created using
853244dda7b2Smrg	    # the KAI C++ compiler.
853344dda7b2Smrg	    case $host in
853444dda7b2Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
853544dda7b2Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
853644dda7b2Smrg	    esac
853744dda7b2Smrg	    ;;
853844dda7b2Smrg          RCC*)
853944dda7b2Smrg	    # Rational C++ 2.4.1
854044dda7b2Smrg	    # FIXME: insert proper C++ library support
854144dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
854244dda7b2Smrg	    ;;
854344dda7b2Smrg          cxx*)
854444dda7b2Smrg	    case $host in
854544dda7b2Smrg	      osf3*)
854644dda7b2Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
854744dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
854844dda7b2Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
854944dda7b2Smrg		;;
855044dda7b2Smrg	      *)
855144dda7b2Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
855244dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
855344dda7b2Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
855444dda7b2Smrg	          echo "-hidden">> $lib.exp~
855544dda7b2Smrg	          $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~
855644dda7b2Smrg	          $RM $lib.exp'
855744dda7b2Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
855844dda7b2Smrg		;;
855944dda7b2Smrg	    esac
85607a3b38f7Smrg
856144dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
85627a3b38f7Smrg
856344dda7b2Smrg	    # Commands to make compiler produce verbose output that lists
856444dda7b2Smrg	    # what "hidden" libraries, object files and flags are used when
856544dda7b2Smrg	    # linking a shared library.
856644dda7b2Smrg	    #
856744dda7b2Smrg	    # There doesn't appear to be a way to prevent this compiler from
856844dda7b2Smrg	    # explicitly linking system object files so we need to strip them
856944dda7b2Smrg	    # from the output so that they don't get included in the library
857044dda7b2Smrg	    # dependencies.
857144dda7b2Smrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
857244dda7b2Smrg	    ;;
857344dda7b2Smrg	  *)
857444dda7b2Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
857544dda7b2Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
857644dda7b2Smrg	      case $host in
857744dda7b2Smrg	        osf3*)
857844dda7b2Smrg	          _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
857944dda7b2Smrg		  ;;
858044dda7b2Smrg	        *)
858144dda7b2Smrg	          _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
858244dda7b2Smrg		  ;;
858344dda7b2Smrg	      esac
85847a3b38f7Smrg
858544dda7b2Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
858644dda7b2Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
85877a3b38f7Smrg
858844dda7b2Smrg	      # Commands to make compiler produce verbose output that lists
858944dda7b2Smrg	      # what "hidden" libraries, object files and flags are used when
859044dda7b2Smrg	      # linking a shared library.
859144dda7b2Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
85927a3b38f7Smrg
859344dda7b2Smrg	    else
859444dda7b2Smrg	      # FIXME: insert proper C++ library support
859544dda7b2Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
859644dda7b2Smrg	    fi
859744dda7b2Smrg	    ;;
859844dda7b2Smrg        esac
859944dda7b2Smrg        ;;
86007a3b38f7Smrg
860144dda7b2Smrg      psos*)
860244dda7b2Smrg        # FIXME: insert proper C++ library support
860344dda7b2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
860444dda7b2Smrg        ;;
86057a3b38f7Smrg
860644dda7b2Smrg      sunos4*)
860744dda7b2Smrg        case $cc_basename in
860844dda7b2Smrg          CC*)
860944dda7b2Smrg	    # Sun C++ 4.x
861044dda7b2Smrg	    # FIXME: insert proper C++ library support
861144dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
861244dda7b2Smrg	    ;;
861344dda7b2Smrg          lcc*)
861444dda7b2Smrg	    # Lucid
861544dda7b2Smrg	    # FIXME: insert proper C++ library support
861644dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
861744dda7b2Smrg	    ;;
861844dda7b2Smrg          *)
861944dda7b2Smrg	    # FIXME: insert proper C++ library support
862044dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
862144dda7b2Smrg	    ;;
862244dda7b2Smrg        esac
862344dda7b2Smrg        ;;
86247a3b38f7Smrg
862544dda7b2Smrg      solaris*)
862644dda7b2Smrg        case $cc_basename in
862744dda7b2Smrg          CC* | sunCC*)
862844dda7b2Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
862944dda7b2Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
863044dda7b2Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
863144dda7b2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
863244dda7b2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
863344dda7b2Smrg	      $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'
86347a3b38f7Smrg
863544dda7b2Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
863644dda7b2Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
863744dda7b2Smrg	    case $host_os in
863844dda7b2Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
863944dda7b2Smrg	      *)
864044dda7b2Smrg		# The compiler driver will combine and reorder linker options,
864144dda7b2Smrg		# but understands `-z linker_flag'.
864244dda7b2Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
864344dda7b2Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
864444dda7b2Smrg	        ;;
864544dda7b2Smrg	    esac
864644dda7b2Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
86477a3b38f7Smrg
864844dda7b2Smrg	    output_verbose_link_cmd='func_echo_all'
86497a3b38f7Smrg
865044dda7b2Smrg	    # Archives containing C++ object files must be created using
865144dda7b2Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
865244dda7b2Smrg	    # necessary to make sure instantiated templates are included
865344dda7b2Smrg	    # in the archive.
865444dda7b2Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
865544dda7b2Smrg	    ;;
865644dda7b2Smrg          gcx*)
865744dda7b2Smrg	    # Green Hills C++ Compiler
865844dda7b2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
86597a3b38f7Smrg
866044dda7b2Smrg	    # The C++ compiler must be used to create the archive.
866144dda7b2Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
866244dda7b2Smrg	    ;;
866344dda7b2Smrg          *)
866444dda7b2Smrg	    # GNU C++ compiler with Solaris linker
866544dda7b2Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
866644dda7b2Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
866744dda7b2Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
866844dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
866944dda7b2Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
867044dda7b2Smrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
86717a3b38f7Smrg
867244dda7b2Smrg	        # Commands to make compiler produce verbose output that lists
867344dda7b2Smrg	        # what "hidden" libraries, object files and flags are used when
867444dda7b2Smrg	        # linking a shared library.
867544dda7b2Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
867644dda7b2Smrg	      else
867744dda7b2Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
867844dda7b2Smrg	        # platform.
867944dda7b2Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
868044dda7b2Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
868144dda7b2Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
86827a3b38f7Smrg
868344dda7b2Smrg	        # Commands to make compiler produce verbose output that lists
868444dda7b2Smrg	        # what "hidden" libraries, object files and flags are used when
868544dda7b2Smrg	        # linking a shared library.
868644dda7b2Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
868744dda7b2Smrg	      fi
86887a3b38f7Smrg
868944dda7b2Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
869044dda7b2Smrg	      case $host_os in
869144dda7b2Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
869244dda7b2Smrg		*)
869344dda7b2Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
869444dda7b2Smrg		  ;;
869544dda7b2Smrg	      esac
869644dda7b2Smrg	    fi
869744dda7b2Smrg	    ;;
869844dda7b2Smrg        esac
869944dda7b2Smrg        ;;
87007a3b38f7Smrg
870144dda7b2Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
870244dda7b2Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
870344dda7b2Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
870444dda7b2Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
870544dda7b2Smrg      runpath_var='LD_RUN_PATH'
87067a3b38f7Smrg
870744dda7b2Smrg      case $cc_basename in
870844dda7b2Smrg        CC*)
870944dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
871044dda7b2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
871144dda7b2Smrg	  ;;
871244dda7b2Smrg	*)
871344dda7b2Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
871444dda7b2Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
871544dda7b2Smrg	  ;;
871644dda7b2Smrg      esac
871744dda7b2Smrg      ;;
87187a3b38f7Smrg
871944dda7b2Smrg      sysv5* | sco3.2v5* | sco5v6*)
872044dda7b2Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
872144dda7b2Smrg	# link with -lc, and that would cause any symbols used from libc to
872244dda7b2Smrg	# always be unresolved, which means just about no library would
872344dda7b2Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
872444dda7b2Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
872544dda7b2Smrg	# as -z defs.
872644dda7b2Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
872744dda7b2Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
872844dda7b2Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
872944dda7b2Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
873044dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
873144dda7b2Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
873244dda7b2Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
873344dda7b2Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
873444dda7b2Smrg	runpath_var='LD_RUN_PATH'
87357a3b38f7Smrg
873644dda7b2Smrg	case $cc_basename in
873744dda7b2Smrg          CC*)
873844dda7b2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
873944dda7b2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
874044dda7b2Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
874144dda7b2Smrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
874244dda7b2Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
874344dda7b2Smrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
874444dda7b2Smrg	    ;;
874544dda7b2Smrg	  *)
874644dda7b2Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
874744dda7b2Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
874844dda7b2Smrg	    ;;
874944dda7b2Smrg	esac
875044dda7b2Smrg      ;;
87517a3b38f7Smrg
875244dda7b2Smrg      tandem*)
875344dda7b2Smrg        case $cc_basename in
875444dda7b2Smrg          NCC*)
875544dda7b2Smrg	    # NonStop-UX NCC 3.20
875644dda7b2Smrg	    # FIXME: insert proper C++ library support
875744dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
875844dda7b2Smrg	    ;;
875944dda7b2Smrg          *)
876044dda7b2Smrg	    # FIXME: insert proper C++ library support
876144dda7b2Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
876244dda7b2Smrg	    ;;
876344dda7b2Smrg        esac
876444dda7b2Smrg        ;;
87657a3b38f7Smrg
876644dda7b2Smrg      vxworks*)
876744dda7b2Smrg        # FIXME: insert proper C++ library support
876844dda7b2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
876944dda7b2Smrg        ;;
87707a3b38f7Smrg
877144dda7b2Smrg      *)
877244dda7b2Smrg        # FIXME: insert proper C++ library support
877344dda7b2Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
877444dda7b2Smrg        ;;
877544dda7b2Smrg    esac
87767a3b38f7Smrg
877744dda7b2Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
877844dda7b2Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
87797a3b38f7Smrg
878044dda7b2Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
878144dda7b2Smrg    _LT_TAGVAR(LD, $1)="$LD"
87827a3b38f7Smrg
878344dda7b2Smrg    ## CAVEAT EMPTOR:
878444dda7b2Smrg    ## There is no encapsulation within the following macros, do not change
878544dda7b2Smrg    ## the running order or otherwise move them around unless you know exactly
878644dda7b2Smrg    ## what you are doing...
878744dda7b2Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
878844dda7b2Smrg    _LT_COMPILER_PIC($1)
878944dda7b2Smrg    _LT_COMPILER_C_O($1)
879044dda7b2Smrg    _LT_COMPILER_FILE_LOCKS($1)
879144dda7b2Smrg    _LT_LINKER_SHLIBS($1)
879244dda7b2Smrg    _LT_SYS_DYNAMIC_LINKER($1)
879344dda7b2Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
87947a3b38f7Smrg
879544dda7b2Smrg    _LT_CONFIG($1)
879644dda7b2Smrg  fi # test -n "$compiler"
87977a3b38f7Smrg
879844dda7b2Smrg  CC=$lt_save_CC
879944dda7b2Smrg  LDCXX=$LD
880044dda7b2Smrg  LD=$lt_save_LD
880144dda7b2Smrg  GCC=$lt_save_GCC
880244dda7b2Smrg  with_gnu_ld=$lt_save_with_gnu_ld
880344dda7b2Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
880444dda7b2Smrg  lt_cv_path_LD=$lt_save_path_LD
880544dda7b2Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
880644dda7b2Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
880744dda7b2Smrgfi # test "$_lt_caught_CXX_error" != yes
88087a3b38f7Smrg
880944dda7b2SmrgAC_LANG_POP
881044dda7b2Smrg])# _LT_LANG_CXX_CONFIG
88117a3b38f7Smrg
88127a3b38f7Smrg
881344dda7b2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
881444dda7b2Smrg# ---------------------------------
881544dda7b2Smrg# Figure out "hidden" library dependencies from verbose
881644dda7b2Smrg# compiler output when linking a shared library.
881744dda7b2Smrg# Parse the compiler output and extract the necessary
881844dda7b2Smrg# objects, libraries and library flags.
881944dda7b2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
882044dda7b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
882144dda7b2Smrg# Dependencies to place before and after the object being linked:
882244dda7b2Smrg_LT_TAGVAR(predep_objects, $1)=
882344dda7b2Smrg_LT_TAGVAR(postdep_objects, $1)=
882444dda7b2Smrg_LT_TAGVAR(predeps, $1)=
882544dda7b2Smrg_LT_TAGVAR(postdeps, $1)=
882644dda7b2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
88277a3b38f7Smrg
882844dda7b2Smrgdnl we can't use the lt_simple_compile_test_code here,
882944dda7b2Smrgdnl because it contains code intended for an executable,
883044dda7b2Smrgdnl not a library.  It's possible we should let each
883144dda7b2Smrgdnl tag define a new lt_????_link_test_code variable,
883244dda7b2Smrgdnl but it's only used here...
883344dda7b2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
883444dda7b2Smrgint a;
883544dda7b2Smrgvoid foo (void) { a = 0; }
883644dda7b2Smrg_LT_EOF
883744dda7b2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
883844dda7b2Smrgclass Foo
883944dda7b2Smrg{
884044dda7b2Smrgpublic:
884144dda7b2Smrg  Foo (void) { a = 0; }
884244dda7b2Smrgprivate:
884344dda7b2Smrg  int a;
884444dda7b2Smrg};
884544dda7b2Smrg_LT_EOF
884644dda7b2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
884744dda7b2Smrg      subroutine foo
884844dda7b2Smrg      implicit none
884944dda7b2Smrg      integer*4 a
885044dda7b2Smrg      a=0
885144dda7b2Smrg      return
885244dda7b2Smrg      end
885344dda7b2Smrg_LT_EOF
885444dda7b2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
885544dda7b2Smrg      subroutine foo
885644dda7b2Smrg      implicit none
885744dda7b2Smrg      integer a
885844dda7b2Smrg      a=0
885944dda7b2Smrg      return
886044dda7b2Smrg      end
886144dda7b2Smrg_LT_EOF
886244dda7b2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
886344dda7b2Smrgpublic class foo {
886444dda7b2Smrg  private int a;
886544dda7b2Smrg  public void bar (void) {
886644dda7b2Smrg    a = 0;
886744dda7b2Smrg  }
886844dda7b2Smrg};
886944dda7b2Smrg_LT_EOF
887044dda7b2Smrg])
887144dda7b2Smrgdnl Parse the compiler output and extract the necessary
887244dda7b2Smrgdnl objects, libraries and library flags.
887344dda7b2Smrgif AC_TRY_EVAL(ac_compile); then
887444dda7b2Smrg  # Parse the compiler output and extract the necessary
887544dda7b2Smrg  # objects, libraries and library flags.
88767a3b38f7Smrg
887744dda7b2Smrg  # Sentinel used to keep track of whether or not we are before
887844dda7b2Smrg  # the conftest object file.
887944dda7b2Smrg  pre_test_object_deps_done=no
88807a3b38f7Smrg
888144dda7b2Smrg  for p in `eval "$output_verbose_link_cmd"`; do
888244dda7b2Smrg    case $p in
88837a3b38f7Smrg
888444dda7b2Smrg    -L* | -R* | -l*)
888544dda7b2Smrg       # Some compilers place space between "-{L,R}" and the path.
888644dda7b2Smrg       # Remove the space.
888744dda7b2Smrg       if test $p = "-L" ||
888844dda7b2Smrg          test $p = "-R"; then
888944dda7b2Smrg	 prev=$p
889044dda7b2Smrg	 continue
889144dda7b2Smrg       else
889244dda7b2Smrg	 prev=
889344dda7b2Smrg       fi
88947a3b38f7Smrg
889544dda7b2Smrg       if test "$pre_test_object_deps_done" = no; then
889644dda7b2Smrg	 case $p in
889744dda7b2Smrg	 -L* | -R*)
889844dda7b2Smrg	   # Internal compiler library paths should come after those
889944dda7b2Smrg	   # provided the user.  The postdeps already come after the
890044dda7b2Smrg	   # user supplied libs so there is no need to process them.
890144dda7b2Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
890244dda7b2Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
890344dda7b2Smrg	   else
890444dda7b2Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
890544dda7b2Smrg	   fi
890644dda7b2Smrg	   ;;
890744dda7b2Smrg	 # The "-l" case would never come before the object being
890844dda7b2Smrg	 # linked, so don't bother handling this case.
890944dda7b2Smrg	 esac
891044dda7b2Smrg       else
891144dda7b2Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
891244dda7b2Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
891344dda7b2Smrg	 else
891444dda7b2Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
891544dda7b2Smrg	 fi
891644dda7b2Smrg       fi
891744dda7b2Smrg       ;;
89187a3b38f7Smrg
891944dda7b2Smrg    *.$objext)
892044dda7b2Smrg       # This assumes that the test object file only shows up
892144dda7b2Smrg       # once in the compiler output.
892244dda7b2Smrg       if test "$p" = "conftest.$objext"; then
892344dda7b2Smrg	 pre_test_object_deps_done=yes
892444dda7b2Smrg	 continue
892544dda7b2Smrg       fi
89267a3b38f7Smrg
892744dda7b2Smrg       if test "$pre_test_object_deps_done" = no; then
892844dda7b2Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
892944dda7b2Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
893044dda7b2Smrg	 else
893144dda7b2Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
893244dda7b2Smrg	 fi
893344dda7b2Smrg       else
893444dda7b2Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
893544dda7b2Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
893644dda7b2Smrg	 else
893744dda7b2Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
893844dda7b2Smrg	 fi
893944dda7b2Smrg       fi
894044dda7b2Smrg       ;;
89417a3b38f7Smrg
894244dda7b2Smrg    *) ;; # Ignore the rest.
89437a3b38f7Smrg
894444dda7b2Smrg    esac
894544dda7b2Smrg  done
89467a3b38f7Smrg
894744dda7b2Smrg  # Clean up.
894844dda7b2Smrg  rm -f a.out a.exe
894944dda7b2Smrgelse
895044dda7b2Smrg  echo "libtool.m4: error: problem compiling $1 test program"
895144dda7b2Smrgfi
89527a3b38f7Smrg
895344dda7b2Smrg$RM -f confest.$objext
89547a3b38f7Smrg
895544dda7b2Smrg# PORTME: override above test on systems where it is broken
895644dda7b2Smrgm4_if([$1], [CXX],
895744dda7b2Smrg[case $host_os in
895844dda7b2Smrginterix[[3-9]]*)
895944dda7b2Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
896044dda7b2Smrg  # hack all around it, let's just trust "g++" to DTRT.
896144dda7b2Smrg  _LT_TAGVAR(predep_objects,$1)=
896244dda7b2Smrg  _LT_TAGVAR(postdep_objects,$1)=
896344dda7b2Smrg  _LT_TAGVAR(postdeps,$1)=
896444dda7b2Smrg  ;;
89657a3b38f7Smrg
896644dda7b2Smrglinux*)
896744dda7b2Smrg  case `$CC -V 2>&1 | sed 5q` in
896844dda7b2Smrg  *Sun\ C*)
896944dda7b2Smrg    # Sun C++ 5.9
89707a3b38f7Smrg
897144dda7b2Smrg    # The more standards-conforming stlport4 library is
897244dda7b2Smrg    # incompatible with the Cstd library. Avoid specifying
897344dda7b2Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
897444dda7b2Smrg    # -library=stlport4 depends on it.
897544dda7b2Smrg    case " $CXX $CXXFLAGS " in
897644dda7b2Smrg    *" -library=stlport4 "*)
897744dda7b2Smrg      solaris_use_stlport4=yes
897844dda7b2Smrg      ;;
897944dda7b2Smrg    esac
89807a3b38f7Smrg
898144dda7b2Smrg    if test "$solaris_use_stlport4" != yes; then
898244dda7b2Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
898344dda7b2Smrg    fi
898444dda7b2Smrg    ;;
898544dda7b2Smrg  esac
898644dda7b2Smrg  ;;
89877a3b38f7Smrg
898844dda7b2Smrgsolaris*)
898944dda7b2Smrg  case $cc_basename in
899044dda7b2Smrg  CC* | sunCC*)
899144dda7b2Smrg    # The more standards-conforming stlport4 library is
899244dda7b2Smrg    # incompatible with the Cstd library. Avoid specifying
899344dda7b2Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
899444dda7b2Smrg    # -library=stlport4 depends on it.
899544dda7b2Smrg    case " $CXX $CXXFLAGS " in
899644dda7b2Smrg    *" -library=stlport4 "*)
899744dda7b2Smrg      solaris_use_stlport4=yes
899844dda7b2Smrg      ;;
899944dda7b2Smrg    esac
90007a3b38f7Smrg
900144dda7b2Smrg    # Adding this requires a known-good setup of shared libraries for
900244dda7b2Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
900344dda7b2Smrg    # archive will be linked into the output, leading to subtle bugs.
900444dda7b2Smrg    if test "$solaris_use_stlport4" != yes; then
900544dda7b2Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
900644dda7b2Smrg    fi
900744dda7b2Smrg    ;;
900844dda7b2Smrg  esac
900944dda7b2Smrg  ;;
901044dda7b2Smrgesac
901144dda7b2Smrg])
90127a3b38f7Smrg
901344dda7b2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
901444dda7b2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
901544dda7b2Smrgesac
901644dda7b2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
901744dda7b2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
901844dda7b2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
901944dda7b2Smrgfi
902044dda7b2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
902144dda7b2Smrg    [The directories searched by this compiler when creating a shared library])
902244dda7b2Smrg_LT_TAGDECL([], [predep_objects], [1],
902344dda7b2Smrg    [Dependencies to place before and after the objects being linked to
902444dda7b2Smrg    create a shared library])
902544dda7b2Smrg_LT_TAGDECL([], [postdep_objects], [1])
902644dda7b2Smrg_LT_TAGDECL([], [predeps], [1])
902744dda7b2Smrg_LT_TAGDECL([], [postdeps], [1])
902844dda7b2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
902944dda7b2Smrg    [The library search path used internally by the compiler when linking
903044dda7b2Smrg    a shared library])
903144dda7b2Smrg])# _LT_SYS_HIDDEN_LIBDEPS
90327a3b38f7Smrg
90337a3b38f7Smrg
903444dda7b2Smrg# _LT_LANG_F77_CONFIG([TAG])
903544dda7b2Smrg# --------------------------
903644dda7b2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
903744dda7b2Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
903844dda7b2Smrg# to write the compiler configuration to `libtool'.
903944dda7b2Smrgm4_defun([_LT_LANG_F77_CONFIG],
904044dda7b2Smrg[AC_LANG_PUSH(Fortran 77)
904144dda7b2Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
904244dda7b2Smrg  _lt_disable_F77=yes
904344dda7b2Smrgfi
90447a3b38f7Smrg
904544dda7b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
904644dda7b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
904744dda7b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no
904844dda7b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
904944dda7b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
905044dda7b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no
905144dda7b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
905244dda7b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
905344dda7b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
905444dda7b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
905544dda7b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
905644dda7b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
905744dda7b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no
905844dda7b2Smrg_LT_TAGVAR(module_cmds, $1)=
905944dda7b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
906044dda7b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
906144dda7b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
906244dda7b2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
906344dda7b2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
906444dda7b2Smrg_LT_TAGVAR(no_undefined_flag, $1)=
906544dda7b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
906644dda7b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
90677a3b38f7Smrg
906844dda7b2Smrg# Source file extension for f77 test sources.
906944dda7b2Smrgac_ext=f
90707a3b38f7Smrg
907144dda7b2Smrg# Object file extension for compiled f77 test sources.
907244dda7b2Smrgobjext=o
907344dda7b2Smrg_LT_TAGVAR(objext, $1)=$objext
90747a3b38f7Smrg
907544dda7b2Smrg# No sense in running all these tests if we already determined that
907644dda7b2Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
907744dda7b2Smrg# are currently assumed to apply to all compilers on this platform,
907844dda7b2Smrg# and will be corrupted by setting them based on a non-working compiler.
907944dda7b2Smrgif test "$_lt_disable_F77" != yes; then
908044dda7b2Smrg  # Code to be used in simple compile tests
908144dda7b2Smrg  lt_simple_compile_test_code="\
908244dda7b2Smrg      subroutine t
908344dda7b2Smrg      return
908444dda7b2Smrg      end
908544dda7b2Smrg"
90867a3b38f7Smrg
908744dda7b2Smrg  # Code to be used in simple link tests
908844dda7b2Smrg  lt_simple_link_test_code="\
908944dda7b2Smrg      program t
909044dda7b2Smrg      end
909144dda7b2Smrg"
90927a3b38f7Smrg
909344dda7b2Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
909444dda7b2Smrg  _LT_TAG_COMPILER
909544dda7b2Smrg
909644dda7b2Smrg  # save warnings/boilerplate of simple test code
909744dda7b2Smrg  _LT_COMPILER_BOILERPLATE
909844dda7b2Smrg  _LT_LINKER_BOILERPLATE
909944dda7b2Smrg
910044dda7b2Smrg  # Allow CC to be a program name with arguments.
910144dda7b2Smrg  lt_save_CC="$CC"
910244dda7b2Smrg  lt_save_GCC=$GCC
910344dda7b2Smrg  CC=${F77-"f77"}
910444dda7b2Smrg  compiler=$CC
910544dda7b2Smrg  _LT_TAGVAR(compiler, $1)=$CC
910644dda7b2Smrg  _LT_CC_BASENAME([$compiler])
910744dda7b2Smrg  GCC=$G77
910844dda7b2Smrg  if test -n "$compiler"; then
910944dda7b2Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
911044dda7b2Smrg    AC_MSG_RESULT([$can_build_shared])
911144dda7b2Smrg
911244dda7b2Smrg    AC_MSG_CHECKING([whether to build shared libraries])
911344dda7b2Smrg    test "$can_build_shared" = "no" && enable_shared=no
911444dda7b2Smrg
911544dda7b2Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
911644dda7b2Smrg    # are all built from PIC.
911744dda7b2Smrg    case $host_os in
911844dda7b2Smrg      aix3*)
911944dda7b2Smrg        test "$enable_shared" = yes && enable_static=no
912044dda7b2Smrg        if test -n "$RANLIB"; then
912144dda7b2Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
912244dda7b2Smrg          postinstall_cmds='$RANLIB $lib'
912344dda7b2Smrg        fi
912444dda7b2Smrg        ;;
912544dda7b2Smrg      aix[[4-9]]*)
912644dda7b2Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
912744dda7b2Smrg	  test "$enable_shared" = yes && enable_static=no
91287a3b38f7Smrg	fi
912944dda7b2Smrg        ;;
913044dda7b2Smrg    esac
913144dda7b2Smrg    AC_MSG_RESULT([$enable_shared])
91327a3b38f7Smrg
913344dda7b2Smrg    AC_MSG_CHECKING([whether to build static libraries])
913444dda7b2Smrg    # Make sure either enable_shared or enable_static is yes.
913544dda7b2Smrg    test "$enable_shared" = yes || enable_static=yes
913644dda7b2Smrg    AC_MSG_RESULT([$enable_static])
91377a3b38f7Smrg
913844dda7b2Smrg    _LT_TAGVAR(GCC, $1)="$G77"
913944dda7b2Smrg    _LT_TAGVAR(LD, $1)="$LD"
91407a3b38f7Smrg
914144dda7b2Smrg    ## CAVEAT EMPTOR:
914244dda7b2Smrg    ## There is no encapsulation within the following macros, do not change
914344dda7b2Smrg    ## the running order or otherwise move them around unless you know exactly
914444dda7b2Smrg    ## what you are doing...
914544dda7b2Smrg    _LT_COMPILER_PIC($1)
914644dda7b2Smrg    _LT_COMPILER_C_O($1)
914744dda7b2Smrg    _LT_COMPILER_FILE_LOCKS($1)
914844dda7b2Smrg    _LT_LINKER_SHLIBS($1)
914944dda7b2Smrg    _LT_SYS_DYNAMIC_LINKER($1)
915044dda7b2Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
91517a3b38f7Smrg
915244dda7b2Smrg    _LT_CONFIG($1)
915344dda7b2Smrg  fi # test -n "$compiler"
91547a3b38f7Smrg
915544dda7b2Smrg  GCC=$lt_save_GCC
915644dda7b2Smrg  CC="$lt_save_CC"
915744dda7b2Smrgfi # test "$_lt_disable_F77" != yes
91587a3b38f7Smrg
915944dda7b2SmrgAC_LANG_POP
916044dda7b2Smrg])# _LT_LANG_F77_CONFIG
91617a3b38f7Smrg
91627a3b38f7Smrg
916344dda7b2Smrg# _LT_LANG_FC_CONFIG([TAG])
916444dda7b2Smrg# -------------------------
916544dda7b2Smrg# Ensure that the configuration variables for a Fortran compiler are
916644dda7b2Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
916744dda7b2Smrg# to write the compiler configuration to `libtool'.
916844dda7b2Smrgm4_defun([_LT_LANG_FC_CONFIG],
916944dda7b2Smrg[AC_LANG_PUSH(Fortran)
91707a3b38f7Smrg
917144dda7b2Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
917244dda7b2Smrg  _lt_disable_FC=yes
917344dda7b2Smrgfi
91747a3b38f7Smrg
917544dda7b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
917644dda7b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
917744dda7b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no
917844dda7b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
917944dda7b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
918044dda7b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no
918144dda7b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
918244dda7b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
918344dda7b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
918444dda7b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
918544dda7b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
918644dda7b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
918744dda7b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no
918844dda7b2Smrg_LT_TAGVAR(module_cmds, $1)=
918944dda7b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
919044dda7b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
919144dda7b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
919244dda7b2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
919344dda7b2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
919444dda7b2Smrg_LT_TAGVAR(no_undefined_flag, $1)=
919544dda7b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
919644dda7b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
91977a3b38f7Smrg
919844dda7b2Smrg# Source file extension for fc test sources.
919944dda7b2Smrgac_ext=${ac_fc_srcext-f}
92007a3b38f7Smrg
920144dda7b2Smrg# Object file extension for compiled fc test sources.
920244dda7b2Smrgobjext=o
920344dda7b2Smrg_LT_TAGVAR(objext, $1)=$objext
92047a3b38f7Smrg
920544dda7b2Smrg# No sense in running all these tests if we already determined that
920644dda7b2Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
920744dda7b2Smrg# are currently assumed to apply to all compilers on this platform,
920844dda7b2Smrg# and will be corrupted by setting them based on a non-working compiler.
920944dda7b2Smrgif test "$_lt_disable_FC" != yes; then
921044dda7b2Smrg  # Code to be used in simple compile tests
921144dda7b2Smrg  lt_simple_compile_test_code="\
921244dda7b2Smrg      subroutine t
921344dda7b2Smrg      return
921444dda7b2Smrg      end
921544dda7b2Smrg"
92167a3b38f7Smrg
921744dda7b2Smrg  # Code to be used in simple link tests
921844dda7b2Smrg  lt_simple_link_test_code="\
921944dda7b2Smrg      program t
922044dda7b2Smrg      end
922144dda7b2Smrg"
92227a3b38f7Smrg
922344dda7b2Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
922444dda7b2Smrg  _LT_TAG_COMPILER
922544dda7b2Smrg
922644dda7b2Smrg  # save warnings/boilerplate of simple test code
922744dda7b2Smrg  _LT_COMPILER_BOILERPLATE
922844dda7b2Smrg  _LT_LINKER_BOILERPLATE
92297a3b38f7Smrg
923044dda7b2Smrg  # Allow CC to be a program name with arguments.
923144dda7b2Smrg  lt_save_CC="$CC"
923244dda7b2Smrg  lt_save_GCC=$GCC
923344dda7b2Smrg  CC=${FC-"f95"}
923444dda7b2Smrg  compiler=$CC
923544dda7b2Smrg  GCC=$ac_cv_fc_compiler_gnu
92367a3b38f7Smrg
923744dda7b2Smrg  _LT_TAGVAR(compiler, $1)=$CC
923844dda7b2Smrg  _LT_CC_BASENAME([$compiler])
92397a3b38f7Smrg
924044dda7b2Smrg  if test -n "$compiler"; then
924144dda7b2Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
924244dda7b2Smrg    AC_MSG_RESULT([$can_build_shared])
92437a3b38f7Smrg
924444dda7b2Smrg    AC_MSG_CHECKING([whether to build shared libraries])
924544dda7b2Smrg    test "$can_build_shared" = "no" && enable_shared=no
92467a3b38f7Smrg
924744dda7b2Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
924844dda7b2Smrg    # are all built from PIC.
924944dda7b2Smrg    case $host_os in
925044dda7b2Smrg      aix3*)
925144dda7b2Smrg        test "$enable_shared" = yes && enable_static=no
925244dda7b2Smrg        if test -n "$RANLIB"; then
925344dda7b2Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
925444dda7b2Smrg          postinstall_cmds='$RANLIB $lib'
925544dda7b2Smrg        fi
925644dda7b2Smrg        ;;
925744dda7b2Smrg      aix[[4-9]]*)
925844dda7b2Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
925944dda7b2Smrg	  test "$enable_shared" = yes && enable_static=no
926044dda7b2Smrg	fi
926144dda7b2Smrg        ;;
926244dda7b2Smrg    esac
926344dda7b2Smrg    AC_MSG_RESULT([$enable_shared])
92647a3b38f7Smrg
926544dda7b2Smrg    AC_MSG_CHECKING([whether to build static libraries])
926644dda7b2Smrg    # Make sure either enable_shared or enable_static is yes.
926744dda7b2Smrg    test "$enable_shared" = yes || enable_static=yes
926844dda7b2Smrg    AC_MSG_RESULT([$enable_static])
92697a3b38f7Smrg
927044dda7b2Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
927144dda7b2Smrg    _LT_TAGVAR(LD, $1)="$LD"
92727a3b38f7Smrg
927344dda7b2Smrg    ## CAVEAT EMPTOR:
927444dda7b2Smrg    ## There is no encapsulation within the following macros, do not change
927544dda7b2Smrg    ## the running order or otherwise move them around unless you know exactly
927644dda7b2Smrg    ## what you are doing...
927744dda7b2Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
927844dda7b2Smrg    _LT_COMPILER_PIC($1)
927944dda7b2Smrg    _LT_COMPILER_C_O($1)
928044dda7b2Smrg    _LT_COMPILER_FILE_LOCKS($1)
928144dda7b2Smrg    _LT_LINKER_SHLIBS($1)
928244dda7b2Smrg    _LT_SYS_DYNAMIC_LINKER($1)
928344dda7b2Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
92847a3b38f7Smrg
928544dda7b2Smrg    _LT_CONFIG($1)
928644dda7b2Smrg  fi # test -n "$compiler"
92877a3b38f7Smrg
928844dda7b2Smrg  GCC=$lt_save_GCC
928944dda7b2Smrg  CC="$lt_save_CC"
929044dda7b2Smrgfi # test "$_lt_disable_FC" != yes
92917a3b38f7Smrg
929244dda7b2SmrgAC_LANG_POP
929344dda7b2Smrg])# _LT_LANG_FC_CONFIG
92947a3b38f7Smrg
92957a3b38f7Smrg
929644dda7b2Smrg# _LT_LANG_GCJ_CONFIG([TAG])
929744dda7b2Smrg# --------------------------
929844dda7b2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
929944dda7b2Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
930044dda7b2Smrg# to write the compiler configuration to `libtool'.
930144dda7b2Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
930244dda7b2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
930344dda7b2SmrgAC_LANG_SAVE
93047a3b38f7Smrg
930544dda7b2Smrg# Source file extension for Java test sources.
930644dda7b2Smrgac_ext=java
93077a3b38f7Smrg
930844dda7b2Smrg# Object file extension for compiled Java test sources.
930944dda7b2Smrgobjext=o
931044dda7b2Smrg_LT_TAGVAR(objext, $1)=$objext
93117a3b38f7Smrg
931244dda7b2Smrg# Code to be used in simple compile tests
931344dda7b2Smrglt_simple_compile_test_code="class foo {}"
93147a3b38f7Smrg
931544dda7b2Smrg# Code to be used in simple link tests
931644dda7b2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
93177a3b38f7Smrg
931844dda7b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
931944dda7b2Smrg_LT_TAG_COMPILER
93207a3b38f7Smrg
932144dda7b2Smrg# save warnings/boilerplate of simple test code
932244dda7b2Smrg_LT_COMPILER_BOILERPLATE
932344dda7b2Smrg_LT_LINKER_BOILERPLATE
93247a3b38f7Smrg
932544dda7b2Smrg# Allow CC to be a program name with arguments.
932644dda7b2Smrglt_save_CC="$CC"
932744dda7b2Smrglt_save_GCC=$GCC
932844dda7b2SmrgGCC=yes
932944dda7b2SmrgCC=${GCJ-"gcj"}
933044dda7b2Smrgcompiler=$CC
933144dda7b2Smrg_LT_TAGVAR(compiler, $1)=$CC
933244dda7b2Smrg_LT_TAGVAR(LD, $1)="$LD"
933344dda7b2Smrg_LT_CC_BASENAME([$compiler])
93347a3b38f7Smrg
933544dda7b2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
933644dda7b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
93377a3b38f7Smrg
933844dda7b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
933944dda7b2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
934044dda7b2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
93417a3b38f7Smrg
934244dda7b2Smrgif test -n "$compiler"; then
934344dda7b2Smrg  _LT_COMPILER_NO_RTTI($1)
934444dda7b2Smrg  _LT_COMPILER_PIC($1)
934544dda7b2Smrg  _LT_COMPILER_C_O($1)
934644dda7b2Smrg  _LT_COMPILER_FILE_LOCKS($1)
934744dda7b2Smrg  _LT_LINKER_SHLIBS($1)
934844dda7b2Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
93497a3b38f7Smrg
935044dda7b2Smrg  _LT_CONFIG($1)
93517a3b38f7Smrgfi
9352ff559fabSmrg
935344dda7b2SmrgAC_LANG_RESTORE
9354ff559fabSmrg
935544dda7b2SmrgGCC=$lt_save_GCC
935644dda7b2SmrgCC="$lt_save_CC"
935744dda7b2Smrg])# _LT_LANG_GCJ_CONFIG
9358ff559fabSmrg
9359ff559fabSmrg
936044dda7b2Smrg# _LT_LANG_RC_CONFIG([TAG])
936144dda7b2Smrg# -------------------------
936244dda7b2Smrg# Ensure that the configuration variables for the Windows resource compiler
936344dda7b2Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
936444dda7b2Smrg# to write the compiler configuration to `libtool'.
936544dda7b2Smrgm4_defun([_LT_LANG_RC_CONFIG],
936644dda7b2Smrg[AC_REQUIRE([LT_PROG_RC])dnl
936744dda7b2SmrgAC_LANG_SAVE
9368ff559fabSmrg
936944dda7b2Smrg# Source file extension for RC test sources.
937044dda7b2Smrgac_ext=rc
9371ff559fabSmrg
937244dda7b2Smrg# Object file extension for compiled RC test sources.
937344dda7b2Smrgobjext=o
937444dda7b2Smrg_LT_TAGVAR(objext, $1)=$objext
9375ff559fabSmrg
937644dda7b2Smrg# Code to be used in simple compile tests
937744dda7b2Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9378ff559fabSmrg
937944dda7b2Smrg# Code to be used in simple link tests
938044dda7b2Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
9381ff559fabSmrg
938244dda7b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
938344dda7b2Smrg_LT_TAG_COMPILER
9384ff559fabSmrg
938544dda7b2Smrg# save warnings/boilerplate of simple test code
938644dda7b2Smrg_LT_COMPILER_BOILERPLATE
938744dda7b2Smrg_LT_LINKER_BOILERPLATE
938844dda7b2Smrg
938944dda7b2Smrg# Allow CC to be a program name with arguments.
939044dda7b2Smrglt_save_CC="$CC"
939144dda7b2Smrglt_save_GCC=$GCC
939244dda7b2SmrgGCC=
939344dda7b2SmrgCC=${RC-"windres"}
939444dda7b2Smrgcompiler=$CC
939544dda7b2Smrg_LT_TAGVAR(compiler, $1)=$CC
939644dda7b2Smrg_LT_CC_BASENAME([$compiler])
939744dda7b2Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
939844dda7b2Smrg
939944dda7b2Smrgif test -n "$compiler"; then
940044dda7b2Smrg  :
940144dda7b2Smrg  _LT_CONFIG($1)
940244dda7b2Smrgfi
940344dda7b2Smrg
940444dda7b2SmrgGCC=$lt_save_GCC
940544dda7b2SmrgAC_LANG_RESTORE
940644dda7b2SmrgCC="$lt_save_CC"
940744dda7b2Smrg])# _LT_LANG_RC_CONFIG
940844dda7b2Smrg
940944dda7b2Smrg
941044dda7b2Smrg# LT_PROG_GCJ
941144dda7b2Smrg# -----------
941244dda7b2SmrgAC_DEFUN([LT_PROG_GCJ],
941344dda7b2Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
941444dda7b2Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
941544dda7b2Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
941644dda7b2Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
941744dda7b2Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
94187a3b38f7Smrg])
9419ff559fabSmrg
942044dda7b2Smrg# Old name:
942144dda7b2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
942244dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
942344dda7b2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9424ff559fabSmrg
9425ff559fabSmrg
942644dda7b2Smrg# LT_PROG_RC
942744dda7b2Smrg# ----------
942844dda7b2SmrgAC_DEFUN([LT_PROG_RC],
942944dda7b2Smrg[AC_CHECK_TOOL(RC, windres,)
943044dda7b2Smrg])
9431ff559fabSmrg
943244dda7b2Smrg# Old name:
943344dda7b2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
943444dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
943544dda7b2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
9436ff559fabSmrg
9437ff559fabSmrg
943844dda7b2Smrg# _LT_DECL_EGREP
943944dda7b2Smrg# --------------
944044dda7b2Smrg# If we don't have a new enough Autoconf to choose the best grep
944144dda7b2Smrg# available, choose the one first in the user's PATH.
944244dda7b2Smrgm4_defun([_LT_DECL_EGREP],
944344dda7b2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
944444dda7b2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
944544dda7b2Smrgtest -z "$GREP" && GREP=grep
944644dda7b2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
944744dda7b2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
944844dda7b2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
944944dda7b2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
945044dda7b2SmrgAC_SUBST([GREP])
945144dda7b2Smrg])
9452ff559fabSmrg
94537a3b38f7Smrg
945444dda7b2Smrg# _LT_DECL_OBJDUMP
945544dda7b2Smrg# --------------
945644dda7b2Smrg# If we don't have a new enough Autoconf to choose the best objdump
945744dda7b2Smrg# available, choose the one first in the user's PATH.
945844dda7b2Smrgm4_defun([_LT_DECL_OBJDUMP],
945944dda7b2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
946044dda7b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
946144dda7b2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
946244dda7b2SmrgAC_SUBST([OBJDUMP])
946344dda7b2Smrg])
9464ff559fabSmrg
9465ff559fabSmrg
946644dda7b2Smrg# _LT_DECL_SED
946744dda7b2Smrg# ------------
946844dda7b2Smrg# Check for a fully-functional sed program, that truncates
946944dda7b2Smrg# as few characters as possible.  Prefer GNU sed if found.
947044dda7b2Smrgm4_defun([_LT_DECL_SED],
947144dda7b2Smrg[AC_PROG_SED
947244dda7b2Smrgtest -z "$SED" && SED=sed
947344dda7b2SmrgXsed="$SED -e 1s/^X//"
947444dda7b2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
947544dda7b2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
947644dda7b2Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
947744dda7b2Smrg])# _LT_DECL_SED
9478ff559fabSmrg
947944dda7b2Smrgm4_ifndef([AC_PROG_SED], [
948044dda7b2Smrg# NOTE: This macro has been submitted for inclusion into   #
948144dda7b2Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
948244dda7b2Smrg#  a released version of Autoconf we should remove this    #
948344dda7b2Smrg#  macro and use it instead.                               #
9484ff559fabSmrg
948544dda7b2Smrgm4_defun([AC_PROG_SED],
948644dda7b2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
948744dda7b2SmrgAC_CACHE_VAL(lt_cv_path_SED,
948844dda7b2Smrg[# Loop through the user's path and test for sed and gsed.
948944dda7b2Smrg# Then use that list of sed's as ones to test for truncation.
949044dda7b2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
949144dda7b2Smrgfor as_dir in $PATH
949244dda7b2Smrgdo
949344dda7b2Smrg  IFS=$as_save_IFS
949444dda7b2Smrg  test -z "$as_dir" && as_dir=.
949544dda7b2Smrg  for lt_ac_prog in sed gsed; do
949644dda7b2Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
949744dda7b2Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
949844dda7b2Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
949944dda7b2Smrg      fi
950044dda7b2Smrg    done
950144dda7b2Smrg  done
950244dda7b2Smrgdone
950344dda7b2SmrgIFS=$as_save_IFS
950444dda7b2Smrglt_ac_max=0
950544dda7b2Smrglt_ac_count=0
950644dda7b2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
950744dda7b2Smrg# along with /bin/sed that truncates output.
950844dda7b2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
950944dda7b2Smrg  test ! -f $lt_ac_sed && continue
951044dda7b2Smrg  cat /dev/null > conftest.in
951144dda7b2Smrg  lt_ac_count=0
951244dda7b2Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
951344dda7b2Smrg  # Check for GNU sed and select it if it is found.
951444dda7b2Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
951544dda7b2Smrg    lt_cv_path_SED=$lt_ac_sed
951644dda7b2Smrg    break
951744dda7b2Smrg  fi
951844dda7b2Smrg  while true; do
951944dda7b2Smrg    cat conftest.in conftest.in >conftest.tmp
952044dda7b2Smrg    mv conftest.tmp conftest.in
952144dda7b2Smrg    cp conftest.in conftest.nl
952244dda7b2Smrg    echo >>conftest.nl
952344dda7b2Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
952444dda7b2Smrg    cmp -s conftest.out conftest.nl || break
952544dda7b2Smrg    # 10000 chars as input seems more than enough
952644dda7b2Smrg    test $lt_ac_count -gt 10 && break
952744dda7b2Smrg    lt_ac_count=`expr $lt_ac_count + 1`
952844dda7b2Smrg    if test $lt_ac_count -gt $lt_ac_max; then
952944dda7b2Smrg      lt_ac_max=$lt_ac_count
953044dda7b2Smrg      lt_cv_path_SED=$lt_ac_sed
953144dda7b2Smrg    fi
953244dda7b2Smrg  done
953344dda7b2Smrgdone
95347a3b38f7Smrg])
953544dda7b2SmrgSED=$lt_cv_path_SED
953644dda7b2SmrgAC_SUBST([SED])
953744dda7b2SmrgAC_MSG_RESULT([$SED])
953844dda7b2Smrg])#AC_PROG_SED
953944dda7b2Smrg])#m4_ifndef
9540ff559fabSmrg
954144dda7b2Smrg# Old name:
954244dda7b2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
954344dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
954444dda7b2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
9545ff559fabSmrg
9546ff559fabSmrg
954744dda7b2Smrg# _LT_CHECK_SHELL_FEATURES
954844dda7b2Smrg# ------------------------
954944dda7b2Smrg# Find out whether the shell is Bourne or XSI compatible,
955044dda7b2Smrg# or has some other useful features.
955144dda7b2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
955244dda7b2Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
955344dda7b2Smrg# Try some XSI features
955444dda7b2Smrgxsi_shell=no
955544dda7b2Smrg( _lt_dummy="a/b/c"
955644dda7b2Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
955744dda7b2Smrg      = c,a/b,, \
955844dda7b2Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
955944dda7b2Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
956044dda7b2Smrg  && xsi_shell=yes
956144dda7b2SmrgAC_MSG_RESULT([$xsi_shell])
956244dda7b2Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9563ff559fabSmrg
956444dda7b2SmrgAC_MSG_CHECKING([whether the shell understands "+="])
956544dda7b2Smrglt_shell_append=no
956644dda7b2Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
956744dda7b2Smrg    >/dev/null 2>&1 \
956844dda7b2Smrg  && lt_shell_append=yes
956944dda7b2SmrgAC_MSG_RESULT([$lt_shell_append])
957044dda7b2Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9571ff559fabSmrg
957244dda7b2Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
957344dda7b2Smrg  lt_unset=unset
957444dda7b2Smrgelse
957544dda7b2Smrg  lt_unset=false
95767a3b38f7Smrgfi
957744dda7b2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9578ff559fabSmrg
957944dda7b2Smrg# test EBCDIC or ASCII
958044dda7b2Smrgcase `echo X|tr X '\101'` in
958144dda7b2Smrg A) # ASCII based system
958244dda7b2Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
958344dda7b2Smrg  lt_SP2NL='tr \040 \012'
958444dda7b2Smrg  lt_NL2SP='tr \015\012 \040\040'
958544dda7b2Smrg  ;;
958644dda7b2Smrg *) # EBCDIC based system
958744dda7b2Smrg  lt_SP2NL='tr \100 \n'
958844dda7b2Smrg  lt_NL2SP='tr \r\n \100\100'
958944dda7b2Smrg  ;;
959044dda7b2Smrgesac
959144dda7b2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
959244dda7b2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
959344dda7b2Smrg])# _LT_CHECK_SHELL_FEATURES
9594ff559fabSmrg
9595ff559fabSmrg
959644dda7b2Smrg# _LT_PROG_XSI_SHELLFNS
959744dda7b2Smrg# ---------------------
959844dda7b2Smrg# Bourne and XSI compatible variants of some useful shell functions.
959944dda7b2Smrgm4_defun([_LT_PROG_XSI_SHELLFNS],
960044dda7b2Smrg[case $xsi_shell in
960144dda7b2Smrg  yes)
960244dda7b2Smrg    cat << \_LT_EOF >> "$cfgfile"
9603ff559fabSmrg
960444dda7b2Smrg# func_dirname file append nondir_replacement
960544dda7b2Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
960644dda7b2Smrg# otherwise set result to NONDIR_REPLACEMENT.
960744dda7b2Smrgfunc_dirname ()
960844dda7b2Smrg{
960944dda7b2Smrg  case ${1} in
961044dda7b2Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
961144dda7b2Smrg    *  ) func_dirname_result="${3}" ;;
961244dda7b2Smrg  esac
961344dda7b2Smrg}
9614ff559fabSmrg
961544dda7b2Smrg# func_basename file
961644dda7b2Smrgfunc_basename ()
961744dda7b2Smrg{
961844dda7b2Smrg  func_basename_result="${1##*/}"
961944dda7b2Smrg}
9620ff559fabSmrg
962144dda7b2Smrg# func_dirname_and_basename file append nondir_replacement
962244dda7b2Smrg# perform func_basename and func_dirname in a single function
962344dda7b2Smrg# call:
962444dda7b2Smrg#   dirname:  Compute the dirname of FILE.  If nonempty,
962544dda7b2Smrg#             add APPEND to the result, otherwise set result
962644dda7b2Smrg#             to NONDIR_REPLACEMENT.
962744dda7b2Smrg#             value returned in "$func_dirname_result"
962844dda7b2Smrg#   basename: Compute filename of FILE.
962944dda7b2Smrg#             value retuned in "$func_basename_result"
963044dda7b2Smrg# Implementation must be kept synchronized with func_dirname
963144dda7b2Smrg# and func_basename. For efficiency, we do not delegate to
963244dda7b2Smrg# those functions but instead duplicate the functionality here.
963344dda7b2Smrgfunc_dirname_and_basename ()
963444dda7b2Smrg{
963544dda7b2Smrg  case ${1} in
963644dda7b2Smrg    */*) func_dirname_result="${1%/*}${2}" ;;
963744dda7b2Smrg    *  ) func_dirname_result="${3}" ;;
963844dda7b2Smrg  esac
963944dda7b2Smrg  func_basename_result="${1##*/}"
964044dda7b2Smrg}
9641ff559fabSmrg
964244dda7b2Smrg# func_stripname prefix suffix name
964344dda7b2Smrg# strip PREFIX and SUFFIX off of NAME.
964444dda7b2Smrg# PREFIX and SUFFIX must not contain globbing or regex special
964544dda7b2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
964644dda7b2Smrg# dot (in which case that matches only a dot).
964744dda7b2Smrgfunc_stripname ()
964844dda7b2Smrg{
964944dda7b2Smrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
965044dda7b2Smrg  # positional parameters, so assign one to ordinary parameter first.
965144dda7b2Smrg  func_stripname_result=${3}
965244dda7b2Smrg  func_stripname_result=${func_stripname_result#"${1}"}
965344dda7b2Smrg  func_stripname_result=${func_stripname_result%"${2}"}
965444dda7b2Smrg}
9655ff559fabSmrg
965644dda7b2Smrg# func_opt_split
965744dda7b2Smrgfunc_opt_split ()
965844dda7b2Smrg{
965944dda7b2Smrg  func_opt_split_opt=${1%%=*}
966044dda7b2Smrg  func_opt_split_arg=${1#*=}
966144dda7b2Smrg}
9662ff559fabSmrg
966344dda7b2Smrg# func_lo2o object
966444dda7b2Smrgfunc_lo2o ()
966544dda7b2Smrg{
966644dda7b2Smrg  case ${1} in
966744dda7b2Smrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
966844dda7b2Smrg    *)    func_lo2o_result=${1} ;;
966944dda7b2Smrg  esac
967044dda7b2Smrg}
9671ff559fabSmrg
967244dda7b2Smrg# func_xform libobj-or-source
967344dda7b2Smrgfunc_xform ()
967444dda7b2Smrg{
967544dda7b2Smrg  func_xform_result=${1%.*}.lo
967644dda7b2Smrg}
9677ff559fabSmrg
967844dda7b2Smrg# func_arith arithmetic-term...
967944dda7b2Smrgfunc_arith ()
968044dda7b2Smrg{
968144dda7b2Smrg  func_arith_result=$(( $[*] ))
968244dda7b2Smrg}
9683ff559fabSmrg
968444dda7b2Smrg# func_len string
968544dda7b2Smrg# STRING may not start with a hyphen.
968644dda7b2Smrgfunc_len ()
968744dda7b2Smrg{
968844dda7b2Smrg  func_len_result=${#1}
968944dda7b2Smrg}
969044dda7b2Smrg
969144dda7b2Smrg_LT_EOF
969244dda7b2Smrg    ;;
969344dda7b2Smrg  *) # Bourne compatible functions.
969444dda7b2Smrg    cat << \_LT_EOF >> "$cfgfile"
969544dda7b2Smrg
969644dda7b2Smrg# func_dirname file append nondir_replacement
969744dda7b2Smrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
969844dda7b2Smrg# otherwise set result to NONDIR_REPLACEMENT.
969944dda7b2Smrgfunc_dirname ()
970044dda7b2Smrg{
970144dda7b2Smrg  # Extract subdirectory from the argument.
970244dda7b2Smrg  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
970344dda7b2Smrg  if test "X$func_dirname_result" = "X${1}"; then
970444dda7b2Smrg    func_dirname_result="${3}"
970544dda7b2Smrg  else
970644dda7b2Smrg    func_dirname_result="$func_dirname_result${2}"
970744dda7b2Smrg  fi
970844dda7b2Smrg}
9709ff559fabSmrg
971044dda7b2Smrg# func_basename file
971144dda7b2Smrgfunc_basename ()
971244dda7b2Smrg{
971344dda7b2Smrg  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
971444dda7b2Smrg}
9715ff559fabSmrg
971644dda7b2Smrgdnl func_dirname_and_basename
971744dda7b2Smrgdnl A portable version of this function is already defined in general.m4sh
971844dda7b2Smrgdnl so there is no need for it here.
9719ff559fabSmrg
972044dda7b2Smrg# func_stripname prefix suffix name
972144dda7b2Smrg# strip PREFIX and SUFFIX off of NAME.
972244dda7b2Smrg# PREFIX and SUFFIX must not contain globbing or regex special
972344dda7b2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
972444dda7b2Smrg# dot (in which case that matches only a dot).
972544dda7b2Smrg# func_strip_suffix prefix name
972644dda7b2Smrgfunc_stripname ()
972744dda7b2Smrg{
972844dda7b2Smrg  case ${2} in
972944dda7b2Smrg    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
973044dda7b2Smrg    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
973144dda7b2Smrg  esac
973244dda7b2Smrg}
9733ff559fabSmrg
973444dda7b2Smrg# sed scripts:
973544dda7b2Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
973644dda7b2Smrgmy_sed_long_arg='1s/^-[[^=]]*=//'
9737ff559fabSmrg
973844dda7b2Smrg# func_opt_split
973944dda7b2Smrgfunc_opt_split ()
974044dda7b2Smrg{
974144dda7b2Smrg  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
974244dda7b2Smrg  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
974344dda7b2Smrg}
9744ff559fabSmrg
974544dda7b2Smrg# func_lo2o object
974644dda7b2Smrgfunc_lo2o ()
974744dda7b2Smrg{
974844dda7b2Smrg  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
974944dda7b2Smrg}
975044dda7b2Smrg
975144dda7b2Smrg# func_xform libobj-or-source
975244dda7b2Smrgfunc_xform ()
975344dda7b2Smrg{
975444dda7b2Smrg  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
975544dda7b2Smrg}
975644dda7b2Smrg
975744dda7b2Smrg# func_arith arithmetic-term...
975844dda7b2Smrgfunc_arith ()
975944dda7b2Smrg{
976044dda7b2Smrg  func_arith_result=`expr "$[@]"`
976144dda7b2Smrg}
976244dda7b2Smrg
976344dda7b2Smrg# func_len string
976444dda7b2Smrg# STRING may not start with a hyphen.
976544dda7b2Smrgfunc_len ()
976644dda7b2Smrg{
976744dda7b2Smrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
976844dda7b2Smrg}
976944dda7b2Smrg
977044dda7b2Smrg_LT_EOF
977144dda7b2Smrgesac
977244dda7b2Smrg
977344dda7b2Smrgcase $lt_shell_append in
977444dda7b2Smrg  yes)
977544dda7b2Smrg    cat << \_LT_EOF >> "$cfgfile"
977644dda7b2Smrg
977744dda7b2Smrg# func_append var value
977844dda7b2Smrg# Append VALUE to the end of shell variable VAR.
977944dda7b2Smrgfunc_append ()
978044dda7b2Smrg{
978144dda7b2Smrg  eval "$[1]+=\$[2]"
978244dda7b2Smrg}
978344dda7b2Smrg_LT_EOF
978444dda7b2Smrg    ;;
97857a3b38f7Smrg  *)
978644dda7b2Smrg    cat << \_LT_EOF >> "$cfgfile"
978744dda7b2Smrg
978844dda7b2Smrg# func_append var value
978944dda7b2Smrg# Append VALUE to the end of shell variable VAR.
979044dda7b2Smrgfunc_append ()
979144dda7b2Smrg{
979244dda7b2Smrg  eval "$[1]=\$$[1]\$[2]"
979344dda7b2Smrg}
979444dda7b2Smrg
979544dda7b2Smrg_LT_EOF
979644dda7b2Smrg    ;;
97977a3b38f7Smrg  esac
97987a3b38f7Smrg])
9799ff559fabSmrg
980044dda7b2Smrg# Helper functions for option handling.                    -*- Autoconf -*-
98017a3b38f7Smrg#
980244dda7b2Smrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
980344dda7b2Smrg#   Inc.
980444dda7b2Smrg#   Written by Gary V. Vaughan, 2004
980544dda7b2Smrg#
980644dda7b2Smrg# This file is free software; the Free Software Foundation gives
980744dda7b2Smrg# unlimited permission to copy and/or distribute it, with or without
980844dda7b2Smrg# modifications, as long as this notice is preserved.
9809ff559fabSmrg
981044dda7b2Smrg# serial 7 ltoptions.m4
9811ff559fabSmrg
981244dda7b2Smrg# This is to help aclocal find these macros, as it can't see m4_define.
981344dda7b2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9814ff559fabSmrg
9815ff559fabSmrg
981644dda7b2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
981744dda7b2Smrg# ------------------------------------------
981844dda7b2Smrgm4_define([_LT_MANGLE_OPTION],
981944dda7b2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9820ff559fabSmrg
9821ff559fabSmrg
982244dda7b2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
982344dda7b2Smrg# ---------------------------------------
982444dda7b2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
982544dda7b2Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
982644dda7b2Smrg# saved as a flag.
982744dda7b2Smrgm4_define([_LT_SET_OPTION],
982844dda7b2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
982944dda7b2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
983044dda7b2Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
983144dda7b2Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
983244dda7b2Smrg])
9833ff559fabSmrg
9834ff559fabSmrg
983544dda7b2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
983644dda7b2Smrg# ------------------------------------------------------------
98377a3b38f7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
983844dda7b2Smrgm4_define([_LT_IF_OPTION],
983944dda7b2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9840ff559fabSmrg
9841ff559fabSmrg
984244dda7b2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
984344dda7b2Smrg# -------------------------------------------------------
984444dda7b2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
984544dda7b2Smrg# are set.
984644dda7b2Smrgm4_define([_LT_UNLESS_OPTIONS],
984744dda7b2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
984844dda7b2Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
984944dda7b2Smrg		      [m4_define([$0_found])])])[]dnl
985044dda7b2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
985144dda7b2Smrg])[]dnl
985244dda7b2Smrg])
9853ff559fabSmrg
9854ff559fabSmrg
985544dda7b2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
985644dda7b2Smrg# ----------------------------------------
985744dda7b2Smrg# OPTION-LIST is a space-separated list of Libtool options associated
985844dda7b2Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
985944dda7b2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
986044dda7b2Smrg# the unknown option and exit.
986144dda7b2Smrgm4_defun([_LT_SET_OPTIONS],
986244dda7b2Smrg[# Set options
986344dda7b2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
986444dda7b2Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
9865ff559fabSmrg
986644dda7b2Smrgm4_if([$1],[LT_INIT],[
986744dda7b2Smrg  dnl
986844dda7b2Smrg  dnl Simply set some default values (i.e off) if boolean options were not
986944dda7b2Smrg  dnl specified:
987044dda7b2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
987144dda7b2Smrg  ])
987244dda7b2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
987344dda7b2Smrg  ])
987444dda7b2Smrg  dnl
987544dda7b2Smrg  dnl If no reference was made to various pairs of opposing options, then
987644dda7b2Smrg  dnl we run the default mode handler for the pair.  For example, if neither
987744dda7b2Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
987844dda7b2Smrg  dnl archives by default:
987944dda7b2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
988044dda7b2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
988144dda7b2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
988244dda7b2Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
988344dda7b2Smrg  		   [_LT_ENABLE_FAST_INSTALL])
988444dda7b2Smrg  ])
988544dda7b2Smrg])# _LT_SET_OPTIONS
9886ff559fabSmrg
9887ff559fabSmrg
9888ff559fabSmrg
988944dda7b2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
989044dda7b2Smrg# -----------------------------------------
989144dda7b2Smrgm4_define([_LT_MANGLE_DEFUN],
989244dda7b2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9893ff559fabSmrg
9894ff559fabSmrg
989544dda7b2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
989644dda7b2Smrg# -----------------------------------------------
989744dda7b2Smrgm4_define([LT_OPTION_DEFINE],
989844dda7b2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
989944dda7b2Smrg])# LT_OPTION_DEFINE
990044dda7b2Smrg
990144dda7b2Smrg
990244dda7b2Smrg# dlopen
990344dda7b2Smrg# ------
990444dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
99057a3b38f7Smrg])
99067a3b38f7Smrg
990744dda7b2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
990844dda7b2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
990944dda7b2SmrgAC_DIAGNOSE([obsolete],
991044dda7b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
991144dda7b2Smrgput the `dlopen' option into LT_INIT's first parameter.])
991244dda7b2Smrg])
99137a3b38f7Smrg
991444dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
991544dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9916ff559fabSmrg
9917ff559fabSmrg
991844dda7b2Smrg# win32-dll
991944dda7b2Smrg# ---------
992044dda7b2Smrg# Declare package support for building win32 dll's.
992144dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
992244dda7b2Smrg[enable_win32_dll=yes
9923ff559fabSmrg
992444dda7b2Smrgcase $host in
992544dda7b2Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
992644dda7b2Smrg  AC_CHECK_TOOL(AS, as, false)
992744dda7b2Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
992844dda7b2Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
992944dda7b2Smrg  ;;
993044dda7b2Smrgesac
9931ff559fabSmrg
993244dda7b2Smrgtest -z "$AS" && AS=as
993344dda7b2Smrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
9934ff559fabSmrg
993544dda7b2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
993644dda7b2Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9937ff559fabSmrg
993844dda7b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
993944dda7b2Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
994044dda7b2Smrg])# win32-dll
9941ff559fabSmrg
994244dda7b2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
994344dda7b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
994444dda7b2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
994544dda7b2SmrgAC_DIAGNOSE([obsolete],
994644dda7b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
994744dda7b2Smrgput the `win32-dll' option into LT_INIT's first parameter.])
994844dda7b2Smrg])
9949ff559fabSmrg
995044dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
995144dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9952ff559fabSmrg
9953ff559fabSmrg
995444dda7b2Smrg# _LT_ENABLE_SHARED([DEFAULT])
995544dda7b2Smrg# ----------------------------
995644dda7b2Smrg# implement the --enable-shared flag, and supports the `shared' and
995744dda7b2Smrg# `disable-shared' LT_INIT options.
995844dda7b2Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
995944dda7b2Smrgm4_define([_LT_ENABLE_SHARED],
996044dda7b2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
996144dda7b2SmrgAC_ARG_ENABLE([shared],
996244dda7b2Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
996344dda7b2Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
996444dda7b2Smrg    [p=${PACKAGE-default}
996544dda7b2Smrg    case $enableval in
996644dda7b2Smrg    yes) enable_shared=yes ;;
996744dda7b2Smrg    no) enable_shared=no ;;
996844dda7b2Smrg    *)
996944dda7b2Smrg      enable_shared=no
997044dda7b2Smrg      # Look at the argument we got.  We use all the common list separators.
997144dda7b2Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
997244dda7b2Smrg      for pkg in $enableval; do
997344dda7b2Smrg	IFS="$lt_save_ifs"
997444dda7b2Smrg	if test "X$pkg" = "X$p"; then
997544dda7b2Smrg	  enable_shared=yes
997644dda7b2Smrg	fi
997744dda7b2Smrg      done
997844dda7b2Smrg      IFS="$lt_save_ifs"
997944dda7b2Smrg      ;;
998044dda7b2Smrg    esac],
998144dda7b2Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
998244dda7b2Smrg
998344dda7b2Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
998444dda7b2Smrg	[Whether or not to build shared libraries])
998544dda7b2Smrg])# _LT_ENABLE_SHARED
998644dda7b2Smrg
998744dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
998844dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
998944dda7b2Smrg
999044dda7b2Smrg# Old names:
999144dda7b2SmrgAC_DEFUN([AC_ENABLE_SHARED],
999244dda7b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
999344dda7b2Smrg])
9994ff559fabSmrg
999544dda7b2SmrgAC_DEFUN([AC_DISABLE_SHARED],
999644dda7b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
999744dda7b2Smrg])
9998ff559fabSmrg
999944dda7b2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
1000044dda7b2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10001ff559fabSmrg
1000244dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
1000344dda7b2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
1000444dda7b2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
100057a3b38f7Smrg
100067a3b38f7Smrg
100077a3b38f7Smrg
1000844dda7b2Smrg# _LT_ENABLE_STATIC([DEFAULT])
1000944dda7b2Smrg# ----------------------------
1001044dda7b2Smrg# implement the --enable-static flag, and support the `static' and
1001144dda7b2Smrg# `disable-static' LT_INIT options.
1001244dda7b2Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1001344dda7b2Smrgm4_define([_LT_ENABLE_STATIC],
1001444dda7b2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
1001544dda7b2SmrgAC_ARG_ENABLE([static],
1001644dda7b2Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1001744dda7b2Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
1001844dda7b2Smrg    [p=${PACKAGE-default}
1001944dda7b2Smrg    case $enableval in
1002044dda7b2Smrg    yes) enable_static=yes ;;
1002144dda7b2Smrg    no) enable_static=no ;;
1002244dda7b2Smrg    *)
1002344dda7b2Smrg     enable_static=no
1002444dda7b2Smrg      # Look at the argument we got.  We use all the common list separators.
1002544dda7b2Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1002644dda7b2Smrg      for pkg in $enableval; do
1002744dda7b2Smrg	IFS="$lt_save_ifs"
1002844dda7b2Smrg	if test "X$pkg" = "X$p"; then
1002944dda7b2Smrg	  enable_static=yes
100307a3b38f7Smrg	fi
1003144dda7b2Smrg      done
1003244dda7b2Smrg      IFS="$lt_save_ifs"
1003344dda7b2Smrg      ;;
1003444dda7b2Smrg    esac],
1003544dda7b2Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10036ff559fabSmrg
1003744dda7b2Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
1003844dda7b2Smrg	[Whether or not to build static libraries])
1003944dda7b2Smrg])# _LT_ENABLE_STATIC
10040ff559fabSmrg
1004144dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
1004244dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10043ff559fabSmrg
1004444dda7b2Smrg# Old names:
1004544dda7b2SmrgAC_DEFUN([AC_ENABLE_STATIC],
1004644dda7b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
1004744dda7b2Smrg])
10048ff559fabSmrg
1004944dda7b2SmrgAC_DEFUN([AC_DISABLE_STATIC],
1005044dda7b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
1005144dda7b2Smrg])
10052ff559fabSmrg
1005344dda7b2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
1005444dda7b2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10055ff559fabSmrg
1005644dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
1005744dda7b2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
1005844dda7b2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
10059ff559fabSmrg
10060ff559fabSmrg
10061ff559fabSmrg
1006244dda7b2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
1006344dda7b2Smrg# ----------------------------------
1006444dda7b2Smrg# implement the --enable-fast-install flag, and support the `fast-install'
1006544dda7b2Smrg# and `disable-fast-install' LT_INIT options.
1006644dda7b2Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1006744dda7b2Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
1006844dda7b2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
1006944dda7b2SmrgAC_ARG_ENABLE([fast-install],
1007044dda7b2Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1007144dda7b2Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1007244dda7b2Smrg    [p=${PACKAGE-default}
1007344dda7b2Smrg    case $enableval in
1007444dda7b2Smrg    yes) enable_fast_install=yes ;;
1007544dda7b2Smrg    no) enable_fast_install=no ;;
1007644dda7b2Smrg    *)
1007744dda7b2Smrg      enable_fast_install=no
1007844dda7b2Smrg      # Look at the argument we got.  We use all the common list separators.
1007944dda7b2Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1008044dda7b2Smrg      for pkg in $enableval; do
1008144dda7b2Smrg	IFS="$lt_save_ifs"
1008244dda7b2Smrg	if test "X$pkg" = "X$p"; then
1008344dda7b2Smrg	  enable_fast_install=yes
1008444dda7b2Smrg	fi
1008544dda7b2Smrg      done
1008644dda7b2Smrg      IFS="$lt_save_ifs"
1008744dda7b2Smrg      ;;
1008844dda7b2Smrg    esac],
1008944dda7b2Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
1009044dda7b2Smrg
1009144dda7b2Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
1009244dda7b2Smrg	 [Whether or not to optimize for fast installation])dnl
1009344dda7b2Smrg])# _LT_ENABLE_FAST_INSTALL
100947a3b38f7Smrg
1009544dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
1009644dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
100977a3b38f7Smrg
1009844dda7b2Smrg# Old names:
1009944dda7b2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
1010044dda7b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
1010144dda7b2SmrgAC_DIAGNOSE([obsolete],
1010244dda7b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
1010344dda7b2Smrgthe `fast-install' option into LT_INIT's first parameter.])
1010444dda7b2Smrg])
10105ff559fabSmrg
1010644dda7b2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
1010744dda7b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
1010844dda7b2SmrgAC_DIAGNOSE([obsolete],
1010944dda7b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
1011044dda7b2Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
1011144dda7b2Smrg])
10112ff559fabSmrg
1011344dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
1011444dda7b2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
1011544dda7b2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10116ff559fabSmrg
10117ff559fabSmrg
1011844dda7b2Smrg# _LT_WITH_PIC([MODE])
1011944dda7b2Smrg# --------------------
1012044dda7b2Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
1012144dda7b2Smrg# LT_INIT options.
1012244dda7b2Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
1012344dda7b2Smrgm4_define([_LT_WITH_PIC],
1012444dda7b2Smrg[AC_ARG_WITH([pic],
1012544dda7b2Smrg    [AS_HELP_STRING([--with-pic],
1012644dda7b2Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1012744dda7b2Smrg    [pic_mode="$withval"],
1012844dda7b2Smrg    [pic_mode=default])
10129ff559fabSmrg
1013044dda7b2Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10131ff559fabSmrg
1013244dda7b2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
1013344dda7b2Smrg])# _LT_WITH_PIC
10134ff559fabSmrg
1013544dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
1013644dda7b2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10137ff559fabSmrg
1013844dda7b2Smrg# Old name:
1013944dda7b2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
1014044dda7b2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
1014144dda7b2SmrgAC_DIAGNOSE([obsolete],
1014244dda7b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
1014344dda7b2Smrgput the `pic-only' option into LT_INIT's first parameter.])
1014444dda7b2Smrg])
10145ff559fabSmrg
1014644dda7b2Smrgdnl aclocal-1.4 backwards compatibility:
1014744dda7b2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10148ff559fabSmrg
10149ff559fabSmrg
1015044dda7b2Smrgm4_define([_LTDL_MODE], [])
1015144dda7b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
1015244dda7b2Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
1015344dda7b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
1015444dda7b2Smrg		 [m4_define([_LTDL_MODE], [recursive])])
1015544dda7b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
1015644dda7b2Smrg		 [m4_define([_LTDL_MODE], [subproject])])
10157ff559fabSmrg
1015844dda7b2Smrgm4_define([_LTDL_TYPE], [])
1015944dda7b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
1016044dda7b2Smrg		 [m4_define([_LTDL_TYPE], [installable])])
1016144dda7b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
1016244dda7b2Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
10163ff559fabSmrg
1016444dda7b2Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
101657a3b38f7Smrg#
1016644dda7b2Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
1016744dda7b2Smrg# Written by Gary V. Vaughan, 2004
1016844dda7b2Smrg#
1016944dda7b2Smrg# This file is free software; the Free Software Foundation gives
1017044dda7b2Smrg# unlimited permission to copy and/or distribute it, with or without
1017144dda7b2Smrg# modifications, as long as this notice is preserved.
101727a3b38f7Smrg
1017344dda7b2Smrg# serial 6 ltsugar.m4
101747a3b38f7Smrg
1017544dda7b2Smrg# This is to help aclocal find these macros, as it can't see m4_define.
1017644dda7b2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10177ff559fabSmrg
10178ff559fabSmrg
1017944dda7b2Smrg# lt_join(SEP, ARG1, [ARG2...])
1018044dda7b2Smrg# -----------------------------
1018144dda7b2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
1018244dda7b2Smrg# associated separator.
1018344dda7b2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
1018444dda7b2Smrg# versions in m4sugar had bugs.
1018544dda7b2Smrgm4_define([lt_join],
1018644dda7b2Smrg[m4_if([$#], [1], [],
1018744dda7b2Smrg       [$#], [2], [[$2]],
1018844dda7b2Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
1018944dda7b2Smrgm4_define([_lt_join],
1019044dda7b2Smrg[m4_if([$#$2], [2], [],
1019144dda7b2Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
101927a3b38f7Smrg
101937a3b38f7Smrg
1019444dda7b2Smrg# lt_car(LIST)
1019544dda7b2Smrg# lt_cdr(LIST)
1019644dda7b2Smrg# ------------
1019744dda7b2Smrg# Manipulate m4 lists.
1019844dda7b2Smrg# These macros are necessary as long as will still need to support
1019944dda7b2Smrg# Autoconf-2.59 which quotes differently.
1020044dda7b2Smrgm4_define([lt_car], [[$1]])
1020144dda7b2Smrgm4_define([lt_cdr],
1020244dda7b2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
1020344dda7b2Smrg       [$#], 1, [],
1020444dda7b2Smrg       [m4_dquote(m4_shift($@))])])
1020544dda7b2Smrgm4_define([lt_unquote], $1)
102067a3b38f7Smrg
102077a3b38f7Smrg
1020844dda7b2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
1020944dda7b2Smrg# ------------------------------------------
1021044dda7b2Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
1021144dda7b2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
1021244dda7b2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
1021344dda7b2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
1021444dda7b2Smrg# than defined and empty).
10215ff559fabSmrg#
1021644dda7b2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
1021744dda7b2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
1021844dda7b2Smrgm4_define([lt_append],
1021944dda7b2Smrg[m4_define([$1],
1022044dda7b2Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10221ff559fabSmrg
10222ff559fabSmrg
10223ff559fabSmrg
1022444dda7b2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
1022544dda7b2Smrg# ----------------------------------------------------------
1022644dda7b2Smrg# Produce a SEP delimited list of all paired combinations of elements of
1022744dda7b2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
1022844dda7b2Smrg# has the form PREFIXmINFIXSUFFIXn.
1022944dda7b2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
1023044dda7b2Smrgm4_define([lt_combine],
1023144dda7b2Smrg[m4_if(m4_eval([$# > 3]), [1],
1023244dda7b2Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
1023344dda7b2Smrg[[m4_foreach([_Lt_prefix], [$2],
1023444dda7b2Smrg	     [m4_foreach([_Lt_suffix],
1023544dda7b2Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
1023644dda7b2Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
102377a3b38f7Smrg
102387a3b38f7Smrg
1023944dda7b2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
1024044dda7b2Smrg# -----------------------------------------------------------------------
1024144dda7b2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
1024244dda7b2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
1024344dda7b2Smrgm4_define([lt_if_append_uniq],
1024444dda7b2Smrg[m4_ifdef([$1],
1024544dda7b2Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
1024644dda7b2Smrg		 [lt_append([$1], [$2], [$3])$4],
1024744dda7b2Smrg		 [$5])],
1024844dda7b2Smrg	  [lt_append([$1], [$2], [$3])$4])])
1024944dda7b2Smrg
1025044dda7b2Smrg
1025144dda7b2Smrg# lt_dict_add(DICT, KEY, VALUE)
1025244dda7b2Smrg# -----------------------------
1025344dda7b2Smrgm4_define([lt_dict_add],
1025444dda7b2Smrg[m4_define([$1($2)], [$3])])
1025544dda7b2Smrg
102567a3b38f7Smrg
1025744dda7b2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
1025844dda7b2Smrg# --------------------------------------------
1025944dda7b2Smrgm4_define([lt_dict_add_subkey],
1026044dda7b2Smrg[m4_define([$1($2:$3)], [$4])])
102617a3b38f7Smrg
102627a3b38f7Smrg
1026344dda7b2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
1026444dda7b2Smrg# ----------------------------------
1026544dda7b2Smrgm4_define([lt_dict_fetch],
1026644dda7b2Smrg[m4_ifval([$3],
1026744dda7b2Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
1026844dda7b2Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10269ff559fabSmrg
10270ff559fabSmrg
1027144dda7b2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
1027244dda7b2Smrg# -----------------------------------------------------------------
1027344dda7b2Smrgm4_define([lt_if_dict_fetch],
1027444dda7b2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
1027544dda7b2Smrg	[$5],
1027644dda7b2Smrg    [$6])])
10277ff559fabSmrg
1027844dda7b2Smrg
1027944dda7b2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
1028044dda7b2Smrg# --------------------------------------------------------------
1028144dda7b2Smrgm4_define([lt_dict_filter],
1028244dda7b2Smrg[m4_if([$5], [], [],
1028344dda7b2Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
1028444dda7b2Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
1028544dda7b2Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
1028644dda7b2Smrg])
1028744dda7b2Smrg
1028844dda7b2Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
102897a3b38f7Smrg#
1029044dda7b2Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
1029144dda7b2Smrg#   Written by Scott James Remnant, 2004
102927a3b38f7Smrg#
1029344dda7b2Smrg# This file is free software; the Free Software Foundation gives
1029444dda7b2Smrg# unlimited permission to copy and/or distribute it, with or without
1029544dda7b2Smrg# modifications, as long as this notice is preserved.
10296ff559fabSmrg
1029744dda7b2Smrg# Generated from ltversion.in.
102987a3b38f7Smrg
1029944dda7b2Smrg# serial 3175 ltversion.m4
1030044dda7b2Smrg# This file is part of GNU Libtool
10301ff559fabSmrg
1030244dda7b2Smrgm4_define([LT_PACKAGE_VERSION], [2.2.10])
1030344dda7b2Smrgm4_define([LT_PACKAGE_REVISION], [1.3175])
1030444dda7b2Smrg
1030544dda7b2SmrgAC_DEFUN([LTVERSION_VERSION],
1030644dda7b2Smrg[macro_version='2.2.10'
1030744dda7b2Smrgmacro_revision='1.3175'
1030844dda7b2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
1030944dda7b2Smrg_LT_DECL(, macro_revision, 0)
1031044dda7b2Smrg])
1031144dda7b2Smrg
1031244dda7b2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
103137a3b38f7Smrg#
1031444dda7b2Smrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
1031544dda7b2Smrg#   Written by Scott James Remnant, 2004.
103167a3b38f7Smrg#
1031744dda7b2Smrg# This file is free software; the Free Software Foundation gives
1031844dda7b2Smrg# unlimited permission to copy and/or distribute it, with or without
1031944dda7b2Smrg# modifications, as long as this notice is preserved.
10320ff559fabSmrg
1032144dda7b2Smrg# serial 5 lt~obsolete.m4
10322ff559fabSmrg
1032344dda7b2Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
103247a3b38f7Smrg#
1032544dda7b2Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
1032644dda7b2Smrg# which have later been changed to m4_define as they aren't part of the
1032744dda7b2Smrg# exported API, or moved to Autoconf or Automake where they belong.
103287a3b38f7Smrg#
1032944dda7b2Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
1033044dda7b2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
1033144dda7b2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
1033244dda7b2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
1033344dda7b2Smrg# and doesn't know about Autoconf macros at all.)
103347a3b38f7Smrg#
1033544dda7b2Smrg# So we provide this file, which has a silly filename so it's always
1033644dda7b2Smrg# included after everything else.  This provides aclocal with the
1033744dda7b2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
1033844dda7b2Smrg# because those macros already exist, or will be overwritten later.
1033944dda7b2Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
1034044dda7b2Smrg#
1034144dda7b2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
1034244dda7b2Smrg# Yes, that means every name once taken will need to remain here until
1034344dda7b2Smrg# we give up compatibility with versions before 1.7, at which point
1034444dda7b2Smrg# we need to keep only those names which we still refer to.
1034544dda7b2Smrg
1034644dda7b2Smrg# This is to help aclocal find these macros, as it can't see m4_define.
1034744dda7b2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
1034844dda7b2Smrg
1034944dda7b2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
1035044dda7b2Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
1035144dda7b2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
1035244dda7b2Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
1035344dda7b2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
1035444dda7b2Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
1035544dda7b2Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
1035644dda7b2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
1035744dda7b2Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
1035844dda7b2Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
1035944dda7b2Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
1036044dda7b2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
1036144dda7b2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
1036244dda7b2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
1036344dda7b2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
1036444dda7b2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
1036544dda7b2Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
1036644dda7b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
1036744dda7b2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
1036844dda7b2Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
1036944dda7b2Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
1037044dda7b2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
1037144dda7b2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
1037244dda7b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
1037344dda7b2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
1037444dda7b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
1037544dda7b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
1037644dda7b2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
1037744dda7b2Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
1037844dda7b2Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
1037944dda7b2Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
1038044dda7b2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
1038144dda7b2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
1038244dda7b2Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
1038344dda7b2Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
1038444dda7b2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
1038544dda7b2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
1038644dda7b2Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
1038744dda7b2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
1038844dda7b2Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
1038944dda7b2Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
1039044dda7b2Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
1039144dda7b2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
1039244dda7b2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
1039344dda7b2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
1039444dda7b2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
1039544dda7b2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
1039644dda7b2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
1039744dda7b2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
1039844dda7b2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
1039944dda7b2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
1040044dda7b2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
1040144dda7b2Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
1040244dda7b2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
1040344dda7b2Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
1040444dda7b2Smrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
1040544dda7b2Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
1040644dda7b2Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
1040744dda7b2Smrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
1040844dda7b2Smrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
1040944dda7b2Smrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
10410ff559fabSmrg
10411