aclocal.m4 revision 95b296d0
195b296d0Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
295b296d0Smrg
395b296d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
495b296d0Smrg# 2005  Free Software Foundation, Inc.
595b296d0Smrg# This file is free software; the Free Software Foundation
695b296d0Smrg# gives unlimited permission to copy and/or distribute it,
795b296d0Smrg# with or without modifications, as long as this notice is preserved.
895b296d0Smrg
995b296d0Smrg# This program is distributed in the hope that it will be useful,
1095b296d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1195b296d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1295b296d0Smrg# PARTICULAR PURPOSE.
1395b296d0Smrg
1495b296d0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1595b296d0Smrg
1695b296d0Smrg# serial 48 AC_PROG_LIBTOOL
1795b296d0Smrg
1895b296d0Smrg
1995b296d0Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2095b296d0Smrg# -----------------------------------------------------------
2195b296d0Smrg# If this macro is not defined by Autoconf, define it here.
2295b296d0Smrgm4_ifdef([AC_PROVIDE_IFELSE],
2395b296d0Smrg         [],
2495b296d0Smrg         [m4_define([AC_PROVIDE_IFELSE],
2595b296d0Smrg	         [m4_ifdef([AC_PROVIDE_$1],
2695b296d0Smrg		           [$2], [$3])])])
2795b296d0Smrg
2895b296d0Smrg
2995b296d0Smrg# AC_PROG_LIBTOOL
3095b296d0Smrg# ---------------
3195b296d0SmrgAC_DEFUN([AC_PROG_LIBTOOL],
3295b296d0Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
3395b296d0Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
3495b296d0Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
3595b296d0Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
3695b296d0Smrg    [AC_LIBTOOL_CXX],
3795b296d0Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
3895b296d0Smrg  ])])
3995b296d0Smrgdnl And a similar setup for Fortran 77 support
4095b296d0Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
4195b296d0Smrg    [AC_LIBTOOL_F77],
4295b296d0Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
4395b296d0Smrg])])
4495b296d0Smrg
4595b296d0Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
4695b296d0Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
4795b296d0Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
4895b296d0Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
4995b296d0Smrg    [AC_LIBTOOL_GCJ],
5095b296d0Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5195b296d0Smrg      [AC_LIBTOOL_GCJ],
5295b296d0Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5395b296d0Smrg	[AC_LIBTOOL_GCJ],
5495b296d0Smrg      [ifdef([AC_PROG_GCJ],
5595b296d0Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5695b296d0Smrg       ifdef([A][M_PROG_GCJ],
5795b296d0Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5895b296d0Smrg       ifdef([LT_AC_PROG_GCJ],
5995b296d0Smrg	     [define([LT_AC_PROG_GCJ],
6095b296d0Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6195b296d0Smrg])])# AC_PROG_LIBTOOL
6295b296d0Smrg
6395b296d0Smrg
6495b296d0Smrg# _AC_PROG_LIBTOOL
6595b296d0Smrg# ----------------
6695b296d0SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
6795b296d0Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
6895b296d0SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
6995b296d0SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
7095b296d0SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
7195b296d0Smrg
7295b296d0Smrg# This can be used to rebuild libtool when needed
7395b296d0SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7495b296d0Smrg
7595b296d0Smrg# Always use our own libtool.
7695b296d0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
7795b296d0SmrgAC_SUBST(LIBTOOL)dnl
7895b296d0Smrg
7995b296d0Smrg# Prevent multiple expansion
8095b296d0Smrgdefine([AC_PROG_LIBTOOL], [])
8195b296d0Smrg])# _AC_PROG_LIBTOOL
8295b296d0Smrg
8395b296d0Smrg
8495b296d0Smrg# AC_LIBTOOL_SETUP
8595b296d0Smrg# ----------------
8695b296d0SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
8795b296d0Smrg[AC_PREREQ(2.50)dnl
8895b296d0SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
8995b296d0SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
9095b296d0SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
9195b296d0SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
9295b296d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
9395b296d0SmrgAC_REQUIRE([AC_PROG_CC])dnl
9495b296d0SmrgAC_REQUIRE([AC_PROG_LD])dnl
9595b296d0SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
9695b296d0SmrgAC_REQUIRE([AC_PROG_NM])dnl
9795b296d0Smrg
9895b296d0SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
9995b296d0SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
10095b296d0Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
10195b296d0SmrgAC_REQUIRE([AC_OBJEXT])dnl
10295b296d0SmrgAC_REQUIRE([AC_EXEEXT])dnl
10395b296d0Smrgdnl
10495b296d0Smrg
10595b296d0SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
10695b296d0SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10795b296d0SmrgAC_LIBTOOL_OBJDIR
10895b296d0Smrg
10995b296d0SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
11095b296d0Smrg_LT_AC_PROG_ECHO_BACKSLASH
11195b296d0Smrg
11295b296d0Smrgcase $host_os in
11395b296d0Smrgaix3*)
11495b296d0Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
11595b296d0Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
11695b296d0Smrg  # vanish in a puff of smoke.
11795b296d0Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
11895b296d0Smrg    COLLECT_NAMES=
11995b296d0Smrg    export COLLECT_NAMES
12095b296d0Smrg  fi
12195b296d0Smrg  ;;
12295b296d0Smrgesac
12395b296d0Smrg
12495b296d0Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
12595b296d0Smrg# metacharacters that are still active within double-quoted strings.
12695b296d0SmrgXsed='sed -e 1s/^X//'
12795b296d0Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
12895b296d0Smrg
12995b296d0Smrg# Same as above, but do not quote variable references.
13095b296d0Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
13195b296d0Smrg
13295b296d0Smrg# Sed substitution to delay expansion of an escaped shell variable in a
13395b296d0Smrg# double_quote_subst'ed string.
13495b296d0Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
13595b296d0Smrg
13695b296d0Smrg# Sed substitution to avoid accidental globbing in evaled expressions
13795b296d0Smrgno_glob_subst='s/\*/\\\*/g'
13895b296d0Smrg
13995b296d0Smrg# Constants:
14095b296d0Smrgrm="rm -f"
14195b296d0Smrg
14295b296d0Smrg# Global variables:
14395b296d0Smrgdefault_ofile=libtool
14495b296d0Smrgcan_build_shared=yes
14595b296d0Smrg
14695b296d0Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
14795b296d0Smrg# which needs '.lib').
14895b296d0Smrglibext=a
14995b296d0Smrgltmain="$ac_aux_dir/ltmain.sh"
15095b296d0Smrgofile="$default_ofile"
15195b296d0Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
15295b296d0Smrg
15395b296d0SmrgAC_CHECK_TOOL(AR, ar, false)
15495b296d0SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
15595b296d0SmrgAC_CHECK_TOOL(STRIP, strip, :)
15695b296d0Smrg
15795b296d0Smrgold_CC="$CC"
15895b296d0Smrgold_CFLAGS="$CFLAGS"
15995b296d0Smrg
16095b296d0Smrg# Set sane defaults for various variables
16195b296d0Smrgtest -z "$AR" && AR=ar
16295b296d0Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
16395b296d0Smrgtest -z "$AS" && AS=as
16495b296d0Smrgtest -z "$CC" && CC=cc
16595b296d0Smrgtest -z "$LTCC" && LTCC=$CC
16695b296d0Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
16795b296d0Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
16895b296d0Smrgtest -z "$LD" && LD=ld
16995b296d0Smrgtest -z "$LN_S" && LN_S="ln -s"
17095b296d0Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
17195b296d0Smrgtest -z "$NM" && NM=nm
17295b296d0Smrgtest -z "$SED" && SED=sed
17395b296d0Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
17495b296d0Smrgtest -z "$RANLIB" && RANLIB=:
17595b296d0Smrgtest -z "$STRIP" && STRIP=:
17695b296d0Smrgtest -z "$ac_objext" && ac_objext=o
17795b296d0Smrg
17895b296d0Smrg# Determine commands to create old-style static archives.
17995b296d0Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
18095b296d0Smrgold_postinstall_cmds='chmod 644 $oldlib'
18195b296d0Smrgold_postuninstall_cmds=
18295b296d0Smrg
18395b296d0Smrgif test -n "$RANLIB"; then
18495b296d0Smrg  case $host_os in
18595b296d0Smrg  openbsd*)
18695b296d0Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
18795b296d0Smrg    ;;
18895b296d0Smrg  *)
18995b296d0Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
19095b296d0Smrg    ;;
19195b296d0Smrg  esac
19295b296d0Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
19395b296d0Smrgfi
19495b296d0Smrg
19595b296d0Smrg_LT_CC_BASENAME([$compiler])
19695b296d0Smrg
19795b296d0Smrg# Only perform the check for file, if the check method requires it
19895b296d0Smrgcase $deplibs_check_method in
19995b296d0Smrgfile_magic*)
20095b296d0Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
20195b296d0Smrg    AC_PATH_MAGIC
20295b296d0Smrg  fi
20395b296d0Smrg  ;;
20495b296d0Smrgesac
20595b296d0Smrg
20695b296d0SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
20795b296d0SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
20895b296d0Smrgenable_win32_dll=yes, enable_win32_dll=no)
20995b296d0Smrg
21095b296d0SmrgAC_ARG_ENABLE([libtool-lock],
21195b296d0Smrg    [AC_HELP_STRING([--disable-libtool-lock],
21295b296d0Smrg	[avoid locking (might break parallel builds)])])
21395b296d0Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
21495b296d0Smrg
21595b296d0SmrgAC_ARG_WITH([pic],
21695b296d0Smrg    [AC_HELP_STRING([--with-pic],
21795b296d0Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
21895b296d0Smrg    [pic_mode="$withval"],
21995b296d0Smrg    [pic_mode=default])
22095b296d0Smrgtest -z "$pic_mode" && pic_mode=default
22195b296d0Smrg
22295b296d0Smrg# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
22395b296d0Smrg#
22495b296d0Smrg# Note:  This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
22595b296d0Smrg#        We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
22695b296d0Smrg#        calls AC_LIBTOOL_CONFIG and creates libtool.
22795b296d0Smrg#
22895b296d0Smrg_LT_VERSION_CHECK
22995b296d0Smrg
23095b296d0Smrg# Use C for the default configuration in the libtool script
23195b296d0Smrgtagname=
23295b296d0SmrgAC_LIBTOOL_LANG_C_CONFIG
23395b296d0Smrg_LT_AC_TAGCONFIG
23495b296d0Smrg])# AC_LIBTOOL_SETUP
23595b296d0Smrg
23695b296d0Smrg
23795b296d0Smrg# _LT_VERSION_CHECK
23895b296d0Smrg# -----------------
23995b296d0SmrgAC_DEFUN([_LT_VERSION_CHECK],
24095b296d0Smrg[AC_MSG_CHECKING([for correct ltmain.sh version])
24195b296d0Smrgif test "x$ltmain" = "x" ; then
24295b296d0Smrg  AC_MSG_RESULT(no)
24395b296d0Smrg  AC_MSG_ERROR([
24495b296d0Smrg
24595b296d0Smrg*** @<:@Gentoo@:>@ sanity check failed! ***
24695b296d0Smrg*** \$ltmain is not defined, please check the patch for consistency! ***
24795b296d0Smrg])
24895b296d0Smrgfi
24995b296d0Smrggentoo_lt_version="1.5.22"
25095b296d0Smrggentoo_ltmain_version=`sed -n '/^[[ 	]]*VERSION=/{s/^[[ 	]]*VERSION=//;p;q;}' "$ltmain"`
25195b296d0Smrgif test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
25295b296d0Smrg  AC_MSG_RESULT(no)
25395b296d0Smrg  AC_MSG_ERROR([
25495b296d0Smrg
25595b296d0Smrg*** @<:@Gentoo@:>@ sanity check failed! ***
25695b296d0Smrg*** libtool.m4 and ltmain.sh have a version mismatch! ***
25795b296d0Smrg*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
25895b296d0Smrg
25995b296d0SmrgPlease run:
26095b296d0Smrg
26195b296d0Smrg  libtoolize --copy --force
26295b296d0Smrg
26395b296d0Smrgif appropriate, please contact the maintainer of this
26495b296d0Smrgpackage (or your distribution) for help.
26595b296d0Smrg])
26695b296d0Smrgelse
26795b296d0Smrg  AC_MSG_RESULT(yes)
26895b296d0Smrgfi
26995b296d0Smrg])# _LT_VERSION_CHECK
27095b296d0Smrg
27195b296d0Smrg
27295b296d0Smrg# _LT_AC_SYS_COMPILER
27395b296d0Smrg# -------------------
27495b296d0SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
27595b296d0Smrg[AC_REQUIRE([AC_PROG_CC])dnl
27695b296d0Smrg
27795b296d0Smrg# If no C compiler was specified, use CC.
27895b296d0SmrgLTCC=${LTCC-"$CC"}
27995b296d0Smrg
28095b296d0Smrg# If no C compiler flags were specified, use CFLAGS.
28195b296d0SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
28295b296d0Smrg
28395b296d0Smrg# Allow CC to be a program name with arguments.
28495b296d0Smrgcompiler=$CC
28595b296d0Smrg])# _LT_AC_SYS_COMPILER
28695b296d0Smrg
28795b296d0Smrg
28895b296d0Smrg# _LT_CC_BASENAME(CC)
28995b296d0Smrg# -------------------
29095b296d0Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
29195b296d0SmrgAC_DEFUN([_LT_CC_BASENAME],
29295b296d0Smrg[for cc_temp in $1""; do
29395b296d0Smrg  case $cc_temp in
29495b296d0Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
29595b296d0Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
29695b296d0Smrg    \-*) ;;
29795b296d0Smrg    *) break;;
29895b296d0Smrg  esac
29995b296d0Smrgdone
30095b296d0Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
30195b296d0Smrg])
30295b296d0Smrg
30395b296d0Smrg
30495b296d0Smrg# _LT_COMPILER_BOILERPLATE
30595b296d0Smrg# ------------------------
30695b296d0Smrg# Check for compiler boilerplate output or warnings with
30795b296d0Smrg# the simple compiler test code.
30895b296d0SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
30995b296d0Smrg[ac_outfile=conftest.$ac_objext
31095b296d0Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
31195b296d0Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
31295b296d0Smrg_lt_compiler_boilerplate=`cat conftest.err`
31395b296d0Smrg$rm conftest*
31495b296d0Smrg])# _LT_COMPILER_BOILERPLATE
31595b296d0Smrg
31695b296d0Smrg
31795b296d0Smrg# _LT_LINKER_BOILERPLATE
31895b296d0Smrg# ----------------------
31995b296d0Smrg# Check for linker boilerplate output or warnings with
32095b296d0Smrg# the simple link test code.
32195b296d0SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
32295b296d0Smrg[ac_outfile=conftest.$ac_objext
32395b296d0Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
32495b296d0Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
32595b296d0Smrg_lt_linker_boilerplate=`cat conftest.err`
32695b296d0Smrg$rm conftest*
32795b296d0Smrg])# _LT_LINKER_BOILERPLATE
32895b296d0Smrg
32995b296d0Smrg
33095b296d0Smrg# _LT_AC_SYS_LIBPATH_AIX
33195b296d0Smrg# ----------------------
33295b296d0Smrg# Links a minimal program and checks the executable
33395b296d0Smrg# for the system default hardcoded library path. In most cases,
33495b296d0Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
33595b296d0Smrg# the location of the communication and MPI libs are included too.
33695b296d0Smrg# If we don't find anything, use the default library path according
33795b296d0Smrg# to the aix ld manual.
33895b296d0SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
33995b296d0Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
34095b296d0Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
34195b296d0Smrg}'`
34295b296d0Smrg# Check for a 64-bit object if we didn't find anything.
34395b296d0Smrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
34495b296d0Smrg}'`; fi],[])
34595b296d0Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
34695b296d0Smrg])# _LT_AC_SYS_LIBPATH_AIX
34795b296d0Smrg
34895b296d0Smrg
34995b296d0Smrg# _LT_AC_SHELL_INIT(ARG)
35095b296d0Smrg# ----------------------
35195b296d0SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
35295b296d0Smrg[ifdef([AC_DIVERSION_NOTICE],
35395b296d0Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
35495b296d0Smrg	 [AC_DIVERT_PUSH(NOTICE)])
35595b296d0Smrg$1
35695b296d0SmrgAC_DIVERT_POP
35795b296d0Smrg])# _LT_AC_SHELL_INIT
35895b296d0Smrg
35995b296d0Smrg
36095b296d0Smrg# _LT_AC_PROG_ECHO_BACKSLASH
36195b296d0Smrg# --------------------------
36295b296d0Smrg# Add some code to the start of the generated configure script which
36395b296d0Smrg# will find an echo command which doesn't interpret backslashes.
36495b296d0SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
36595b296d0Smrg[_LT_AC_SHELL_INIT([
36695b296d0Smrg# Check that we are running under the correct shell.
36795b296d0SmrgSHELL=${CONFIG_SHELL-/bin/sh}
36895b296d0Smrg
36995b296d0Smrgcase X$ECHO in
37095b296d0SmrgX*--fallback-echo)
37195b296d0Smrg  # Remove one level of quotation (which was required for Make).
37295b296d0Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
37395b296d0Smrg  ;;
37495b296d0Smrgesac
37595b296d0Smrg
37695b296d0Smrgecho=${ECHO-echo}
37795b296d0Smrgif test "X[$]1" = X--no-reexec; then
37895b296d0Smrg  # Discard the --no-reexec flag, and continue.
37995b296d0Smrg  shift
38095b296d0Smrgelif test "X[$]1" = X--fallback-echo; then
38195b296d0Smrg  # Avoid inline document here, it may be left over
38295b296d0Smrg  :
38395b296d0Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
38495b296d0Smrg  # Yippee, $echo works!
38595b296d0Smrg  :
38695b296d0Smrgelse
38795b296d0Smrg  # Restart under the correct shell.
38895b296d0Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
38995b296d0Smrgfi
39095b296d0Smrg
39195b296d0Smrgif test "X[$]1" = X--fallback-echo; then
39295b296d0Smrg  # used as fallback echo
39395b296d0Smrg  shift
39495b296d0Smrg  cat <<EOF
39595b296d0Smrg[$]*
39695b296d0SmrgEOF
39795b296d0Smrg  exit 0
39895b296d0Smrgfi
39995b296d0Smrg
40095b296d0Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
40195b296d0Smrg# if CDPATH is set.
40295b296d0Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
40395b296d0Smrg
40495b296d0Smrgif test -z "$ECHO"; then
40595b296d0Smrgif test "X${echo_test_string+set}" != Xset; then
40695b296d0Smrg# find a string as large as possible, as long as the shell can cope with it
40795b296d0Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
40895b296d0Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
40995b296d0Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
41095b296d0Smrg       echo_test_string=`eval $cmd` &&
41195b296d0Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
41295b296d0Smrg    then
41395b296d0Smrg      break
41495b296d0Smrg    fi
41595b296d0Smrg  done
41695b296d0Smrgfi
41795b296d0Smrg
41895b296d0Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
41995b296d0Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
42095b296d0Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
42195b296d0Smrg  :
42295b296d0Smrgelse
42395b296d0Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
42495b296d0Smrg  # backslashes.  This makes it impossible to quote backslashes using
42595b296d0Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
42695b296d0Smrg  #
42795b296d0Smrg  # So, first we look for a working echo in the user's PATH.
42895b296d0Smrg
42995b296d0Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
43095b296d0Smrg  for dir in $PATH /usr/ucb; do
43195b296d0Smrg    IFS="$lt_save_ifs"
43295b296d0Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
43395b296d0Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
43495b296d0Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
43595b296d0Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
43695b296d0Smrg      echo="$dir/echo"
43795b296d0Smrg      break
43895b296d0Smrg    fi
43995b296d0Smrg  done
44095b296d0Smrg  IFS="$lt_save_ifs"
44195b296d0Smrg
44295b296d0Smrg  if test "X$echo" = Xecho; then
44395b296d0Smrg    # We didn't find a better echo, so look for alternatives.
44495b296d0Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
44595b296d0Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
44695b296d0Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
44795b296d0Smrg      # This shell has a builtin print -r that does the trick.
44895b296d0Smrg      echo='print -r'
44995b296d0Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
45095b296d0Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
45195b296d0Smrg      # If we have ksh, try running configure again with it.
45295b296d0Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
45395b296d0Smrg      export ORIGINAL_CONFIG_SHELL
45495b296d0Smrg      CONFIG_SHELL=/bin/ksh
45595b296d0Smrg      export CONFIG_SHELL
45695b296d0Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
45795b296d0Smrg    else
45895b296d0Smrg      # Try using printf.
45995b296d0Smrg      echo='printf %s\n'
46095b296d0Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
46195b296d0Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
46295b296d0Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
46395b296d0Smrg	# Cool, printf works
46495b296d0Smrg	:
46595b296d0Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
46695b296d0Smrg	   test "X$echo_testing_string" = 'X\t' &&
46795b296d0Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
46895b296d0Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
46995b296d0Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
47095b296d0Smrg	export CONFIG_SHELL
47195b296d0Smrg	SHELL="$CONFIG_SHELL"
47295b296d0Smrg	export SHELL
47395b296d0Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
47495b296d0Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
47595b296d0Smrg	   test "X$echo_testing_string" = 'X\t' &&
47695b296d0Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
47795b296d0Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
47895b296d0Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
47995b296d0Smrg      else
48095b296d0Smrg	# maybe with a smaller string...
48195b296d0Smrg	prev=:
48295b296d0Smrg
48395b296d0Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
48495b296d0Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
48595b296d0Smrg	  then
48695b296d0Smrg	    break
48795b296d0Smrg	  fi
48895b296d0Smrg	  prev="$cmd"
48995b296d0Smrg	done
49095b296d0Smrg
49195b296d0Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
49295b296d0Smrg	  echo_test_string=`eval $prev`
49395b296d0Smrg	  export echo_test_string
49495b296d0Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
49595b296d0Smrg	else
49695b296d0Smrg	  # Oops.  We lost completely, so just stick with echo.
49795b296d0Smrg	  echo=echo
49895b296d0Smrg	fi
49995b296d0Smrg      fi
50095b296d0Smrg    fi
50195b296d0Smrg  fi
50295b296d0Smrgfi
50395b296d0Smrgfi
50495b296d0Smrg
50595b296d0Smrg# Copy echo and quote the copy suitably for passing to libtool from
50695b296d0Smrg# the Makefile, instead of quoting the original, which is used later.
50795b296d0SmrgECHO=$echo
50895b296d0Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
50995b296d0Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
51095b296d0Smrgfi
51195b296d0Smrg
51295b296d0SmrgAC_SUBST(ECHO)
51395b296d0Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
51495b296d0Smrg
51595b296d0Smrg
51695b296d0Smrg# _LT_AC_LOCK
51795b296d0Smrg# -----------
51895b296d0SmrgAC_DEFUN([_LT_AC_LOCK],
51995b296d0Smrg[AC_ARG_ENABLE([libtool-lock],
52095b296d0Smrg    [AC_HELP_STRING([--disable-libtool-lock],
52195b296d0Smrg	[avoid locking (might break parallel builds)])])
52295b296d0Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
52395b296d0Smrg
52495b296d0Smrg# Some flags need to be propagated to the compiler or linker for good
52595b296d0Smrg# libtool support.
52695b296d0Smrgcase $host in
52795b296d0Smrgia64-*-hpux*)
52895b296d0Smrg  # Find out which ABI we are using.
52995b296d0Smrg  echo 'int i;' > conftest.$ac_ext
53095b296d0Smrg  if AC_TRY_EVAL(ac_compile); then
53195b296d0Smrg    case `/usr/bin/file conftest.$ac_objext` in
53295b296d0Smrg    *ELF-32*)
53395b296d0Smrg      HPUX_IA64_MODE="32"
53495b296d0Smrg      ;;
53595b296d0Smrg    *ELF-64*)
53695b296d0Smrg      HPUX_IA64_MODE="64"
53795b296d0Smrg      ;;
53895b296d0Smrg    esac
53995b296d0Smrg  fi
54095b296d0Smrg  rm -rf conftest*
54195b296d0Smrg  ;;
54295b296d0Smrg*-*-irix6*)
54395b296d0Smrg  # Find out which ABI we are using.
54495b296d0Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
54595b296d0Smrg  if AC_TRY_EVAL(ac_compile); then
54695b296d0Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
54795b296d0Smrg    case `/usr/bin/file conftest.$ac_objext` in
54895b296d0Smrg    *32-bit*)
54995b296d0Smrg      LD="${LD-ld} -melf32bsmip"
55095b296d0Smrg      ;;
55195b296d0Smrg    *N32*)
55295b296d0Smrg      LD="${LD-ld} -melf32bmipn32"
55395b296d0Smrg      ;;
55495b296d0Smrg    *64-bit*)
55595b296d0Smrg      LD="${LD-ld} -melf64bmip"
55695b296d0Smrg      ;;
55795b296d0Smrg    esac
55895b296d0Smrg   else
55995b296d0Smrg    case `/usr/bin/file conftest.$ac_objext` in
56095b296d0Smrg    *32-bit*)
56195b296d0Smrg      LD="${LD-ld} -32"
56295b296d0Smrg      ;;
56395b296d0Smrg    *N32*)
56495b296d0Smrg      LD="${LD-ld} -n32"
56595b296d0Smrg      ;;
56695b296d0Smrg    *64-bit*)
56795b296d0Smrg      LD="${LD-ld} -64"
56895b296d0Smrg      ;;
56995b296d0Smrg    esac
57095b296d0Smrg   fi
57195b296d0Smrg  fi
57295b296d0Smrg  rm -rf conftest*
57395b296d0Smrg  ;;
57495b296d0Smrg
57595b296d0Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
57695b296d0Smrg  # Find out which ABI we are using.
57795b296d0Smrg  echo 'int i;' > conftest.$ac_ext
57895b296d0Smrg  if AC_TRY_EVAL(ac_compile); then
57995b296d0Smrg    case `/usr/bin/file conftest.o` in
58095b296d0Smrg    *32-bit*)
58195b296d0Smrg      case $host in
58295b296d0Smrg        x86_64-*linux*)
58395b296d0Smrg          LD="${LD-ld} -m elf_i386"
58495b296d0Smrg          ;;
58595b296d0Smrg        ppc64-*linux*|powerpc64-*linux*)
58695b296d0Smrg          LD="${LD-ld} -m elf32ppclinux"
58795b296d0Smrg          ;;
58895b296d0Smrg        s390x-*linux*)
58995b296d0Smrg          LD="${LD-ld} -m elf_s390"
59095b296d0Smrg          ;;
59195b296d0Smrg        sparc64-*linux*)
59295b296d0Smrg          LD="${LD-ld} -m elf32_sparc"
59395b296d0Smrg          ;;
59495b296d0Smrg      esac
59595b296d0Smrg      ;;
59695b296d0Smrg    *64-bit*)
59795b296d0Smrg      case $host in
59895b296d0Smrg        x86_64-*linux*)
59995b296d0Smrg          LD="${LD-ld} -m elf_x86_64"
60095b296d0Smrg          ;;
60195b296d0Smrg        ppc*-*linux*|powerpc*-*linux*)
60295b296d0Smrg          LD="${LD-ld} -m elf64ppc"
60395b296d0Smrg          ;;
60495b296d0Smrg        s390*-*linux*)
60595b296d0Smrg          LD="${LD-ld} -m elf64_s390"
60695b296d0Smrg          ;;
60795b296d0Smrg        sparc*-*linux*)
60895b296d0Smrg          LD="${LD-ld} -m elf64_sparc"
60995b296d0Smrg          ;;
61095b296d0Smrg      esac
61195b296d0Smrg      ;;
61295b296d0Smrg    esac
61395b296d0Smrg  fi
61495b296d0Smrg  rm -rf conftest*
61595b296d0Smrg  ;;
61695b296d0Smrg
61795b296d0Smrg*-*-sco3.2v5*)
61895b296d0Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
61995b296d0Smrg  SAVE_CFLAGS="$CFLAGS"
62095b296d0Smrg  CFLAGS="$CFLAGS -belf"
62195b296d0Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
62295b296d0Smrg    [AC_LANG_PUSH(C)
62395b296d0Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
62495b296d0Smrg     AC_LANG_POP])
62595b296d0Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
62695b296d0Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
62795b296d0Smrg    CFLAGS="$SAVE_CFLAGS"
62895b296d0Smrg  fi
62995b296d0Smrg  ;;
63095b296d0Smrgsparc*-*solaris*)
63195b296d0Smrg  # Find out which ABI we are using.
63295b296d0Smrg  echo 'int i;' > conftest.$ac_ext
63395b296d0Smrg  if AC_TRY_EVAL(ac_compile); then
63495b296d0Smrg    case `/usr/bin/file conftest.o` in
63595b296d0Smrg    *64-bit*)
63695b296d0Smrg      case $lt_cv_prog_gnu_ld in
63795b296d0Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
63895b296d0Smrg      *)    LD="${LD-ld} -64" ;;
63995b296d0Smrg      esac
64095b296d0Smrg      ;;
64195b296d0Smrg    esac
64295b296d0Smrg  fi
64395b296d0Smrg  rm -rf conftest*
64495b296d0Smrg  ;;
64595b296d0Smrg
64695b296d0SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
64795b296d0Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
64895b296d0Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
64995b296d0Smrg  AC_CHECK_TOOL(AS, as, false)
65095b296d0Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
65195b296d0Smrg  ;;
65295b296d0Smrg  ])
65395b296d0Smrgesac
65495b296d0Smrg
65595b296d0Smrgneed_locks="$enable_libtool_lock"
65695b296d0Smrg
65795b296d0Smrg])# _LT_AC_LOCK
65895b296d0Smrg
65995b296d0Smrg
66095b296d0Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
66195b296d0Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
66295b296d0Smrg# ----------------------------------------------------------------
66395b296d0Smrg# Check whether the given compiler option works
66495b296d0SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
66595b296d0Smrg[AC_REQUIRE([LT_AC_PROG_SED])
66695b296d0SmrgAC_CACHE_CHECK([$1], [$2],
66795b296d0Smrg  [$2=no
66895b296d0Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
66995b296d0Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
67095b296d0Smrg   lt_compiler_flag="$3"
67195b296d0Smrg   # Insert the option either (1) after the last *FLAGS variable, or
67295b296d0Smrg   # (2) before a word containing "conftest.", or (3) at the end.
67395b296d0Smrg   # Note that $ac_compile itself does not contain backslashes and begins
67495b296d0Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
67595b296d0Smrg   # The option is referenced via a variable to avoid confusing sed.
67695b296d0Smrg   lt_compile=`echo "$ac_compile" | $SED \
67795b296d0Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
67895b296d0Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
67995b296d0Smrg   -e 's:$: $lt_compiler_flag:'`
68095b296d0Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
68195b296d0Smrg   (eval "$lt_compile" 2>conftest.err)
68295b296d0Smrg   ac_status=$?
68395b296d0Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
68495b296d0Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
68595b296d0Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
68695b296d0Smrg     # The compiler can only warn and ignore the option if not recognized
68795b296d0Smrg     # So say no if there are warnings other than the usual output.
68895b296d0Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
68995b296d0Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
69095b296d0Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
69195b296d0Smrg       $2=yes
69295b296d0Smrg     fi
69395b296d0Smrg   fi
69495b296d0Smrg   $rm conftest*
69595b296d0Smrg])
69695b296d0Smrg
69795b296d0Smrgif test x"[$]$2" = xyes; then
69895b296d0Smrg    ifelse([$5], , :, [$5])
69995b296d0Smrgelse
70095b296d0Smrg    ifelse([$6], , :, [$6])
70195b296d0Smrgfi
70295b296d0Smrg])# AC_LIBTOOL_COMPILER_OPTION
70395b296d0Smrg
70495b296d0Smrg
70595b296d0Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
70695b296d0Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
70795b296d0Smrg# ------------------------------------------------------------
70895b296d0Smrg# Check whether the given compiler option works
70995b296d0SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
71095b296d0Smrg[AC_CACHE_CHECK([$1], [$2],
71195b296d0Smrg  [$2=no
71295b296d0Smrg   save_LDFLAGS="$LDFLAGS"
71395b296d0Smrg   LDFLAGS="$LDFLAGS $3"
71495b296d0Smrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
71595b296d0Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
71695b296d0Smrg     # The linker can only warn and ignore the option if not recognized
71795b296d0Smrg     # So say no if there are warnings
71895b296d0Smrg     if test -s conftest.err; then
71995b296d0Smrg       # Append any errors to the config.log.
72095b296d0Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
72195b296d0Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
72295b296d0Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
72395b296d0Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
72495b296d0Smrg         $2=yes
72595b296d0Smrg       fi
72695b296d0Smrg     else
72795b296d0Smrg       $2=yes
72895b296d0Smrg     fi
72995b296d0Smrg   fi
73095b296d0Smrg   $rm conftest*
73195b296d0Smrg   LDFLAGS="$save_LDFLAGS"
73295b296d0Smrg])
73395b296d0Smrg
73495b296d0Smrgif test x"[$]$2" = xyes; then
73595b296d0Smrg    ifelse([$4], , :, [$4])
73695b296d0Smrgelse
73795b296d0Smrg    ifelse([$5], , :, [$5])
73895b296d0Smrgfi
73995b296d0Smrg])# AC_LIBTOOL_LINKER_OPTION
74095b296d0Smrg
74195b296d0Smrg
74295b296d0Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
74395b296d0Smrg# --------------------------
74495b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
74595b296d0Smrg[# find the maximum length of command line arguments
74695b296d0SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
74795b296d0SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
74895b296d0Smrg  i=0
74995b296d0Smrg  teststring="ABCD"
75095b296d0Smrg
75195b296d0Smrg  case $build_os in
75295b296d0Smrg  msdosdjgpp*)
75395b296d0Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
75495b296d0Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
75595b296d0Smrg    # during glob expansion).  Even if it were fixed, the result of this
75695b296d0Smrg    # check would be larger than it should be.
75795b296d0Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
75895b296d0Smrg    ;;
75995b296d0Smrg
76095b296d0Smrg  gnu*)
76195b296d0Smrg    # Under GNU Hurd, this test is not required because there is
76295b296d0Smrg    # no limit to the length of command line arguments.
76395b296d0Smrg    # Libtool will interpret -1 as no limit whatsoever
76495b296d0Smrg    lt_cv_sys_max_cmd_len=-1;
76595b296d0Smrg    ;;
76695b296d0Smrg
76795b296d0Smrg  cygwin* | mingw*)
76895b296d0Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
76995b296d0Smrg    # about 5 minutes as the teststring grows exponentially.
77095b296d0Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
77195b296d0Smrg    # you end up with a "frozen" computer, even though with patience
77295b296d0Smrg    # the test eventually succeeds (with a max line length of 256k).
77395b296d0Smrg    # Instead, let's just punt: use the minimum linelength reported by
77495b296d0Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
77595b296d0Smrg    lt_cv_sys_max_cmd_len=8192;
77695b296d0Smrg    ;;
77795b296d0Smrg
77895b296d0Smrg  amigaos*)
77995b296d0Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
78095b296d0Smrg    # So we just punt and use a minimum line length of 8192.
78195b296d0Smrg    lt_cv_sys_max_cmd_len=8192;
78295b296d0Smrg    ;;
78395b296d0Smrg
78495b296d0Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
78595b296d0Smrg    # This has been around since 386BSD, at least.  Likely further.
78695b296d0Smrg    if test -x /sbin/sysctl; then
78795b296d0Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
78895b296d0Smrg    elif test -x /usr/sbin/sysctl; then
78995b296d0Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
79095b296d0Smrg    else
79195b296d0Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
79295b296d0Smrg    fi
79395b296d0Smrg    # And add a safety zone
79495b296d0Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
79595b296d0Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
79695b296d0Smrg    ;;
79795b296d0Smrg
79895b296d0Smrg  interix*)
79995b296d0Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
80095b296d0Smrg    lt_cv_sys_max_cmd_len=196608
80195b296d0Smrg    ;;
80295b296d0Smrg
80395b296d0Smrg  osf*)
80495b296d0Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
80595b296d0Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
80695b296d0Smrg    # nice to cause kernel panics so lets avoid the loop below.
80795b296d0Smrg    # First set a reasonable default.
80895b296d0Smrg    lt_cv_sys_max_cmd_len=16384
80995b296d0Smrg    #
81095b296d0Smrg    if test -x /sbin/sysconfig; then
81195b296d0Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
81295b296d0Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
81395b296d0Smrg      esac
81495b296d0Smrg    fi
81595b296d0Smrg    ;;
81695b296d0Smrg  sco3.2v5*)
81795b296d0Smrg    lt_cv_sys_max_cmd_len=102400
81895b296d0Smrg    ;;
81995b296d0Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
82095b296d0Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
82195b296d0Smrg    if test -n "$kargmax"; then
82295b296d0Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
82395b296d0Smrg    else
82495b296d0Smrg      lt_cv_sys_max_cmd_len=32768
82595b296d0Smrg    fi
82695b296d0Smrg    ;;
82795b296d0Smrg  *)
82895b296d0Smrg    # If test is not a shell built-in, we'll probably end up computing a
82995b296d0Smrg    # maximum length that is only half of the actual maximum length, but
83095b296d0Smrg    # we can't tell.
83195b296d0Smrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
83295b296d0Smrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
83395b296d0Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
83495b296d0Smrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
83595b296d0Smrg	    lt_cv_sys_max_cmd_len=$new_result &&
83695b296d0Smrg	    test $i != 17 # 1/2 MB should be enough
83795b296d0Smrg    do
83895b296d0Smrg      i=`expr $i + 1`
83995b296d0Smrg      teststring=$teststring$teststring
84095b296d0Smrg    done
84195b296d0Smrg    teststring=
84295b296d0Smrg    # Add a significant safety factor because C++ compilers can tack on massive
84395b296d0Smrg    # amounts of additional arguments before passing them to the linker.
84495b296d0Smrg    # It appears as though 1/2 is a usable value.
84595b296d0Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
84695b296d0Smrg    ;;
84795b296d0Smrg  esac
84895b296d0Smrg])
84995b296d0Smrgif test -n $lt_cv_sys_max_cmd_len ; then
85095b296d0Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
85195b296d0Smrgelse
85295b296d0Smrg  AC_MSG_RESULT(none)
85395b296d0Smrgfi
85495b296d0Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
85595b296d0Smrg
85695b296d0Smrg
85795b296d0Smrg# _LT_AC_CHECK_DLFCN
85895b296d0Smrg# ------------------
85995b296d0SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
86095b296d0Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
86195b296d0Smrg])# _LT_AC_CHECK_DLFCN
86295b296d0Smrg
86395b296d0Smrg
86495b296d0Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
86595b296d0Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
86695b296d0Smrg# ---------------------------------------------------------------------
86795b296d0SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
86895b296d0Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
86995b296d0Smrgif test "$cross_compiling" = yes; then :
87095b296d0Smrg  [$4]
87195b296d0Smrgelse
87295b296d0Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
87395b296d0Smrg  lt_status=$lt_dlunknown
87495b296d0Smrg  cat > conftest.$ac_ext <<EOF
87595b296d0Smrg[#line __oline__ "configure"
87695b296d0Smrg#include "confdefs.h"
87795b296d0Smrg
87895b296d0Smrg#if HAVE_DLFCN_H
87995b296d0Smrg#include <dlfcn.h>
88095b296d0Smrg#endif
88195b296d0Smrg
88295b296d0Smrg#include <stdio.h>
88395b296d0Smrg
88495b296d0Smrg#ifdef RTLD_GLOBAL
88595b296d0Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
88695b296d0Smrg#else
88795b296d0Smrg#  ifdef DL_GLOBAL
88895b296d0Smrg#    define LT_DLGLOBAL		DL_GLOBAL
88995b296d0Smrg#  else
89095b296d0Smrg#    define LT_DLGLOBAL		0
89195b296d0Smrg#  endif
89295b296d0Smrg#endif
89395b296d0Smrg
89495b296d0Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
89595b296d0Smrg   find out it does not work in some platform. */
89695b296d0Smrg#ifndef LT_DLLAZY_OR_NOW
89795b296d0Smrg#  ifdef RTLD_LAZY
89895b296d0Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
89995b296d0Smrg#  else
90095b296d0Smrg#    ifdef DL_LAZY
90195b296d0Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
90295b296d0Smrg#    else
90395b296d0Smrg#      ifdef RTLD_NOW
90495b296d0Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
90595b296d0Smrg#      else
90695b296d0Smrg#        ifdef DL_NOW
90795b296d0Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
90895b296d0Smrg#        else
90995b296d0Smrg#          define LT_DLLAZY_OR_NOW	0
91095b296d0Smrg#        endif
91195b296d0Smrg#      endif
91295b296d0Smrg#    endif
91395b296d0Smrg#  endif
91495b296d0Smrg#endif
91595b296d0Smrg
91695b296d0Smrg#ifdef __cplusplus
91795b296d0Smrgextern "C" void exit (int);
91895b296d0Smrg#endif
91995b296d0Smrg
92095b296d0Smrgvoid fnord() { int i=42;}
92195b296d0Smrgint main ()
92295b296d0Smrg{
92395b296d0Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
92495b296d0Smrg  int status = $lt_dlunknown;
92595b296d0Smrg
92695b296d0Smrg  if (self)
92795b296d0Smrg    {
92895b296d0Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
92995b296d0Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
93095b296d0Smrg      /* dlclose (self); */
93195b296d0Smrg    }
93295b296d0Smrg  else
93395b296d0Smrg    puts (dlerror ());
93495b296d0Smrg
93595b296d0Smrg    exit (status);
93695b296d0Smrg}]
93795b296d0SmrgEOF
93895b296d0Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
93995b296d0Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
94095b296d0Smrg    lt_status=$?
94195b296d0Smrg    case x$lt_status in
94295b296d0Smrg      x$lt_dlno_uscore) $1 ;;
94395b296d0Smrg      x$lt_dlneed_uscore) $2 ;;
94495b296d0Smrg      x$lt_dlunknown|x*) $3 ;;
94595b296d0Smrg    esac
94695b296d0Smrg  else :
94795b296d0Smrg    # compilation failed
94895b296d0Smrg    $3
94995b296d0Smrg  fi
95095b296d0Smrgfi
95195b296d0Smrgrm -fr conftest*
95295b296d0Smrg])# _LT_AC_TRY_DLOPEN_SELF
95395b296d0Smrg
95495b296d0Smrg
95595b296d0Smrg# AC_LIBTOOL_DLOPEN_SELF
95695b296d0Smrg# ----------------------
95795b296d0SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
95895b296d0Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
95995b296d0Smrgif test "x$enable_dlopen" != xyes; then
96095b296d0Smrg  enable_dlopen=unknown
96195b296d0Smrg  enable_dlopen_self=unknown
96295b296d0Smrg  enable_dlopen_self_static=unknown
96395b296d0Smrgelse
96495b296d0Smrg  lt_cv_dlopen=no
96595b296d0Smrg  lt_cv_dlopen_libs=
96695b296d0Smrg
96795b296d0Smrg  case $host_os in
96895b296d0Smrg  beos*)
96995b296d0Smrg    lt_cv_dlopen="load_add_on"
97095b296d0Smrg    lt_cv_dlopen_libs=
97195b296d0Smrg    lt_cv_dlopen_self=yes
97295b296d0Smrg    ;;
97395b296d0Smrg
97495b296d0Smrg  mingw* | pw32*)
97595b296d0Smrg    lt_cv_dlopen="LoadLibrary"
97695b296d0Smrg    lt_cv_dlopen_libs=
97795b296d0Smrg   ;;
97895b296d0Smrg
97995b296d0Smrg  cygwin*)
98095b296d0Smrg    lt_cv_dlopen="dlopen"
98195b296d0Smrg    lt_cv_dlopen_libs=
98295b296d0Smrg   ;;
98395b296d0Smrg
98495b296d0Smrg  darwin*)
98595b296d0Smrg  # if libdl is installed we need to link against it
98695b296d0Smrg    AC_CHECK_LIB([dl], [dlopen],
98795b296d0Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
98895b296d0Smrg    lt_cv_dlopen="dyld"
98995b296d0Smrg    lt_cv_dlopen_libs=
99095b296d0Smrg    lt_cv_dlopen_self=yes
99195b296d0Smrg    ])
99295b296d0Smrg   ;;
99395b296d0Smrg
99495b296d0Smrg  *)
99595b296d0Smrg    AC_CHECK_FUNC([shl_load],
99695b296d0Smrg	  [lt_cv_dlopen="shl_load"],
99795b296d0Smrg      [AC_CHECK_LIB([dld], [shl_load],
99895b296d0Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
99995b296d0Smrg	[AC_CHECK_FUNC([dlopen],
100095b296d0Smrg	      [lt_cv_dlopen="dlopen"],
100195b296d0Smrg	  [AC_CHECK_LIB([dl], [dlopen],
100295b296d0Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
100395b296d0Smrg	    [AC_CHECK_LIB([svld], [dlopen],
100495b296d0Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
100595b296d0Smrg	      [AC_CHECK_LIB([dld], [dld_link],
100695b296d0Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
100795b296d0Smrg	      ])
100895b296d0Smrg	    ])
100995b296d0Smrg	  ])
101095b296d0Smrg	])
101195b296d0Smrg      ])
101295b296d0Smrg    ;;
101395b296d0Smrg  esac
101495b296d0Smrg
101595b296d0Smrg  if test "x$lt_cv_dlopen" != xno; then
101695b296d0Smrg    enable_dlopen=yes
101795b296d0Smrg  else
101895b296d0Smrg    enable_dlopen=no
101995b296d0Smrg  fi
102095b296d0Smrg
102195b296d0Smrg  case $lt_cv_dlopen in
102295b296d0Smrg  dlopen)
102395b296d0Smrg    save_CPPFLAGS="$CPPFLAGS"
102495b296d0Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
102595b296d0Smrg
102695b296d0Smrg    save_LDFLAGS="$LDFLAGS"
102795b296d0Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
102895b296d0Smrg
102995b296d0Smrg    save_LIBS="$LIBS"
103095b296d0Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
103195b296d0Smrg
103295b296d0Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
103395b296d0Smrg	  lt_cv_dlopen_self, [dnl
103495b296d0Smrg	  _LT_AC_TRY_DLOPEN_SELF(
103595b296d0Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
103695b296d0Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
103795b296d0Smrg    ])
103895b296d0Smrg
103995b296d0Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
104095b296d0Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
104195b296d0Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
104295b296d0Smrg    	  lt_cv_dlopen_self_static, [dnl
104395b296d0Smrg	  _LT_AC_TRY_DLOPEN_SELF(
104495b296d0Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
104595b296d0Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
104695b296d0Smrg      ])
104795b296d0Smrg    fi
104895b296d0Smrg
104995b296d0Smrg    CPPFLAGS="$save_CPPFLAGS"
105095b296d0Smrg    LDFLAGS="$save_LDFLAGS"
105195b296d0Smrg    LIBS="$save_LIBS"
105295b296d0Smrg    ;;
105395b296d0Smrg  esac
105495b296d0Smrg
105595b296d0Smrg  case $lt_cv_dlopen_self in
105695b296d0Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
105795b296d0Smrg  *) enable_dlopen_self=unknown ;;
105895b296d0Smrg  esac
105995b296d0Smrg
106095b296d0Smrg  case $lt_cv_dlopen_self_static in
106195b296d0Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
106295b296d0Smrg  *) enable_dlopen_self_static=unknown ;;
106395b296d0Smrg  esac
106495b296d0Smrgfi
106595b296d0Smrg])# AC_LIBTOOL_DLOPEN_SELF
106695b296d0Smrg
106795b296d0Smrg
106895b296d0Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
106995b296d0Smrg# ---------------------------------
107095b296d0Smrg# Check to see if options -c and -o are simultaneously supported by compiler
107195b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
107295b296d0Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
107395b296d0SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
107495b296d0Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
107595b296d0Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
107695b296d0Smrg   $rm -r conftest 2>/dev/null
107795b296d0Smrg   mkdir conftest
107895b296d0Smrg   cd conftest
107995b296d0Smrg   mkdir out
108095b296d0Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
108195b296d0Smrg
108295b296d0Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
108395b296d0Smrg   # Insert the option either (1) after the last *FLAGS variable, or
108495b296d0Smrg   # (2) before a word containing "conftest.", or (3) at the end.
108595b296d0Smrg   # Note that $ac_compile itself does not contain backslashes and begins
108695b296d0Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
108795b296d0Smrg   lt_compile=`echo "$ac_compile" | $SED \
108895b296d0Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
108995b296d0Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
109095b296d0Smrg   -e 's:$: $lt_compiler_flag:'`
109195b296d0Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
109295b296d0Smrg   (eval "$lt_compile" 2>out/conftest.err)
109395b296d0Smrg   ac_status=$?
109495b296d0Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
109595b296d0Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
109695b296d0Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
109795b296d0Smrg   then
109895b296d0Smrg     # The compiler can only warn and ignore the option if not recognized
109995b296d0Smrg     # So say no if there are warnings
110095b296d0Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
110195b296d0Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
110295b296d0Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
110395b296d0Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
110495b296d0Smrg     fi
110595b296d0Smrg   fi
110695b296d0Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
110795b296d0Smrg   $rm conftest*
110895b296d0Smrg   # SGI C++ compiler will create directory out/ii_files/ for
110995b296d0Smrg   # template instantiation
111095b296d0Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
111195b296d0Smrg   $rm out/* && rmdir out
111295b296d0Smrg   cd ..
111395b296d0Smrg   rmdir conftest
111495b296d0Smrg   $rm conftest*
111595b296d0Smrg])
111695b296d0Smrg])# AC_LIBTOOL_PROG_CC_C_O
111795b296d0Smrg
111895b296d0Smrg
111995b296d0Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
112095b296d0Smrg# -----------------------------------------
112195b296d0Smrg# Check to see if we can do hard links to lock some files if needed
112295b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
112395b296d0Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
112495b296d0Smrg
112595b296d0Smrghard_links="nottested"
112695b296d0Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
112795b296d0Smrg  # do not overwrite the value of need_locks provided by the user
112895b296d0Smrg  AC_MSG_CHECKING([if we can lock with hard links])
112995b296d0Smrg  hard_links=yes
113095b296d0Smrg  $rm conftest*
113195b296d0Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
113295b296d0Smrg  touch conftest.a
113395b296d0Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
113495b296d0Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
113595b296d0Smrg  AC_MSG_RESULT([$hard_links])
113695b296d0Smrg  if test "$hard_links" = no; then
113795b296d0Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
113895b296d0Smrg    need_locks=warn
113995b296d0Smrg  fi
114095b296d0Smrgelse
114195b296d0Smrg  need_locks=no
114295b296d0Smrgfi
114395b296d0Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
114495b296d0Smrg
114595b296d0Smrg
114695b296d0Smrg# AC_LIBTOOL_OBJDIR
114795b296d0Smrg# -----------------
114895b296d0SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
114995b296d0Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
115095b296d0Smrg[rm -f .libs 2>/dev/null
115195b296d0Smrgmkdir .libs 2>/dev/null
115295b296d0Smrgif test -d .libs; then
115395b296d0Smrg  lt_cv_objdir=.libs
115495b296d0Smrgelse
115595b296d0Smrg  # MS-DOS does not allow filenames that begin with a dot.
115695b296d0Smrg  lt_cv_objdir=_libs
115795b296d0Smrgfi
115895b296d0Smrgrmdir .libs 2>/dev/null])
115995b296d0Smrgobjdir=$lt_cv_objdir
116095b296d0Smrg])# AC_LIBTOOL_OBJDIR
116195b296d0Smrg
116295b296d0Smrg
116395b296d0Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
116495b296d0Smrg# ----------------------------------------------
116595b296d0Smrg# Check hardcoding attributes.
116695b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
116795b296d0Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
116895b296d0Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
116995b296d0Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
117095b296d0Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
117195b296d0Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
117295b296d0Smrg
117395b296d0Smrg  # We can hardcode non-existant directories.
117495b296d0Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
117595b296d0Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
117695b296d0Smrg     # have to relink, otherwise we might link with an installed library
117795b296d0Smrg     # when we should be linking with a yet-to-be-installed one
117895b296d0Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
117995b296d0Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
118095b296d0Smrg    # Linking always hardcodes the temporary library directory.
118195b296d0Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
118295b296d0Smrg  else
118395b296d0Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
118495b296d0Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
118595b296d0Smrg  fi
118695b296d0Smrgelse
118795b296d0Smrg  # We cannot hardcode anything, or else we can only hardcode existing
118895b296d0Smrg  # directories.
118995b296d0Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
119095b296d0Smrgfi
119195b296d0SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
119295b296d0Smrg
119395b296d0Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
119495b296d0Smrg  # Fast installation is not supported
119595b296d0Smrg  enable_fast_install=no
119695b296d0Smrgelif test "$shlibpath_overrides_runpath" = yes ||
119795b296d0Smrg     test "$enable_shared" = no; then
119895b296d0Smrg  # Fast installation is not necessary
119995b296d0Smrg  enable_fast_install=needless
120095b296d0Smrgfi
120195b296d0Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
120295b296d0Smrg
120395b296d0Smrg
120495b296d0Smrg# AC_LIBTOOL_SYS_LIB_STRIP
120595b296d0Smrg# ------------------------
120695b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
120795b296d0Smrg[striplib=
120895b296d0Smrgold_striplib=
120995b296d0SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
121095b296d0Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
121195b296d0Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
121295b296d0Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
121395b296d0Smrg  AC_MSG_RESULT([yes])
121495b296d0Smrgelse
121595b296d0Smrg# FIXME - insert some real tests, host_os isn't really good enough
121695b296d0Smrg  case $host_os in
121795b296d0Smrg   darwin*)
121895b296d0Smrg       if test -n "$STRIP" ; then
121995b296d0Smrg         striplib="$STRIP -x"
122095b296d0Smrg         AC_MSG_RESULT([yes])
122195b296d0Smrg       else
122295b296d0Smrg  AC_MSG_RESULT([no])
122395b296d0Smrgfi
122495b296d0Smrg       ;;
122595b296d0Smrg   *)
122695b296d0Smrg  AC_MSG_RESULT([no])
122795b296d0Smrg    ;;
122895b296d0Smrg  esac
122995b296d0Smrgfi
123095b296d0Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
123195b296d0Smrg
123295b296d0Smrg
123395b296d0Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
123495b296d0Smrg# -----------------------------
123595b296d0Smrg# PORTME Fill in your ld.so characteristics
123695b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
123795b296d0Smrg[AC_MSG_CHECKING([dynamic linker characteristics])
123895b296d0Smrglibrary_names_spec=
123995b296d0Smrglibname_spec='lib$name'
124095b296d0Smrgsoname_spec=
124195b296d0Smrgshrext_cmds=".so"
124295b296d0Smrgpostinstall_cmds=
124395b296d0Smrgpostuninstall_cmds=
124495b296d0Smrgfinish_cmds=
124595b296d0Smrgfinish_eval=
124695b296d0Smrgshlibpath_var=
124795b296d0Smrgshlibpath_overrides_runpath=unknown
124895b296d0Smrgversion_type=none
124995b296d0Smrgdynamic_linker="$host_os ld.so"
125095b296d0Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
125195b296d0Smrgif test "$GCC" = yes; then
125295b296d0Smrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
125395b296d0Smrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
125495b296d0Smrg    # if the path contains ";" then we assume it to be the separator
125595b296d0Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
125695b296d0Smrg    # assumed that no part of a normal pathname contains ";" but that should
125795b296d0Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
125895b296d0Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
125995b296d0Smrg  else
126095b296d0Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
126195b296d0Smrg  fi
126295b296d0Smrgelse
126395b296d0Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
126495b296d0Smrgfi
126595b296d0Smrgneed_lib_prefix=unknown
126695b296d0Smrghardcode_into_libs=no
126795b296d0Smrg
126895b296d0Smrg# when you set need_version to no, make sure it does not cause -set_version
126995b296d0Smrg# flags to be left without arguments
127095b296d0Smrgneed_version=unknown
127195b296d0Smrg
127295b296d0Smrgcase $host_os in
127395b296d0Smrgaix3*)
127495b296d0Smrg  version_type=linux
127595b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
127695b296d0Smrg  shlibpath_var=LIBPATH
127795b296d0Smrg
127895b296d0Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
127995b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
128095b296d0Smrg  ;;
128195b296d0Smrg
128295b296d0Smrgaix4* | aix5*)
128395b296d0Smrg  version_type=linux
128495b296d0Smrg  need_lib_prefix=no
128595b296d0Smrg  need_version=no
128695b296d0Smrg  hardcode_into_libs=yes
128795b296d0Smrg  if test "$host_cpu" = ia64; then
128895b296d0Smrg    # AIX 5 supports IA64
128995b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
129095b296d0Smrg    shlibpath_var=LD_LIBRARY_PATH
129195b296d0Smrg  else
129295b296d0Smrg    # With GCC up to 2.95.x, collect2 would create an import file
129395b296d0Smrg    # for dependence libraries.  The import file would start with
129495b296d0Smrg    # the line `#! .'.  This would cause the generated library to
129595b296d0Smrg    # depend on `.', always an invalid library.  This was fixed in
129695b296d0Smrg    # development snapshots of GCC prior to 3.0.
129795b296d0Smrg    case $host_os in
129895b296d0Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
129995b296d0Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
130095b296d0Smrg	   echo ' yes '
130195b296d0Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
130295b296d0Smrg	:
130395b296d0Smrg      else
130495b296d0Smrg	can_build_shared=no
130595b296d0Smrg      fi
130695b296d0Smrg      ;;
130795b296d0Smrg    esac
130895b296d0Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
130995b296d0Smrg    # soname into executable. Probably we can add versioning support to
131095b296d0Smrg    # collect2, so additional links can be useful in future.
131195b296d0Smrg    if test "$aix_use_runtimelinking" = yes; then
131295b296d0Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
131395b296d0Smrg      # instead of lib<name>.a to let people know that these are not
131495b296d0Smrg      # typical AIX shared libraries.
131595b296d0Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
131695b296d0Smrg    else
131795b296d0Smrg      # We preserve .a as extension for shared libraries through AIX4.2
131895b296d0Smrg      # and later when we are not doing run time linking.
131995b296d0Smrg      library_names_spec='${libname}${release}.a $libname.a'
132095b296d0Smrg      soname_spec='${libname}${release}${shared_ext}$major'
132195b296d0Smrg    fi
132295b296d0Smrg    shlibpath_var=LIBPATH
132395b296d0Smrg  fi
132495b296d0Smrg  ;;
132595b296d0Smrg
132695b296d0Smrgamigaos*)
132795b296d0Smrg  library_names_spec='$libname.ixlibrary $libname.a'
132895b296d0Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
132995b296d0Smrg  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
133095b296d0Smrg  ;;
133195b296d0Smrg
133295b296d0Smrgbeos*)
133395b296d0Smrg  library_names_spec='${libname}${shared_ext}'
133495b296d0Smrg  dynamic_linker="$host_os ld.so"
133595b296d0Smrg  shlibpath_var=LIBRARY_PATH
133695b296d0Smrg  ;;
133795b296d0Smrg
133895b296d0Smrgbsdi[[45]]*)
133995b296d0Smrg  version_type=linux
134095b296d0Smrg  need_version=no
134195b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
134295b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
134395b296d0Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
134495b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
134595b296d0Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
134695b296d0Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
134795b296d0Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
134895b296d0Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
134995b296d0Smrg  # libtool to hard-code these into programs
135095b296d0Smrg  ;;
135195b296d0Smrg
135295b296d0Smrgcygwin* | mingw* | pw32*)
135395b296d0Smrg  version_type=windows
135495b296d0Smrg  shrext_cmds=".dll"
135595b296d0Smrg  need_version=no
135695b296d0Smrg  need_lib_prefix=no
135795b296d0Smrg
135895b296d0Smrg  case $GCC,$host_os in
135995b296d0Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
136095b296d0Smrg    library_names_spec='$libname.dll.a'
136195b296d0Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
136295b296d0Smrg    postinstall_cmds='base_file=`basename \${file}`~
136395b296d0Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
136495b296d0Smrg      dldir=$destdir/`dirname \$dlpath`~
136595b296d0Smrg      test -d \$dldir || mkdir -p \$dldir~
136695b296d0Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
136795b296d0Smrg      chmod a+x \$dldir/$dlname'
136895b296d0Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
136995b296d0Smrg      dlpath=$dir/\$dldll~
137095b296d0Smrg       $rm \$dlpath'
137195b296d0Smrg    shlibpath_overrides_runpath=yes
137295b296d0Smrg
137395b296d0Smrg    case $host_os in
137495b296d0Smrg    cygwin*)
137595b296d0Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
137695b296d0Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
137795b296d0Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
137895b296d0Smrg      ;;
137995b296d0Smrg    mingw*)
138095b296d0Smrg      # MinGW DLLs use traditional 'lib' prefix
138195b296d0Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
138295b296d0Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
138395b296d0Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
138495b296d0Smrg        # It is most probably a Windows format PATH printed by
138595b296d0Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
138695b296d0Smrg        # path with ; separators, and with drive letters. We can handle the
138795b296d0Smrg        # drive letters (cygwin fileutils understands them), so leave them,
138895b296d0Smrg        # especially as we might pass files found there to a mingw objdump,
138995b296d0Smrg        # which wouldn't understand a cygwinified path. Ahh.
139095b296d0Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
139195b296d0Smrg      else
139295b296d0Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
139395b296d0Smrg      fi
139495b296d0Smrg      ;;
139595b296d0Smrg    pw32*)
139695b296d0Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
139795b296d0Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
139895b296d0Smrg      ;;
139995b296d0Smrg    esac
140095b296d0Smrg    ;;
140195b296d0Smrg
140295b296d0Smrg  linux*)
140395b296d0Smrg    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
140495b296d0Smrg      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
140595b296d0Smrg      supports_anon_versioning=no
140695b296d0Smrg      case `$LD -v 2>/dev/null` in
140795b296d0Smrg        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
140895b296d0Smrg        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
140995b296d0Smrg        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
141095b296d0Smrg        *\ 2.11.*) ;; # other 2.11 versions
141195b296d0Smrg        *) supports_anon_versioning=yes ;;
141295b296d0Smrg      esac
141395b296d0Smrg      if test $supports_anon_versioning = yes; then
141495b296d0Smrg        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
141595b296d0Smrgcat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
141695b296d0Smrg$echo "local: *; };" >> $output_objdir/$libname.ver~
141795b296d0Smrg        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
141895b296d0Smrg      else
141995b296d0Smrg        $archive_expsym_cmds="$archive_cmds"
142095b296d0Smrg      fi
142195b296d0Smrg    else
142295b296d0Smrg      ld_shlibs=no
142395b296d0Smrg    fi
142495b296d0Smrg    ;;
142595b296d0Smrg
142695b296d0Smrg  *)
142795b296d0Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
142895b296d0Smrg    ;;
142995b296d0Smrg  esac
143095b296d0Smrg  dynamic_linker='Win32 ld.exe'
143195b296d0Smrg  # FIXME: first we should search . and the directory the executable is in
143295b296d0Smrg  shlibpath_var=PATH
143395b296d0Smrg  ;;
143495b296d0Smrg
143595b296d0Smrgdarwin* | rhapsody*)
143695b296d0Smrg  dynamic_linker="$host_os dyld"
143795b296d0Smrg  version_type=darwin
143895b296d0Smrg  need_lib_prefix=no
143995b296d0Smrg  need_version=no
144095b296d0Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
144195b296d0Smrg  soname_spec='${libname}${release}${major}$shared_ext'
144295b296d0Smrg  shlibpath_overrides_runpath=yes
144395b296d0Smrg  shlibpath_var=DYLD_LIBRARY_PATH
144495b296d0Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
144595b296d0Smrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
144695b296d0Smrg  if test "$GCC" = yes; then
144795b296d0Smrg    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
144895b296d0Smrg  else
144995b296d0Smrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
145095b296d0Smrg  fi
145195b296d0Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
145295b296d0Smrg  ;;
145395b296d0Smrg
145495b296d0Smrgdgux*)
145595b296d0Smrg  version_type=linux
145695b296d0Smrg  need_lib_prefix=no
145795b296d0Smrg  need_version=no
145895b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
145995b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
146095b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
146195b296d0Smrg  ;;
146295b296d0Smrg
146395b296d0Smrgfreebsd1*)
146495b296d0Smrg  dynamic_linker=no
146595b296d0Smrg  ;;
146695b296d0Smrg
146795b296d0Smrgkfreebsd*-gnu)
146895b296d0Smrg  version_type=linux
146995b296d0Smrg  need_lib_prefix=no
147095b296d0Smrg  need_version=no
147195b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
147295b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
147395b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
147495b296d0Smrg  shlibpath_overrides_runpath=no
147595b296d0Smrg  hardcode_into_libs=yes
147695b296d0Smrg  dynamic_linker='GNU ld.so'
147795b296d0Smrg  ;;
147895b296d0Smrg
147995b296d0Smrgfreebsd* | dragonfly*)
148095b296d0Smrg  # DragonFly does not have aout.  When/if they implement a new
148195b296d0Smrg  # versioning mechanism, adjust this.
148295b296d0Smrg  if test -x /usr/bin/objformat; then
148395b296d0Smrg    objformat=`/usr/bin/objformat`
148495b296d0Smrg  else
148595b296d0Smrg    case $host_os in
148695b296d0Smrg    freebsd[[123]]*) objformat=aout ;;
148795b296d0Smrg    *) objformat=elf ;;
148895b296d0Smrg    esac
148995b296d0Smrg  fi
149095b296d0Smrg  # Handle Gentoo/FreeBSD as it was Linux
149195b296d0Smrg  case $host_vendor in
149295b296d0Smrg    gentoo)
149395b296d0Smrg      version_type=linux ;;
149495b296d0Smrg    *)
149595b296d0Smrg      version_type=freebsd-$objformat ;;
149695b296d0Smrg  esac
149795b296d0Smrg
149895b296d0Smrg  case $version_type in
149995b296d0Smrg    freebsd-elf*)
150095b296d0Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
150195b296d0Smrg      need_version=no
150295b296d0Smrg      need_lib_prefix=no
150395b296d0Smrg      ;;
150495b296d0Smrg    freebsd-*)
150595b296d0Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
150695b296d0Smrg      need_version=yes
150795b296d0Smrg      ;;
150895b296d0Smrg    linux)
150995b296d0Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
151095b296d0Smrg      soname_spec='${libname}${release}${shared_ext}$major'
151195b296d0Smrg      need_lib_prefix=no
151295b296d0Smrg      need_version=no
151395b296d0Smrg      ;;
151495b296d0Smrg  esac
151595b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
151695b296d0Smrg  case $host_os in
151795b296d0Smrg  freebsd2*)
151895b296d0Smrg    shlibpath_overrides_runpath=yes
151995b296d0Smrg    ;;
152095b296d0Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
152195b296d0Smrg    shlibpath_overrides_runpath=yes
152295b296d0Smrg    hardcode_into_libs=yes
152395b296d0Smrg    ;;
152495b296d0Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
152595b296d0Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
152695b296d0Smrg    shlibpath_overrides_runpath=no
152795b296d0Smrg    hardcode_into_libs=yes
152895b296d0Smrg    ;;
152995b296d0Smrg  freebsd*) # from 4.6 on
153095b296d0Smrg    shlibpath_overrides_runpath=yes
153195b296d0Smrg    hardcode_into_libs=yes
153295b296d0Smrg    ;;
153395b296d0Smrg  esac
153495b296d0Smrg  ;;
153595b296d0Smrg
153695b296d0Smrggnu*)
153795b296d0Smrg  version_type=linux
153895b296d0Smrg  need_lib_prefix=no
153995b296d0Smrg  need_version=no
154095b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
154195b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
154295b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
154395b296d0Smrg  hardcode_into_libs=yes
154495b296d0Smrg  ;;
154595b296d0Smrg
154695b296d0Smrghpux9* | hpux10* | hpux11*)
154795b296d0Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
154895b296d0Smrg  # link against other versions.
154995b296d0Smrg  version_type=sunos
155095b296d0Smrg  need_lib_prefix=no
155195b296d0Smrg  need_version=no
155295b296d0Smrg  case $host_cpu in
155395b296d0Smrg  ia64*)
155495b296d0Smrg    shrext_cmds='.so'
155595b296d0Smrg    hardcode_into_libs=yes
155695b296d0Smrg    dynamic_linker="$host_os dld.so"
155795b296d0Smrg    shlibpath_var=LD_LIBRARY_PATH
155895b296d0Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
155995b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
156095b296d0Smrg    soname_spec='${libname}${release}${shared_ext}$major'
156195b296d0Smrg    if test "X$HPUX_IA64_MODE" = X32; then
156295b296d0Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
156395b296d0Smrg    else
156495b296d0Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
156595b296d0Smrg    fi
156695b296d0Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
156795b296d0Smrg    ;;
156895b296d0Smrg   hppa*64*)
156995b296d0Smrg     shrext_cmds='.sl'
157095b296d0Smrg     hardcode_into_libs=yes
157195b296d0Smrg     dynamic_linker="$host_os dld.sl"
157295b296d0Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
157395b296d0Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
157495b296d0Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
157595b296d0Smrg     soname_spec='${libname}${release}${shared_ext}$major'
157695b296d0Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
157795b296d0Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
157895b296d0Smrg     ;;
157995b296d0Smrg   *)
158095b296d0Smrg    shrext_cmds='.sl'
158195b296d0Smrg    dynamic_linker="$host_os dld.sl"
158295b296d0Smrg    shlibpath_var=SHLIB_PATH
158395b296d0Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
158495b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
158595b296d0Smrg    soname_spec='${libname}${release}${shared_ext}$major'
158695b296d0Smrg    ;;
158795b296d0Smrg  esac
158895b296d0Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
158995b296d0Smrg  postinstall_cmds='chmod 555 $lib'
159095b296d0Smrg  ;;
159195b296d0Smrg
159295b296d0Smrginterix3*)
159395b296d0Smrg  version_type=linux
159495b296d0Smrg  need_lib_prefix=no
159595b296d0Smrg  need_version=no
159695b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
159795b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
159895b296d0Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
159995b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
160095b296d0Smrg  shlibpath_overrides_runpath=no
160195b296d0Smrg  hardcode_into_libs=yes
160295b296d0Smrg  ;;
160395b296d0Smrg
160495b296d0Smrgirix5* | irix6* | nonstopux*)
160595b296d0Smrg  case $host_os in
160695b296d0Smrg    nonstopux*) version_type=nonstopux ;;
160795b296d0Smrg    *)
160895b296d0Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
160995b296d0Smrg		version_type=linux
161095b296d0Smrg	else
161195b296d0Smrg		version_type=irix
161295b296d0Smrg	fi ;;
161395b296d0Smrg  esac
161495b296d0Smrg  need_lib_prefix=no
161595b296d0Smrg  need_version=no
161695b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
161795b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
161895b296d0Smrg  case $host_os in
161995b296d0Smrg  irix5* | nonstopux*)
162095b296d0Smrg    libsuff= shlibsuff=
162195b296d0Smrg    ;;
162295b296d0Smrg  *)
162395b296d0Smrg    case $LD in # libtool.m4 will add one of these switches to LD
162495b296d0Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
162595b296d0Smrg      libsuff= shlibsuff= libmagic=32-bit;;
162695b296d0Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
162795b296d0Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
162895b296d0Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
162995b296d0Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
163095b296d0Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
163195b296d0Smrg    esac
163295b296d0Smrg    ;;
163395b296d0Smrg  esac
163495b296d0Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
163595b296d0Smrg  shlibpath_overrides_runpath=no
163695b296d0Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
163795b296d0Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
163895b296d0Smrg  hardcode_into_libs=yes
163995b296d0Smrg  ;;
164095b296d0Smrg
164195b296d0Smrg# No shared lib support for Linux oldld, aout, or coff.
164295b296d0Smrglinux*oldld* | linux*aout* | linux*coff*)
164395b296d0Smrg  dynamic_linker=no
164495b296d0Smrg  ;;
164595b296d0Smrg
164695b296d0Smrg# This must be Linux ELF.
164795b296d0Smrglinux*)
164895b296d0Smrg  version_type=linux
164995b296d0Smrg  need_lib_prefix=no
165095b296d0Smrg  need_version=no
165195b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
165295b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
165395b296d0Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
165495b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
165595b296d0Smrg  shlibpath_overrides_runpath=no
165695b296d0Smrg  # This implies no fast_install, which is unacceptable.
165795b296d0Smrg  # Some rework will be needed to allow for fast_install
165895b296d0Smrg  # before this can be enabled.
165995b296d0Smrg  hardcode_into_libs=yes
166095b296d0Smrg
166195b296d0Smrg  # Append ld.so.conf contents to the search path
166295b296d0Smrg  if test -f /etc/ld.so.conf; then
166395b296d0Smrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
166495b296d0Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
166595b296d0Smrg  fi
166695b296d0Smrg
166795b296d0Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
166895b296d0Smrg  # powerpc, because MkLinux only supported shared libraries with the
166995b296d0Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
167095b296d0Smrg  # most powerpc-linux boxes support dynamic linking these days and
167195b296d0Smrg  # people can always --disable-shared, the test was removed, and we
167295b296d0Smrg  # assume the GNU/Linux dynamic linker is in use.
167395b296d0Smrg  dynamic_linker='GNU/Linux ld.so'
167495b296d0Smrg  ;;
167595b296d0Smrg
167695b296d0Smrgknetbsd*-gnu)
167795b296d0Smrg  version_type=linux
167895b296d0Smrg  need_lib_prefix=no
167995b296d0Smrg  need_version=no
168095b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
168195b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
168295b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
168395b296d0Smrg  shlibpath_overrides_runpath=no
168495b296d0Smrg  hardcode_into_libs=yes
168595b296d0Smrg  dynamic_linker='GNU ld.so'
168695b296d0Smrg  ;;
168795b296d0Smrg
168895b296d0Smrgnetbsd*)
168995b296d0Smrg  version_type=sunos
169095b296d0Smrg  need_lib_prefix=no
169195b296d0Smrg  need_version=no
169295b296d0Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
169395b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
169495b296d0Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
169595b296d0Smrg    dynamic_linker='NetBSD (a.out) ld.so'
169695b296d0Smrg  else
169795b296d0Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
169895b296d0Smrg    soname_spec='${libname}${release}${shared_ext}$major'
169995b296d0Smrg    dynamic_linker='NetBSD ld.elf_so'
170095b296d0Smrg  fi
170195b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
170295b296d0Smrg  shlibpath_overrides_runpath=yes
170395b296d0Smrg  hardcode_into_libs=yes
170495b296d0Smrg  ;;
170595b296d0Smrg
170695b296d0Smrgnewsos6)
170795b296d0Smrg  version_type=linux
170895b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
170995b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
171095b296d0Smrg  shlibpath_overrides_runpath=yes
171195b296d0Smrg  ;;
171295b296d0Smrg
171395b296d0Smrgnto-qnx*)
171495b296d0Smrg  version_type=linux
171595b296d0Smrg  need_lib_prefix=no
171695b296d0Smrg  need_version=no
171795b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
171895b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
171995b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
172095b296d0Smrg  shlibpath_overrides_runpath=yes
172195b296d0Smrg  ;;
172295b296d0Smrg
172395b296d0Smrgopenbsd*)
172495b296d0Smrg  version_type=sunos
172595b296d0Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
172695b296d0Smrg  need_lib_prefix=no
172795b296d0Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
172895b296d0Smrg  case $host_os in
172995b296d0Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
173095b296d0Smrg    *)                         need_version=no  ;;
173195b296d0Smrg  esac
173295b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
173395b296d0Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
173495b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
173595b296d0Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
173695b296d0Smrg    case $host_os in
173795b296d0Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
173895b296d0Smrg	shlibpath_overrides_runpath=no
173995b296d0Smrg	;;
174095b296d0Smrg      *)
174195b296d0Smrg	shlibpath_overrides_runpath=yes
174295b296d0Smrg	;;
174395b296d0Smrg      esac
174495b296d0Smrg  else
174595b296d0Smrg    shlibpath_overrides_runpath=yes
174695b296d0Smrg  fi
174795b296d0Smrg  ;;
174895b296d0Smrg
174995b296d0Smrgos2*)
175095b296d0Smrg  libname_spec='$name'
175195b296d0Smrg  shrext_cmds=".dll"
175295b296d0Smrg  need_lib_prefix=no
175395b296d0Smrg  library_names_spec='$libname${shared_ext} $libname.a'
175495b296d0Smrg  dynamic_linker='OS/2 ld.exe'
175595b296d0Smrg  shlibpath_var=LIBPATH
175695b296d0Smrg  ;;
175795b296d0Smrg
175895b296d0Smrgosf3* | osf4* | osf5*)
175995b296d0Smrg  version_type=osf
176095b296d0Smrg  need_lib_prefix=no
176195b296d0Smrg  need_version=no
176295b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
176395b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
176495b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
176595b296d0Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
176695b296d0Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
176795b296d0Smrg  ;;
176895b296d0Smrg
176995b296d0Smrgsolaris*)
177095b296d0Smrg  version_type=linux
177195b296d0Smrg  need_lib_prefix=no
177295b296d0Smrg  need_version=no
177395b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
177495b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
177595b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
177695b296d0Smrg  shlibpath_overrides_runpath=yes
177795b296d0Smrg  hardcode_into_libs=yes
177895b296d0Smrg  # ldd complains unless libraries are executable
177995b296d0Smrg  postinstall_cmds='chmod +x $lib'
178095b296d0Smrg  ;;
178195b296d0Smrg
178295b296d0Smrgsunos4*)
178395b296d0Smrg  version_type=sunos
178495b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
178595b296d0Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
178695b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
178795b296d0Smrg  shlibpath_overrides_runpath=yes
178895b296d0Smrg  if test "$with_gnu_ld" = yes; then
178995b296d0Smrg    need_lib_prefix=no
179095b296d0Smrg  fi
179195b296d0Smrg  need_version=yes
179295b296d0Smrg  ;;
179395b296d0Smrg
179495b296d0Smrgsysv4 | sysv4.3*)
179595b296d0Smrg  version_type=linux
179695b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
179795b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
179895b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
179995b296d0Smrg  case $host_vendor in
180095b296d0Smrg    sni)
180195b296d0Smrg      shlibpath_overrides_runpath=no
180295b296d0Smrg      need_lib_prefix=no
180395b296d0Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
180495b296d0Smrg      runpath_var=LD_RUN_PATH
180595b296d0Smrg      ;;
180695b296d0Smrg    siemens)
180795b296d0Smrg      need_lib_prefix=no
180895b296d0Smrg      ;;
180995b296d0Smrg    motorola)
181095b296d0Smrg      need_lib_prefix=no
181195b296d0Smrg      need_version=no
181295b296d0Smrg      shlibpath_overrides_runpath=no
181395b296d0Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
181495b296d0Smrg      ;;
181595b296d0Smrg  esac
181695b296d0Smrg  ;;
181795b296d0Smrg
181895b296d0Smrgsysv4*MP*)
181995b296d0Smrg  if test -d /usr/nec ;then
182095b296d0Smrg    version_type=linux
182195b296d0Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
182295b296d0Smrg    soname_spec='$libname${shared_ext}.$major'
182395b296d0Smrg    shlibpath_var=LD_LIBRARY_PATH
182495b296d0Smrg  fi
182595b296d0Smrg  ;;
182695b296d0Smrg
182795b296d0Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
182895b296d0Smrg  version_type=freebsd-elf
182995b296d0Smrg  need_lib_prefix=no
183095b296d0Smrg  need_version=no
183195b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
183295b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
183395b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
183495b296d0Smrg  hardcode_into_libs=yes
183595b296d0Smrg  if test "$with_gnu_ld" = yes; then
183695b296d0Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
183795b296d0Smrg    shlibpath_overrides_runpath=no
183895b296d0Smrg  else
183995b296d0Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
184095b296d0Smrg    shlibpath_overrides_runpath=yes
184195b296d0Smrg    case $host_os in
184295b296d0Smrg      sco3.2v5*)
184395b296d0Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
184495b296d0Smrg	;;
184595b296d0Smrg    esac
184695b296d0Smrg  fi
184795b296d0Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
184895b296d0Smrg  ;;
184995b296d0Smrg
185095b296d0Smrguts4*)
185195b296d0Smrg  version_type=linux
185295b296d0Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
185395b296d0Smrg  soname_spec='${libname}${release}${shared_ext}$major'
185495b296d0Smrg  shlibpath_var=LD_LIBRARY_PATH
185595b296d0Smrg  ;;
185695b296d0Smrg
185795b296d0Smrg*)
185895b296d0Smrg  dynamic_linker=no
185995b296d0Smrg  ;;
186095b296d0Smrgesac
186195b296d0SmrgAC_MSG_RESULT([$dynamic_linker])
186295b296d0Smrgtest "$dynamic_linker" = no && can_build_shared=no
186395b296d0Smrg
186495b296d0Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
186595b296d0Smrgif test "$GCC" = yes; then
186695b296d0Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
186795b296d0Smrgfi
186895b296d0Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
186995b296d0Smrg
187095b296d0Smrg
187195b296d0Smrg# _LT_AC_TAGCONFIG
187295b296d0Smrg# ----------------
187395b296d0SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
187495b296d0Smrg[AC_ARG_WITH([tags],
187595b296d0Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
187695b296d0Smrg        [include additional configurations @<:@automatic@:>@])],
187795b296d0Smrg    [tagnames="$withval"])
187895b296d0Smrg
187995b296d0Smrgif test -f "$ltmain" && test -n "$tagnames"; then
188095b296d0Smrg  if test ! -f "${ofile}"; then
188195b296d0Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
188295b296d0Smrg  fi
188395b296d0Smrg
188495b296d0Smrg  if test -z "$LTCC"; then
188595b296d0Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
188695b296d0Smrg    if test -z "$LTCC"; then
188795b296d0Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
188895b296d0Smrg    else
188995b296d0Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
189095b296d0Smrg    fi
189195b296d0Smrg  fi
189295b296d0Smrg  if test -z "$LTCFLAGS"; then
189395b296d0Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
189495b296d0Smrg  fi
189595b296d0Smrg
189695b296d0Smrg  # Extract list of available tagged configurations in $ofile.
189795b296d0Smrg  # Note that this assumes the entire list is on one line.
189895b296d0Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
189995b296d0Smrg
190095b296d0Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
190195b296d0Smrg  for tagname in $tagnames; do
190295b296d0Smrg    IFS="$lt_save_ifs"
190395b296d0Smrg    # Check whether tagname contains only valid characters
190495b296d0Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
190595b296d0Smrg    "") ;;
190695b296d0Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
190795b296d0Smrg	;;
190895b296d0Smrg    esac
190995b296d0Smrg
191095b296d0Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
191195b296d0Smrg    then
191295b296d0Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
191395b296d0Smrg    fi
191495b296d0Smrg
191595b296d0Smrg    # Update the list of available tags.
191695b296d0Smrg    if test -n "$tagname"; then
191795b296d0Smrg      echo appending configuration tag \"$tagname\" to $ofile
191895b296d0Smrg
191995b296d0Smrg      case $tagname in
192095b296d0Smrg      CXX)
192195b296d0Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
192295b296d0Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
192395b296d0Smrg	    (test "X$CXX" != "Xg++"))) ; then
192495b296d0Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
192595b296d0Smrg	else
192695b296d0Smrg	  tagname=""
192795b296d0Smrg	fi
192895b296d0Smrg	;;
192995b296d0Smrg
193095b296d0Smrg      F77)
193195b296d0Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
193295b296d0Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
193395b296d0Smrg	else
193495b296d0Smrg	  tagname=""
193595b296d0Smrg	fi
193695b296d0Smrg	;;
193795b296d0Smrg
193895b296d0Smrg      GCJ)
193995b296d0Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
194095b296d0Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
194195b296d0Smrg	else
194295b296d0Smrg	  tagname=""
194395b296d0Smrg	fi
194495b296d0Smrg	;;
194595b296d0Smrg
194695b296d0Smrg      RC)
194795b296d0Smrg	AC_LIBTOOL_LANG_RC_CONFIG
194895b296d0Smrg	;;
194995b296d0Smrg
195095b296d0Smrg      *)
195195b296d0Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
195295b296d0Smrg	;;
195395b296d0Smrg      esac
195495b296d0Smrg
195595b296d0Smrg      # Append the new tag name to the list of available tags.
195695b296d0Smrg      if test -n "$tagname" ; then
195795b296d0Smrg      available_tags="$available_tags $tagname"
195895b296d0Smrg    fi
195995b296d0Smrg    fi
196095b296d0Smrg  done
196195b296d0Smrg  IFS="$lt_save_ifs"
196295b296d0Smrg
196395b296d0Smrg  # Now substitute the updated list of available tags.
196495b296d0Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
196595b296d0Smrg    mv "${ofile}T" "$ofile"
196695b296d0Smrg    chmod +x "$ofile"
196795b296d0Smrg  else
196895b296d0Smrg    rm -f "${ofile}T"
196995b296d0Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
197095b296d0Smrg  fi
197195b296d0Smrgfi
197295b296d0Smrg])# _LT_AC_TAGCONFIG
197395b296d0Smrg
197495b296d0Smrg
197595b296d0Smrg# AC_LIBTOOL_DLOPEN
197695b296d0Smrg# -----------------
197795b296d0Smrg# enable checks for dlopen support
197895b296d0SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
197995b296d0Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
198095b296d0Smrg])# AC_LIBTOOL_DLOPEN
198195b296d0Smrg
198295b296d0Smrg
198395b296d0Smrg# AC_LIBTOOL_WIN32_DLL
198495b296d0Smrg# --------------------
198595b296d0Smrg# declare package support for building win32 DLLs
198695b296d0SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
198795b296d0Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
198895b296d0Smrg])# AC_LIBTOOL_WIN32_DLL
198995b296d0Smrg
199095b296d0Smrg
199195b296d0Smrg# AC_ENABLE_SHARED([DEFAULT])
199295b296d0Smrg# ---------------------------
199395b296d0Smrg# implement the --enable-shared flag
199495b296d0Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
199595b296d0SmrgAC_DEFUN([AC_ENABLE_SHARED],
199695b296d0Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
199795b296d0SmrgAC_ARG_ENABLE([shared],
199895b296d0Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
199995b296d0Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
200095b296d0Smrg    [p=${PACKAGE-default}
200195b296d0Smrg    case $enableval in
200295b296d0Smrg    yes) enable_shared=yes ;;
200395b296d0Smrg    no) enable_shared=no ;;
200495b296d0Smrg    *)
200595b296d0Smrg      enable_shared=no
200695b296d0Smrg      # Look at the argument we got.  We use all the common list separators.
200795b296d0Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
200895b296d0Smrg      for pkg in $enableval; do
200995b296d0Smrg	IFS="$lt_save_ifs"
201095b296d0Smrg	if test "X$pkg" = "X$p"; then
201195b296d0Smrg	  enable_shared=yes
201295b296d0Smrg	fi
201395b296d0Smrg      done
201495b296d0Smrg      IFS="$lt_save_ifs"
201595b296d0Smrg      ;;
201695b296d0Smrg    esac],
201795b296d0Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
201895b296d0Smrg])# AC_ENABLE_SHARED
201995b296d0Smrg
202095b296d0Smrg
202195b296d0Smrg# AC_DISABLE_SHARED
202295b296d0Smrg# -----------------
202395b296d0Smrg# set the default shared flag to --disable-shared
202495b296d0SmrgAC_DEFUN([AC_DISABLE_SHARED],
202595b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
202695b296d0SmrgAC_ENABLE_SHARED(no)
202795b296d0Smrg])# AC_DISABLE_SHARED
202895b296d0Smrg
202995b296d0Smrg
203095b296d0Smrg# AC_ENABLE_STATIC([DEFAULT])
203195b296d0Smrg# ---------------------------
203295b296d0Smrg# implement the --enable-static flag
203395b296d0Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
203495b296d0SmrgAC_DEFUN([AC_ENABLE_STATIC],
203595b296d0Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
203695b296d0SmrgAC_ARG_ENABLE([static],
203795b296d0Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
203895b296d0Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
203995b296d0Smrg    [p=${PACKAGE-default}
204095b296d0Smrg    case $enableval in
204195b296d0Smrg    yes) enable_static=yes ;;
204295b296d0Smrg    no) enable_static=no ;;
204395b296d0Smrg    *)
204495b296d0Smrg     enable_static=no
204595b296d0Smrg      # Look at the argument we got.  We use all the common list separators.
204695b296d0Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
204795b296d0Smrg      for pkg in $enableval; do
204895b296d0Smrg	IFS="$lt_save_ifs"
204995b296d0Smrg	if test "X$pkg" = "X$p"; then
205095b296d0Smrg	  enable_static=yes
205195b296d0Smrg	fi
205295b296d0Smrg      done
205395b296d0Smrg      IFS="$lt_save_ifs"
205495b296d0Smrg      ;;
205595b296d0Smrg    esac],
205695b296d0Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
205795b296d0Smrg])# AC_ENABLE_STATIC
205895b296d0Smrg
205995b296d0Smrg
206095b296d0Smrg# AC_DISABLE_STATIC
206195b296d0Smrg# -----------------
206295b296d0Smrg# set the default static flag to --disable-static
206395b296d0SmrgAC_DEFUN([AC_DISABLE_STATIC],
206495b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
206595b296d0SmrgAC_ENABLE_STATIC(no)
206695b296d0Smrg])# AC_DISABLE_STATIC
206795b296d0Smrg
206895b296d0Smrg
206995b296d0Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
207095b296d0Smrg# ---------------------------------
207195b296d0Smrg# implement the --enable-fast-install flag
207295b296d0Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
207395b296d0SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
207495b296d0Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
207595b296d0SmrgAC_ARG_ENABLE([fast-install],
207695b296d0Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
207795b296d0Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
207895b296d0Smrg    [p=${PACKAGE-default}
207995b296d0Smrg    case $enableval in
208095b296d0Smrg    yes) enable_fast_install=yes ;;
208195b296d0Smrg    no) enable_fast_install=no ;;
208295b296d0Smrg    *)
208395b296d0Smrg      enable_fast_install=no
208495b296d0Smrg      # Look at the argument we got.  We use all the common list separators.
208595b296d0Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
208695b296d0Smrg      for pkg in $enableval; do
208795b296d0Smrg	IFS="$lt_save_ifs"
208895b296d0Smrg	if test "X$pkg" = "X$p"; then
208995b296d0Smrg	  enable_fast_install=yes
209095b296d0Smrg	fi
209195b296d0Smrg      done
209295b296d0Smrg      IFS="$lt_save_ifs"
209395b296d0Smrg      ;;
209495b296d0Smrg    esac],
209595b296d0Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
209695b296d0Smrg])# AC_ENABLE_FAST_INSTALL
209795b296d0Smrg
209895b296d0Smrg
209995b296d0Smrg# AC_DISABLE_FAST_INSTALL
210095b296d0Smrg# -----------------------
210195b296d0Smrg# set the default to --disable-fast-install
210295b296d0SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
210395b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
210495b296d0SmrgAC_ENABLE_FAST_INSTALL(no)
210595b296d0Smrg])# AC_DISABLE_FAST_INSTALL
210695b296d0Smrg
210795b296d0Smrg
210895b296d0Smrg# AC_LIBTOOL_PICMODE([MODE])
210995b296d0Smrg# --------------------------
211095b296d0Smrg# implement the --with-pic flag
211195b296d0Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
211295b296d0SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
211395b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
211495b296d0Smrgpic_mode=ifelse($#,1,$1,default)
211595b296d0Smrg])# AC_LIBTOOL_PICMODE
211695b296d0Smrg
211795b296d0Smrg
211895b296d0Smrg# AC_PROG_EGREP
211995b296d0Smrg# -------------
212095b296d0Smrg# This is predefined starting with Autoconf 2.54, so this conditional
212195b296d0Smrg# definition can be removed once we require Autoconf 2.54 or later.
212295b296d0Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
212395b296d0Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
212495b296d0Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
212595b296d0Smrg    then ac_cv_prog_egrep='grep -E'
212695b296d0Smrg    else ac_cv_prog_egrep='egrep'
212795b296d0Smrg    fi])
212895b296d0Smrg EGREP=$ac_cv_prog_egrep
212995b296d0Smrg AC_SUBST([EGREP])
213095b296d0Smrg])])
213195b296d0Smrg
213295b296d0Smrg
213395b296d0Smrg# AC_PATH_TOOL_PREFIX
213495b296d0Smrg# -------------------
213595b296d0Smrg# find a file program which can recognise shared library
213695b296d0SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
213795b296d0Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
213895b296d0SmrgAC_MSG_CHECKING([for $1])
213995b296d0SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
214095b296d0Smrg[case $MAGIC_CMD in
214195b296d0Smrg[[\\/*] |  ?:[\\/]*])
214295b296d0Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
214395b296d0Smrg  ;;
214495b296d0Smrg*)
214595b296d0Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
214695b296d0Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
214795b296d0Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
214895b296d0Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
214995b296d0Smrgdnl not every word.  This closes a longstanding sh security hole.
215095b296d0Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
215195b296d0Smrg  for ac_dir in $ac_dummy; do
215295b296d0Smrg    IFS="$lt_save_ifs"
215395b296d0Smrg    test -z "$ac_dir" && ac_dir=.
215495b296d0Smrg    if test -f $ac_dir/$1; then
215595b296d0Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
215695b296d0Smrg      if test -n "$file_magic_test_file"; then
215795b296d0Smrg	case $deplibs_check_method in
215895b296d0Smrg	"file_magic "*)
215995b296d0Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
216095b296d0Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
216195b296d0Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
216295b296d0Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
216395b296d0Smrg	    :
216495b296d0Smrg	  else
216595b296d0Smrg	    cat <<EOF 1>&2
216695b296d0Smrg
216795b296d0Smrg*** Warning: the command libtool uses to detect shared libraries,
216895b296d0Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
216995b296d0Smrg*** The result is that libtool may fail to recognize shared libraries
217095b296d0Smrg*** as such.  This will affect the creation of libtool libraries that
217195b296d0Smrg*** depend on shared libraries, but programs linked with such libtool
217295b296d0Smrg*** libraries will work regardless of this problem.  Nevertheless, you
217395b296d0Smrg*** may want to report the problem to your system manager and/or to
217495b296d0Smrg*** bug-libtool@gnu.org
217595b296d0Smrg
217695b296d0SmrgEOF
217795b296d0Smrg	  fi ;;
217895b296d0Smrg	esac
217995b296d0Smrg      fi
218095b296d0Smrg      break
218195b296d0Smrg    fi
218295b296d0Smrg  done
218395b296d0Smrg  IFS="$lt_save_ifs"
218495b296d0Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
218595b296d0Smrg  ;;
218695b296d0Smrgesac])
218795b296d0SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
218895b296d0Smrgif test -n "$MAGIC_CMD"; then
218995b296d0Smrg  AC_MSG_RESULT($MAGIC_CMD)
219095b296d0Smrgelse
219195b296d0Smrg  AC_MSG_RESULT(no)
219295b296d0Smrgfi
219395b296d0Smrg])# AC_PATH_TOOL_PREFIX
219495b296d0Smrg
219595b296d0Smrg
219695b296d0Smrg# AC_PATH_MAGIC
219795b296d0Smrg# -------------
219895b296d0Smrg# find a file program which can recognise a shared library
219995b296d0SmrgAC_DEFUN([AC_PATH_MAGIC],
220095b296d0Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
220195b296d0Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
220295b296d0Smrg  if test -n "$ac_tool_prefix"; then
220395b296d0Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
220495b296d0Smrg  else
220595b296d0Smrg    MAGIC_CMD=:
220695b296d0Smrg  fi
220795b296d0Smrgfi
220895b296d0Smrg])# AC_PATH_MAGIC
220995b296d0Smrg
221095b296d0Smrg
221195b296d0Smrg# AC_PROG_LD
221295b296d0Smrg# ----------
221395b296d0Smrg# find the pathname to the GNU or non-GNU linker
221495b296d0SmrgAC_DEFUN([AC_PROG_LD],
221595b296d0Smrg[AC_ARG_WITH([gnu-ld],
221695b296d0Smrg    [AC_HELP_STRING([--with-gnu-ld],
221795b296d0Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
221895b296d0Smrg    [test "$withval" = no || with_gnu_ld=yes],
221995b296d0Smrg    [with_gnu_ld=no])
222095b296d0SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
222195b296d0SmrgAC_REQUIRE([AC_PROG_CC])dnl
222295b296d0SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
222395b296d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
222495b296d0Smrgac_prog=ld
222595b296d0Smrgif test "$GCC" = yes; then
222695b296d0Smrg  # Check if gcc -print-prog-name=ld gives a path.
222795b296d0Smrg  AC_MSG_CHECKING([for ld used by $CC])
222895b296d0Smrg  case $host in
222995b296d0Smrg  *-*-mingw*)
223095b296d0Smrg    # gcc leaves a trailing carriage return which upsets mingw
223195b296d0Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
223295b296d0Smrg  *)
223395b296d0Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
223495b296d0Smrg  esac
223595b296d0Smrg  case $ac_prog in
223695b296d0Smrg    # Accept absolute paths.
223795b296d0Smrg    [[\\/]]* | ?:[[\\/]]*)
223895b296d0Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
223995b296d0Smrg      # Canonicalize the pathname of ld
224095b296d0Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
224195b296d0Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
224295b296d0Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
224395b296d0Smrg      done
224495b296d0Smrg      test -z "$LD" && LD="$ac_prog"
224595b296d0Smrg      ;;
224695b296d0Smrg  "")
224795b296d0Smrg    # If it fails, then pretend we aren't using GCC.
224895b296d0Smrg    ac_prog=ld
224995b296d0Smrg    ;;
225095b296d0Smrg  *)
225195b296d0Smrg    # If it is relative, then search for the first ld in PATH.
225295b296d0Smrg    with_gnu_ld=unknown
225395b296d0Smrg    ;;
225495b296d0Smrg  esac
225595b296d0Smrgelif test "$with_gnu_ld" = yes; then
225695b296d0Smrg  AC_MSG_CHECKING([for GNU ld])
225795b296d0Smrgelse
225895b296d0Smrg  AC_MSG_CHECKING([for non-GNU ld])
225995b296d0Smrgfi
226095b296d0SmrgAC_CACHE_VAL(lt_cv_path_LD,
226195b296d0Smrg[if test -z "$LD"; then
226295b296d0Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
226395b296d0Smrg  for ac_dir in $PATH; do
226495b296d0Smrg    IFS="$lt_save_ifs"
226595b296d0Smrg    test -z "$ac_dir" && ac_dir=.
226695b296d0Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
226795b296d0Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
226895b296d0Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
226995b296d0Smrg      # but apparently some variants of GNU ld only accept -v.
227095b296d0Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
227195b296d0Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
227295b296d0Smrg      *GNU* | *'with BFD'*)
227395b296d0Smrg	test "$with_gnu_ld" != no && break
227495b296d0Smrg	;;
227595b296d0Smrg      *)
227695b296d0Smrg	test "$with_gnu_ld" != yes && break
227795b296d0Smrg	;;
227895b296d0Smrg      esac
227995b296d0Smrg    fi
228095b296d0Smrg  done
228195b296d0Smrg  IFS="$lt_save_ifs"
228295b296d0Smrgelse
228395b296d0Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
228495b296d0Smrgfi])
228595b296d0SmrgLD="$lt_cv_path_LD"
228695b296d0Smrgif test -n "$LD"; then
228795b296d0Smrg  AC_MSG_RESULT($LD)
228895b296d0Smrgelse
228995b296d0Smrg  AC_MSG_RESULT(no)
229095b296d0Smrgfi
229195b296d0Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
229295b296d0SmrgAC_PROG_LD_GNU
229395b296d0Smrg])# AC_PROG_LD
229495b296d0Smrg
229595b296d0Smrg
229695b296d0Smrg# AC_PROG_LD_GNU
229795b296d0Smrg# --------------
229895b296d0SmrgAC_DEFUN([AC_PROG_LD_GNU],
229995b296d0Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
230095b296d0SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
230195b296d0Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
230295b296d0Smrgcase `$LD -v 2>&1 </dev/null` in
230395b296d0Smrg*GNU* | *'with BFD'*)
230495b296d0Smrg  lt_cv_prog_gnu_ld=yes
230595b296d0Smrg  ;;
230695b296d0Smrg*)
230795b296d0Smrg  lt_cv_prog_gnu_ld=no
230895b296d0Smrg  ;;
230995b296d0Smrgesac])
231095b296d0Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
231195b296d0Smrg])# AC_PROG_LD_GNU
231295b296d0Smrg
231395b296d0Smrg
231495b296d0Smrg# AC_PROG_LD_RELOAD_FLAG
231595b296d0Smrg# ----------------------
231695b296d0Smrg# find reload flag for linker
231795b296d0Smrg#   -- PORTME Some linkers may need a different reload flag.
231895b296d0SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
231995b296d0Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
232095b296d0Smrg  lt_cv_ld_reload_flag,
232195b296d0Smrg  [lt_cv_ld_reload_flag='-r'])
232295b296d0Smrgreload_flag=$lt_cv_ld_reload_flag
232395b296d0Smrgcase $reload_flag in
232495b296d0Smrg"" | " "*) ;;
232595b296d0Smrg*) reload_flag=" $reload_flag" ;;
232695b296d0Smrgesac
232795b296d0Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
232895b296d0Smrgcase $host_os in
232995b296d0Smrg  darwin*)
233095b296d0Smrg    if test "$GCC" = yes; then
233195b296d0Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
233295b296d0Smrg    else
233395b296d0Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
233495b296d0Smrg    fi
233595b296d0Smrg    ;;
233695b296d0Smrgesac
233795b296d0Smrg])# AC_PROG_LD_RELOAD_FLAG
233895b296d0Smrg
233995b296d0Smrg
234095b296d0Smrg# AC_DEPLIBS_CHECK_METHOD
234195b296d0Smrg# -----------------------
234295b296d0Smrg# how to check for library dependencies
234395b296d0Smrg#  -- PORTME fill in with the dynamic library characteristics
234495b296d0SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
234595b296d0Smrg[AC_CACHE_CHECK([how to recognise dependent libraries],
234695b296d0Smrglt_cv_deplibs_check_method,
234795b296d0Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
234895b296d0Smrglt_cv_file_magic_test_file=
234995b296d0Smrglt_cv_deplibs_check_method='unknown'
235095b296d0Smrg# Need to set the preceding variable on all platforms that support
235195b296d0Smrg# interlibrary dependencies.
235295b296d0Smrg# 'none' -- dependencies not supported.
235395b296d0Smrg# `unknown' -- same as none, but documents that we really don't know.
235495b296d0Smrg# 'pass_all' -- all dependencies passed with no checks.
235595b296d0Smrg# 'test_compile' -- check by making test program.
235695b296d0Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
235795b296d0Smrg# which responds to the $file_magic_cmd with a given extended regex.
235895b296d0Smrg# If you have `file' or equivalent on your system and you're not sure
235995b296d0Smrg# whether `pass_all' will *always* work, you probably want this one.
236095b296d0Smrg
236195b296d0Smrgcase $host_os in
236295b296d0Smrgaix4* | aix5*)
236395b296d0Smrg  lt_cv_deplibs_check_method=pass_all
236495b296d0Smrg  ;;
236595b296d0Smrg
236695b296d0Smrgbeos*)
236795b296d0Smrg  lt_cv_deplibs_check_method=pass_all
236895b296d0Smrg  ;;
236995b296d0Smrg
237095b296d0Smrgbsdi[[45]]*)
237195b296d0Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
237295b296d0Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
237395b296d0Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
237495b296d0Smrg  ;;
237595b296d0Smrg
237695b296d0Smrgcygwin*)
237795b296d0Smrg  # func_win32_libid is a shell function defined in ltmain.sh
237895b296d0Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
237995b296d0Smrg  lt_cv_file_magic_cmd='func_win32_libid'
238095b296d0Smrg  ;;
238195b296d0Smrg
238295b296d0Smrgmingw* | pw32*)
238395b296d0Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
238495b296d0Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
238595b296d0Smrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
238695b296d0Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
238795b296d0Smrg  ;;
238895b296d0Smrg
238995b296d0Smrgdarwin* | rhapsody*)
239095b296d0Smrg  lt_cv_deplibs_check_method=pass_all
239195b296d0Smrg  ;;
239295b296d0Smrg
239395b296d0Smrgfreebsd* | kfreebsd*-gnu | dragonfly*)
239495b296d0Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
239595b296d0Smrg    case $host_cpu in
239695b296d0Smrg    i*86 )
239795b296d0Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
239895b296d0Smrg      # Let's accept both of them until this is cleared up.
239995b296d0Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
240095b296d0Smrg      lt_cv_file_magic_cmd=/usr/bin/file
240195b296d0Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
240295b296d0Smrg      ;;
240395b296d0Smrg    esac
240495b296d0Smrg  else
240595b296d0Smrg    lt_cv_deplibs_check_method=pass_all
240695b296d0Smrg  fi
240795b296d0Smrg  ;;
240895b296d0Smrg
240995b296d0Smrggnu*)
241095b296d0Smrg  lt_cv_deplibs_check_method=pass_all
241195b296d0Smrg  ;;
241295b296d0Smrg
241395b296d0Smrghpux10.20* | hpux11*)
241495b296d0Smrg  lt_cv_file_magic_cmd=/usr/bin/file
241595b296d0Smrg  case $host_cpu in
241695b296d0Smrg  ia64*)
241795b296d0Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
241895b296d0Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
241995b296d0Smrg    ;;
242095b296d0Smrg  hppa*64*)
242195b296d0Smrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
242295b296d0Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
242395b296d0Smrg    ;;
242495b296d0Smrg  *)
242595b296d0Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
242695b296d0Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
242795b296d0Smrg    ;;
242895b296d0Smrg  esac
242995b296d0Smrg  ;;
243095b296d0Smrg
243195b296d0Smrginterix3*)
243295b296d0Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
243395b296d0Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
243495b296d0Smrg  ;;
243595b296d0Smrg
243695b296d0Smrgirix5* | irix6* | nonstopux*)
243795b296d0Smrg  case $LD in
243895b296d0Smrg  *-32|*"-32 ") libmagic=32-bit;;
243995b296d0Smrg  *-n32|*"-n32 ") libmagic=N32;;
244095b296d0Smrg  *-64|*"-64 ") libmagic=64-bit;;
244195b296d0Smrg  *) libmagic=never-match;;
244295b296d0Smrg  esac
244395b296d0Smrg  lt_cv_deplibs_check_method=pass_all
244495b296d0Smrg  ;;
244595b296d0Smrg
244695b296d0Smrg# This must be Linux ELF.
244795b296d0Smrglinux*)
244895b296d0Smrg  lt_cv_deplibs_check_method=pass_all
244995b296d0Smrg  ;;
245095b296d0Smrg
245195b296d0Smrgnetbsd*)
245295b296d0Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
245395b296d0Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
245495b296d0Smrg  else
245595b296d0Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
245695b296d0Smrg  fi
245795b296d0Smrg  ;;
245895b296d0Smrg
245995b296d0Smrgnewos6*)
246095b296d0Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
246195b296d0Smrg  lt_cv_file_magic_cmd=/usr/bin/file
246295b296d0Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
246395b296d0Smrg  ;;
246495b296d0Smrg
246595b296d0Smrgnto-qnx*)
246695b296d0Smrg  lt_cv_deplibs_check_method=unknown
246795b296d0Smrg  ;;
246895b296d0Smrg
246995b296d0Smrgopenbsd*)
247095b296d0Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
247195b296d0Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
247295b296d0Smrg  else
247395b296d0Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
247495b296d0Smrg  fi
247595b296d0Smrg  ;;
247695b296d0Smrg
247795b296d0Smrgosf3* | osf4* | osf5*)
247895b296d0Smrg  lt_cv_deplibs_check_method=pass_all
247995b296d0Smrg  ;;
248095b296d0Smrg
248195b296d0Smrgsolaris*)
248295b296d0Smrg  lt_cv_deplibs_check_method=pass_all
248395b296d0Smrg  ;;
248495b296d0Smrg
248595b296d0Smrgsysv4 | sysv4.3*)
248695b296d0Smrg  case $host_vendor in
248795b296d0Smrg  motorola)
248895b296d0Smrg    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]]'
248995b296d0Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
249095b296d0Smrg    ;;
249195b296d0Smrg  ncr)
249295b296d0Smrg    lt_cv_deplibs_check_method=pass_all
249395b296d0Smrg    ;;
249495b296d0Smrg  sequent)
249595b296d0Smrg    lt_cv_file_magic_cmd='/bin/file'
249695b296d0Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
249795b296d0Smrg    ;;
249895b296d0Smrg  sni)
249995b296d0Smrg    lt_cv_file_magic_cmd='/bin/file'
250095b296d0Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
250195b296d0Smrg    lt_cv_file_magic_test_file=/lib/libc.so
250295b296d0Smrg    ;;
250395b296d0Smrg  siemens)
250495b296d0Smrg    lt_cv_deplibs_check_method=pass_all
250595b296d0Smrg    ;;
250695b296d0Smrg  pc)
250795b296d0Smrg    lt_cv_deplibs_check_method=pass_all
250895b296d0Smrg    ;;
250995b296d0Smrg  esac
251095b296d0Smrg  ;;
251195b296d0Smrg
251295b296d0Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
251395b296d0Smrg  lt_cv_deplibs_check_method=pass_all
251495b296d0Smrg  ;;
251595b296d0Smrgesac
251695b296d0Smrg])
251795b296d0Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
251895b296d0Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
251995b296d0Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
252095b296d0Smrg])# AC_DEPLIBS_CHECK_METHOD
252195b296d0Smrg
252295b296d0Smrg
252395b296d0Smrg# AC_PROG_NM
252495b296d0Smrg# ----------
252595b296d0Smrg# find the pathname to a BSD-compatible name lister
252695b296d0SmrgAC_DEFUN([AC_PROG_NM],
252795b296d0Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
252895b296d0Smrg[if test -n "$NM"; then
252995b296d0Smrg  # Let the user override the test.
253095b296d0Smrg  lt_cv_path_NM="$NM"
253195b296d0Smrgelse
253295b296d0Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
253395b296d0Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
253495b296d0Smrg    lt_nm_to_check="$lt_nm_to_check nm"
253595b296d0Smrg  fi
253695b296d0Smrg  for lt_tmp_nm in $lt_nm_to_check; do
253795b296d0Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
253895b296d0Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
253995b296d0Smrg      IFS="$lt_save_ifs"
254095b296d0Smrg      test -z "$ac_dir" && ac_dir=.
254195b296d0Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
254295b296d0Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
254395b296d0Smrg	# Check to see if the nm accepts a BSD-compat flag.
254495b296d0Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
254595b296d0Smrg	#   nm: unknown option "B" ignored
254695b296d0Smrg	# Tru64's nm complains that /dev/null is an invalid object file
254795b296d0Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
254895b296d0Smrg	*/dev/null* | *'Invalid file or object type'*)
254995b296d0Smrg	  lt_cv_path_NM="$tmp_nm -B"
255095b296d0Smrg	  break
255195b296d0Smrg	  ;;
255295b296d0Smrg	*)
255395b296d0Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
255495b296d0Smrg	  */dev/null*)
255595b296d0Smrg	    lt_cv_path_NM="$tmp_nm -p"
255695b296d0Smrg	    break
255795b296d0Smrg	    ;;
255895b296d0Smrg	  *)
255995b296d0Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
256095b296d0Smrg	    continue # so that we can try to find one that supports BSD flags
256195b296d0Smrg	    ;;
256295b296d0Smrg	  esac
256395b296d0Smrg	  ;;
256495b296d0Smrg	esac
256595b296d0Smrg      fi
256695b296d0Smrg    done
256795b296d0Smrg    IFS="$lt_save_ifs"
256895b296d0Smrg  done
256995b296d0Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
257095b296d0Smrgfi])
257195b296d0SmrgNM="$lt_cv_path_NM"
257295b296d0Smrg])# AC_PROG_NM
257395b296d0Smrg
257495b296d0Smrg
257595b296d0Smrg# AC_CHECK_LIBM
257695b296d0Smrg# -------------
257795b296d0Smrg# check for math library
257895b296d0SmrgAC_DEFUN([AC_CHECK_LIBM],
257995b296d0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
258095b296d0SmrgLIBM=
258195b296d0Smrgcase $host in
258295b296d0Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
258395b296d0Smrg  # These system don't have libm, or don't need it
258495b296d0Smrg  ;;
258595b296d0Smrg*-ncr-sysv4.3*)
258695b296d0Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
258795b296d0Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
258895b296d0Smrg  ;;
258995b296d0Smrg*)
259095b296d0Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
259195b296d0Smrg  ;;
259295b296d0Smrgesac
259395b296d0Smrg])# AC_CHECK_LIBM
259495b296d0Smrg
259595b296d0Smrg
259695b296d0Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
259795b296d0Smrg# -----------------------------------
259895b296d0Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
259995b296d0Smrg# LTDLINCL to the include flags for the libltdl header and adds
260095b296d0Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
260195b296d0Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
260295b296d0Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
260395b296d0Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
260495b296d0Smrg# (note the single quotes!).  If your package is not flat and you're not
260595b296d0Smrg# using automake, define top_builddir and top_srcdir appropriately in
260695b296d0Smrg# the Makefiles.
260795b296d0SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
260895b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
260995b296d0Smrg  case $enable_ltdl_convenience in
261095b296d0Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
261195b296d0Smrg  "") enable_ltdl_convenience=yes
261295b296d0Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
261395b296d0Smrg  esac
261495b296d0Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
261595b296d0Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
261695b296d0Smrg  # For backwards non-gettext consistent compatibility...
261795b296d0Smrg  INCLTDL="$LTDLINCL"
261895b296d0Smrg])# AC_LIBLTDL_CONVENIENCE
261995b296d0Smrg
262095b296d0Smrg
262195b296d0Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
262295b296d0Smrg# -----------------------------------
262395b296d0Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
262495b296d0Smrg# LTDLINCL to the include flags for the libltdl header and adds
262595b296d0Smrg# --enable-ltdl-install to the configure arguments.  Note that
262695b296d0Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
262795b296d0Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
262895b296d0Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
262995b296d0Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
263095b296d0Smrg# flat and you're not using automake, define top_builddir and top_srcdir
263195b296d0Smrg# appropriately in the Makefiles.
263295b296d0Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
263395b296d0SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
263495b296d0Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
263595b296d0Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
263695b296d0Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
263795b296d0Smrg  [if test x"$enable_ltdl_install" = xno; then
263895b296d0Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
263995b296d0Smrg   else
264095b296d0Smrg     enable_ltdl_install=yes
264195b296d0Smrg   fi
264295b296d0Smrg  ])
264395b296d0Smrg  if test x"$enable_ltdl_install" = x"yes"; then
264495b296d0Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
264595b296d0Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
264695b296d0Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
264795b296d0Smrg  else
264895b296d0Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
264995b296d0Smrg    LIBLTDL="-lltdl"
265095b296d0Smrg    LTDLINCL=
265195b296d0Smrg  fi
265295b296d0Smrg  # For backwards non-gettext consistent compatibility...
265395b296d0Smrg  INCLTDL="$LTDLINCL"
265495b296d0Smrg])# AC_LIBLTDL_INSTALLABLE
265595b296d0Smrg
265695b296d0Smrg
265795b296d0Smrg# AC_LIBTOOL_CXX
265895b296d0Smrg# --------------
265995b296d0Smrg# enable support for C++ libraries
266095b296d0SmrgAC_DEFUN([AC_LIBTOOL_CXX],
266195b296d0Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
266295b296d0Smrg])# AC_LIBTOOL_CXX
266395b296d0Smrg
266495b296d0Smrg
266595b296d0Smrg# _LT_AC_LANG_CXX
266695b296d0Smrg# ---------------
266795b296d0SmrgAC_DEFUN([_LT_AC_LANG_CXX],
266895b296d0Smrg[AC_REQUIRE([AC_PROG_CXX])
266995b296d0SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
267095b296d0Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
267195b296d0Smrg])# _LT_AC_LANG_CXX
267295b296d0Smrg
267395b296d0Smrg# _LT_AC_PROG_CXXCPP
267495b296d0Smrg# ------------------
267595b296d0SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
267695b296d0Smrg[
267795b296d0SmrgAC_REQUIRE([AC_PROG_CXX])
267895b296d0Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
267995b296d0Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
268095b296d0Smrg    (test "X$CXX" != "Xg++"))) ; then
268195b296d0Smrg  AC_PROG_CXXCPP
268295b296d0Smrgfi
268395b296d0Smrg])# _LT_AC_PROG_CXXCPP
268495b296d0Smrg
268595b296d0Smrg# AC_LIBTOOL_F77
268695b296d0Smrg# --------------
268795b296d0Smrg# enable support for Fortran 77 libraries
268895b296d0SmrgAC_DEFUN([AC_LIBTOOL_F77],
268995b296d0Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
269095b296d0Smrg])# AC_LIBTOOL_F77
269195b296d0Smrg
269295b296d0Smrg
269395b296d0Smrg# _LT_AC_LANG_F77
269495b296d0Smrg# ---------------
269595b296d0SmrgAC_DEFUN([_LT_AC_LANG_F77],
269695b296d0Smrg[AC_REQUIRE([AC_PROG_F77])
269795b296d0Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
269895b296d0Smrg])# _LT_AC_LANG_F77
269995b296d0Smrg
270095b296d0Smrg
270195b296d0Smrg# AC_LIBTOOL_GCJ
270295b296d0Smrg# --------------
270395b296d0Smrg# enable support for GCJ libraries
270495b296d0SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
270595b296d0Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
270695b296d0Smrg])# AC_LIBTOOL_GCJ
270795b296d0Smrg
270895b296d0Smrg
270995b296d0Smrg# _LT_AC_LANG_GCJ
271095b296d0Smrg# ---------------
271195b296d0SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
271295b296d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
271395b296d0Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
271495b296d0Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
271595b296d0Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
271695b296d0Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
271795b296d0Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
271895b296d0Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
271995b296d0Smrg])# _LT_AC_LANG_GCJ
272095b296d0Smrg
272195b296d0Smrg
272295b296d0Smrg# AC_LIBTOOL_RC
272395b296d0Smrg# -------------
272495b296d0Smrg# enable support for Windows resource files
272595b296d0SmrgAC_DEFUN([AC_LIBTOOL_RC],
272695b296d0Smrg[AC_REQUIRE([LT_AC_PROG_RC])
272795b296d0Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
272895b296d0Smrg])# AC_LIBTOOL_RC
272995b296d0Smrg
273095b296d0Smrg
273195b296d0Smrg# AC_LIBTOOL_LANG_C_CONFIG
273295b296d0Smrg# ------------------------
273395b296d0Smrg# Ensure that the configuration vars for the C compiler are
273495b296d0Smrg# suitably defined.  Those variables are subsequently used by
273595b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
273695b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
273795b296d0SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
273895b296d0Smrg[lt_save_CC="$CC"
273995b296d0SmrgAC_LANG_PUSH(C)
274095b296d0Smrg
274195b296d0Smrg# Source file extension for C test sources.
274295b296d0Smrgac_ext=c
274395b296d0Smrg
274495b296d0Smrg# Object file extension for compiled C test sources.
274595b296d0Smrgobjext=o
274695b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext
274795b296d0Smrg
274895b296d0Smrg# Code to be used in simple compile tests
274995b296d0Smrglt_simple_compile_test_code="int some_variable = 0;\n"
275095b296d0Smrg
275195b296d0Smrg# Code to be used in simple link tests
275295b296d0Smrglt_simple_link_test_code='int main(){return(0);}\n'
275395b296d0Smrg
275495b296d0Smrg_LT_AC_SYS_COMPILER
275595b296d0Smrg
275695b296d0Smrg# save warnings/boilerplate of simple test code
275795b296d0Smrg_LT_COMPILER_BOILERPLATE
275895b296d0Smrg_LT_LINKER_BOILERPLATE
275995b296d0Smrg
276095b296d0SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
276195b296d0SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
276295b296d0SmrgAC_LIBTOOL_PROG_CC_C_O($1)
276395b296d0SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
276495b296d0SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
276595b296d0SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
276695b296d0SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
276795b296d0SmrgAC_LIBTOOL_SYS_LIB_STRIP
276895b296d0SmrgAC_LIBTOOL_DLOPEN_SELF
276995b296d0Smrg
277095b296d0Smrg# Report which library types will actually be built
277195b296d0SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
277295b296d0SmrgAC_MSG_RESULT([$can_build_shared])
277395b296d0Smrg
277495b296d0SmrgAC_MSG_CHECKING([whether to build shared libraries])
277595b296d0Smrgtest "$can_build_shared" = "no" && enable_shared=no
277695b296d0Smrg
277795b296d0Smrg# On AIX, shared libraries and static libraries use the same namespace, and
277895b296d0Smrg# are all built from PIC.
277995b296d0Smrgcase $host_os in
278095b296d0Smrgaix3*)
278195b296d0Smrg  test "$enable_shared" = yes && enable_static=no
278295b296d0Smrg  if test -n "$RANLIB"; then
278395b296d0Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
278495b296d0Smrg    postinstall_cmds='$RANLIB $lib'
278595b296d0Smrg  fi
278695b296d0Smrg  ;;
278795b296d0Smrg
278895b296d0Smrgaix4* | aix5*)
278995b296d0Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
279095b296d0Smrg    test "$enable_shared" = yes && enable_static=no
279195b296d0Smrg  fi
279295b296d0Smrg    ;;
279395b296d0Smrgesac
279495b296d0SmrgAC_MSG_RESULT([$enable_shared])
279595b296d0Smrg
279695b296d0SmrgAC_MSG_CHECKING([whether to build static libraries])
279795b296d0Smrg# Make sure either enable_shared or enable_static is yes.
279895b296d0Smrgtest "$enable_shared" = yes || enable_static=yes
279995b296d0SmrgAC_MSG_RESULT([$enable_static])
280095b296d0Smrg
280195b296d0SmrgAC_LIBTOOL_CONFIG($1)
280295b296d0Smrg
280395b296d0SmrgAC_LANG_POP
280495b296d0SmrgCC="$lt_save_CC"
280595b296d0Smrg])# AC_LIBTOOL_LANG_C_CONFIG
280695b296d0Smrg
280795b296d0Smrg
280895b296d0Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
280995b296d0Smrg# --------------------------
281095b296d0Smrg# Ensure that the configuration vars for the C compiler are
281195b296d0Smrg# suitably defined.  Those variables are subsequently used by
281295b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
281395b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
281495b296d0SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
281595b296d0Smrg[AC_LANG_PUSH(C++)
281695b296d0SmrgAC_REQUIRE([AC_PROG_CXX])
281795b296d0SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
281895b296d0Smrg
281995b296d0Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
282095b296d0Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
282195b296d0Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
282295b296d0Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
282395b296d0Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
282495b296d0Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
282595b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
282695b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
282795b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
282895b296d0Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
282995b296d0Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
283095b296d0Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
283195b296d0Smrg_LT_AC_TAGVAR(module_cmds, $1)=
283295b296d0Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
283395b296d0Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
283495b296d0Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
283595b296d0Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
283695b296d0Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
283795b296d0Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
283895b296d0Smrg
283995b296d0Smrg# Dependencies to place before and after the object being linked:
284095b296d0Smrg_LT_AC_TAGVAR(predep_objects, $1)=
284195b296d0Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
284295b296d0Smrg_LT_AC_TAGVAR(predeps, $1)=
284395b296d0Smrg_LT_AC_TAGVAR(postdeps, $1)=
284495b296d0Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
284595b296d0Smrg
284695b296d0Smrg# Source file extension for C++ test sources.
284795b296d0Smrgac_ext=cpp
284895b296d0Smrg
284995b296d0Smrg# Object file extension for compiled C++ test sources.
285095b296d0Smrgobjext=o
285195b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext
285295b296d0Smrg
285395b296d0Smrg# Code to be used in simple compile tests
285495b296d0Smrglt_simple_compile_test_code="int some_variable = 0;\n"
285595b296d0Smrg
285695b296d0Smrg# Code to be used in simple link tests
285795b296d0Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
285895b296d0Smrg
285995b296d0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
286095b296d0Smrg_LT_AC_SYS_COMPILER
286195b296d0Smrg
286295b296d0Smrg# save warnings/boilerplate of simple test code
286395b296d0Smrg_LT_COMPILER_BOILERPLATE
286495b296d0Smrg_LT_LINKER_BOILERPLATE
286595b296d0Smrg
286695b296d0Smrg# Allow CC to be a program name with arguments.
286795b296d0Smrglt_save_CC=$CC
286895b296d0Smrglt_save_LD=$LD
286995b296d0Smrglt_save_GCC=$GCC
287095b296d0SmrgGCC=$GXX
287195b296d0Smrglt_save_with_gnu_ld=$with_gnu_ld
287295b296d0Smrglt_save_path_LD=$lt_cv_path_LD
287395b296d0Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
287495b296d0Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
287595b296d0Smrgelse
287695b296d0Smrg  $as_unset lt_cv_prog_gnu_ld
287795b296d0Smrgfi
287895b296d0Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
287995b296d0Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
288095b296d0Smrgelse
288195b296d0Smrg  $as_unset lt_cv_path_LD
288295b296d0Smrgfi
288395b296d0Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
288495b296d0SmrgCC=${CXX-"c++"}
288595b296d0Smrgcompiler=$CC
288695b296d0Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
288795b296d0Smrg_LT_CC_BASENAME([$compiler])
288895b296d0Smrg
288995b296d0Smrg# We don't want -fno-exception wen compiling C++ code, so set the
289095b296d0Smrg# no_builtin_flag separately
289195b296d0Smrgif test "$GXX" = yes; then
289295b296d0Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
289395b296d0Smrgelse
289495b296d0Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
289595b296d0Smrgfi
289695b296d0Smrg
289795b296d0Smrgif test "$GXX" = yes; then
289895b296d0Smrg  # Set up default GNU C++ configuration
289995b296d0Smrg
290095b296d0Smrg  AC_PROG_LD
290195b296d0Smrg
290295b296d0Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
290395b296d0Smrg  # archiving commands below assume that GNU ld is being used.
290495b296d0Smrg  if test "$with_gnu_ld" = yes; then
290595b296d0Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
290695b296d0Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
290795b296d0Smrg
290895b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
290995b296d0Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
291095b296d0Smrg
291195b296d0Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
291295b296d0Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
291395b296d0Smrg    #     investigate it a little bit more. (MM)
291495b296d0Smrg    wlarc='${wl}'
291595b296d0Smrg
291695b296d0Smrg    # ancient GNU ld didn't support --whole-archive et. al.
291795b296d0Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
291895b296d0Smrg	grep 'no-whole-archive' > /dev/null; then
291995b296d0Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
292095b296d0Smrg    else
292195b296d0Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
292295b296d0Smrg    fi
292395b296d0Smrg  else
292495b296d0Smrg    with_gnu_ld=no
292595b296d0Smrg    wlarc=
292695b296d0Smrg
292795b296d0Smrg    # A generic and very simple default shared library creation
292895b296d0Smrg    # command for GNU C++ for the case where it uses the native
292995b296d0Smrg    # linker, instead of GNU ld.  If possible, this setting should
293095b296d0Smrg    # overridden to take advantage of the native linker features on
293195b296d0Smrg    # the platform it is being used on.
293295b296d0Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
293395b296d0Smrg  fi
293495b296d0Smrg
293595b296d0Smrg  # Commands to make compiler produce verbose output that lists
293695b296d0Smrg  # what "hidden" libraries, object files and flags are used when
293795b296d0Smrg  # linking a shared library.
293895b296d0Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
293995b296d0Smrg
294095b296d0Smrgelse
294195b296d0Smrg  GXX=no
294295b296d0Smrg  with_gnu_ld=no
294395b296d0Smrg  wlarc=
294495b296d0Smrgfi
294595b296d0Smrg
294695b296d0Smrg# PORTME: fill in a description of your system's C++ link characteristics
294795b296d0SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
294895b296d0Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
294995b296d0Smrgcase $host_os in
295095b296d0Smrg  aix3*)
295195b296d0Smrg    # FIXME: insert proper C++ library support
295295b296d0Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
295395b296d0Smrg    ;;
295495b296d0Smrg  aix4* | aix5*)
295595b296d0Smrg    if test "$host_cpu" = ia64; then
295695b296d0Smrg      # On IA64, the linker does run time linking by default, so we don't
295795b296d0Smrg      # have to do anything special.
295895b296d0Smrg      aix_use_runtimelinking=no
295995b296d0Smrg      exp_sym_flag='-Bexport'
296095b296d0Smrg      no_entry_flag=""
296195b296d0Smrg    else
296295b296d0Smrg      aix_use_runtimelinking=no
296395b296d0Smrg
296495b296d0Smrg      # Test if we are trying to use run time linking or normal
296595b296d0Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
296695b296d0Smrg      # need to do runtime linking.
296795b296d0Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
296895b296d0Smrg	for ld_flag in $LDFLAGS; do
296995b296d0Smrg	  case $ld_flag in
297095b296d0Smrg	  *-brtl*)
297195b296d0Smrg	    aix_use_runtimelinking=yes
297295b296d0Smrg	    break
297395b296d0Smrg	    ;;
297495b296d0Smrg	  esac
297595b296d0Smrg	done
297695b296d0Smrg	;;
297795b296d0Smrg      esac
297895b296d0Smrg
297995b296d0Smrg      exp_sym_flag='-bexport'
298095b296d0Smrg      no_entry_flag='-bnoentry'
298195b296d0Smrg    fi
298295b296d0Smrg
298395b296d0Smrg    # When large executables or shared objects are built, AIX ld can
298495b296d0Smrg    # have problems creating the table of contents.  If linking a library
298595b296d0Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
298695b296d0Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
298795b296d0Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
298895b296d0Smrg
298995b296d0Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
299095b296d0Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
299195b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
299295b296d0Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
299395b296d0Smrg
299495b296d0Smrg    if test "$GXX" = yes; then
299595b296d0Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
299695b296d0Smrg      # We only want to do this on AIX 4.2 and lower, the check
299795b296d0Smrg      # below for broken collect2 doesn't work under 4.3+
299895b296d0Smrg	collect2name=`${CC} -print-prog-name=collect2`
299995b296d0Smrg	if test -f "$collect2name" && \
300095b296d0Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
300195b296d0Smrg	then
300295b296d0Smrg	  # We have reworked collect2
300395b296d0Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
300495b296d0Smrg	else
300595b296d0Smrg	  # We have old collect2
300695b296d0Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
300795b296d0Smrg	  # It fails to find uninstalled libraries when the uninstalled
300895b296d0Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
300995b296d0Smrg	  # to unsupported forces relinking
301095b296d0Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
301195b296d0Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
301295b296d0Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
301395b296d0Smrg	fi
301495b296d0Smrg	;;
301595b296d0Smrg      esac
301695b296d0Smrg      shared_flag='-shared'
301795b296d0Smrg      if test "$aix_use_runtimelinking" = yes; then
301895b296d0Smrg	shared_flag="$shared_flag "'${wl}-G'
301995b296d0Smrg      fi
302095b296d0Smrg    else
302195b296d0Smrg      # not using gcc
302295b296d0Smrg      if test "$host_cpu" = ia64; then
302395b296d0Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
302495b296d0Smrg	# chokes on -Wl,-G. The following line is correct:
302595b296d0Smrg	shared_flag='-G'
302695b296d0Smrg      else
302795b296d0Smrg	if test "$aix_use_runtimelinking" = yes; then
302895b296d0Smrg	  shared_flag='${wl}-G'
302995b296d0Smrg	else
303095b296d0Smrg	  shared_flag='${wl}-bM:SRE'
303195b296d0Smrg	fi
303295b296d0Smrg      fi
303395b296d0Smrg    fi
303495b296d0Smrg
303595b296d0Smrg    # It seems that -bexpall does not export symbols beginning with
303695b296d0Smrg    # underscore (_), so it is better to generate a list of symbols to export.
303795b296d0Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
303895b296d0Smrg    if test "$aix_use_runtimelinking" = yes; then
303995b296d0Smrg      # Warning - without using the other runtime loading flags (-brtl),
304095b296d0Smrg      # -berok will link without error, but may produce a broken library.
304195b296d0Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
304295b296d0Smrg      # Determine the default libpath from the value encoded in an empty executable.
304395b296d0Smrg      _LT_AC_SYS_LIBPATH_AIX
304495b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
304595b296d0Smrg
304695b296d0Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
304795b296d0Smrg     else
304895b296d0Smrg      if test "$host_cpu" = ia64; then
304995b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
305095b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
305195b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
305295b296d0Smrg      else
305395b296d0Smrg	# Determine the default libpath from the value encoded in an empty executable.
305495b296d0Smrg	_LT_AC_SYS_LIBPATH_AIX
305595b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
305695b296d0Smrg	# Warning - without using the other run time loading flags,
305795b296d0Smrg	# -berok will link without error, but may produce a broken library.
305895b296d0Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
305995b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
306095b296d0Smrg	# Exported symbols can be pulled into shared objects from archives
306195b296d0Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
306295b296d0Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
306395b296d0Smrg	# This is similar to how AIX traditionally builds its shared libraries.
306495b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
306595b296d0Smrg      fi
306695b296d0Smrg    fi
306795b296d0Smrg    ;;
306895b296d0Smrg
306995b296d0Smrg  beos*)
307095b296d0Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
307195b296d0Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
307295b296d0Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
307395b296d0Smrg      # support --undefined.  This deserves some investigation.  FIXME
307495b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
307595b296d0Smrg    else
307695b296d0Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
307795b296d0Smrg    fi
307895b296d0Smrg    ;;
307995b296d0Smrg
308095b296d0Smrg  chorus*)
308195b296d0Smrg    case $cc_basename in
308295b296d0Smrg      *)
308395b296d0Smrg	# FIXME: insert proper C++ library support
308495b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
308595b296d0Smrg	;;
308695b296d0Smrg    esac
308795b296d0Smrg    ;;
308895b296d0Smrg
308995b296d0Smrg  cygwin* | mingw* | pw32*)
309095b296d0Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
309195b296d0Smrg    # as there is no search path for DLLs.
309295b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
309395b296d0Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
309495b296d0Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
309595b296d0Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
309695b296d0Smrg
309795b296d0Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
309895b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
309995b296d0Smrg      # If the export-symbols file already is a .def file (1st line
310095b296d0Smrg      # is EXPORTS), use it as is; otherwise, prepend...
310195b296d0Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
310295b296d0Smrg	cp $export_symbols $output_objdir/$soname.def;
310395b296d0Smrg      else
310495b296d0Smrg	echo EXPORTS > $output_objdir/$soname.def;
310595b296d0Smrg	cat $export_symbols >> $output_objdir/$soname.def;
310695b296d0Smrg      fi~
310795b296d0Smrg      $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'
310895b296d0Smrg    else
310995b296d0Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
311095b296d0Smrg    fi
311195b296d0Smrg  ;;
311295b296d0Smrg      darwin* | rhapsody*)
311395b296d0Smrg        case $host_os in
311495b296d0Smrg        rhapsody* | darwin1.[[012]])
311595b296d0Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
311695b296d0Smrg         ;;
311795b296d0Smrg       *) # Darwin 1.3 on
311895b296d0Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
311995b296d0Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
312095b296d0Smrg         else
312195b296d0Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
312295b296d0Smrg             10.[[012]])
312395b296d0Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
312495b296d0Smrg               ;;
312595b296d0Smrg             10.*)
312695b296d0Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
312795b296d0Smrg               ;;
312895b296d0Smrg           esac
312995b296d0Smrg         fi
313095b296d0Smrg         ;;
313195b296d0Smrg        esac
313295b296d0Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
313395b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
313495b296d0Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
313595b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
313695b296d0Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
313795b296d0Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
313895b296d0Smrg
313995b296d0Smrg    if test "$GXX" = yes ; then
314095b296d0Smrg      lt_int_apple_cc_single_mod=no
314195b296d0Smrg      output_verbose_link_cmd='echo'
314295b296d0Smrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
314395b296d0Smrg       lt_int_apple_cc_single_mod=yes
314495b296d0Smrg      fi
314595b296d0Smrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
314695b296d0Smrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
314795b296d0Smrg      else
314895b296d0Smrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
314995b296d0Smrg        fi
315095b296d0Smrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
315195b296d0Smrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
315295b296d0Smrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
315395b296d0Smrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
315495b296d0Smrg          else
315595b296d0Smrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
315695b296d0Smrg          fi
315795b296d0Smrg            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
315895b296d0Smrg      else
315995b296d0Smrg      case $cc_basename in
316095b296d0Smrg        xlc*)
316195b296d0Smrg         output_verbose_link_cmd='echo'
316295b296d0Smrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
316395b296d0Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
316495b296d0Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
316595b296d0Smrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
316695b296d0Smrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
316795b296d0Smrg          ;;
316895b296d0Smrg       *)
316995b296d0Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
317095b296d0Smrg          ;;
317195b296d0Smrg      esac
317295b296d0Smrg      fi
317395b296d0Smrg        ;;
317495b296d0Smrg
317595b296d0Smrg  dgux*)
317695b296d0Smrg    case $cc_basename in
317795b296d0Smrg      ec++*)
317895b296d0Smrg	# FIXME: insert proper C++ library support
317995b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
318095b296d0Smrg	;;
318195b296d0Smrg      ghcx*)
318295b296d0Smrg	# Green Hills C++ Compiler
318395b296d0Smrg	# FIXME: insert proper C++ library support
318495b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
318595b296d0Smrg	;;
318695b296d0Smrg      *)
318795b296d0Smrg	# FIXME: insert proper C++ library support
318895b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
318995b296d0Smrg	;;
319095b296d0Smrg    esac
319195b296d0Smrg    ;;
319295b296d0Smrg  freebsd[[12]]*)
319395b296d0Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
319495b296d0Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
319595b296d0Smrg    ;;
319695b296d0Smrg  freebsd-elf*)
319795b296d0Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
319895b296d0Smrg    ;;
319995b296d0Smrg  freebsd* | kfreebsd*-gnu | dragonfly*)
320095b296d0Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
320195b296d0Smrg    # conventions
320295b296d0Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
320395b296d0Smrg    ;;
320495b296d0Smrg  gnu*)
320595b296d0Smrg    ;;
320695b296d0Smrg  hpux9*)
320795b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
320895b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
320995b296d0Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
321095b296d0Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
321195b296d0Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
321295b296d0Smrg				# but as the default
321395b296d0Smrg				# location of the library.
321495b296d0Smrg
321595b296d0Smrg    case $cc_basename in
321695b296d0Smrg    CC*)
321795b296d0Smrg      # FIXME: insert proper C++ library support
321895b296d0Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
321995b296d0Smrg      ;;
322095b296d0Smrg    aCC*)
322195b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
322295b296d0Smrg      # Commands to make compiler produce verbose output that lists
322395b296d0Smrg      # what "hidden" libraries, object files and flags are used when
322495b296d0Smrg      # linking a shared library.
322595b296d0Smrg      #
322695b296d0Smrg      # There doesn't appear to be a way to prevent this compiler from
322795b296d0Smrg      # explicitly linking system object files so we need to strip them
322895b296d0Smrg      # from the output so that they don't get included in the library
322995b296d0Smrg      # dependencies.
323095b296d0Smrg      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
323195b296d0Smrg      ;;
323295b296d0Smrg    *)
323395b296d0Smrg      if test "$GXX" = yes; then
323495b296d0Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
323595b296d0Smrg      else
323695b296d0Smrg        # FIXME: insert proper C++ library support
323795b296d0Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
323895b296d0Smrg      fi
323995b296d0Smrg      ;;
324095b296d0Smrg    esac
324195b296d0Smrg    ;;
324295b296d0Smrg  hpux10*|hpux11*)
324395b296d0Smrg    if test $with_gnu_ld = no; then
324495b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
324595b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
324695b296d0Smrg
324795b296d0Smrg      case $host_cpu in
324895b296d0Smrg      hppa*64*|ia64*)
324995b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
325095b296d0Smrg        ;;
325195b296d0Smrg      *)
325295b296d0Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
325395b296d0Smrg        ;;
325495b296d0Smrg      esac
325595b296d0Smrg    fi
325695b296d0Smrg    case $host_cpu in
325795b296d0Smrg    hppa*64*|ia64*)
325895b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
325995b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
326095b296d0Smrg      ;;
326195b296d0Smrg    *)
326295b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
326395b296d0Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
326495b296d0Smrg					      # but as the default
326595b296d0Smrg					      # location of the library.
326695b296d0Smrg      ;;
326795b296d0Smrg    esac
326895b296d0Smrg
326995b296d0Smrg    case $cc_basename in
327095b296d0Smrg      CC*)
327195b296d0Smrg	# FIXME: insert proper C++ library support
327295b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
327395b296d0Smrg	;;
327495b296d0Smrg      aCC*)
327595b296d0Smrg	case $host_cpu in
327695b296d0Smrg	hppa*64*)
327795b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
327895b296d0Smrg	  ;;
327995b296d0Smrg	ia64*)
328095b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
328195b296d0Smrg	  ;;
328295b296d0Smrg	*)
328395b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
328495b296d0Smrg	  ;;
328595b296d0Smrg	esac
328695b296d0Smrg	# Commands to make compiler produce verbose output that lists
328795b296d0Smrg	# what "hidden" libraries, object files and flags are used when
328895b296d0Smrg	# linking a shared library.
328995b296d0Smrg	#
329095b296d0Smrg	# There doesn't appear to be a way to prevent this compiler from
329195b296d0Smrg	# explicitly linking system object files so we need to strip them
329295b296d0Smrg	# from the output so that they don't get included in the library
329395b296d0Smrg	# dependencies.
329495b296d0Smrg	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
329595b296d0Smrg	;;
329695b296d0Smrg      *)
329795b296d0Smrg	if test "$GXX" = yes; then
329895b296d0Smrg	  if test $with_gnu_ld = no; then
329995b296d0Smrg	    case $host_cpu in
330095b296d0Smrg	    hppa*64*)
330195b296d0Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
330295b296d0Smrg	      ;;
330395b296d0Smrg	    ia64*)
330495b296d0Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
330595b296d0Smrg	      ;;
330695b296d0Smrg	    *)
330795b296d0Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
330895b296d0Smrg	      ;;
330995b296d0Smrg	    esac
331095b296d0Smrg	  fi
331195b296d0Smrg	else
331295b296d0Smrg	  # FIXME: insert proper C++ library support
331395b296d0Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
331495b296d0Smrg	fi
331595b296d0Smrg	;;
331695b296d0Smrg    esac
331795b296d0Smrg    ;;
331895b296d0Smrg  interix3*)
331995b296d0Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
332095b296d0Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
332195b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
332295b296d0Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
332395b296d0Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
332495b296d0Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
332595b296d0Smrg    # default) and relocated if they conflict, which is a slow very memory
332695b296d0Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
332795b296d0Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
332895b296d0Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
332995b296d0Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
333095b296d0Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
333195b296d0Smrg    ;;
333295b296d0Smrg  irix5* | irix6*)
333395b296d0Smrg    case $cc_basename in
333495b296d0Smrg      CC*)
333595b296d0Smrg	# SGI C++
333695b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
333795b296d0Smrg
333895b296d0Smrg	# Archives containing C++ object files must be created using
333995b296d0Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
334095b296d0Smrg	# necessary to make sure instantiated templates are included
334195b296d0Smrg	# in the archive.
334295b296d0Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
334395b296d0Smrg	;;
334495b296d0Smrg      *)
334595b296d0Smrg	if test "$GXX" = yes; then
334695b296d0Smrg	  if test "$with_gnu_ld" = no; then
334795b296d0Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
334895b296d0Smrg	  else
334995b296d0Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
335095b296d0Smrg	  fi
335195b296d0Smrg	fi
335295b296d0Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
335395b296d0Smrg	;;
335495b296d0Smrg    esac
335595b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
335695b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
335795b296d0Smrg    ;;
335895b296d0Smrg  linux*)
335995b296d0Smrg    case $cc_basename in
336095b296d0Smrg      KCC*)
336195b296d0Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
336295b296d0Smrg
336395b296d0Smrg	# KCC will only create a shared library if the output file
336495b296d0Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
336595b296d0Smrg	# to its proper name (with version) after linking.
336695b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
336795b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
336895b296d0Smrg	# Commands to make compiler produce verbose output that lists
336995b296d0Smrg	# what "hidden" libraries, object files and flags are used when
337095b296d0Smrg	# linking a shared library.
337195b296d0Smrg	#
337295b296d0Smrg	# There doesn't appear to be a way to prevent this compiler from
337395b296d0Smrg	# explicitly linking system object files so we need to strip them
337495b296d0Smrg	# from the output so that they don't get included in the library
337595b296d0Smrg	# dependencies.
337695b296d0Smrg	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
337795b296d0Smrg
337895b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
337995b296d0Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
338095b296d0Smrg
338195b296d0Smrg	# Archives containing C++ object files must be created using
338295b296d0Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
338395b296d0Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
338495b296d0Smrg	;;
338595b296d0Smrg      icpc*)
338695b296d0Smrg	# Intel C++
338795b296d0Smrg	with_gnu_ld=yes
338895b296d0Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
338995b296d0Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
339095b296d0Smrg	# earlier do not add the objects themselves.
339195b296d0Smrg	case `$CC -V 2>&1` in
339295b296d0Smrg	*"Version 7."*)
339395b296d0Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
339495b296d0Smrg  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
339595b296d0Smrg	  ;;
339695b296d0Smrg	*)  # Version 8.0 or newer
339795b296d0Smrg	  tmp_idyn=
339895b296d0Smrg	  case $host_cpu in
339995b296d0Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
340095b296d0Smrg	  esac
340195b296d0Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
340295b296d0Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
340395b296d0Smrg	  ;;
340495b296d0Smrg	esac
340595b296d0Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
340695b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
340795b296d0Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
340895b296d0Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
340995b296d0Smrg	;;
341095b296d0Smrg      pgCC*)
341195b296d0Smrg        # Portland Group C++ compiler
341295b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
341395b296d0Smrg  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
341495b296d0Smrg
341595b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
341695b296d0Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
341795b296d0Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
341895b296d0Smrg        ;;
341995b296d0Smrg      cxx*)
342095b296d0Smrg	# Compaq C++
342195b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
342295b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
342395b296d0Smrg
342495b296d0Smrg	runpath_var=LD_RUN_PATH
342595b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
342695b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
342795b296d0Smrg
342895b296d0Smrg	# Commands to make compiler produce verbose output that lists
342995b296d0Smrg	# what "hidden" libraries, object files and flags are used when
343095b296d0Smrg	# linking a shared library.
343195b296d0Smrg	#
343295b296d0Smrg	# There doesn't appear to be a way to prevent this compiler from
343395b296d0Smrg	# explicitly linking system object files so we need to strip them
343495b296d0Smrg	# from the output so that they don't get included in the library
343595b296d0Smrg	# dependencies.
343695b296d0Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
343795b296d0Smrg	;;
343895b296d0Smrg    esac
343995b296d0Smrg    ;;
344095b296d0Smrg  lynxos*)
344195b296d0Smrg    # FIXME: insert proper C++ library support
344295b296d0Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
344395b296d0Smrg    ;;
344495b296d0Smrg  m88k*)
344595b296d0Smrg    # FIXME: insert proper C++ library support
344695b296d0Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
344795b296d0Smrg    ;;
344895b296d0Smrg  mvs*)
344995b296d0Smrg    case $cc_basename in
345095b296d0Smrg      cxx*)
345195b296d0Smrg	# FIXME: insert proper C++ library support
345295b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
345395b296d0Smrg	;;
345495b296d0Smrg      *)
345595b296d0Smrg	# FIXME: insert proper C++ library support
345695b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
345795b296d0Smrg	;;
345895b296d0Smrg    esac
345995b296d0Smrg    ;;
346095b296d0Smrg  netbsd*)
346195b296d0Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
346295b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
346395b296d0Smrg      wlarc=
346495b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
346595b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
346695b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
346795b296d0Smrg    fi
346895b296d0Smrg    # Workaround some broken pre-1.5 toolchains
346995b296d0Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
347095b296d0Smrg    ;;
347195b296d0Smrg  openbsd2*)
347295b296d0Smrg    # C++ shared libraries are fairly broken
347395b296d0Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
347495b296d0Smrg    ;;
347595b296d0Smrg  openbsd*)
347695b296d0Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
347795b296d0Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
347895b296d0Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
347995b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
348095b296d0Smrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
348195b296d0Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
348295b296d0Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
348395b296d0Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
348495b296d0Smrg    fi
348595b296d0Smrg    output_verbose_link_cmd='echo'
348695b296d0Smrg    ;;
348795b296d0Smrg  osf3*)
348895b296d0Smrg    case $cc_basename in
348995b296d0Smrg      KCC*)
349095b296d0Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
349195b296d0Smrg
349295b296d0Smrg	# KCC will only create a shared library if the output file
349395b296d0Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
349495b296d0Smrg	# to its proper name (with version) after linking.
349595b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
349695b296d0Smrg
349795b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
349895b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
349995b296d0Smrg
350095b296d0Smrg	# Archives containing C++ object files must be created using
350195b296d0Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
350295b296d0Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
350395b296d0Smrg
350495b296d0Smrg	;;
350595b296d0Smrg      RCC*)
350695b296d0Smrg	# Rational C++ 2.4.1
350795b296d0Smrg	# FIXME: insert proper C++ library support
350895b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
350995b296d0Smrg	;;
351095b296d0Smrg      cxx*)
351195b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
351295b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
351395b296d0Smrg
351495b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
351595b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
351695b296d0Smrg
351795b296d0Smrg	# Commands to make compiler produce verbose output that lists
351895b296d0Smrg	# what "hidden" libraries, object files and flags are used when
351995b296d0Smrg	# linking a shared library.
352095b296d0Smrg	#
352195b296d0Smrg	# There doesn't appear to be a way to prevent this compiler from
352295b296d0Smrg	# explicitly linking system object files so we need to strip them
352395b296d0Smrg	# from the output so that they don't get included in the library
352495b296d0Smrg	# dependencies.
352595b296d0Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
352695b296d0Smrg	;;
352795b296d0Smrg      *)
352895b296d0Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
352995b296d0Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
353095b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
353195b296d0Smrg
353295b296d0Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
353395b296d0Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
353495b296d0Smrg
353595b296d0Smrg	  # Commands to make compiler produce verbose output that lists
353695b296d0Smrg	  # what "hidden" libraries, object files and flags are used when
353795b296d0Smrg	  # linking a shared library.
353895b296d0Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
353995b296d0Smrg
354095b296d0Smrg	else
354195b296d0Smrg	  # FIXME: insert proper C++ library support
354295b296d0Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
354395b296d0Smrg	fi
354495b296d0Smrg	;;
354595b296d0Smrg    esac
354695b296d0Smrg    ;;
354795b296d0Smrg  osf4* | osf5*)
354895b296d0Smrg    case $cc_basename in
354995b296d0Smrg      KCC*)
355095b296d0Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
355195b296d0Smrg
355295b296d0Smrg	# KCC will only create a shared library if the output file
355395b296d0Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
355495b296d0Smrg	# to its proper name (with version) after linking.
355595b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
355695b296d0Smrg
355795b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
355895b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
355995b296d0Smrg
356095b296d0Smrg	# Archives containing C++ object files must be created using
356195b296d0Smrg	# the KAI C++ compiler.
356295b296d0Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
356395b296d0Smrg	;;
356495b296d0Smrg      RCC*)
356595b296d0Smrg	# Rational C++ 2.4.1
356695b296d0Smrg	# FIXME: insert proper C++ library support
356795b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
356895b296d0Smrg	;;
356995b296d0Smrg      cxx*)
357095b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
357195b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
357295b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
357395b296d0Smrg	  echo "-hidden">> $lib.exp~
357495b296d0Smrg	  $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~
357595b296d0Smrg	  $rm $lib.exp'
357695b296d0Smrg
357795b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
357895b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
357995b296d0Smrg
358095b296d0Smrg	# Commands to make compiler produce verbose output that lists
358195b296d0Smrg	# what "hidden" libraries, object files and flags are used when
358295b296d0Smrg	# linking a shared library.
358395b296d0Smrg	#
358495b296d0Smrg	# There doesn't appear to be a way to prevent this compiler from
358595b296d0Smrg	# explicitly linking system object files so we need to strip them
358695b296d0Smrg	# from the output so that they don't get included in the library
358795b296d0Smrg	# dependencies.
358895b296d0Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
358995b296d0Smrg	;;
359095b296d0Smrg      *)
359195b296d0Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
359295b296d0Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
359395b296d0Smrg	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
359495b296d0Smrg
359595b296d0Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
359695b296d0Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
359795b296d0Smrg
359895b296d0Smrg	  # Commands to make compiler produce verbose output that lists
359995b296d0Smrg	  # what "hidden" libraries, object files and flags are used when
360095b296d0Smrg	  # linking a shared library.
360195b296d0Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
360295b296d0Smrg
360395b296d0Smrg	else
360495b296d0Smrg	  # FIXME: insert proper C++ library support
360595b296d0Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
360695b296d0Smrg	fi
360795b296d0Smrg	;;
360895b296d0Smrg    esac
360995b296d0Smrg    ;;
361095b296d0Smrg  psos*)
361195b296d0Smrg    # FIXME: insert proper C++ library support
361295b296d0Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
361395b296d0Smrg    ;;
361495b296d0Smrg  sunos4*)
361595b296d0Smrg    case $cc_basename in
361695b296d0Smrg      CC*)
361795b296d0Smrg	# Sun C++ 4.x
361895b296d0Smrg	# FIXME: insert proper C++ library support
361995b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
362095b296d0Smrg	;;
362195b296d0Smrg      lcc*)
362295b296d0Smrg	# Lucid
362395b296d0Smrg	# FIXME: insert proper C++ library support
362495b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
362595b296d0Smrg	;;
362695b296d0Smrg      *)
362795b296d0Smrg	# FIXME: insert proper C++ library support
362895b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
362995b296d0Smrg	;;
363095b296d0Smrg    esac
363195b296d0Smrg    ;;
363295b296d0Smrg  solaris*)
363395b296d0Smrg    case $cc_basename in
363495b296d0Smrg      CC*)
363595b296d0Smrg	# Sun C++ 4.2, 5.x and Centerline C++
363695b296d0Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
363795b296d0Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
363895b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
363995b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
364095b296d0Smrg	$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'
364195b296d0Smrg
364295b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
364395b296d0Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
364495b296d0Smrg	case $host_os in
364595b296d0Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
364695b296d0Smrg	  *)
364795b296d0Smrg	    # The C++ compiler is used as linker so we must use $wl
364895b296d0Smrg	    # flag to pass the commands to the underlying system
364995b296d0Smrg	    # linker. We must also pass each convience library through
365095b296d0Smrg	    # to the system linker between allextract/defaultextract.
365195b296d0Smrg	    # The C++ compiler will combine linker options so we
365295b296d0Smrg	    # cannot just pass the convience library names through
365395b296d0Smrg	    # without $wl.
365495b296d0Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
365595b296d0Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
365695b296d0Smrg	    ;;
365795b296d0Smrg	esac
365895b296d0Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
365995b296d0Smrg
366095b296d0Smrg	output_verbose_link_cmd='echo'
366195b296d0Smrg
366295b296d0Smrg	# Archives containing C++ object files must be created using
366395b296d0Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
366495b296d0Smrg	# necessary to make sure instantiated templates are included
366595b296d0Smrg	# in the archive.
366695b296d0Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
366795b296d0Smrg	;;
366895b296d0Smrg      gcx*)
366995b296d0Smrg	# Green Hills C++ Compiler
367095b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
367195b296d0Smrg
367295b296d0Smrg	# The C++ compiler must be used to create the archive.
367395b296d0Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
367495b296d0Smrg	;;
367595b296d0Smrg      *)
367695b296d0Smrg	# GNU C++ compiler with Solaris linker
367795b296d0Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
367895b296d0Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
367995b296d0Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
368095b296d0Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
368195b296d0Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
368295b296d0Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
368395b296d0Smrg
368495b296d0Smrg	    # Commands to make compiler produce verbose output that lists
368595b296d0Smrg	    # what "hidden" libraries, object files and flags are used when
368695b296d0Smrg	    # linking a shared library.
368795b296d0Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
368895b296d0Smrg	  else
368995b296d0Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
369095b296d0Smrg	    # platform.
369195b296d0Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
369295b296d0Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
369395b296d0Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
369495b296d0Smrg
369595b296d0Smrg	    # Commands to make compiler produce verbose output that lists
369695b296d0Smrg	    # what "hidden" libraries, object files and flags are used when
369795b296d0Smrg	    # linking a shared library.
369895b296d0Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
369995b296d0Smrg	  fi
370095b296d0Smrg
370195b296d0Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
370295b296d0Smrg	fi
370395b296d0Smrg	;;
370495b296d0Smrg    esac
370595b296d0Smrg    ;;
370695b296d0Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
370795b296d0Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
370895b296d0Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
370995b296d0Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
371095b296d0Smrg    runpath_var='LD_RUN_PATH'
371195b296d0Smrg
371295b296d0Smrg    case $cc_basename in
371395b296d0Smrg      CC*)
371495b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
371595b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
371695b296d0Smrg	;;
371795b296d0Smrg      *)
371895b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
371995b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
372095b296d0Smrg	;;
372195b296d0Smrg    esac
372295b296d0Smrg    ;;
372395b296d0Smrg  sysv5* | sco3.2v5* | sco5v6*)
372495b296d0Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
372595b296d0Smrg    # link with -lc, and that would cause any symbols used from libc to
372695b296d0Smrg    # always be unresolved, which means just about no library would
372795b296d0Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
372895b296d0Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
372995b296d0Smrg    # as -z defs.
373095b296d0Smrg    # For security reasons, it is highly recommended that you always
373195b296d0Smrg    # use absolute paths for naming shared libraries, and exclude the
373295b296d0Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
373395b296d0Smrg    # requires that you compile everything twice, which is a pain.
373495b296d0Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
373595b296d0Smrg    # non-empty value in the environment.  Most likely only useful for
373695b296d0Smrg    # creating official distributions of packages.
373795b296d0Smrg    # This is a hack until libtool officially supports absolute path
373895b296d0Smrg    # names for shared libraries.
373995b296d0Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
374095b296d0Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
374195b296d0Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
374295b296d0Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
374395b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
374495b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
374595b296d0Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
374695b296d0Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
374795b296d0Smrg    runpath_var='LD_RUN_PATH'
374895b296d0Smrg
374995b296d0Smrg    case $cc_basename in
375095b296d0Smrg      CC*)
375195b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
375295b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
375395b296d0Smrg	;;
375495b296d0Smrg      *)
375595b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
375695b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
375795b296d0Smrg	;;
375895b296d0Smrg    esac
375995b296d0Smrg    ;;
376095b296d0Smrg  tandem*)
376195b296d0Smrg    case $cc_basename in
376295b296d0Smrg      NCC*)
376395b296d0Smrg	# NonStop-UX NCC 3.20
376495b296d0Smrg	# FIXME: insert proper C++ library support
376595b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
376695b296d0Smrg	;;
376795b296d0Smrg      *)
376895b296d0Smrg	# FIXME: insert proper C++ library support
376995b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
377095b296d0Smrg	;;
377195b296d0Smrg    esac
377295b296d0Smrg    ;;
377395b296d0Smrg  vxworks*)
377495b296d0Smrg    # FIXME: insert proper C++ library support
377595b296d0Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
377695b296d0Smrg    ;;
377795b296d0Smrg  *)
377895b296d0Smrg    # FIXME: insert proper C++ library support
377995b296d0Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
378095b296d0Smrg    ;;
378195b296d0Smrgesac
378295b296d0SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
378395b296d0Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
378495b296d0Smrg
378595b296d0Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
378695b296d0Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
378795b296d0Smrg
378895b296d0SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
378995b296d0SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
379095b296d0SmrgAC_LIBTOOL_PROG_CC_C_O($1)
379195b296d0SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
379295b296d0SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
379395b296d0SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
379495b296d0SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
379595b296d0Smrg
379695b296d0SmrgAC_LIBTOOL_CONFIG($1)
379795b296d0Smrg
379895b296d0SmrgAC_LANG_POP
379995b296d0SmrgCC=$lt_save_CC
380095b296d0SmrgLDCXX=$LD
380195b296d0SmrgLD=$lt_save_LD
380295b296d0SmrgGCC=$lt_save_GCC
380395b296d0Smrgwith_gnu_ldcxx=$with_gnu_ld
380495b296d0Smrgwith_gnu_ld=$lt_save_with_gnu_ld
380595b296d0Smrglt_cv_path_LDCXX=$lt_cv_path_LD
380695b296d0Smrglt_cv_path_LD=$lt_save_path_LD
380795b296d0Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
380895b296d0Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
380995b296d0Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
381095b296d0Smrg
381195b296d0Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
381295b296d0Smrg# ------------------------------------
381395b296d0Smrg# Figure out "hidden" library dependencies from verbose
381495b296d0Smrg# compiler output when linking a shared library.
381595b296d0Smrg# Parse the compiler output and extract the necessary
381695b296d0Smrg# objects, libraries and library flags.
381795b296d0SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
381895b296d0Smrgdnl we can't use the lt_simple_compile_test_code here,
381995b296d0Smrgdnl because it contains code intended for an executable,
382095b296d0Smrgdnl not a library.  It's possible we should let each
382195b296d0Smrgdnl tag define a new lt_????_link_test_code variable,
382295b296d0Smrgdnl but it's only used here...
382395b296d0Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
382495b296d0Smrgint a;
382595b296d0Smrgvoid foo (void) { a = 0; }
382695b296d0SmrgEOF
382795b296d0Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
382895b296d0Smrgclass Foo
382995b296d0Smrg{
383095b296d0Smrgpublic:
383195b296d0Smrg  Foo (void) { a = 0; }
383295b296d0Smrgprivate:
383395b296d0Smrg  int a;
383495b296d0Smrg};
383595b296d0SmrgEOF
383695b296d0Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
383795b296d0Smrg      subroutine foo
383895b296d0Smrg      implicit none
383995b296d0Smrg      integer*4 a
384095b296d0Smrg      a=0
384195b296d0Smrg      return
384295b296d0Smrg      end
384395b296d0SmrgEOF
384495b296d0Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
384595b296d0Smrgpublic class foo {
384695b296d0Smrg  private int a;
384795b296d0Smrg  public void bar (void) {
384895b296d0Smrg    a = 0;
384995b296d0Smrg  }
385095b296d0Smrg};
385195b296d0SmrgEOF
385295b296d0Smrg])
385395b296d0Smrgdnl Parse the compiler output and extract the necessary
385495b296d0Smrgdnl objects, libraries and library flags.
385595b296d0Smrgif AC_TRY_EVAL(ac_compile); then
385695b296d0Smrg  # Parse the compiler output and extract the necessary
385795b296d0Smrg  # objects, libraries and library flags.
385895b296d0Smrg
385995b296d0Smrg  # Sentinel used to keep track of whether or not we are before
386095b296d0Smrg  # the conftest object file.
386195b296d0Smrg  pre_test_object_deps_done=no
386295b296d0Smrg
386395b296d0Smrg  # The `*' in the case matches for architectures that use `case' in
386495b296d0Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
386595b296d0Smrg  # eval without this substitution.
386695b296d0Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
386795b296d0Smrg
386895b296d0Smrg  for p in `eval $output_verbose_link_cmd`; do
386995b296d0Smrg    case $p in
387095b296d0Smrg
387195b296d0Smrg    -L* | -R* | -l*)
387295b296d0Smrg       # Some compilers place space between "-{L,R}" and the path.
387395b296d0Smrg       # Remove the space.
387495b296d0Smrg       if test $p = "-L" \
387595b296d0Smrg	  || test $p = "-R"; then
387695b296d0Smrg	 prev=$p
387795b296d0Smrg	 continue
387895b296d0Smrg       else
387995b296d0Smrg	 prev=
388095b296d0Smrg       fi
388195b296d0Smrg
388295b296d0Smrg       if test "$pre_test_object_deps_done" = no; then
388395b296d0Smrg	 case $p in
388495b296d0Smrg	 -L* | -R*)
388595b296d0Smrg	   # Internal compiler library paths should come after those
388695b296d0Smrg	   # provided the user.  The postdeps already come after the
388795b296d0Smrg	   # user supplied libs so there is no need to process them.
388895b296d0Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
388995b296d0Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
389095b296d0Smrg	   else
389195b296d0Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
389295b296d0Smrg	   fi
389395b296d0Smrg	   ;;
389495b296d0Smrg	 # The "-l" case would never come before the object being
389595b296d0Smrg	 # linked, so don't bother handling this case.
389695b296d0Smrg	 esac
389795b296d0Smrg       else
389895b296d0Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
389995b296d0Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
390095b296d0Smrg	 else
390195b296d0Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
390295b296d0Smrg	 fi
390395b296d0Smrg       fi
390495b296d0Smrg       ;;
390595b296d0Smrg
390695b296d0Smrg    *.$objext)
390795b296d0Smrg       # This assumes that the test object file only shows up
390895b296d0Smrg       # once in the compiler output.
390995b296d0Smrg       if test "$p" = "conftest.$objext"; then
391095b296d0Smrg	 pre_test_object_deps_done=yes
391195b296d0Smrg	 continue
391295b296d0Smrg       fi
391395b296d0Smrg
391495b296d0Smrg       if test "$pre_test_object_deps_done" = no; then
391595b296d0Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
391695b296d0Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
391795b296d0Smrg	 else
391895b296d0Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
391995b296d0Smrg	 fi
392095b296d0Smrg       else
392195b296d0Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
392295b296d0Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
392395b296d0Smrg	 else
392495b296d0Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
392595b296d0Smrg	 fi
392695b296d0Smrg       fi
392795b296d0Smrg       ;;
392895b296d0Smrg
392995b296d0Smrg    *) ;; # Ignore the rest.
393095b296d0Smrg
393195b296d0Smrg    esac
393295b296d0Smrg  done
393395b296d0Smrg
393495b296d0Smrg  # Clean up.
393595b296d0Smrg  rm -f a.out a.exe
393695b296d0Smrgelse
393795b296d0Smrg  echo "libtool.m4: error: problem compiling $1 test program"
393895b296d0Smrgfi
393995b296d0Smrg
394095b296d0Smrg$rm -f confest.$objext
394195b296d0Smrg
394295b296d0Smrg# PORTME: override above test on systems where it is broken
394395b296d0Smrgifelse([$1],[CXX],
394495b296d0Smrg[case $host_os in
394595b296d0Smrginterix3*)
394695b296d0Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
394795b296d0Smrg  # hack all around it, let's just trust "g++" to DTRT.
394895b296d0Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
394995b296d0Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
395095b296d0Smrg  _LT_AC_TAGVAR(postdeps,$1)=
395195b296d0Smrg  ;;
395295b296d0Smrg
395395b296d0Smrgsolaris*)
395495b296d0Smrg  case $cc_basename in
395595b296d0Smrg  CC*)
395695b296d0Smrg    # Adding this requires a known-good setup of shared libraries for
395795b296d0Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
395895b296d0Smrg    # archive will be linked into the output, leading to subtle bugs.
395995b296d0Smrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
396095b296d0Smrg    ;;
396195b296d0Smrg  esac
396295b296d0Smrg  ;;
396395b296d0Smrgesac
396495b296d0Smrg])
396595b296d0Smrg
396695b296d0Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
396795b296d0Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
396895b296d0Smrgesac
396995b296d0Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
397095b296d0Smrg
397195b296d0Smrg# AC_LIBTOOL_LANG_F77_CONFIG
397295b296d0Smrg# --------------------------
397395b296d0Smrg# Ensure that the configuration vars for the C compiler are
397495b296d0Smrg# suitably defined.  Those variables are subsequently used by
397595b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
397695b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
397795b296d0SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
397895b296d0Smrg[AC_REQUIRE([AC_PROG_F77])
397995b296d0SmrgAC_LANG_PUSH(Fortran 77)
398095b296d0Smrg
398195b296d0Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
398295b296d0Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
398395b296d0Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
398495b296d0Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
398595b296d0Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
398695b296d0Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
398795b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
398895b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
398995b296d0Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
399095b296d0Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
399195b296d0Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
399295b296d0Smrg_LT_AC_TAGVAR(module_cmds, $1)=
399395b296d0Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
399495b296d0Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
399595b296d0Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
399695b296d0Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
399795b296d0Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
399895b296d0Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
399995b296d0Smrg
400095b296d0Smrg# Source file extension for f77 test sources.
400195b296d0Smrgac_ext=f
400295b296d0Smrg
400395b296d0Smrg# Object file extension for compiled f77 test sources.
400495b296d0Smrgobjext=o
400595b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext
400695b296d0Smrg
400795b296d0Smrg# Code to be used in simple compile tests
400895b296d0Smrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
400995b296d0Smrg
401095b296d0Smrg# Code to be used in simple link tests
401195b296d0Smrglt_simple_link_test_code="      program t\n      end\n"
401295b296d0Smrg
401395b296d0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
401495b296d0Smrg_LT_AC_SYS_COMPILER
401595b296d0Smrg
401695b296d0Smrg# save warnings/boilerplate of simple test code
401795b296d0Smrg_LT_COMPILER_BOILERPLATE
401895b296d0Smrg_LT_LINKER_BOILERPLATE
401995b296d0Smrg
402095b296d0Smrg# Allow CC to be a program name with arguments.
402195b296d0Smrglt_save_CC="$CC"
402295b296d0SmrgCC=${F77-"f77"}
402395b296d0Smrgcompiler=$CC
402495b296d0Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
402595b296d0Smrg_LT_CC_BASENAME([$compiler])
402695b296d0Smrg
402795b296d0SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
402895b296d0SmrgAC_MSG_RESULT([$can_build_shared])
402995b296d0Smrg
403095b296d0SmrgAC_MSG_CHECKING([whether to build shared libraries])
403195b296d0Smrgtest "$can_build_shared" = "no" && enable_shared=no
403295b296d0Smrg
403395b296d0Smrg# On AIX, shared libraries and static libraries use the same namespace, and
403495b296d0Smrg# are all built from PIC.
403595b296d0Smrgcase $host_os in
403695b296d0Smrgaix3*)
403795b296d0Smrg  test "$enable_shared" = yes && enable_static=no
403895b296d0Smrg  if test -n "$RANLIB"; then
403995b296d0Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
404095b296d0Smrg    postinstall_cmds='$RANLIB $lib'
404195b296d0Smrg  fi
404295b296d0Smrg  ;;
404395b296d0Smrgaix4* | aix5*)
404495b296d0Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
404595b296d0Smrg    test "$enable_shared" = yes && enable_static=no
404695b296d0Smrg  fi
404795b296d0Smrg  ;;
404895b296d0Smrgesac
404995b296d0SmrgAC_MSG_RESULT([$enable_shared])
405095b296d0Smrg
405195b296d0SmrgAC_MSG_CHECKING([whether to build static libraries])
405295b296d0Smrg# Make sure either enable_shared or enable_static is yes.
405395b296d0Smrgtest "$enable_shared" = yes || enable_static=yes
405495b296d0SmrgAC_MSG_RESULT([$enable_static])
405595b296d0Smrg
405695b296d0Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
405795b296d0Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
405895b296d0Smrg
405995b296d0SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
406095b296d0SmrgAC_LIBTOOL_PROG_CC_C_O($1)
406195b296d0SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
406295b296d0SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
406395b296d0SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
406495b296d0SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
406595b296d0Smrg
406695b296d0SmrgAC_LIBTOOL_CONFIG($1)
406795b296d0Smrg
406895b296d0SmrgAC_LANG_POP
406995b296d0SmrgCC="$lt_save_CC"
407095b296d0Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
407195b296d0Smrg
407295b296d0Smrg
407395b296d0Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
407495b296d0Smrg# --------------------------
407595b296d0Smrg# Ensure that the configuration vars for the C compiler are
407695b296d0Smrg# suitably defined.  Those variables are subsequently used by
407795b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
407895b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
407995b296d0SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
408095b296d0Smrg[AC_LANG_SAVE
408195b296d0Smrg
408295b296d0Smrg# Source file extension for Java test sources.
408395b296d0Smrgac_ext=java
408495b296d0Smrg
408595b296d0Smrg# Object file extension for compiled Java test sources.
408695b296d0Smrgobjext=o
408795b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext
408895b296d0Smrg
408995b296d0Smrg# Code to be used in simple compile tests
409095b296d0Smrglt_simple_compile_test_code="class foo {}\n"
409195b296d0Smrg
409295b296d0Smrg# Code to be used in simple link tests
409395b296d0Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
409495b296d0Smrg
409595b296d0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
409695b296d0Smrg_LT_AC_SYS_COMPILER
409795b296d0Smrg
409895b296d0Smrg# save warnings/boilerplate of simple test code
409995b296d0Smrg_LT_COMPILER_BOILERPLATE
410095b296d0Smrg_LT_LINKER_BOILERPLATE
410195b296d0Smrg
410295b296d0Smrg# Allow CC to be a program name with arguments.
410395b296d0Smrglt_save_CC="$CC"
410495b296d0SmrgCC=${GCJ-"gcj"}
410595b296d0Smrgcompiler=$CC
410695b296d0Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
410795b296d0Smrg_LT_CC_BASENAME([$compiler])
410895b296d0Smrg
410995b296d0Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
411095b296d0Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
411195b296d0Smrg
411295b296d0Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
411395b296d0Smrg
411495b296d0SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
411595b296d0SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
411695b296d0SmrgAC_LIBTOOL_PROG_CC_C_O($1)
411795b296d0SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
411895b296d0SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
411995b296d0SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
412095b296d0SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
412195b296d0Smrg
412295b296d0SmrgAC_LIBTOOL_CONFIG($1)
412395b296d0Smrg
412495b296d0SmrgAC_LANG_RESTORE
412595b296d0SmrgCC="$lt_save_CC"
412695b296d0Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
412795b296d0Smrg
412895b296d0Smrg
412995b296d0Smrg# AC_LIBTOOL_LANG_RC_CONFIG
413095b296d0Smrg# -------------------------
413195b296d0Smrg# Ensure that the configuration vars for the Windows resource compiler are
413295b296d0Smrg# suitably defined.  Those variables are subsequently used by
413395b296d0Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
413495b296d0SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
413595b296d0SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
413695b296d0Smrg[AC_LANG_SAVE
413795b296d0Smrg
413895b296d0Smrg# Source file extension for RC test sources.
413995b296d0Smrgac_ext=rc
414095b296d0Smrg
414195b296d0Smrg# Object file extension for compiled RC test sources.
414295b296d0Smrgobjext=o
414395b296d0Smrg_LT_AC_TAGVAR(objext, $1)=$objext
414495b296d0Smrg
414595b296d0Smrg# Code to be used in simple compile tests
414695b296d0Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
414795b296d0Smrg
414895b296d0Smrg# Code to be used in simple link tests
414995b296d0Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
415095b296d0Smrg
415195b296d0Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
415295b296d0Smrg_LT_AC_SYS_COMPILER
415395b296d0Smrg
415495b296d0Smrg# save warnings/boilerplate of simple test code
415595b296d0Smrg_LT_COMPILER_BOILERPLATE
415695b296d0Smrg_LT_LINKER_BOILERPLATE
415795b296d0Smrg
415895b296d0Smrg# Allow CC to be a program name with arguments.
415995b296d0Smrglt_save_CC="$CC"
416095b296d0SmrgCC=${RC-"windres"}
416195b296d0Smrgcompiler=$CC
416295b296d0Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
416395b296d0Smrg_LT_CC_BASENAME([$compiler])
416495b296d0Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
416595b296d0Smrg
416695b296d0SmrgAC_LIBTOOL_CONFIG($1)
416795b296d0Smrg
416895b296d0SmrgAC_LANG_RESTORE
416995b296d0SmrgCC="$lt_save_CC"
417095b296d0Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
417195b296d0Smrg
417295b296d0Smrg
417395b296d0Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
417495b296d0Smrg# ----------------------------
417595b296d0Smrg# If TAGNAME is not passed, then create an initial libtool script
417695b296d0Smrg# with a default configuration from the untagged config vars.  Otherwise
417795b296d0Smrg# add code to config.status for appending the configuration named by
417895b296d0Smrg# TAGNAME from the matching tagged config vars.
417995b296d0SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
418095b296d0Smrg[# The else clause should only fire when bootstrapping the
418195b296d0Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
418295b296d0Smrg# with your package, and you will get complaints that there are
418395b296d0Smrg# no rules to generate ltmain.sh.
418495b296d0Smrgif test -f "$ltmain"; then
418595b296d0Smrg  # See if we are running on zsh, and set the options which allow our commands through
418695b296d0Smrg  # without removal of \ escapes.
418795b296d0Smrg  if test -n "${ZSH_VERSION+set}" ; then
418895b296d0Smrg    setopt NO_GLOB_SUBST
418995b296d0Smrg  fi
419095b296d0Smrg  # Now quote all the things that may contain metacharacters while being
419195b296d0Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
419295b296d0Smrg  # variables and quote the copies for generation of the libtool script.
419395b296d0Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
419495b296d0Smrg    SED SHELL STRIP \
419595b296d0Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
419695b296d0Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
419795b296d0Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
419895b296d0Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
419995b296d0Smrg    lt_cv_sys_global_symbol_to_c_name_address \
420095b296d0Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
420195b296d0Smrg    old_postinstall_cmds old_postuninstall_cmds \
420295b296d0Smrg    _LT_AC_TAGVAR(compiler, $1) \
420395b296d0Smrg    _LT_AC_TAGVAR(CC, $1) \
420495b296d0Smrg    _LT_AC_TAGVAR(LD, $1) \
420595b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
420695b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
420795b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
420895b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
420995b296d0Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
421095b296d0Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
421195b296d0Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
421295b296d0Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
421395b296d0Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
421495b296d0Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
421595b296d0Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
421695b296d0Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
421795b296d0Smrg    _LT_AC_TAGVAR(predeps, $1) \
421895b296d0Smrg    _LT_AC_TAGVAR(postdeps, $1) \
421995b296d0Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
422095b296d0Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
422195b296d0Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
422295b296d0Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
422395b296d0Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
422495b296d0Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
422595b296d0Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
422695b296d0Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
422795b296d0Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
422895b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
422995b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
423095b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
423195b296d0Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
423295b296d0Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
423395b296d0Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
423495b296d0Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
423595b296d0Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
423695b296d0Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
423795b296d0Smrg
423895b296d0Smrg    case $var in
423995b296d0Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
424095b296d0Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
424195b296d0Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
424295b296d0Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
424395b296d0Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
424495b296d0Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
424595b296d0Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
424695b296d0Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
424795b296d0Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
424895b296d0Smrg    postinstall_cmds | postuninstall_cmds | \
424995b296d0Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
425095b296d0Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
425195b296d0Smrg      # Double-quote double-evaled strings.
425295b296d0Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
425395b296d0Smrg      ;;
425495b296d0Smrg    *)
425595b296d0Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
425695b296d0Smrg      ;;
425795b296d0Smrg    esac
425895b296d0Smrg  done
425995b296d0Smrg
426095b296d0Smrg  case $lt_echo in
426195b296d0Smrg  *'\[$]0 --fallback-echo"')
426295b296d0Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
426395b296d0Smrg    ;;
426495b296d0Smrg  esac
426595b296d0Smrg
426695b296d0Smrgifelse([$1], [],
426795b296d0Smrg  [cfgfile="${ofile}T"
426895b296d0Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
426995b296d0Smrg  $rm -f "$cfgfile"
427095b296d0Smrg  AC_MSG_NOTICE([creating $ofile])],
427195b296d0Smrg  [cfgfile="$ofile"])
427295b296d0Smrg
427395b296d0Smrg  cat <<__EOF__ >> "$cfgfile"
427495b296d0Smrgifelse([$1], [],
427595b296d0Smrg[#! $SHELL
427695b296d0Smrg
427795b296d0Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
427895b296d0Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
427995b296d0Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
428095b296d0Smrg#
428195b296d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
428295b296d0Smrg# Free Software Foundation, Inc.
428395b296d0Smrg#
428495b296d0Smrg# This file is part of GNU Libtool:
428595b296d0Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
428695b296d0Smrg#
428795b296d0Smrg# This program is free software; you can redistribute it and/or modify
428895b296d0Smrg# it under the terms of the GNU General Public License as published by
428995b296d0Smrg# the Free Software Foundation; either version 2 of the License, or
429095b296d0Smrg# (at your option) any later version.
429195b296d0Smrg#
429295b296d0Smrg# This program is distributed in the hope that it will be useful, but
429395b296d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
429495b296d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
429595b296d0Smrg# General Public License for more details.
429695b296d0Smrg#
429795b296d0Smrg# You should have received a copy of the GNU General Public License
429895b296d0Smrg# along with this program; if not, write to the Free Software
429995b296d0Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
430095b296d0Smrg#
430195b296d0Smrg# As a special exception to the GNU General Public License, if you
430295b296d0Smrg# distribute this file as part of a program that contains a
430395b296d0Smrg# configuration script generated by Autoconf, you may include it under
430495b296d0Smrg# the same distribution terms that you use for the rest of that program.
430595b296d0Smrg
430695b296d0Smrg# A sed program that does not truncate output.
430795b296d0SmrgSED=$lt_SED
430895b296d0Smrg
430995b296d0Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
431095b296d0SmrgXsed="$SED -e 1s/^X//"
431195b296d0Smrg
431295b296d0Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
431395b296d0Smrg# if CDPATH is set.
431495b296d0Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
431595b296d0Smrg
431695b296d0Smrg# The names of the tagged configurations supported by this script.
431795b296d0Smrgavailable_tags=
431895b296d0Smrg
431995b296d0Smrg# ### BEGIN LIBTOOL CONFIG],
432095b296d0Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
432195b296d0Smrg
432295b296d0Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
432395b296d0Smrg
432495b296d0Smrg# Shell to use when invoking shell scripts.
432595b296d0SmrgSHELL=$lt_SHELL
432695b296d0Smrg
432795b296d0Smrg# Whether or not to build shared libraries.
432895b296d0Smrgbuild_libtool_libs=$enable_shared
432995b296d0Smrg
433095b296d0Smrg# Whether or not to build static libraries.
433195b296d0Smrgbuild_old_libs=$enable_static
433295b296d0Smrg
433395b296d0Smrg# Whether or not to add -lc for building shared libraries.
433495b296d0Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
433595b296d0Smrg
433695b296d0Smrg# Whether or not to disallow shared libs when runtime libs are static
433795b296d0Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
433895b296d0Smrg
433995b296d0Smrg# Whether or not to optimize for fast installation.
434095b296d0Smrgfast_install=$enable_fast_install
434195b296d0Smrg
434295b296d0Smrg# The host system.
434395b296d0Smrghost_alias=$host_alias
434495b296d0Smrghost=$host
434595b296d0Smrghost_os=$host_os
434695b296d0Smrg
434795b296d0Smrg# The build system.
434895b296d0Smrgbuild_alias=$build_alias
434995b296d0Smrgbuild=$build
435095b296d0Smrgbuild_os=$build_os
435195b296d0Smrg
435295b296d0Smrg# An echo program that does not interpret backslashes.
435395b296d0Smrgecho=$lt_echo
435495b296d0Smrg
435595b296d0Smrg# The archiver.
435695b296d0SmrgAR=$lt_AR
435795b296d0SmrgAR_FLAGS=$lt_AR_FLAGS
435895b296d0Smrg
435995b296d0Smrg# A C compiler.
436095b296d0SmrgLTCC=$lt_LTCC
436195b296d0Smrg
436295b296d0Smrg# LTCC compiler flags.
436395b296d0SmrgLTCFLAGS=$lt_LTCFLAGS
436495b296d0Smrg
436595b296d0Smrg# A language-specific compiler.
436695b296d0SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
436795b296d0Smrg
436895b296d0Smrg# Is the compiler the GNU C compiler?
436995b296d0Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
437095b296d0Smrg
437195b296d0Smrg# An ERE matcher.
437295b296d0SmrgEGREP=$lt_EGREP
437395b296d0Smrg
437495b296d0Smrg# The linker used to build libraries.
437595b296d0SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
437695b296d0Smrg
437795b296d0Smrg# Whether we need hard or soft links.
437895b296d0SmrgLN_S=$lt_LN_S
437995b296d0Smrg
438095b296d0Smrg# A BSD-compatible nm program.
438195b296d0SmrgNM=$lt_NM
438295b296d0Smrg
438395b296d0Smrg# A symbol stripping program
438495b296d0SmrgSTRIP=$lt_STRIP
438595b296d0Smrg
438695b296d0Smrg# Used to examine libraries when file_magic_cmd begins "file"
438795b296d0SmrgMAGIC_CMD=$MAGIC_CMD
438895b296d0Smrg
438995b296d0Smrg# Used on cygwin: DLL creation program.
439095b296d0SmrgDLLTOOL="$DLLTOOL"
439195b296d0Smrg
439295b296d0Smrg# Used on cygwin: object dumper.
439395b296d0SmrgOBJDUMP="$OBJDUMP"
439495b296d0Smrg
439595b296d0Smrg# Used on cygwin: assembler.
439695b296d0SmrgAS="$AS"
439795b296d0Smrg
439895b296d0Smrg# The name of the directory that contains temporary libtool files.
439995b296d0Smrgobjdir=$objdir
440095b296d0Smrg
440195b296d0Smrg# How to create reloadable object files.
440295b296d0Smrgreload_flag=$lt_reload_flag
440395b296d0Smrgreload_cmds=$lt_reload_cmds
440495b296d0Smrg
440595b296d0Smrg# How to pass a linker flag through the compiler.
440695b296d0Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
440795b296d0Smrg
440895b296d0Smrg# Object file suffix (normally "o").
440995b296d0Smrgobjext="$ac_objext"
441095b296d0Smrg
441195b296d0Smrg# Old archive suffix (normally "a").
441295b296d0Smrglibext="$libext"
441395b296d0Smrg
441495b296d0Smrg# Shared library suffix (normally ".so").
441595b296d0Smrgshrext_cmds='$shrext_cmds'
441695b296d0Smrg
441795b296d0Smrg# Executable file suffix (normally "").
441895b296d0Smrgexeext="$exeext"
441995b296d0Smrg
442095b296d0Smrg# Additional compiler flags for building library objects.
442195b296d0Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
442295b296d0Smrgpic_mode=$pic_mode
442395b296d0Smrg
442495b296d0Smrg# What is the maximum length of a command?
442595b296d0Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
442695b296d0Smrg
442795b296d0Smrg# Does compiler simultaneously support -c and -o options?
442895b296d0Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
442995b296d0Smrg
443095b296d0Smrg# Must we lock files when doing compilation?
443195b296d0Smrgneed_locks=$lt_need_locks
443295b296d0Smrg
443395b296d0Smrg# Do we need the lib prefix for modules?
443495b296d0Smrgneed_lib_prefix=$need_lib_prefix
443595b296d0Smrg
443695b296d0Smrg# Do we need a version for libraries?
443795b296d0Smrgneed_version=$need_version
443895b296d0Smrg
443995b296d0Smrg# Whether dlopen is supported.
444095b296d0Smrgdlopen_support=$enable_dlopen
444195b296d0Smrg
444295b296d0Smrg# Whether dlopen of programs is supported.
444395b296d0Smrgdlopen_self=$enable_dlopen_self
444495b296d0Smrg
444595b296d0Smrg# Whether dlopen of statically linked programs is supported.
444695b296d0Smrgdlopen_self_static=$enable_dlopen_self_static
444795b296d0Smrg
444895b296d0Smrg# Compiler flag to prevent dynamic linking.
444995b296d0Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
445095b296d0Smrg
445195b296d0Smrg# Compiler flag to turn off builtin functions.
445295b296d0Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
445395b296d0Smrg
445495b296d0Smrg# Compiler flag to allow reflexive dlopens.
445595b296d0Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
445695b296d0Smrg
445795b296d0Smrg# Compiler flag to generate shared objects directly from archives.
445895b296d0Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
445995b296d0Smrg
446095b296d0Smrg# Compiler flag to generate thread-safe objects.
446195b296d0Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
446295b296d0Smrg
446395b296d0Smrg# Library versioning type.
446495b296d0Smrgversion_type=$version_type
446595b296d0Smrg
446695b296d0Smrg# Format of library name prefix.
446795b296d0Smrglibname_spec=$lt_libname_spec
446895b296d0Smrg
446995b296d0Smrg# List of archive names.  First name is the real one, the rest are links.
447095b296d0Smrg# The last name is the one that the linker finds with -lNAME.
447195b296d0Smrglibrary_names_spec=$lt_library_names_spec
447295b296d0Smrg
447395b296d0Smrg# The coded name of the library, if different from the real name.
447495b296d0Smrgsoname_spec=$lt_soname_spec
447595b296d0Smrg
447695b296d0Smrg# Commands used to build and install an old-style archive.
447795b296d0SmrgRANLIB=$lt_RANLIB
447895b296d0Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
447995b296d0Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
448095b296d0Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
448195b296d0Smrg
448295b296d0Smrg# Create an old-style archive from a shared archive.
448395b296d0Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
448495b296d0Smrg
448595b296d0Smrg# Create a temporary old-style archive to link instead of a shared archive.
448695b296d0Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
448795b296d0Smrg
448895b296d0Smrg# Commands used to build and install a shared archive.
448995b296d0Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
449095b296d0Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
449195b296d0Smrgpostinstall_cmds=$lt_postinstall_cmds
449295b296d0Smrgpostuninstall_cmds=$lt_postuninstall_cmds
449395b296d0Smrg
449495b296d0Smrg# Commands used to build a loadable module (assumed same as above if empty)
449595b296d0Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
449695b296d0Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
449795b296d0Smrg
449895b296d0Smrg# Commands to strip libraries.
449995b296d0Smrgold_striplib=$lt_old_striplib
450095b296d0Smrgstriplib=$lt_striplib
450195b296d0Smrg
450295b296d0Smrg# Dependencies to place before the objects being linked to create a
450395b296d0Smrg# shared library.
450495b296d0Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
450595b296d0Smrg
450695b296d0Smrg# Dependencies to place after the objects being linked to create a
450795b296d0Smrg# shared library.
450895b296d0Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
450995b296d0Smrg
451095b296d0Smrg# Dependencies to place before the objects being linked to create a
451195b296d0Smrg# shared library.
451295b296d0Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
451395b296d0Smrg
451495b296d0Smrg# Dependencies to place after the objects being linked to create a
451595b296d0Smrg# shared library.
451695b296d0Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
451795b296d0Smrg
451895b296d0Smrg# The library search path used internally by the compiler when linking
451995b296d0Smrg# a shared library.
452095b296d0Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
452195b296d0Smrg
452295b296d0Smrg# Method to check whether dependent libraries are shared objects.
452395b296d0Smrgdeplibs_check_method=$lt_deplibs_check_method
452495b296d0Smrg
452595b296d0Smrg# Command to use when deplibs_check_method == file_magic.
452695b296d0Smrgfile_magic_cmd=$lt_file_magic_cmd
452795b296d0Smrg
452895b296d0Smrg# Flag that allows shared libraries with undefined symbols to be built.
452995b296d0Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
453095b296d0Smrg
453195b296d0Smrg# Flag that forces no undefined symbols.
453295b296d0Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
453395b296d0Smrg
453495b296d0Smrg# Commands used to finish a libtool library installation in a directory.
453595b296d0Smrgfinish_cmds=$lt_finish_cmds
453695b296d0Smrg
453795b296d0Smrg# Same as above, but a single script fragment to be evaled but not shown.
453895b296d0Smrgfinish_eval=$lt_finish_eval
453995b296d0Smrg
454095b296d0Smrg# Take the output of nm and produce a listing of raw symbols and C names.
454195b296d0Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
454295b296d0Smrg
454395b296d0Smrg# Transform the output of nm in a proper C declaration
454495b296d0Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
454595b296d0Smrg
454695b296d0Smrg# Transform the output of nm in a C name address pair
454795b296d0Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
454895b296d0Smrg
454995b296d0Smrg# This is the shared library runtime path variable.
455095b296d0Smrgrunpath_var=$runpath_var
455195b296d0Smrg
455295b296d0Smrg# This is the shared library path variable.
455395b296d0Smrgshlibpath_var=$shlibpath_var
455495b296d0Smrg
455595b296d0Smrg# Is shlibpath searched before the hard-coded library search path?
455695b296d0Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
455795b296d0Smrg
455895b296d0Smrg# How to hardcode a shared library path into an executable.
455995b296d0Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
456095b296d0Smrg
456195b296d0Smrg# Whether we should hardcode library paths into libraries.
456295b296d0Smrghardcode_into_libs=$hardcode_into_libs
456395b296d0Smrg
456495b296d0Smrg# Flag to hardcode \$libdir into a binary during linking.
456595b296d0Smrg# This must work even if \$libdir does not exist.
456695b296d0Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
456795b296d0Smrg
456895b296d0Smrg# If ld is used when linking, flag to hardcode \$libdir into
456995b296d0Smrg# a binary during linking. This must work even if \$libdir does
457095b296d0Smrg# not exist.
457195b296d0Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
457295b296d0Smrg
457395b296d0Smrg# Whether we need a single -rpath flag with a separated argument.
457495b296d0Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
457595b296d0Smrg
457695b296d0Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
457795b296d0Smrg# resulting binary.
457895b296d0Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
457995b296d0Smrg
458095b296d0Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
458195b296d0Smrg# resulting binary.
458295b296d0Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
458395b296d0Smrg
458495b296d0Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
458595b296d0Smrg# the resulting binary.
458695b296d0Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
458795b296d0Smrg
458895b296d0Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
458995b296d0Smrg# and all subsequent libraries and executables linked against it.
459095b296d0Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
459195b296d0Smrg
459295b296d0Smrg# Variables whose values should be saved in libtool wrapper scripts and
459395b296d0Smrg# restored at relink time.
459495b296d0Smrgvariables_saved_for_relink="$variables_saved_for_relink"
459595b296d0Smrg
459695b296d0Smrg# Whether libtool must link a program against all its dependency libraries.
459795b296d0Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
459895b296d0Smrg
459995b296d0Smrg# Compile-time system search path for libraries
460095b296d0Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
460195b296d0Smrg
460295b296d0Smrg# Run-time system search path for libraries
460395b296d0Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
460495b296d0Smrg
460595b296d0Smrg# Fix the shell variable \$srcfile for the compiler.
460695b296d0Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
460795b296d0Smrg
460895b296d0Smrg# Set to yes if exported symbols are required.
460995b296d0Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
461095b296d0Smrg
461195b296d0Smrg# The commands to list exported symbols.
461295b296d0Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
461395b296d0Smrg
461495b296d0Smrg# The commands to extract the exported symbol list from a shared archive.
461595b296d0Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
461695b296d0Smrg
461795b296d0Smrg# Symbols that should not be listed in the preloaded symbols.
461895b296d0Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
461995b296d0Smrg
462095b296d0Smrg# Symbols that must always be exported.
462195b296d0Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
462295b296d0Smrg
462395b296d0Smrgifelse([$1],[],
462495b296d0Smrg[# ### END LIBTOOL CONFIG],
462595b296d0Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
462695b296d0Smrg
462795b296d0Smrg__EOF__
462895b296d0Smrg
462995b296d0Smrgifelse([$1],[], [
463095b296d0Smrg  case $host_os in
463195b296d0Smrg  aix3*)
463295b296d0Smrg    cat <<\EOF >> "$cfgfile"
463395b296d0Smrg
463495b296d0Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
463595b296d0Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
463695b296d0Smrg# vanish in a puff of smoke.
463795b296d0Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
463895b296d0Smrg  COLLECT_NAMES=
463995b296d0Smrg  export COLLECT_NAMES
464095b296d0Smrgfi
464195b296d0SmrgEOF
464295b296d0Smrg    ;;
464395b296d0Smrg  esac
464495b296d0Smrg
464595b296d0Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
464695b296d0Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
464795b296d0Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
464895b296d0Smrg  # is reportedly fixed, but why not run on old versions too?
464995b296d0Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
465095b296d0Smrg
465195b296d0Smrg  mv -f "$cfgfile" "$ofile" || \
465295b296d0Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
465395b296d0Smrg  chmod +x "$ofile"
465495b296d0Smrg])
465595b296d0Smrgelse
465695b296d0Smrg  # If there is no Makefile yet, we rely on a make rule to execute
465795b296d0Smrg  # `config.status --recheck' to rerun these tests and create the
465895b296d0Smrg  # libtool script then.
465995b296d0Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
466095b296d0Smrg  if test -f "$ltmain_in"; then
466195b296d0Smrg    test -f Makefile && make "$ltmain"
466295b296d0Smrg  fi
466395b296d0Smrgfi
466495b296d0Smrg])# AC_LIBTOOL_CONFIG
466595b296d0Smrg
466695b296d0Smrg
466795b296d0Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
466895b296d0Smrg# -------------------------------------------
466995b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
467095b296d0Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
467195b296d0Smrg
467295b296d0Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
467395b296d0Smrg
467495b296d0Smrgif test "$GCC" = yes; then
467595b296d0Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
467695b296d0Smrg
467795b296d0Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
467895b296d0Smrg    lt_cv_prog_compiler_rtti_exceptions,
467995b296d0Smrg    [-fno-rtti -fno-exceptions], [],
468095b296d0Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
468195b296d0Smrgfi
468295b296d0Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
468395b296d0Smrg
468495b296d0Smrg
468595b296d0Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
468695b296d0Smrg# ---------------------------------
468795b296d0SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
468895b296d0Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
468995b296d0SmrgAC_REQUIRE([AC_PROG_NM])
469095b296d0SmrgAC_REQUIRE([AC_OBJEXT])
469195b296d0Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
469295b296d0SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
469395b296d0SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
469495b296d0Smrg[
469595b296d0Smrg# These are sane defaults that work on at least a few old systems.
469695b296d0Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
469795b296d0Smrg
469895b296d0Smrg# Character class describing NM global symbol codes.
469995b296d0Smrgsymcode='[[BCDEGRST]]'
470095b296d0Smrg
470195b296d0Smrg# Regexp to match symbols that can be accessed directly from C.
470295b296d0Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
470395b296d0Smrg
470495b296d0Smrg# Transform an extracted symbol line into a proper C declaration
470595b296d0Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
470695b296d0Smrg
470795b296d0Smrg# Transform an extracted symbol line into symbol name and symbol address
470895b296d0Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
470995b296d0Smrg
471095b296d0Smrg# Define system-specific variables.
471195b296d0Smrgcase $host_os in
471295b296d0Smrgaix*)
471395b296d0Smrg  symcode='[[BCDT]]'
471495b296d0Smrg  ;;
471595b296d0Smrgcygwin* | mingw* | pw32*)
471695b296d0Smrg  symcode='[[ABCDGISTW]]'
471795b296d0Smrg  ;;
471895b296d0Smrghpux*) # Its linker distinguishes data from code symbols
471995b296d0Smrg  if test "$host_cpu" = ia64; then
472095b296d0Smrg    symcode='[[ABCDEGRST]]'
472195b296d0Smrg  fi
472295b296d0Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
472395b296d0Smrg  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
472495b296d0Smrg  ;;
472595b296d0Smrglinux*)
472695b296d0Smrg  if test "$host_cpu" = ia64; then
472795b296d0Smrg    symcode='[[ABCDGIRSTW]]'
472895b296d0Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
472995b296d0Smrg    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
473095b296d0Smrg  fi
473195b296d0Smrg  ;;
473295b296d0Smrgirix* | nonstopux*)
473395b296d0Smrg  symcode='[[BCDEGRST]]'
473495b296d0Smrg  ;;
473595b296d0Smrgosf*)
473695b296d0Smrg  symcode='[[BCDEGQRST]]'
473795b296d0Smrg  ;;
473895b296d0Smrgsolaris*)
473995b296d0Smrg  symcode='[[BDRT]]'
474095b296d0Smrg  ;;
474195b296d0Smrgsco3.2v5*)
474295b296d0Smrg  symcode='[[DT]]'
474395b296d0Smrg  ;;
474495b296d0Smrgsysv4.2uw2*)
474595b296d0Smrg  symcode='[[DT]]'
474695b296d0Smrg  ;;
474795b296d0Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
474895b296d0Smrg  symcode='[[ABDT]]'
474995b296d0Smrg  ;;
475095b296d0Smrgsysv4)
475195b296d0Smrg  symcode='[[DFNSTU]]'
475295b296d0Smrg  ;;
475395b296d0Smrgesac
475495b296d0Smrg
475595b296d0Smrg# Handle CRLF in mingw tool chain
475695b296d0Smrgopt_cr=
475795b296d0Smrgcase $build_os in
475895b296d0Smrgmingw*)
475995b296d0Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
476095b296d0Smrg  ;;
476195b296d0Smrgesac
476295b296d0Smrg
476395b296d0Smrg# If we're using GNU nm, then use its standard symbol codes.
476495b296d0Smrgcase `$NM -V 2>&1` in
476595b296d0Smrg*GNU* | *'with BFD'*)
476695b296d0Smrg  symcode='[[ABCDGIRSTW]]' ;;
476795b296d0Smrgesac
476895b296d0Smrg
476995b296d0Smrg# Try without a prefix undercore, then with it.
477095b296d0Smrgfor ac_symprfx in "" "_"; do
477195b296d0Smrg
477295b296d0Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
477395b296d0Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
477495b296d0Smrg
477595b296d0Smrg  # Write the raw and C identifiers.
477695b296d0Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
477795b296d0Smrg
477895b296d0Smrg  # Check to see that the pipe works correctly.
477995b296d0Smrg  pipe_works=no
478095b296d0Smrg
478195b296d0Smrg  rm -f conftest*
478295b296d0Smrg  cat > conftest.$ac_ext <<EOF
478395b296d0Smrg#ifdef __cplusplus
478495b296d0Smrgextern "C" {
478595b296d0Smrg#endif
478695b296d0Smrgchar nm_test_var;
478795b296d0Smrgvoid nm_test_func(){}
478895b296d0Smrg#ifdef __cplusplus
478995b296d0Smrg}
479095b296d0Smrg#endif
479195b296d0Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
479295b296d0SmrgEOF
479395b296d0Smrg
479495b296d0Smrg  if AC_TRY_EVAL(ac_compile); then
479595b296d0Smrg    # Now try to grab the symbols.
479695b296d0Smrg    nlist=conftest.nm
479795b296d0Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
479895b296d0Smrg      # Try sorting and uniquifying the output.
479995b296d0Smrg      if sort "$nlist" | uniq > "$nlist"T; then
480095b296d0Smrg	mv -f "$nlist"T "$nlist"
480195b296d0Smrg      else
480295b296d0Smrg	rm -f "$nlist"T
480395b296d0Smrg      fi
480495b296d0Smrg
480595b296d0Smrg      # Make sure that we snagged all the symbols we need.
480695b296d0Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
480795b296d0Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
480895b296d0Smrg	  cat <<EOF > conftest.$ac_ext
480995b296d0Smrg#ifdef __cplusplus
481095b296d0Smrgextern "C" {
481195b296d0Smrg#endif
481295b296d0Smrg
481395b296d0SmrgEOF
481495b296d0Smrg	  # Now generate the symbol file.
481595b296d0Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
481695b296d0Smrg
481795b296d0Smrg	  cat <<EOF >> conftest.$ac_ext
481895b296d0Smrg#if defined (__STDC__) && __STDC__
481995b296d0Smrg# define lt_ptr_t void *
482095b296d0Smrg#else
482195b296d0Smrg# define lt_ptr_t char *
482295b296d0Smrg# define const
482395b296d0Smrg#endif
482495b296d0Smrg
482595b296d0Smrg/* The mapping between symbol names and symbols. */
482695b296d0Smrgconst struct {
482795b296d0Smrg  const char *name;
482895b296d0Smrg  lt_ptr_t address;
482995b296d0Smrg}
483095b296d0Smrglt_preloaded_symbols[[]] =
483195b296d0Smrg{
483295b296d0SmrgEOF
483395b296d0Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
483495b296d0Smrg	  cat <<\EOF >> conftest.$ac_ext
483595b296d0Smrg  {0, (lt_ptr_t) 0}
483695b296d0Smrg};
483795b296d0Smrg
483895b296d0Smrg#ifdef __cplusplus
483995b296d0Smrg}
484095b296d0Smrg#endif
484195b296d0SmrgEOF
484295b296d0Smrg	  # Now try linking the two files.
484395b296d0Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
484495b296d0Smrg	  lt_save_LIBS="$LIBS"
484595b296d0Smrg	  lt_save_CFLAGS="$CFLAGS"
484695b296d0Smrg	  LIBS="conftstm.$ac_objext"
484795b296d0Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
484895b296d0Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
484995b296d0Smrg	    pipe_works=yes
485095b296d0Smrg	  fi
485195b296d0Smrg	  LIBS="$lt_save_LIBS"
485295b296d0Smrg	  CFLAGS="$lt_save_CFLAGS"
485395b296d0Smrg	else
485495b296d0Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
485595b296d0Smrg	fi
485695b296d0Smrg      else
485795b296d0Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
485895b296d0Smrg      fi
485995b296d0Smrg    else
486095b296d0Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
486195b296d0Smrg    fi
486295b296d0Smrg  else
486395b296d0Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
486495b296d0Smrg    cat conftest.$ac_ext >&5
486595b296d0Smrg  fi
486695b296d0Smrg  rm -f conftest* conftst*
486795b296d0Smrg
486895b296d0Smrg  # Do not use the global_symbol_pipe unless it works.
486995b296d0Smrg  if test "$pipe_works" = yes; then
487095b296d0Smrg    break
487195b296d0Smrg  else
487295b296d0Smrg    lt_cv_sys_global_symbol_pipe=
487395b296d0Smrg  fi
487495b296d0Smrgdone
487595b296d0Smrg])
487695b296d0Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
487795b296d0Smrg  lt_cv_sys_global_symbol_to_cdecl=
487895b296d0Smrgfi
487995b296d0Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
488095b296d0Smrg  AC_MSG_RESULT(failed)
488195b296d0Smrgelse
488295b296d0Smrg  AC_MSG_RESULT(ok)
488395b296d0Smrgfi
488495b296d0Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
488595b296d0Smrg
488695b296d0Smrg
488795b296d0Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
488895b296d0Smrg# ---------------------------------------
488995b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
489095b296d0Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
489195b296d0Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
489295b296d0Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
489395b296d0Smrg
489495b296d0SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
489595b296d0Smrg ifelse([$1],[CXX],[
489695b296d0Smrg  # C++ specific cases for pic, static, wl, etc.
489795b296d0Smrg  if test "$GXX" = yes; then
489895b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
489995b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
490095b296d0Smrg
490195b296d0Smrg    case $host_os in
490295b296d0Smrg    aix*)
490395b296d0Smrg      # All AIX code is PIC.
490495b296d0Smrg      if test "$host_cpu" = ia64; then
490595b296d0Smrg	# AIX 5 now supports IA64 processor
490695b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
490795b296d0Smrg      fi
490895b296d0Smrg      ;;
490995b296d0Smrg    amigaos*)
491095b296d0Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
491195b296d0Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
491295b296d0Smrg      # like `-m68040'.
491395b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
491495b296d0Smrg      ;;
491595b296d0Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
491695b296d0Smrg      # PIC is the default for these OSes.
491795b296d0Smrg      ;;
491895b296d0Smrg    mingw* | os2* | pw32*)
491995b296d0Smrg      # This hack is so that the source file can tell whether it is being
492095b296d0Smrg      # built for inclusion in a dll (and should export symbols for example).
492195b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
492295b296d0Smrg      ;;
492395b296d0Smrg    darwin* | rhapsody*)
492495b296d0Smrg      # PIC is the default on this platform
492595b296d0Smrg      # Common symbols not allowed in MH_DYLIB files
492695b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
492795b296d0Smrg      ;;
492895b296d0Smrg    *djgpp*)
492995b296d0Smrg      # DJGPP does not support shared libraries at all
493095b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
493195b296d0Smrg      ;;
493295b296d0Smrg    interix3*)
493395b296d0Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
493495b296d0Smrg      # Instead, we relocate shared libraries at runtime.
493595b296d0Smrg      ;;
493695b296d0Smrg    sysv4*MP*)
493795b296d0Smrg      if test -d /usr/nec; then
493895b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
493995b296d0Smrg      fi
494095b296d0Smrg      ;;
494195b296d0Smrg    hpux*)
494295b296d0Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
494395b296d0Smrg      # not for PA HP-UX.
494495b296d0Smrg      case $host_cpu in
494595b296d0Smrg      hppa*64*|ia64*)
494695b296d0Smrg	;;
494795b296d0Smrg      *)
494895b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
494995b296d0Smrg	;;
495095b296d0Smrg      esac
495195b296d0Smrg      ;;
495295b296d0Smrg    *)
495395b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
495495b296d0Smrg      ;;
495595b296d0Smrg    esac
495695b296d0Smrg  else
495795b296d0Smrg    case $host_os in
495895b296d0Smrg      aix4* | aix5*)
495995b296d0Smrg	# All AIX code is PIC.
496095b296d0Smrg	if test "$host_cpu" = ia64; then
496195b296d0Smrg	  # AIX 5 now supports IA64 processor
496295b296d0Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
496395b296d0Smrg	else
496495b296d0Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
496595b296d0Smrg	fi
496695b296d0Smrg	;;
496795b296d0Smrg      chorus*)
496895b296d0Smrg	case $cc_basename in
496995b296d0Smrg	cxch68*)
497095b296d0Smrg	  # Green Hills C++ Compiler
497195b296d0Smrg	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
497295b296d0Smrg	  ;;
497395b296d0Smrg	esac
497495b296d0Smrg	;;
497595b296d0Smrg       darwin*)
497695b296d0Smrg         # PIC is the default on this platform
497795b296d0Smrg         # Common symbols not allowed in MH_DYLIB files
497895b296d0Smrg         case $cc_basename in
497995b296d0Smrg           xlc*)
498095b296d0Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
498195b296d0Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
498295b296d0Smrg           ;;
498395b296d0Smrg         esac
498495b296d0Smrg       ;;
498595b296d0Smrg      dgux*)
498695b296d0Smrg	case $cc_basename in
498795b296d0Smrg	  ec++*)
498895b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
498995b296d0Smrg	    ;;
499095b296d0Smrg	  ghcx*)
499195b296d0Smrg	    # Green Hills C++ Compiler
499295b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
499395b296d0Smrg	    ;;
499495b296d0Smrg	  *)
499595b296d0Smrg	    ;;
499695b296d0Smrg	esac
499795b296d0Smrg	;;
499895b296d0Smrg      freebsd* | kfreebsd*-gnu | dragonfly*)
499995b296d0Smrg	# FreeBSD uses GNU C++
500095b296d0Smrg	;;
500195b296d0Smrg      hpux9* | hpux10* | hpux11*)
500295b296d0Smrg	case $cc_basename in
500395b296d0Smrg	  CC*)
500495b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
500595b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
500695b296d0Smrg	    if test "$host_cpu" != ia64; then
500795b296d0Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
500895b296d0Smrg	    fi
500995b296d0Smrg	    ;;
501095b296d0Smrg	  aCC*)
501195b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
501295b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
501395b296d0Smrg	    case $host_cpu in
501495b296d0Smrg	    hppa*64*|ia64*)
501595b296d0Smrg	      # +Z the default
501695b296d0Smrg	      ;;
501795b296d0Smrg	    *)
501895b296d0Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
501995b296d0Smrg	      ;;
502095b296d0Smrg	    esac
502195b296d0Smrg	    ;;
502295b296d0Smrg	  *)
502395b296d0Smrg	    ;;
502495b296d0Smrg	esac
502595b296d0Smrg	;;
502695b296d0Smrg      interix*)
502795b296d0Smrg	# This is c89, which is MS Visual C++ (no shared libs)
502895b296d0Smrg	# Anyone wants to do a port?
502995b296d0Smrg	;;
503095b296d0Smrg      irix5* | irix6* | nonstopux*)
503195b296d0Smrg	case $cc_basename in
503295b296d0Smrg	  CC*)
503395b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
503495b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
503595b296d0Smrg	    # CC pic flag -KPIC is the default.
503695b296d0Smrg	    ;;
503795b296d0Smrg	  *)
503895b296d0Smrg	    ;;
503995b296d0Smrg	esac
504095b296d0Smrg	;;
504195b296d0Smrg      linux*)
504295b296d0Smrg	case $cc_basename in
504395b296d0Smrg	  KCC*)
504495b296d0Smrg	    # KAI C++ Compiler
504595b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
504695b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
504795b296d0Smrg	    ;;
504895b296d0Smrg	  icpc* | ecpc*)
504995b296d0Smrg	    # Intel C++
505095b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
505195b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
505295b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
505395b296d0Smrg	    ;;
505495b296d0Smrg	  pgCC*)
505595b296d0Smrg	    # Portland Group C++ compiler.
505695b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
505795b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
505895b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
505995b296d0Smrg	    ;;
506095b296d0Smrg	  cxx*)
506195b296d0Smrg	    # Compaq C++
506295b296d0Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
506395b296d0Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
506495b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
506595b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
506695b296d0Smrg	    ;;
506795b296d0Smrg	  *)
506895b296d0Smrg	    ;;
506995b296d0Smrg	esac
507095b296d0Smrg	;;
507195b296d0Smrg      lynxos*)
507295b296d0Smrg	;;
507395b296d0Smrg      m88k*)
507495b296d0Smrg	;;
507595b296d0Smrg      mvs*)
507695b296d0Smrg	case $cc_basename in
507795b296d0Smrg	  cxx*)
507895b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
507995b296d0Smrg	    ;;
508095b296d0Smrg	  *)
508195b296d0Smrg	    ;;
508295b296d0Smrg	esac
508395b296d0Smrg	;;
508495b296d0Smrg      netbsd*)
508595b296d0Smrg	;;
508695b296d0Smrg      osf3* | osf4* | osf5*)
508795b296d0Smrg	case $cc_basename in
508895b296d0Smrg	  KCC*)
508995b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
509095b296d0Smrg	    ;;
509195b296d0Smrg	  RCC*)
509295b296d0Smrg	    # Rational C++ 2.4.1
509395b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
509495b296d0Smrg	    ;;
509595b296d0Smrg	  cxx*)
509695b296d0Smrg	    # Digital/Compaq C++
509795b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
509895b296d0Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
509995b296d0Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
510095b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
510195b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
510295b296d0Smrg	    ;;
510395b296d0Smrg	  *)
510495b296d0Smrg	    ;;
510595b296d0Smrg	esac
510695b296d0Smrg	;;
510795b296d0Smrg      psos*)
510895b296d0Smrg	;;
510995b296d0Smrg      solaris*)
511095b296d0Smrg	case $cc_basename in
511195b296d0Smrg	  CC*)
511295b296d0Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
511395b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
511495b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
511595b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
511695b296d0Smrg	    ;;
511795b296d0Smrg	  gcx*)
511895b296d0Smrg	    # Green Hills C++ Compiler
511995b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
512095b296d0Smrg	    ;;
512195b296d0Smrg	  *)
512295b296d0Smrg	    ;;
512395b296d0Smrg	esac
512495b296d0Smrg	;;
512595b296d0Smrg      sunos4*)
512695b296d0Smrg	case $cc_basename in
512795b296d0Smrg	  CC*)
512895b296d0Smrg	    # Sun C++ 4.x
512995b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
513095b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
513195b296d0Smrg	    ;;
513295b296d0Smrg	  lcc*)
513395b296d0Smrg	    # Lucid
513495b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
513595b296d0Smrg	    ;;
513695b296d0Smrg	  *)
513795b296d0Smrg	    ;;
513895b296d0Smrg	esac
513995b296d0Smrg	;;
514095b296d0Smrg      tandem*)
514195b296d0Smrg	case $cc_basename in
514295b296d0Smrg	  NCC*)
514395b296d0Smrg	    # NonStop-UX NCC 3.20
514495b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
514595b296d0Smrg	    ;;
514695b296d0Smrg	  *)
514795b296d0Smrg	    ;;
514895b296d0Smrg	esac
514995b296d0Smrg	;;
515095b296d0Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
515195b296d0Smrg	case $cc_basename in
515295b296d0Smrg	  CC*)
515395b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
515495b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
515595b296d0Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
515695b296d0Smrg	    ;;
515795b296d0Smrg	esac
515895b296d0Smrg	;;
515995b296d0Smrg      vxworks*)
516095b296d0Smrg	;;
516195b296d0Smrg      *)
516295b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
516395b296d0Smrg	;;
516495b296d0Smrg    esac
516595b296d0Smrg  fi
516695b296d0Smrg],
516795b296d0Smrg[
516895b296d0Smrg  if test "$GCC" = yes; then
516995b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
517095b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
517195b296d0Smrg
517295b296d0Smrg    case $host_os in
517395b296d0Smrg      aix*)
517495b296d0Smrg      # All AIX code is PIC.
517595b296d0Smrg      if test "$host_cpu" = ia64; then
517695b296d0Smrg	# AIX 5 now supports IA64 processor
517795b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
517895b296d0Smrg      fi
517995b296d0Smrg      ;;
518095b296d0Smrg
518195b296d0Smrg    amigaos*)
518295b296d0Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
518395b296d0Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
518495b296d0Smrg      # like `-m68040'.
518595b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
518695b296d0Smrg      ;;
518795b296d0Smrg
518895b296d0Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
518995b296d0Smrg      # PIC is the default for these OSes.
519095b296d0Smrg      ;;
519195b296d0Smrg
519295b296d0Smrg    mingw* | pw32* | os2*)
519395b296d0Smrg      # This hack is so that the source file can tell whether it is being
519495b296d0Smrg      # built for inclusion in a dll (and should export symbols for example).
519595b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
519695b296d0Smrg      ;;
519795b296d0Smrg
519895b296d0Smrg    darwin* | rhapsody*)
519995b296d0Smrg      # PIC is the default on this platform
520095b296d0Smrg      # Common symbols not allowed in MH_DYLIB files
520195b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
520295b296d0Smrg      ;;
520395b296d0Smrg
520495b296d0Smrg    interix3*)
520595b296d0Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
520695b296d0Smrg      # Instead, we relocate shared libraries at runtime.
520795b296d0Smrg      ;;
520895b296d0Smrg
520995b296d0Smrg    msdosdjgpp*)
521095b296d0Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
521195b296d0Smrg      # on systems that don't support them.
521295b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
521395b296d0Smrg      enable_shared=no
521495b296d0Smrg      ;;
521595b296d0Smrg
521695b296d0Smrg    sysv4*MP*)
521795b296d0Smrg      if test -d /usr/nec; then
521895b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
521995b296d0Smrg      fi
522095b296d0Smrg      ;;
522195b296d0Smrg
522295b296d0Smrg    hpux*)
522395b296d0Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
522495b296d0Smrg      # not for PA HP-UX.
522595b296d0Smrg      case $host_cpu in
522695b296d0Smrg      hppa*64*|ia64*)
522795b296d0Smrg	# +Z the default
522895b296d0Smrg	;;
522995b296d0Smrg      *)
523095b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
523195b296d0Smrg	;;
523295b296d0Smrg      esac
523395b296d0Smrg      ;;
523495b296d0Smrg
523595b296d0Smrg    *)
523695b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
523795b296d0Smrg      ;;
523895b296d0Smrg    esac
523995b296d0Smrg  else
524095b296d0Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
524195b296d0Smrg    case $host_os in
524295b296d0Smrg    aix*)
524395b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
524495b296d0Smrg      if test "$host_cpu" = ia64; then
524595b296d0Smrg	# AIX 5 now supports IA64 processor
524695b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
524795b296d0Smrg      else
524895b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
524995b296d0Smrg      fi
525095b296d0Smrg      ;;
525195b296d0Smrg      darwin*)
525295b296d0Smrg        # PIC is the default on this platform
525395b296d0Smrg        # Common symbols not allowed in MH_DYLIB files
525495b296d0Smrg       case $cc_basename in
525595b296d0Smrg         xlc*)
525695b296d0Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
525795b296d0Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
525895b296d0Smrg         ;;
525995b296d0Smrg       esac
526095b296d0Smrg       ;;
526195b296d0Smrg
526295b296d0Smrg    mingw* | pw32* | os2*)
526395b296d0Smrg      # This hack is so that the source file can tell whether it is being
526495b296d0Smrg      # built for inclusion in a dll (and should export symbols for example).
526595b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
526695b296d0Smrg      ;;
526795b296d0Smrg
526895b296d0Smrg    hpux9* | hpux10* | hpux11*)
526995b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
527095b296d0Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
527195b296d0Smrg      # not for PA HP-UX.
527295b296d0Smrg      case $host_cpu in
527395b296d0Smrg      hppa*64*|ia64*)
527495b296d0Smrg	# +Z the default
527595b296d0Smrg	;;
527695b296d0Smrg      *)
527795b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
527895b296d0Smrg	;;
527995b296d0Smrg      esac
528095b296d0Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
528195b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
528295b296d0Smrg      ;;
528395b296d0Smrg
528495b296d0Smrg    irix5* | irix6* | nonstopux*)
528595b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
528695b296d0Smrg      # PIC (with -KPIC) is the default.
528795b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
528895b296d0Smrg      ;;
528995b296d0Smrg
529095b296d0Smrg    newsos6)
529195b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
529295b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
529395b296d0Smrg      ;;
529495b296d0Smrg
529595b296d0Smrg    linux*)
529695b296d0Smrg      case $cc_basename in
529795b296d0Smrg      icc* | ecc*)
529895b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
529995b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
530095b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
530195b296d0Smrg        ;;
530295b296d0Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
530395b296d0Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
530495b296d0Smrg	# which looks to be a dead project)
530595b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
530695b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
530795b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
530895b296d0Smrg        ;;
530995b296d0Smrg      ccc*)
531095b296d0Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
531195b296d0Smrg        # All Alpha code is PIC.
531295b296d0Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
531395b296d0Smrg        ;;
531495b296d0Smrg      esac
531595b296d0Smrg      ;;
531695b296d0Smrg
531795b296d0Smrg    osf3* | osf4* | osf5*)
531895b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
531995b296d0Smrg      # All OSF/1 code is PIC.
532095b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
532195b296d0Smrg      ;;
532295b296d0Smrg
532395b296d0Smrg    solaris*)
532495b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
532595b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
532695b296d0Smrg      case $cc_basename in
532795b296d0Smrg      f77* | f90* | f95*)
532895b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
532995b296d0Smrg      *)
533095b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
533195b296d0Smrg      esac
533295b296d0Smrg      ;;
533395b296d0Smrg
533495b296d0Smrg    sunos4*)
533595b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
533695b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
533795b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
533895b296d0Smrg      ;;
533995b296d0Smrg
534095b296d0Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
534195b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
534295b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
534395b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
534495b296d0Smrg      ;;
534595b296d0Smrg
534695b296d0Smrg    sysv4*MP*)
534795b296d0Smrg      if test -d /usr/nec ;then
534895b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
534995b296d0Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
535095b296d0Smrg      fi
535195b296d0Smrg      ;;
535295b296d0Smrg
535395b296d0Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
535495b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
535595b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
535695b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
535795b296d0Smrg      ;;
535895b296d0Smrg
535995b296d0Smrg    unicos*)
536095b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
536195b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
536295b296d0Smrg      ;;
536395b296d0Smrg
536495b296d0Smrg    uts4*)
536595b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
536695b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
536795b296d0Smrg      ;;
536895b296d0Smrg
536995b296d0Smrg    *)
537095b296d0Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
537195b296d0Smrg      ;;
537295b296d0Smrg    esac
537395b296d0Smrg  fi
537495b296d0Smrg])
537595b296d0SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
537695b296d0Smrg
537795b296d0Smrg#
537895b296d0Smrg# Check to make sure the PIC flag actually works.
537995b296d0Smrg#
538095b296d0Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
538195b296d0Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
538295b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
538395b296d0Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
538495b296d0Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
538595b296d0Smrg     "" | " "*) ;;
538695b296d0Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
538795b296d0Smrg     esac],
538895b296d0Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
538995b296d0Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
539095b296d0Smrgfi
539195b296d0Smrgcase $host_os in
539295b296d0Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
539395b296d0Smrg  *djgpp*)
539495b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
539595b296d0Smrg    ;;
539695b296d0Smrg  *)
539795b296d0Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
539895b296d0Smrg    ;;
539995b296d0Smrgesac
540095b296d0Smrg
540195b296d0Smrg#
540295b296d0Smrg# Check to make sure the static flag actually works.
540395b296d0Smrg#
540495b296d0Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
540595b296d0SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
540695b296d0Smrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
540795b296d0Smrg  $lt_tmp_static_flag,
540895b296d0Smrg  [],
540995b296d0Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
541095b296d0Smrg])
541195b296d0Smrg
541295b296d0Smrg
541395b296d0Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
541495b296d0Smrg# ------------------------------------
541595b296d0Smrg# See if the linker supports building shared libraries.
541695b296d0SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
541795b296d0Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
541895b296d0Smrgifelse([$1],[CXX],[
541995b296d0Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
542095b296d0Smrg  case $host_os in
542195b296d0Smrg  aix4* | aix5*)
542295b296d0Smrg    # If we're using GNU nm, then we don't want the "-C" option.
542395b296d0Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
542495b296d0Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
542595b296d0Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
542695b296d0Smrg    else
542795b296d0Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
542895b296d0Smrg    fi
542995b296d0Smrg    ;;
543095b296d0Smrg  pw32*)
543195b296d0Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
543295b296d0Smrg  ;;
543395b296d0Smrg  cygwin* | mingw*)
543495b296d0Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
543595b296d0Smrg  ;;
543695b296d0Smrg  *)
543795b296d0Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
543895b296d0Smrg  ;;
543995b296d0Smrg  esac
544095b296d0Smrg],[
544195b296d0Smrg  runpath_var=
544295b296d0Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
544395b296d0Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
544495b296d0Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
544595b296d0Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
544695b296d0Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
544795b296d0Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
544895b296d0Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
544995b296d0Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
545095b296d0Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
545195b296d0Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
545295b296d0Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
545395b296d0Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
545495b296d0Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
545595b296d0Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
545695b296d0Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
545795b296d0Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
545895b296d0Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
545995b296d0Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
546095b296d0Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
546195b296d0Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
546295b296d0Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
546395b296d0Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
546495b296d0Smrg  # included in the symbol list
546595b296d0Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
546695b296d0Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
546795b296d0Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
546895b296d0Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
546995b296d0Smrg  # as well as any symbol that contains `d'.
547095b296d0Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
547195b296d0Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
547295b296d0Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
547395b296d0Smrg  # the symbol is explicitly referenced.  Since portable code cannot
547495b296d0Smrg  # rely on this symbol name, it's probably fine to never include it in
547595b296d0Smrg  # preloaded symbol tables.
547695b296d0Smrg  extract_expsyms_cmds=
547795b296d0Smrg  # Just being paranoid about ensuring that cc_basename is set.
547895b296d0Smrg  _LT_CC_BASENAME([$compiler])
547995b296d0Smrg  case $host_os in
548095b296d0Smrg  cygwin* | mingw* | pw32*)
548195b296d0Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
548295b296d0Smrg    # When not using gcc, we currently assume that we are using
548395b296d0Smrg    # Microsoft Visual C++.
548495b296d0Smrg    if test "$GCC" != yes; then
548595b296d0Smrg      with_gnu_ld=no
548695b296d0Smrg    fi
548795b296d0Smrg    ;;
548895b296d0Smrg  interix*)
548995b296d0Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
549095b296d0Smrg    with_gnu_ld=yes
549195b296d0Smrg    ;;
549295b296d0Smrg  openbsd*)
549395b296d0Smrg    with_gnu_ld=no
549495b296d0Smrg    ;;
549595b296d0Smrg  esac
549695b296d0Smrg
549795b296d0Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
549895b296d0Smrg  if test "$with_gnu_ld" = yes; then
549995b296d0Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
550095b296d0Smrg    wlarc='${wl}'
550195b296d0Smrg
550295b296d0Smrg    # Set some defaults for GNU ld with shared library support. These
550395b296d0Smrg    # are reset later if shared libraries are not supported. Putting them
550495b296d0Smrg    # here allows them to be overridden if necessary.
550595b296d0Smrg    runpath_var=LD_RUN_PATH
550695b296d0Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
550795b296d0Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
550895b296d0Smrg    # ancient GNU ld didn't support --whole-archive et. al.
550995b296d0Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
551095b296d0Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
551195b296d0Smrg      else
551295b296d0Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
551395b296d0Smrg    fi
551495b296d0Smrg    supports_anon_versioning=no
551595b296d0Smrg    case `$LD -v 2>/dev/null` in
551695b296d0Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
551795b296d0Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
551895b296d0Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
551995b296d0Smrg      *\ 2.11.*) ;; # other 2.11 versions
552095b296d0Smrg      *) supports_anon_versioning=yes ;;
552195b296d0Smrg    esac
552295b296d0Smrg
552395b296d0Smrg    # See if GNU ld supports shared libraries.
552495b296d0Smrg    case $host_os in
552595b296d0Smrg    aix3* | aix4* | aix5*)
552695b296d0Smrg      # On AIX/PPC, the GNU linker is very broken
552795b296d0Smrg      if test "$host_cpu" != ia64; then
552895b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
552995b296d0Smrg	cat <<EOF 1>&2
553095b296d0Smrg
553195b296d0Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
553295b296d0Smrg*** to be unable to reliably create shared libraries on AIX.
553395b296d0Smrg*** Therefore, libtool is disabling shared libraries support.  If you
553495b296d0Smrg*** really care for shared libraries, you may want to modify your PATH
553595b296d0Smrg*** so that a non-GNU linker is found, and then restart.
553695b296d0Smrg
553795b296d0SmrgEOF
553895b296d0Smrg      fi
553995b296d0Smrg      ;;
554095b296d0Smrg
554195b296d0Smrg    amigaos*)
554295b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
554395b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
554495b296d0Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
554595b296d0Smrg
554695b296d0Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
554795b296d0Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
554895b296d0Smrg      # to version 4, is to share data among multiple programs linked
554995b296d0Smrg      # with the same dynamic library.  Since this doesn't match the
555095b296d0Smrg      # behavior of shared libraries on other platforms, we can't use
555195b296d0Smrg      # them.
555295b296d0Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
555395b296d0Smrg      ;;
555495b296d0Smrg
555595b296d0Smrg    beos*)
555695b296d0Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
555795b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
555895b296d0Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
555995b296d0Smrg	# support --undefined.  This deserves some investigation.  FIXME
556095b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
556195b296d0Smrg      else
556295b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
556395b296d0Smrg      fi
556495b296d0Smrg      ;;
556595b296d0Smrg
556695b296d0Smrg    cygwin* | mingw* | pw32*)
556795b296d0Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
556895b296d0Smrg      # as there is no search path for DLLs.
556995b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
557095b296d0Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
557195b296d0Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
557295b296d0Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
557395b296d0Smrg      _LT_AC_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'
557495b296d0Smrg
557595b296d0Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
557695b296d0Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
557795b296d0Smrg	# If the export-symbols file already is a .def file (1st line
557895b296d0Smrg	# is EXPORTS), use it as is; otherwise, prepend...
557995b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
558095b296d0Smrg	  cp $export_symbols $output_objdir/$soname.def;
558195b296d0Smrg	else
558295b296d0Smrg	  echo EXPORTS > $output_objdir/$soname.def;
558395b296d0Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
558495b296d0Smrg	fi~
558595b296d0Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
558695b296d0Smrg      else
558795b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
558895b296d0Smrg      fi
558995b296d0Smrg      ;;
559095b296d0Smrg
559195b296d0Smrg    interix3*)
559295b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
559395b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
559495b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
559595b296d0Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
559695b296d0Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
559795b296d0Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
559895b296d0Smrg      # default) and relocated if they conflict, which is a slow very memory
559995b296d0Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
560095b296d0Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
560195b296d0Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
560295b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
560395b296d0Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
560495b296d0Smrg      ;;
560595b296d0Smrg
560695b296d0Smrg    linux*)
560795b296d0Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
560895b296d0Smrg	tmp_addflag=
560995b296d0Smrg	case $cc_basename,$host_cpu in
561095b296d0Smrg	pgcc*)				# Portland Group C compiler
561195b296d0Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
561295b296d0Smrg	  tmp_addflag=' $pic_flag'
561395b296d0Smrg	  ;;
561495b296d0Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
561595b296d0Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
561695b296d0Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
561795b296d0Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
561895b296d0Smrg	  tmp_addflag=' -i_dynamic' ;;
561995b296d0Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
562095b296d0Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
562195b296d0Smrg	ifc* | ifort*)			# Intel Fortran compiler
562295b296d0Smrg	  tmp_addflag=' -nofor_main' ;;
562395b296d0Smrg	esac
562495b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
562595b296d0Smrg
562695b296d0Smrg	if test $supports_anon_versioning = yes; then
562795b296d0Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
562895b296d0Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
562995b296d0Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
563095b296d0Smrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
563195b296d0Smrg	fi
563295b296d0Smrg      else
563395b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
563495b296d0Smrg      fi
563595b296d0Smrg      ;;
563695b296d0Smrg
563795b296d0Smrg    netbsd*)
563895b296d0Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
563995b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
564095b296d0Smrg	wlarc=
564195b296d0Smrg      else
564295b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
564395b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
564495b296d0Smrg      fi
564595b296d0Smrg      ;;
564695b296d0Smrg
564795b296d0Smrg    solaris*)
564895b296d0Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
564995b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
565095b296d0Smrg	cat <<EOF 1>&2
565195b296d0Smrg
565295b296d0Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
565395b296d0Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
565495b296d0Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
565595b296d0Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
565695b296d0Smrg*** your PATH or compiler configuration so that the native linker is
565795b296d0Smrg*** used, and then restart.
565895b296d0Smrg
565995b296d0SmrgEOF
566095b296d0Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
566195b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
566295b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
566395b296d0Smrg      else
566495b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
566595b296d0Smrg      fi
566695b296d0Smrg      ;;
566795b296d0Smrg
566895b296d0Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
566995b296d0Smrg      case `$LD -v 2>&1` in
567095b296d0Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
567195b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
567295b296d0Smrg	cat <<_LT_EOF 1>&2
567395b296d0Smrg
567495b296d0Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
567595b296d0Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
567695b296d0Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
567795b296d0Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
567895b296d0Smrg*** your PATH or compiler configuration so that the native linker is
567995b296d0Smrg*** used, and then restart.
568095b296d0Smrg
568195b296d0Smrg_LT_EOF
568295b296d0Smrg	;;
568395b296d0Smrg	*)
568495b296d0Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
568595b296d0Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
568695b296d0Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
568795b296d0Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
568895b296d0Smrg	  else
568995b296d0Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
569095b296d0Smrg	  fi
569195b296d0Smrg	;;
569295b296d0Smrg      esac
569395b296d0Smrg      ;;
569495b296d0Smrg
569595b296d0Smrg    sunos4*)
569695b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
569795b296d0Smrg      wlarc=
569895b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
569995b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
570095b296d0Smrg      ;;
570195b296d0Smrg
570295b296d0Smrg    *)
570395b296d0Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
570495b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
570595b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
570695b296d0Smrg      else
570795b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
570895b296d0Smrg      fi
570995b296d0Smrg      ;;
571095b296d0Smrg    esac
571195b296d0Smrg
571295b296d0Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
571395b296d0Smrg      runpath_var=
571495b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
571595b296d0Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
571695b296d0Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
571795b296d0Smrg    fi
571895b296d0Smrg  else
571995b296d0Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
572095b296d0Smrg    case $host_os in
572195b296d0Smrg    aix3*)
572295b296d0Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
572395b296d0Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
572495b296d0Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
572595b296d0Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
572695b296d0Smrg      # are no directories specified by -L.
572795b296d0Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
572895b296d0Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
572995b296d0Smrg	# Neither direct hardcoding nor static linking is supported with a
573095b296d0Smrg	# broken collect2.
573195b296d0Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
573295b296d0Smrg      fi
573395b296d0Smrg      ;;
573495b296d0Smrg
573595b296d0Smrg    aix4* | aix5*)
573695b296d0Smrg      if test "$host_cpu" = ia64; then
573795b296d0Smrg	# On IA64, the linker does run time linking by default, so we don't
573895b296d0Smrg	# have to do anything special.
573995b296d0Smrg	aix_use_runtimelinking=no
574095b296d0Smrg	exp_sym_flag='-Bexport'
574195b296d0Smrg	no_entry_flag=""
574295b296d0Smrg      else
574395b296d0Smrg	# If we're using GNU nm, then we don't want the "-C" option.
574495b296d0Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
574595b296d0Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
574695b296d0Smrg	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
574795b296d0Smrg	else
574895b296d0Smrg	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
574995b296d0Smrg	fi
575095b296d0Smrg	aix_use_runtimelinking=no
575195b296d0Smrg
575295b296d0Smrg	# Test if we are trying to use run time linking or normal
575395b296d0Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
575495b296d0Smrg	# need to do runtime linking.
575595b296d0Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
575695b296d0Smrg	  for ld_flag in $LDFLAGS; do
575795b296d0Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
575895b296d0Smrg  	    aix_use_runtimelinking=yes
575995b296d0Smrg  	    break
576095b296d0Smrg  	  fi
576195b296d0Smrg	  done
576295b296d0Smrg	  ;;
576395b296d0Smrg	esac
576495b296d0Smrg
576595b296d0Smrg	exp_sym_flag='-bexport'
576695b296d0Smrg	no_entry_flag='-bnoentry'
576795b296d0Smrg      fi
576895b296d0Smrg
576995b296d0Smrg      # When large executables or shared objects are built, AIX ld can
577095b296d0Smrg      # have problems creating the table of contents.  If linking a library
577195b296d0Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
577295b296d0Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
577395b296d0Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
577495b296d0Smrg
577595b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
577695b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
577795b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
577895b296d0Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
577995b296d0Smrg
578095b296d0Smrg      if test "$GCC" = yes; then
578195b296d0Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
578295b296d0Smrg	# We only want to do this on AIX 4.2 and lower, the check
578395b296d0Smrg	# below for broken collect2 doesn't work under 4.3+
578495b296d0Smrg	  collect2name=`${CC} -print-prog-name=collect2`
578595b296d0Smrg	  if test -f "$collect2name" && \
578695b296d0Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
578795b296d0Smrg	  then
578895b296d0Smrg  	  # We have reworked collect2
578995b296d0Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
579095b296d0Smrg	  else
579195b296d0Smrg  	  # We have old collect2
579295b296d0Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
579395b296d0Smrg  	  # It fails to find uninstalled libraries when the uninstalled
579495b296d0Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
579595b296d0Smrg  	  # to unsupported forces relinking
579695b296d0Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
579795b296d0Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
579895b296d0Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
579995b296d0Smrg	  fi
580095b296d0Smrg	  ;;
580195b296d0Smrg	esac
580295b296d0Smrg	shared_flag='-shared'
580395b296d0Smrg	if test "$aix_use_runtimelinking" = yes; then
580495b296d0Smrg	  shared_flag="$shared_flag "'${wl}-G'
580595b296d0Smrg	fi
580695b296d0Smrg      else
580795b296d0Smrg	# not using gcc
580895b296d0Smrg	if test "$host_cpu" = ia64; then
580995b296d0Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
581095b296d0Smrg  	# chokes on -Wl,-G. The following line is correct:
581195b296d0Smrg	  shared_flag='-G'
581295b296d0Smrg	else
581395b296d0Smrg	  if test "$aix_use_runtimelinking" = yes; then
581495b296d0Smrg	    shared_flag='${wl}-G'
581595b296d0Smrg	  else
581695b296d0Smrg	    shared_flag='${wl}-bM:SRE'
581795b296d0Smrg	  fi
581895b296d0Smrg	fi
581995b296d0Smrg      fi
582095b296d0Smrg
582195b296d0Smrg      # It seems that -bexpall does not export symbols beginning with
582295b296d0Smrg      # underscore (_), so it is better to generate a list of symbols to export.
582395b296d0Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
582495b296d0Smrg      if test "$aix_use_runtimelinking" = yes; then
582595b296d0Smrg	# Warning - without using the other runtime loading flags (-brtl),
582695b296d0Smrg	# -berok will link without error, but may produce a broken library.
582795b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
582895b296d0Smrg       # Determine the default libpath from the value encoded in an empty executable.
582995b296d0Smrg       _LT_AC_SYS_LIBPATH_AIX
583095b296d0Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
583195b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
583295b296d0Smrg       else
583395b296d0Smrg	if test "$host_cpu" = ia64; then
583495b296d0Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
583595b296d0Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
583695b296d0Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
583795b296d0Smrg	else
583895b296d0Smrg	 # Determine the default libpath from the value encoded in an empty executable.
583995b296d0Smrg	 _LT_AC_SYS_LIBPATH_AIX
584095b296d0Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
584195b296d0Smrg	  # Warning - without using the other run time loading flags,
584295b296d0Smrg	  # -berok will link without error, but may produce a broken library.
584395b296d0Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
584495b296d0Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
584595b296d0Smrg	  # Exported symbols can be pulled into shared objects from archives
584695b296d0Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
584795b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
584895b296d0Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
584995b296d0Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
585095b296d0Smrg	fi
585195b296d0Smrg      fi
585295b296d0Smrg      ;;
585395b296d0Smrg
585495b296d0Smrg    amigaos*)
585595b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
585695b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
585795b296d0Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
585895b296d0Smrg      # see comment about different semantics on the GNU ld section
585995b296d0Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
586095b296d0Smrg      ;;
586195b296d0Smrg
586295b296d0Smrg    bsdi[[45]]*)
586395b296d0Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
586495b296d0Smrg      ;;
586595b296d0Smrg
586695b296d0Smrg    cygwin* | mingw* | pw32*)
586795b296d0Smrg      # When not using gcc, we currently assume that we are using
586895b296d0Smrg      # Microsoft Visual C++.
586995b296d0Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
587095b296d0Smrg      # no search path for DLLs.
587195b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
587295b296d0Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
587395b296d0Smrg      # Tell ltmain to make .lib files, not .a files.
587495b296d0Smrg      libext=lib
587595b296d0Smrg      # Tell ltmain to make .dll files, not .so files.
587695b296d0Smrg      shrext_cmds=".dll"
587795b296d0Smrg      # FIXME: Setting linknames here is a bad hack.
587895b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
587995b296d0Smrg      # The linker will automatically build a .lib file if we build a DLL.
588095b296d0Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
588195b296d0Smrg      # FIXME: Should let the user specify the lib program.
588295b296d0Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
588395b296d0Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
588495b296d0Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
588595b296d0Smrg      ;;
588695b296d0Smrg
588795b296d0Smrg    darwin* | rhapsody*)
588895b296d0Smrg      case $host_os in
588995b296d0Smrg        rhapsody* | darwin1.[[012]])
589095b296d0Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
589195b296d0Smrg         ;;
589295b296d0Smrg       *) # Darwin 1.3 on
589395b296d0Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
589495b296d0Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
589595b296d0Smrg         else
589695b296d0Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
589795b296d0Smrg             10.[[012]])
589895b296d0Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
589995b296d0Smrg               ;;
590095b296d0Smrg             10.*)
590195b296d0Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
590295b296d0Smrg               ;;
590395b296d0Smrg           esac
590495b296d0Smrg         fi
590595b296d0Smrg         ;;
590695b296d0Smrg      esac
590795b296d0Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
590895b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
590995b296d0Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
591095b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
591195b296d0Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
591295b296d0Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
591395b296d0Smrg    if test "$GCC" = yes ; then
591495b296d0Smrg    	output_verbose_link_cmd='echo'
591595b296d0Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
591695b296d0Smrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
591795b296d0Smrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
591895b296d0Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
591995b296d0Smrg      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
592095b296d0Smrg    else
592195b296d0Smrg      case $cc_basename in
592295b296d0Smrg        xlc*)
592395b296d0Smrg         output_verbose_link_cmd='echo'
592495b296d0Smrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
592595b296d0Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
592695b296d0Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
592795b296d0Smrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
592895b296d0Smrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
592995b296d0Smrg          ;;
593095b296d0Smrg       *)
593195b296d0Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
593295b296d0Smrg          ;;
593395b296d0Smrg      esac
593495b296d0Smrg    fi
593595b296d0Smrg      ;;
593695b296d0Smrg
593795b296d0Smrg    dgux*)
593895b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
593995b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
594095b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
594195b296d0Smrg      ;;
594295b296d0Smrg
594395b296d0Smrg    freebsd1*)
594495b296d0Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
594595b296d0Smrg      ;;
594695b296d0Smrg
594795b296d0Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
594895b296d0Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
594995b296d0Smrg    # does not break anything, and helps significantly (at the cost of a little
595095b296d0Smrg    # extra space).
595195b296d0Smrg    freebsd2.2*)
595295b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
595395b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
595495b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
595595b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
595695b296d0Smrg      ;;
595795b296d0Smrg
595895b296d0Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
595995b296d0Smrg    freebsd2*)
596095b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
596195b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
596295b296d0Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
596395b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
596495b296d0Smrg      ;;
596595b296d0Smrg
596695b296d0Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
596795b296d0Smrg    freebsd* | kfreebsd*-gnu | dragonfly*)
596895b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
596995b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
597095b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
597195b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
597295b296d0Smrg      ;;
597395b296d0Smrg
597495b296d0Smrg    hpux9*)
597595b296d0Smrg      if test "$GCC" = yes; then
597695b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
597795b296d0Smrg      else
597895b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
597995b296d0Smrg      fi
598095b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
598195b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
598295b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
598395b296d0Smrg
598495b296d0Smrg      # hardcode_minus_L: Not really in the search PATH,
598595b296d0Smrg      # but as the default location of the library.
598695b296d0Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
598795b296d0Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
598895b296d0Smrg      ;;
598995b296d0Smrg
599095b296d0Smrg    hpux10*)
599195b296d0Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
599295b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
599395b296d0Smrg      else
599495b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
599595b296d0Smrg      fi
599695b296d0Smrg      if test "$with_gnu_ld" = no; then
599795b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
599895b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
599995b296d0Smrg
600095b296d0Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
600195b296d0Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
600295b296d0Smrg
600395b296d0Smrg	# hardcode_minus_L: Not really in the search PATH,
600495b296d0Smrg	# but as the default location of the library.
600595b296d0Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
600695b296d0Smrg      fi
600795b296d0Smrg      ;;
600895b296d0Smrg
600995b296d0Smrg    hpux11*)
601095b296d0Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
601195b296d0Smrg	case $host_cpu in
601295b296d0Smrg	hppa*64*)
601395b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
601495b296d0Smrg	  ;;
601595b296d0Smrg	ia64*)
601695b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
601795b296d0Smrg	  ;;
601895b296d0Smrg	*)
601995b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
602095b296d0Smrg	  ;;
602195b296d0Smrg	esac
602295b296d0Smrg      else
602395b296d0Smrg	case $host_cpu in
602495b296d0Smrg	hppa*64*)
602595b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
602695b296d0Smrg	  ;;
602795b296d0Smrg	ia64*)
602895b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
602995b296d0Smrg	  ;;
603095b296d0Smrg	*)
603195b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
603295b296d0Smrg	  ;;
603395b296d0Smrg	esac
603495b296d0Smrg      fi
603595b296d0Smrg      if test "$with_gnu_ld" = no; then
603695b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
603795b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
603895b296d0Smrg
603995b296d0Smrg	case $host_cpu in
604095b296d0Smrg	hppa*64*|ia64*)
604195b296d0Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
604295b296d0Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
604395b296d0Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
604495b296d0Smrg	  ;;
604595b296d0Smrg	*)
604695b296d0Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
604795b296d0Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
604895b296d0Smrg
604995b296d0Smrg	  # hardcode_minus_L: Not really in the search PATH,
605095b296d0Smrg	  # but as the default location of the library.
605195b296d0Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
605295b296d0Smrg	  ;;
605395b296d0Smrg	esac
605495b296d0Smrg      fi
605595b296d0Smrg      ;;
605695b296d0Smrg
605795b296d0Smrg    irix5* | irix6* | nonstopux*)
605895b296d0Smrg      if test "$GCC" = yes; then
605995b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
606095b296d0Smrg      else
606195b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
606295b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
606395b296d0Smrg      fi
606495b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
606595b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
606695b296d0Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
606795b296d0Smrg      ;;
606895b296d0Smrg
606995b296d0Smrg    netbsd*)
607095b296d0Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
607195b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
607295b296d0Smrg      else
607395b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
607495b296d0Smrg      fi
607595b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
607695b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
607795b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
607895b296d0Smrg      ;;
607995b296d0Smrg
608095b296d0Smrg    newsos6)
608195b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
608295b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
608395b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
608495b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
608595b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
608695b296d0Smrg      ;;
608795b296d0Smrg
608895b296d0Smrg    openbsd*)
608995b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
609095b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
609195b296d0Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
609295b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
609395b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
609495b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
609595b296d0Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
609695b296d0Smrg      else
609795b296d0Smrg       case $host_os in
609895b296d0Smrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
609995b296d0Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
610095b296d0Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
610195b296d0Smrg	   ;;
610295b296d0Smrg	 *)
610395b296d0Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
610495b296d0Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
610595b296d0Smrg	   ;;
610695b296d0Smrg       esac
610795b296d0Smrg      fi
610895b296d0Smrg      ;;
610995b296d0Smrg
611095b296d0Smrg    os2*)
611195b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
611295b296d0Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
611395b296d0Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
611495b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
611595b296d0Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
611695b296d0Smrg      ;;
611795b296d0Smrg
611895b296d0Smrg    osf3*)
611995b296d0Smrg      if test "$GCC" = yes; then
612095b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
612195b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
612295b296d0Smrg      else
612395b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
612495b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
612595b296d0Smrg      fi
612695b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
612795b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
612895b296d0Smrg      ;;
612995b296d0Smrg
613095b296d0Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
613195b296d0Smrg      if test "$GCC" = yes; then
613295b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
613395b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
613495b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
613595b296d0Smrg      else
613695b296d0Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
613795b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
613895b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
613995b296d0Smrg	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
614095b296d0Smrg
614195b296d0Smrg	# Both c and cxx compiler support -rpath directly
614295b296d0Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
614395b296d0Smrg      fi
614495b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
614595b296d0Smrg      ;;
614695b296d0Smrg
614795b296d0Smrg    solaris*)
614895b296d0Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
614995b296d0Smrg      if test "$GCC" = yes; then
615095b296d0Smrg	wlarc='${wl}'
615195b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
615295b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
615395b296d0Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
615495b296d0Smrg      else
615595b296d0Smrg	wlarc=''
615695b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
615795b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
615895b296d0Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
615995b296d0Smrg      fi
616095b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
616195b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
616295b296d0Smrg      case $host_os in
616395b296d0Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
616495b296d0Smrg      *)
616595b296d0Smrg 	# The compiler driver will combine linker options so we
616695b296d0Smrg 	# cannot just pass the convience library names through
616795b296d0Smrg 	# without $wl, iff we do not link with $LD.
616895b296d0Smrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
616995b296d0Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
617095b296d0Smrg 	case $wlarc in
617195b296d0Smrg 	'')
617295b296d0Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
617395b296d0Smrg 	*)
617495b296d0Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
617595b296d0Smrg 	esac ;;
617695b296d0Smrg      esac
617795b296d0Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
617895b296d0Smrg      ;;
617995b296d0Smrg
618095b296d0Smrg    sunos4*)
618195b296d0Smrg      if test "x$host_vendor" = xsequent; then
618295b296d0Smrg	# Use $CC to link under sequent, because it throws in some extra .o
618395b296d0Smrg	# files that make .init and .fini sections work.
618495b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
618595b296d0Smrg      else
618695b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
618795b296d0Smrg      fi
618895b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
618995b296d0Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
619095b296d0Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
619195b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
619295b296d0Smrg      ;;
619395b296d0Smrg
619495b296d0Smrg    sysv4)
619595b296d0Smrg      case $host_vendor in
619695b296d0Smrg	sni)
619795b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
619895b296d0Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
619995b296d0Smrg	;;
620095b296d0Smrg	siemens)
620195b296d0Smrg	  ## LD is ld it makes a PLAMLIB
620295b296d0Smrg	  ## CC just makes a GrossModule.
620395b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
620495b296d0Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
620595b296d0Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
620695b296d0Smrg        ;;
620795b296d0Smrg	motorola)
620895b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
620995b296d0Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
621095b296d0Smrg	;;
621195b296d0Smrg      esac
621295b296d0Smrg      runpath_var='LD_RUN_PATH'
621395b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
621495b296d0Smrg      ;;
621595b296d0Smrg
621695b296d0Smrg    sysv4.3*)
621795b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
621895b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
621995b296d0Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
622095b296d0Smrg      ;;
622195b296d0Smrg
622295b296d0Smrg    sysv4*MP*)
622395b296d0Smrg      if test -d /usr/nec; then
622495b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
622595b296d0Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
622695b296d0Smrg	runpath_var=LD_RUN_PATH
622795b296d0Smrg	hardcode_runpath_var=yes
622895b296d0Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
622995b296d0Smrg      fi
623095b296d0Smrg      ;;
623195b296d0Smrg
623295b296d0Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
623395b296d0Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
623495b296d0Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
623595b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
623695b296d0Smrg      runpath_var='LD_RUN_PATH'
623795b296d0Smrg
623895b296d0Smrg      if test "$GCC" = yes; then
623995b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
624095b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
624195b296d0Smrg      else
624295b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
624395b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
624495b296d0Smrg      fi
624595b296d0Smrg      ;;
624695b296d0Smrg
624795b296d0Smrg    sysv5* | sco3.2v5* | sco5v6*)
624895b296d0Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
624995b296d0Smrg      # link with -lc, and that would cause any symbols used from libc to
625095b296d0Smrg      # always be unresolved, which means just about no library would
625195b296d0Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
625295b296d0Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
625395b296d0Smrg      # as -z defs.
625495b296d0Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
625595b296d0Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
625695b296d0Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
625795b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
625895b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
625995b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
626095b296d0Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
626195b296d0Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
626295b296d0Smrg      runpath_var='LD_RUN_PATH'
626395b296d0Smrg
626495b296d0Smrg      if test "$GCC" = yes; then
626595b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
626695b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
626795b296d0Smrg      else
626895b296d0Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
626995b296d0Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
627095b296d0Smrg      fi
627195b296d0Smrg      ;;
627295b296d0Smrg
627395b296d0Smrg    uts4*)
627495b296d0Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
627595b296d0Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
627695b296d0Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
627795b296d0Smrg      ;;
627895b296d0Smrg
627995b296d0Smrg    *)
628095b296d0Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
628195b296d0Smrg      ;;
628295b296d0Smrg    esac
628395b296d0Smrg  fi
628495b296d0Smrg])
628595b296d0SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
628695b296d0Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
628795b296d0Smrg
628895b296d0Smrg#
628995b296d0Smrg# Do we need to explicitly link libc?
629095b296d0Smrg#
629195b296d0Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
629295b296d0Smrgx|xyes)
629395b296d0Smrg  # Assume -lc should be added
629495b296d0Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
629595b296d0Smrg
629695b296d0Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
629795b296d0Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
629895b296d0Smrg    *'~'*)
629995b296d0Smrg      # FIXME: we may have to deal with multi-command sequences.
630095b296d0Smrg      ;;
630195b296d0Smrg    '$CC '*)
630295b296d0Smrg      # Test whether the compiler implicitly links with -lc since on some
630395b296d0Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
630495b296d0Smrg      # to ld, don't add -lc before -lgcc.
630595b296d0Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
630695b296d0Smrg      $rm conftest*
630795b296d0Smrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
630895b296d0Smrg
630995b296d0Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
631095b296d0Smrg        soname=conftest
631195b296d0Smrg        lib=conftest
631295b296d0Smrg        libobjs=conftest.$ac_objext
631395b296d0Smrg        deplibs=
631495b296d0Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
631595b296d0Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
631695b296d0Smrg        compiler_flags=-v
631795b296d0Smrg        linker_flags=-v
631895b296d0Smrg        verstring=
631995b296d0Smrg        output_objdir=.
632095b296d0Smrg        libname=conftest
632195b296d0Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
632295b296d0Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
632395b296d0Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
632495b296d0Smrg        then
632595b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
632695b296d0Smrg        else
632795b296d0Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
632895b296d0Smrg        fi
632995b296d0Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
633095b296d0Smrg      else
633195b296d0Smrg        cat conftest.err 1>&5
633295b296d0Smrg      fi
633395b296d0Smrg      $rm conftest*
633495b296d0Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
633595b296d0Smrg      ;;
633695b296d0Smrg    esac
633795b296d0Smrg  fi
633895b296d0Smrg  ;;
633995b296d0Smrgesac
634095b296d0Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
634195b296d0Smrg
634295b296d0Smrg
634395b296d0Smrg# _LT_AC_FILE_LTDLL_C
634495b296d0Smrg# -------------------
634595b296d0Smrg# Be careful that the start marker always follows a newline.
634695b296d0SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
634795b296d0Smrg# /* ltdll.c starts here */
634895b296d0Smrg# #define WIN32_LEAN_AND_MEAN
634995b296d0Smrg# #include <windows.h>
635095b296d0Smrg# #undef WIN32_LEAN_AND_MEAN
635195b296d0Smrg# #include <stdio.h>
635295b296d0Smrg#
635395b296d0Smrg# #ifndef __CYGWIN__
635495b296d0Smrg# #  ifdef __CYGWIN32__
635595b296d0Smrg# #    define __CYGWIN__ __CYGWIN32__
635695b296d0Smrg# #  endif
635795b296d0Smrg# #endif
635895b296d0Smrg#
635995b296d0Smrg# #ifdef __cplusplus
636095b296d0Smrg# extern "C" {
636195b296d0Smrg# #endif
636295b296d0Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
636395b296d0Smrg# #ifdef __cplusplus
636495b296d0Smrg# }
636595b296d0Smrg# #endif
636695b296d0Smrg#
636795b296d0Smrg# #ifdef __CYGWIN__
636895b296d0Smrg# #include <cygwin/cygwin_dll.h>
636995b296d0Smrg# DECLARE_CYGWIN_DLL( DllMain );
637095b296d0Smrg# #endif
637195b296d0Smrg# HINSTANCE __hDllInstance_base;
637295b296d0Smrg#
637395b296d0Smrg# BOOL APIENTRY
637495b296d0Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
637595b296d0Smrg# {
637695b296d0Smrg#   __hDllInstance_base = hInst;
637795b296d0Smrg#   return TRUE;
637895b296d0Smrg# }
637995b296d0Smrg# /* ltdll.c ends here */
638095b296d0Smrg])# _LT_AC_FILE_LTDLL_C
638195b296d0Smrg
638295b296d0Smrg
638395b296d0Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
638495b296d0Smrg# ---------------------------------
638595b296d0SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
638695b296d0Smrg
638795b296d0Smrg
638895b296d0Smrg# old names
638995b296d0SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
639095b296d0SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
639195b296d0SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
639295b296d0SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
639395b296d0SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
639495b296d0SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
639595b296d0SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
639695b296d0Smrg
639795b296d0Smrg# This is just to silence aclocal about the macro not being used
639895b296d0Smrgifelse([AC_DISABLE_FAST_INSTALL])
639995b296d0Smrg
640095b296d0SmrgAC_DEFUN([LT_AC_PROG_GCJ],
640195b296d0Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
640295b296d0Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
640395b296d0Smrg  AC_SUBST(GCJFLAGS)
640495b296d0Smrg])
640595b296d0Smrg
640695b296d0SmrgAC_DEFUN([LT_AC_PROG_RC],
640795b296d0Smrg[AC_CHECK_TOOL(RC, windres, no)
640895b296d0Smrg])
640995b296d0Smrg
641095b296d0Smrg# NOTE: This macro has been submitted for inclusion into   #
641195b296d0Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
641295b296d0Smrg#  a released version of Autoconf we should remove this    #
641395b296d0Smrg#  macro and use it instead.                               #
641495b296d0Smrg# LT_AC_PROG_SED
641595b296d0Smrg# --------------
641695b296d0Smrg# Check for a fully-functional sed program, that truncates
641795b296d0Smrg# as few characters as possible.  Prefer GNU sed if found.
641895b296d0SmrgAC_DEFUN([LT_AC_PROG_SED],
641995b296d0Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
642095b296d0SmrgAC_CACHE_VAL(lt_cv_path_SED,
642195b296d0Smrg[# Loop through the user's path and test for sed and gsed.
642295b296d0Smrg# Then use that list of sed's as ones to test for truncation.
642395b296d0Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
642495b296d0Smrgfor as_dir in $PATH
642595b296d0Smrgdo
642695b296d0Smrg  IFS=$as_save_IFS
642795b296d0Smrg  test -z "$as_dir" && as_dir=.
642895b296d0Smrg  for lt_ac_prog in sed gsed; do
642995b296d0Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
643095b296d0Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
643195b296d0Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
643295b296d0Smrg      fi
643395b296d0Smrg    done
643495b296d0Smrg  done
643595b296d0Smrgdone
643695b296d0Smrglt_ac_max=0
643795b296d0Smrglt_ac_count=0
643895b296d0Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
643995b296d0Smrg# along with /bin/sed that truncates output.
644095b296d0Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
644195b296d0Smrg  test ! -f $lt_ac_sed && continue
644295b296d0Smrg  cat /dev/null > conftest.in
644395b296d0Smrg  lt_ac_count=0
644495b296d0Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
644595b296d0Smrg  # Check for GNU sed and select it if it is found.
644695b296d0Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
644795b296d0Smrg    lt_cv_path_SED=$lt_ac_sed
644895b296d0Smrg    break
644995b296d0Smrg  fi
645095b296d0Smrg  while true; do
645195b296d0Smrg    cat conftest.in conftest.in >conftest.tmp
645295b296d0Smrg    mv conftest.tmp conftest.in
645395b296d0Smrg    cp conftest.in conftest.nl
645495b296d0Smrg    echo >>conftest.nl
645595b296d0Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
645695b296d0Smrg    cmp -s conftest.out conftest.nl || break
645795b296d0Smrg    # 10000 chars as input seems more than enough
645895b296d0Smrg    test $lt_ac_count -gt 10 && break
645995b296d0Smrg    lt_ac_count=`expr $lt_ac_count + 1`
646095b296d0Smrg    if test $lt_ac_count -gt $lt_ac_max; then
646195b296d0Smrg      lt_ac_max=$lt_ac_count
646295b296d0Smrg      lt_cv_path_SED=$lt_ac_sed
646395b296d0Smrg    fi
646495b296d0Smrg  done
646595b296d0Smrgdone
646695b296d0Smrg])
646795b296d0SmrgSED=$lt_cv_path_SED
646895b296d0SmrgAC_MSG_RESULT([$SED])
646995b296d0Smrg])
647095b296d0Smrg
647195b296d0Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
647295b296d0Smrg# 
647395b296d0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
647495b296d0Smrg#
647595b296d0Smrg# This program is free software; you can redistribute it and/or modify
647695b296d0Smrg# it under the terms of the GNU General Public License as published by
647795b296d0Smrg# the Free Software Foundation; either version 2 of the License, or
647895b296d0Smrg# (at your option) any later version.
647995b296d0Smrg#
648095b296d0Smrg# This program is distributed in the hope that it will be useful, but
648195b296d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
648295b296d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
648395b296d0Smrg# General Public License for more details.
648495b296d0Smrg#
648595b296d0Smrg# You should have received a copy of the GNU General Public License
648695b296d0Smrg# along with this program; if not, write to the Free Software
648795b296d0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
648895b296d0Smrg#
648995b296d0Smrg# As a special exception to the GNU General Public License, if you
649095b296d0Smrg# distribute this file as part of a program that contains a
649195b296d0Smrg# configuration script generated by Autoconf, you may include it under
649295b296d0Smrg# the same distribution terms that you use for the rest of that program.
649395b296d0Smrg
649495b296d0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
649595b296d0Smrg# ----------------------------------
649695b296d0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
649795b296d0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
649895b296d0Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
649995b296d0SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
650095b296d0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
650195b296d0Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
650295b296d0Smrgfi
650395b296d0Smrgif test -n "$PKG_CONFIG"; then
650495b296d0Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
650595b296d0Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
650695b296d0Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
650795b296d0Smrg		AC_MSG_RESULT([yes])
650895b296d0Smrg	else
650995b296d0Smrg		AC_MSG_RESULT([no])
651095b296d0Smrg		PKG_CONFIG=""
651195b296d0Smrg	fi
651295b296d0Smrg		
651395b296d0Smrgfi[]dnl
651495b296d0Smrg])# PKG_PROG_PKG_CONFIG
651595b296d0Smrg
651695b296d0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
651795b296d0Smrg#
651895b296d0Smrg# Check to see whether a particular set of modules exists.  Similar
651995b296d0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
652095b296d0Smrg#
652195b296d0Smrg#
652295b296d0Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
652395b296d0Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
652495b296d0Smrg# PKG_CHECK_EXISTS manually
652595b296d0Smrg# --------------------------------------------------------------
652695b296d0SmrgAC_DEFUN([PKG_CHECK_EXISTS],
652795b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
652895b296d0Smrgif test -n "$PKG_CONFIG" && \
652995b296d0Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
653095b296d0Smrg  m4_ifval([$2], [$2], [:])
653195b296d0Smrgm4_ifvaln([$3], [else
653295b296d0Smrg  $3])dnl
653395b296d0Smrgfi])
653495b296d0Smrg
653595b296d0Smrg
653695b296d0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
653795b296d0Smrg# ---------------------------------------------
653895b296d0Smrgm4_define([_PKG_CONFIG],
653995b296d0Smrg[if test -n "$PKG_CONFIG"; then
654095b296d0Smrg    if test -n "$$1"; then
654195b296d0Smrg        pkg_cv_[]$1="$$1"
654295b296d0Smrg    else
654395b296d0Smrg        PKG_CHECK_EXISTS([$3],
654495b296d0Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
654595b296d0Smrg			 [pkg_failed=yes])
654695b296d0Smrg    fi
654795b296d0Smrgelse
654895b296d0Smrg	pkg_failed=untried
654995b296d0Smrgfi[]dnl
655095b296d0Smrg])# _PKG_CONFIG
655195b296d0Smrg
655295b296d0Smrg# _PKG_SHORT_ERRORS_SUPPORTED
655395b296d0Smrg# -----------------------------
655495b296d0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
655595b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
655695b296d0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
655795b296d0Smrg        _pkg_short_errors_supported=yes
655895b296d0Smrgelse
655995b296d0Smrg        _pkg_short_errors_supported=no
656095b296d0Smrgfi[]dnl
656195b296d0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
656295b296d0Smrg
656395b296d0Smrg
656495b296d0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
656595b296d0Smrg# [ACTION-IF-NOT-FOUND])
656695b296d0Smrg#
656795b296d0Smrg#
656895b296d0Smrg# Note that if there is a possibility the first call to
656995b296d0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
657095b296d0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
657195b296d0Smrg#
657295b296d0Smrg#
657395b296d0Smrg# --------------------------------------------------------------
657495b296d0SmrgAC_DEFUN([PKG_CHECK_MODULES],
657595b296d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
657695b296d0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
657795b296d0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
657895b296d0Smrg
657995b296d0Smrgpkg_failed=no
658095b296d0SmrgAC_MSG_CHECKING([for $1])
658195b296d0Smrg
658295b296d0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
658395b296d0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
658495b296d0Smrg
658595b296d0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
658695b296d0Smrgand $1[]_LIBS to avoid the need to call pkg-config.
658795b296d0SmrgSee the pkg-config man page for more details.])
658895b296d0Smrg
658995b296d0Smrgif test $pkg_failed = yes; then
659095b296d0Smrg        _PKG_SHORT_ERRORS_SUPPORTED
659195b296d0Smrg        if test $_pkg_short_errors_supported = yes; then
659295b296d0Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
659395b296d0Smrg        else 
659495b296d0Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
659595b296d0Smrg        fi
659695b296d0Smrg	# Put the nasty error message in config.log where it belongs
659795b296d0Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
659895b296d0Smrg
659995b296d0Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
660095b296d0Smrg[Package requirements ($2) were not met:
660195b296d0Smrg
660295b296d0Smrg$$1_PKG_ERRORS
660395b296d0Smrg
660495b296d0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
660595b296d0Smrginstalled software in a non-standard prefix.
660695b296d0Smrg
660795b296d0Smrg_PKG_TEXT
660895b296d0Smrg])],
660995b296d0Smrg		[$4])
661095b296d0Smrgelif test $pkg_failed = untried; then
661195b296d0Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
661295b296d0Smrg[The pkg-config script could not be found or is too old.  Make sure it
661395b296d0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
661495b296d0Smrgpath to pkg-config.
661595b296d0Smrg
661695b296d0Smrg_PKG_TEXT
661795b296d0Smrg
661895b296d0SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
661995b296d0Smrg		[$4])
662095b296d0Smrgelse
662195b296d0Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
662295b296d0Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
662395b296d0Smrg        AC_MSG_RESULT([yes])
662495b296d0Smrg	ifelse([$3], , :, [$3])
662595b296d0Smrgfi[]dnl
662695b296d0Smrg])# PKG_CHECK_MODULES
662795b296d0Smrg
662895b296d0Smrgdnl
662995b296d0Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
663095b296d0Smrgdnl 
663195b296d0Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
663295b296d0Smrgdnl copy of this software and associated documentation files (the
663395b296d0Smrgdnl "Software"), to deal in the Software without restriction, including
663495b296d0Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
663595b296d0Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
663695b296d0Smrgdnl to whom the Software is furnished to do so, provided that the above
663795b296d0Smrgdnl copyright notice(s) and this permission notice appear in all copies of
663895b296d0Smrgdnl the Software and that both the above copyright notice(s) and this
663995b296d0Smrgdnl permission notice appear in supporting documentation.
664095b296d0Smrgdnl
664195b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
664295b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
664395b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
664495b296d0Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
664595b296d0Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
664695b296d0Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
664795b296d0Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
664895b296d0Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
664995b296d0Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
665095b296d0Smrgdnl
665195b296d0Smrgdnl Except as contained in this notice, the name of a copyright holder
665295b296d0Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
665395b296d0Smrgdnl or other dealings in this Software without prior written authorization
665495b296d0Smrgdnl of the copyright holder.
665595b296d0Smrg
665695b296d0Smrg# XORG_MACROS_VERSION(required-version)
665795b296d0Smrg# -------------------------------------
665895b296d0Smrg# Minimum version: 1.1.0
665995b296d0Smrg#
666095b296d0Smrg# If you're using a macro added in Version 1.1 or newer, include this in
666195b296d0Smrg# your configure.ac with the minimum required version, such as:
666295b296d0Smrg# XORG_MACROS_VERSION(1.1)
666395b296d0Smrg#
666495b296d0Smrg# To force at least a version with this macro defined, also add:
666595b296d0Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
666695b296d0Smrg#
666795b296d0Smrg#
666895b296d0Smrg# See the "minimum version" comment for each macro you use to see what 
666995b296d0Smrg# version you require.
667095b296d0SmrgAC_DEFUN([XORG_MACROS_VERSION],[
667195b296d0Smrg	[XORG_MACROS_needed_version=$1
667295b296d0Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
667395b296d0Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
667495b296d0Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
667595b296d0Smrg	[XORG_MACROS_version=1.1.0
667695b296d0Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
667795b296d0Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
667895b296d0Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
667995b296d0Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
668095b296d0Smrg	fi
668195b296d0Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
668295b296d0Smrg		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
668395b296d0Smrg	fi
668495b296d0Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
668595b296d0Smrg]) # XORG_MACROS_VERSION
668695b296d0Smrg
668795b296d0Smrg# XORG_PROG_RAWCPP()
668895b296d0Smrg# ------------------
668995b296d0Smrg# Minimum version: 1.0.0
669095b296d0Smrg#
669195b296d0Smrg# Find cpp program and necessary flags for use in pre-processing text files
669295b296d0Smrg# such as man pages and config files
669395b296d0SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
669495b296d0SmrgAC_REQUIRE([AC_PROG_CPP])
669595b296d0SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
669695b296d0Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
669795b296d0Smrg
669895b296d0Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
669995b296d0Smrg# which is not the best choice for supporting other OS'es, but covers most
670095b296d0Smrg# of the ones we need for now.
670195b296d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
670295b296d0SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
670395b296d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
670495b296d0Smrg	AC_MSG_RESULT([no])
670595b296d0Smrgelse
670695b296d0Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
670795b296d0Smrg		RAWCPPFLAGS=-undef
670895b296d0Smrg		AC_MSG_RESULT([yes])
670995b296d0Smrg	else
671095b296d0Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
671195b296d0Smrg	fi
671295b296d0Smrgfi
671395b296d0Smrgrm -f conftest.$ac_ext
671495b296d0Smrg
671595b296d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
671695b296d0SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
671795b296d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
671895b296d0Smrg	AC_MSG_RESULT([no])
671995b296d0Smrgelse
672095b296d0Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
672195b296d0Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
672295b296d0Smrg		AC_MSG_RESULT([yes])
672395b296d0Smrg	else
672495b296d0Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
672595b296d0Smrg	fi
672695b296d0Smrgfi
672795b296d0Smrgrm -f conftest.$ac_ext
672895b296d0SmrgAC_SUBST(RAWCPPFLAGS)
672995b296d0Smrg]) # XORG_PROG_RAWCPP
673095b296d0Smrg
673195b296d0Smrg# XORG_MANPAGE_SECTIONS()
673295b296d0Smrg# -----------------------
673395b296d0Smrg# Minimum version: 1.0.0
673495b296d0Smrg#
673595b296d0Smrg# Determine which sections man pages go in for the different man page types
673695b296d0Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
673795b296d0Smrg# Not sure if there's any better way than just hardcoding by OS name.
673895b296d0Smrg# Override default settings by setting environment variables
673995b296d0Smrg
674095b296d0SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
674195b296d0SmrgAC_REQUIRE([AC_CANONICAL_HOST])
674295b296d0Smrg
674395b296d0Smrgif test x$APP_MAN_SUFFIX = x    ; then
674495b296d0Smrg    case $host_os in
674595b296d0Smrg	linux* | gnu* | k*bsd*-gnu)	APP_MAN_SUFFIX=1x ;;
674695b296d0Smrg	*)	APP_MAN_SUFFIX=1  ;;
674795b296d0Smrg    esac
674895b296d0Smrgfi
674995b296d0Smrgif test x$APP_MAN_DIR = x    ; then
675095b296d0Smrg    case $host_os in
675195b296d0Smrg	linux* | gnu* | k*bsd*-gnu)	APP_MAN_DIR='$(mandir)/man1' ;;
675295b296d0Smrg	*)	APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;;
675395b296d0Smrg    esac
675495b296d0Smrgfi
675595b296d0Smrg
675695b296d0Smrgif test x$LIB_MAN_SUFFIX = x    ; then
675795b296d0Smrg    case $host_os in
675895b296d0Smrg	linux* | gnu* | k*bsd*-gnu)	LIB_MAN_SUFFIX=3x ;;
675995b296d0Smrg	*)	LIB_MAN_SUFFIX=3  ;;
676095b296d0Smrg    esac
676195b296d0Smrgfi
676295b296d0Smrgif test x$LIB_MAN_DIR = x    ; then
676395b296d0Smrg    case $host_os in
676495b296d0Smrg	linux* | gnu* | k*bsd*-gnu)	LIB_MAN_DIR='$(mandir)/man3' ;;
676595b296d0Smrg	*)	LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;;
676695b296d0Smrg    esac
676795b296d0Smrgfi
676895b296d0Smrg
676995b296d0Smrgif test x$FILE_MAN_SUFFIX = x    ; then
677095b296d0Smrg    case $host_os in
677195b296d0Smrg	linux* | gnu* | k*bsd*-gnu)		FILE_MAN_SUFFIX=5x ;;
677295b296d0Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
677395b296d0Smrg	*)		FILE_MAN_SUFFIX=5  ;;
677495b296d0Smrg    esac
677595b296d0Smrgfi
677695b296d0Smrgif test x$FILE_MAN_DIR = x    ; then
677795b296d0Smrg    case $host_os in
677895b296d0Smrg	linux* | gnu* | k*bsd*-gnu)	FILE_MAN_DIR='$(mandir)/man5' ;;
677995b296d0Smrg	*)	FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;;
678095b296d0Smrg    esac
678195b296d0Smrgfi
678295b296d0Smrg
678395b296d0Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 
678495b296d0Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
678595b296d0Smrgif test x$MISC_MAN_SUFFIX = x    ; then
678695b296d0Smrg    case $host_os in
678795b296d0Smrg#	linux* | gnu* | k*bsd*-gnu)		MISC_MAN_SUFFIX=7x ;;
678895b296d0Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
678995b296d0Smrg	*)		MISC_MAN_SUFFIX=7  ;;
679095b296d0Smrg    esac
679195b296d0Smrgfi
679295b296d0Smrgif test x$MISC_MAN_DIR = x    ; then
679395b296d0Smrg    case $host_os in
679495b296d0Smrg#	linux* | gnu* | k*bsd*-gnu)	MISC_MAN_DIR='$(mandir)/man7' ;;
679595b296d0Smrg	*)	MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;;
679695b296d0Smrg    esac
679795b296d0Smrgfi
679895b296d0Smrg
679995b296d0Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 
680095b296d0Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
680195b296d0Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
680295b296d0Smrg    case $host_os in
680395b296d0Smrg#	linux* | gnu* | k*bsd*-gnu)		DRIVER_MAN_SUFFIX=4x ;;
680495b296d0Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
680595b296d0Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
680695b296d0Smrg    esac
680795b296d0Smrgfi
680895b296d0Smrgif test x$DRIVER_MAN_DIR = x    ; then
680995b296d0Smrg    case $host_os in
681095b296d0Smrg#	linux* | gnu* | k*bsd*-gnu)	DRIVER_MAN_DIR='$(mandir)/man4' ;;
681195b296d0Smrg	*)	DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;;
681295b296d0Smrg    esac
681395b296d0Smrgfi
681495b296d0Smrg
681595b296d0Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
681695b296d0Smrg    case $host_os in
681795b296d0Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
681895b296d0Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
681995b296d0Smrg    esac
682095b296d0Smrgfi
682195b296d0Smrgif test x$ADMIN_MAN_DIR = x    ; then
682295b296d0Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
682395b296d0Smrgfi
682495b296d0Smrg
682595b296d0Smrg
682695b296d0SmrgAC_SUBST([APP_MAN_SUFFIX])
682795b296d0SmrgAC_SUBST([LIB_MAN_SUFFIX])
682895b296d0SmrgAC_SUBST([FILE_MAN_SUFFIX])
682995b296d0SmrgAC_SUBST([MISC_MAN_SUFFIX])
683095b296d0SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
683195b296d0SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
683295b296d0SmrgAC_SUBST([APP_MAN_DIR])
683395b296d0SmrgAC_SUBST([LIB_MAN_DIR])
683495b296d0SmrgAC_SUBST([FILE_MAN_DIR])
683595b296d0SmrgAC_SUBST([MISC_MAN_DIR])
683695b296d0SmrgAC_SUBST([DRIVER_MAN_DIR])
683795b296d0SmrgAC_SUBST([ADMIN_MAN_DIR])
683895b296d0Smrg]) # XORG_MANPAGE_SECTIONS
683995b296d0Smrg
684095b296d0Smrg# XORG_CHECK_LINUXDOC
684195b296d0Smrg# -------------------
684295b296d0Smrg# Minimum version: 1.0.0
684395b296d0Smrg#
684495b296d0Smrg# Defines the variable MAKE_TEXT if the necessary tools and
684595b296d0Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
684695b296d0Smrg# Whether or not the necessary tools and files are found can be checked
684795b296d0Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
684895b296d0SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
684995b296d0SmrgAC_CHECK_FILE(
685095b296d0Smrg	[$prefix/share/X11/sgml/defs.ent], 
685195b296d0Smrg	[DEFS_ENT_PATH=$prefix/share/X11/sgml],
685295b296d0Smrg	[DEFS_ENT_PATH=]
685395b296d0Smrg)
685495b296d0Smrg
685595b296d0SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
685695b296d0SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
685795b296d0Smrg
685895b296d0SmrgAC_MSG_CHECKING([Whether to build documentation])
685995b296d0Smrg
686095b296d0Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
686195b296d0Smrg   BUILDDOC=yes
686295b296d0Smrgelse
686395b296d0Smrg   BUILDDOC=no
686495b296d0Smrgfi
686595b296d0Smrg
686695b296d0SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
686795b296d0Smrg
686895b296d0SmrgAC_MSG_RESULT([$BUILDDOC])
686995b296d0Smrg
687095b296d0SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
687195b296d0Smrg
687295b296d0Smrgif test x$PS2PDF != x ; then
687395b296d0Smrg   BUILDPDFDOC=yes
687495b296d0Smrgelse
687595b296d0Smrg   BUILDPDFDOC=no
687695b296d0Smrgfi
687795b296d0Smrg
687895b296d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
687995b296d0Smrg
688095b296d0SmrgAC_MSG_RESULT([$BUILDPDFDOC])
688195b296d0Smrg
688295b296d0SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
688395b296d0SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
688495b296d0SmrgMAKE_PDF="$PS2PDF"
688595b296d0SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC  -B html --split=0"
688695b296d0Smrg
688795b296d0SmrgAC_SUBST(MAKE_TEXT)
688895b296d0SmrgAC_SUBST(MAKE_PS)
688995b296d0SmrgAC_SUBST(MAKE_PDF)
689095b296d0SmrgAC_SUBST(MAKE_HTML)
689195b296d0Smrg]) # XORG_CHECK_LINUXDOC
689295b296d0Smrg
689395b296d0Smrg# XORG_CHECK_MALLOC_ZERO
689495b296d0Smrg# ----------------------
689595b296d0Smrg# Minimum version: 1.0.0
689695b296d0Smrg#
689795b296d0Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
689895b296d0Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
689995b296d0Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
690095b296d0SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
690195b296d0SmrgAC_ARG_ENABLE(malloc0returnsnull,
690295b296d0Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
690395b296d0Smrg		       [malloc(0) returns NULL (default: auto)]),
690495b296d0Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
690595b296d0Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
690695b296d0Smrg
690795b296d0SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
690895b296d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
690995b296d0Smrg	AC_RUN_IFELSE([
691095b296d0Smrgchar *malloc();
691195b296d0Smrgchar *realloc();
691295b296d0Smrgchar *calloc();
691395b296d0Smrgmain() {
691495b296d0Smrg    char *m0, *r0, *c0, *p;
691595b296d0Smrg    m0 = malloc(0);
691695b296d0Smrg    p = malloc(10);
691795b296d0Smrg    r0 = realloc(p,0);
691895b296d0Smrg    c0 = calloc(0);
691995b296d0Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
692095b296d0Smrg}],
692195b296d0Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
692295b296d0Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
692395b296d0Smrgfi
692495b296d0SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
692595b296d0Smrg
692695b296d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
692795b296d0Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
692895b296d0Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
692995b296d0Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
693095b296d0Smrgelse
693195b296d0Smrg	MALLOC_ZERO_CFLAGS=""
693295b296d0Smrg	XMALLOC_ZERO_CFLAGS=""
693395b296d0Smrg	XTMALLOC_ZERO_CFLAGS=""
693495b296d0Smrgfi
693595b296d0Smrg
693695b296d0SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
693795b296d0SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
693895b296d0SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
693995b296d0Smrg]) # XORG_CHECK_MALLOC_ZERO
694095b296d0Smrg
694195b296d0Smrg# XORG_WITH_LINT()
694295b296d0Smrg# ----------------
694395b296d0Smrg# Minimum version: 1.1.0
694495b296d0Smrg#
694595b296d0Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
694695b296d0Smrg# is specified.   (Use --with-lint=sparse for sparse.)
694795b296d0Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
694895b296d0Smrg# Sets $LINT_FLAGS to flags to pass to source checker
694995b296d0Smrg# Sets LINT automake conditional if enabled (default: disabled)
695095b296d0Smrg#
695195b296d0SmrgAC_DEFUN([XORG_WITH_LINT],[
695295b296d0Smrg
695395b296d0Smrg# Allow checking code with lint, sparse, etc.
695495b296d0SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
695595b296d0Smrg		[Use a lint-style source code checker (default: disabled)])],
695695b296d0Smrg		[use_lint=$withval], [use_lint=no])
695795b296d0Smrgif test "x$use_lint" = "xyes" ; then
695895b296d0Smrg	LINT="lint"
695995b296d0Smrgelse
696095b296d0Smrg	LINT="$use_lint"
696195b296d0Smrgfi
696295b296d0Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
696395b296d0Smrg    case $LINT in
696495b296d0Smrg	lint|*/lint)
696595b296d0Smrg	    case $host_os in
696695b296d0Smrg		solaris*)
696795b296d0Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
696895b296d0Smrg			;;
696995b296d0Smrg	    esac
697095b296d0Smrg	    ;;
697195b296d0Smrg    esac
697295b296d0Smrgfi
697395b296d0Smrg
697495b296d0SmrgAC_SUBST(LINT)
697595b296d0SmrgAC_SUBST(LINT_FLAGS)
697695b296d0SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
697795b296d0Smrg
697895b296d0Smrg]) # XORG_WITH_LINT
697995b296d0Smrg
698095b296d0Smrg# XORG_LINT_LIBRARY(LIBNAME)
698195b296d0Smrg# --------------------------
698295b296d0Smrg# Minimum version: 1.1.0
698395b296d0Smrg#
698495b296d0Smrg# Sets up flags for building lint libraries for checking programs that call
698595b296d0Smrg# functions in the library.
698695b296d0Smrg# Disabled by default, enable with --enable-lint-library
698795b296d0Smrg# Sets: 
698895b296d0Smrg#	@LINTLIB@		- name of lint library file to make
698995b296d0Smrg#	MAKE_LINT_LIB		- automake conditional
699095b296d0Smrg#
699195b296d0Smrg
699295b296d0SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
699395b296d0SmrgAC_REQUIRE([XORG_WITH_LINT])
699495b296d0Smrg# Build lint "library" for more indepth checks of programs calling this library
699595b296d0SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
699695b296d0Smrg	[Create lint library (default: disabled)])],
699795b296d0Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
699895b296d0Smrgif test "x$make_lint_lib" != "xno" ; then
699995b296d0Smrg	if test "x$LINT" = "xno" ; then
700095b296d0Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
700195b296d0Smrg	fi
700295b296d0Smrg	if test "x$make_lint_lib" = "xyes" ; then
700395b296d0Smrg		LINTLIB=llib-l$1.ln
700495b296d0Smrg	else
700595b296d0Smrg		LINTLIB=$make_lint_lib
700695b296d0Smrg	fi
700795b296d0Smrgfi
700895b296d0SmrgAC_SUBST(LINTLIB)
700995b296d0SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
701095b296d0Smrg
701195b296d0Smrg]) # XORG_LINT_LIBRARY
701295b296d0Smrg
701395b296d0Smrgdnl Copyright 2005 Red Hat, Inc
701495b296d0Smrgdnl 
701595b296d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
701695b296d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that
701795b296d0Smrgdnl the above copyright notice appear in all copies and that both that
701895b296d0Smrgdnl copyright notice and this permission notice appear in supporting
701995b296d0Smrgdnl documentation.
702095b296d0Smrgdnl 
702195b296d0Smrgdnl The above copyright notice and this permission notice shall be included
702295b296d0Smrgdnl in all copies or substantial portions of the Software.
702395b296d0Smrgdnl 
702495b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
702595b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
702695b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
702795b296d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
702895b296d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
702995b296d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
703095b296d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
703195b296d0Smrgdnl 
703295b296d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall
703395b296d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or
703495b296d0Smrgdnl other dealings in this Software without prior written authorization
703595b296d0Smrgdnl from the copyright holders.
703695b296d0Smrgdnl 
703795b296d0Smrg
703895b296d0Smrg# XORG_DRIVER_CHECK_EXT()
703995b296d0Smrg# --------------------------
704095b296d0Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
704195b296d0Smrg# is defined, then add $1 to $REQUIRED_MODULES.
704295b296d0Smrg
704395b296d0SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
704495b296d0Smrg	SAVE_CFLAGS="$CFLAGS"
704595b296d0Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
704695b296d0Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
704795b296d0Smrg#include "xorg-server.h"
704895b296d0Smrg#if !defined $1
704995b296d0Smrg#error $1 not defined
705095b296d0Smrg#endif
705195b296d0Smrg		]])],
705295b296d0Smrg		[_EXT_CHECK=yes],
705395b296d0Smrg		[_EXT_CHECK=no])
705495b296d0Smrg	CFLAGS="$SAVE_CFLAGS"
705595b296d0Smrg	AC_MSG_CHECKING([if $1 is defined])
705695b296d0Smrg	AC_MSG_RESULT([$_EXT_CHECK])
705795b296d0Smrg	if test "$_EXT_CHECK" != no; then
705895b296d0Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
705995b296d0Smrg	fi
706095b296d0Smrg])
706195b296d0Smrg
706295b296d0Smrgdnl Copyright 2005 Red Hat, Inc
706395b296d0Smrgdnl
706495b296d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
706595b296d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that
706695b296d0Smrgdnl the above copyright notice appear in all copies and that both that
706795b296d0Smrgdnl copyright notice and this permission notice appear in supporting
706895b296d0Smrgdnl documentation.
706995b296d0Smrgdnl
707095b296d0Smrgdnl The above copyright notice and this permission notice shall be included
707195b296d0Smrgdnl in all copies or substantial portions of the Software.
707295b296d0Smrgdnl
707395b296d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
707495b296d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
707595b296d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
707695b296d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
707795b296d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
707895b296d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
707995b296d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
708095b296d0Smrgdnl
708195b296d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall
708295b296d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or
708395b296d0Smrgdnl other dealings in this Software without prior written authorization
708495b296d0Smrgdnl from the copyright holders.
708595b296d0Smrgdnl
708695b296d0Smrg
708795b296d0Smrg# XORG_RELEASE_VERSION
708895b296d0Smrg# --------------------
708995b296d0Smrg# Adds --with/without-release-string and changes the PACKAGE and
709095b296d0Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
709195b296d0Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
709295b296d0Smrg 
709395b296d0SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
709495b296d0Smrg	AC_ARG_WITH(release-version,
709595b296d0Smrg			AC_HELP_STRING([--with-release-version=STRING],
709695b296d0Smrg				[Use release version string in package name]),
709795b296d0Smrg			[RELEASE_VERSION="$withval"],
709895b296d0Smrg			[RELEASE_VERSION=""])
709995b296d0Smrg	if test "x$RELEASE_VERSION" != "x"; then
710095b296d0Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
710195b296d0Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
710295b296d0Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
710395b296d0Smrg	fi
710495b296d0Smrg])
710595b296d0Smrg
710695b296d0Smrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
710795b296d0Smrg#
710895b296d0Smrg# This file is free software; the Free Software Foundation
710995b296d0Smrg# gives unlimited permission to copy and/or distribute it,
711095b296d0Smrg# with or without modifications, as long as this notice is preserved.
711195b296d0Smrg
711295b296d0Smrg# AM_AUTOMAKE_VERSION(VERSION)
711395b296d0Smrg# ----------------------------
711495b296d0Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
711595b296d0Smrg# generated from the m4 files accompanying Automake X.Y.
711695b296d0SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
711795b296d0Smrg
711895b296d0Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
711995b296d0Smrg# -------------------------------
712095b296d0Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
712195b296d0Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
712295b296d0SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
712395b296d0Smrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
712495b296d0Smrg
712595b296d0Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
712695b296d0Smrg
712795b296d0Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
712895b296d0Smrg#
712995b296d0Smrg# This file is free software; the Free Software Foundation
713095b296d0Smrg# gives unlimited permission to copy and/or distribute it,
713195b296d0Smrg# with or without modifications, as long as this notice is preserved.
713295b296d0Smrg
713395b296d0Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
713495b296d0Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
713595b296d0Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
713695b296d0Smrg#
713795b296d0Smrg# Of course, Automake must honor this variable whenever it calls a
713895b296d0Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
713995b296d0Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
714095b296d0Smrg# depending on how configure is run.  This is pretty annoying, since
714195b296d0Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
714295b296d0Smrg# source directory, any form will work fine, but in subdirectories a
714395b296d0Smrg# relative path needs to be adjusted first.
714495b296d0Smrg#
714595b296d0Smrg# $ac_aux_dir/missing
714695b296d0Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
714795b296d0Smrg# $top_srcdir/$ac_aux_dir/missing
714895b296d0Smrg#    fails if $ac_aux_dir is absolute,
714995b296d0Smrg#    fails when called from a subdirectory in a VPATH build with
715095b296d0Smrg#          a relative $ac_aux_dir
715195b296d0Smrg#
715295b296d0Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
715395b296d0Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
715495b296d0Smrg# harmless because $srcdir is `.', but things will broke when you
715595b296d0Smrg# start a VPATH build or use an absolute $srcdir.
715695b296d0Smrg#
715795b296d0Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
715895b296d0Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
715995b296d0Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
716095b296d0Smrg# and then we would define $MISSING as
716195b296d0Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
716295b296d0Smrg# This will work as long as MISSING is not called from configure, because
716395b296d0Smrg# unfortunately $(top_srcdir) has no meaning in configure.
716495b296d0Smrg# However there are other variables, like CC, which are often used in
716595b296d0Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
716695b296d0Smrg#
716795b296d0Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
716895b296d0Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
716995b296d0Smrg# configured tree to be moved without reconfiguration.
717095b296d0Smrg
717195b296d0SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
717295b296d0Smrg[dnl Rely on autoconf to set up CDPATH properly.
717395b296d0SmrgAC_PREREQ([2.50])dnl
717495b296d0Smrg# expand $ac_aux_dir to an absolute path
717595b296d0Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
717695b296d0Smrg])
717795b296d0Smrg
717895b296d0Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
717995b296d0Smrg
718095b296d0Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
718195b296d0Smrg# Free Software Foundation, Inc.
718295b296d0Smrg#
718395b296d0Smrg# This file is free software; the Free Software Foundation
718495b296d0Smrg# gives unlimited permission to copy and/or distribute it,
718595b296d0Smrg# with or without modifications, as long as this notice is preserved.
718695b296d0Smrg
718795b296d0Smrg# serial 7
718895b296d0Smrg
718995b296d0Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
719095b296d0Smrg# -------------------------------------
719195b296d0Smrg# Define a conditional.
719295b296d0SmrgAC_DEFUN([AM_CONDITIONAL],
719395b296d0Smrg[AC_PREREQ(2.52)dnl
719495b296d0Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
719595b296d0Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
719695b296d0SmrgAC_SUBST([$1_TRUE])
719795b296d0SmrgAC_SUBST([$1_FALSE])
719895b296d0Smrgif $2; then
719995b296d0Smrg  $1_TRUE=
720095b296d0Smrg  $1_FALSE='#'
720195b296d0Smrgelse
720295b296d0Smrg  $1_TRUE='#'
720395b296d0Smrg  $1_FALSE=
720495b296d0Smrgfi
720595b296d0SmrgAC_CONFIG_COMMANDS_PRE(
720695b296d0Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
720795b296d0Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
720895b296d0SmrgUsually this means the macro was only invoked conditionally.]])
720995b296d0Smrgfi])])
721095b296d0Smrg
721195b296d0Smrg
721295b296d0Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
721395b296d0Smrg# Free Software Foundation, Inc.
721495b296d0Smrg#
721595b296d0Smrg# This file is free software; the Free Software Foundation
721695b296d0Smrg# gives unlimited permission to copy and/or distribute it,
721795b296d0Smrg# with or without modifications, as long as this notice is preserved.
721895b296d0Smrg
721995b296d0Smrg# serial 8
722095b296d0Smrg
722195b296d0Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
722295b296d0Smrg# written in clear, in which case automake, when reading aclocal.m4,
722395b296d0Smrg# will think it sees a *use*, and therefore will trigger all it's
722495b296d0Smrg# C support machinery.  Also note that it means that autoscan, seeing
722595b296d0Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
722695b296d0Smrg
722795b296d0Smrg
722895b296d0Smrg# _AM_DEPENDENCIES(NAME)
722995b296d0Smrg# ----------------------
723095b296d0Smrg# See how the compiler implements dependency checking.
723195b296d0Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
723295b296d0Smrg# We try a few techniques and use that to set a single cache variable.
723395b296d0Smrg#
723495b296d0Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
723595b296d0Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
723695b296d0Smrg# dependency, and given that the user is not expected to run this macro,
723795b296d0Smrg# just rely on AC_PROG_CC.
723895b296d0SmrgAC_DEFUN([_AM_DEPENDENCIES],
723995b296d0Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
724095b296d0SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
724195b296d0SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
724295b296d0SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
724395b296d0Smrg
724495b296d0Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
724595b296d0Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
724695b296d0Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
724795b296d0Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
724895b296d0Smrg                   [depcc="$$1"   am_compiler_list=])
724995b296d0Smrg
725095b296d0SmrgAC_CACHE_CHECK([dependency style of $depcc],
725195b296d0Smrg               [am_cv_$1_dependencies_compiler_type],
725295b296d0Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
725395b296d0Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
725495b296d0Smrg  # making bogus files that we don't know about and never remove.  For
725595b296d0Smrg  # instance it was reported that on HP-UX the gcc test will end up
725695b296d0Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
725795b296d0Smrg  # in D'.
725895b296d0Smrg  mkdir conftest.dir
725995b296d0Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
726095b296d0Smrg  # using a relative directory.
726195b296d0Smrg  cp "$am_depcomp" conftest.dir
726295b296d0Smrg  cd conftest.dir
726395b296d0Smrg  # We will build objects and dependencies in a subdirectory because
726495b296d0Smrg  # it helps to detect inapplicable dependency modes.  For instance
726595b296d0Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
726695b296d0Smrg  # side effect of compilation, but ICC will put the dependencies in
726795b296d0Smrg  # the current directory while Tru64 will put them in the object
726895b296d0Smrg  # directory.
726995b296d0Smrg  mkdir sub
727095b296d0Smrg
727195b296d0Smrg  am_cv_$1_dependencies_compiler_type=none
727295b296d0Smrg  if test "$am_compiler_list" = ""; then
727395b296d0Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
727495b296d0Smrg  fi
727595b296d0Smrg  for depmode in $am_compiler_list; do
727695b296d0Smrg    # Setup a source with many dependencies, because some compilers
727795b296d0Smrg    # like to wrap large dependency lists on column 80 (with \), and
727895b296d0Smrg    # we should not choose a depcomp mode which is confused by this.
727995b296d0Smrg    #
728095b296d0Smrg    # We need to recreate these files for each test, as the compiler may
728195b296d0Smrg    # overwrite some of them when testing with obscure command lines.
728295b296d0Smrg    # This happens at least with the AIX C compiler.
728395b296d0Smrg    : > sub/conftest.c
728495b296d0Smrg    for i in 1 2 3 4 5 6; do
728595b296d0Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
728695b296d0Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
728795b296d0Smrg      # Solaris 8's {/usr,}/bin/sh.
728895b296d0Smrg      touch sub/conftst$i.h
728995b296d0Smrg    done
729095b296d0Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
729195b296d0Smrg
729295b296d0Smrg    case $depmode in
729395b296d0Smrg    nosideeffect)
729495b296d0Smrg      # after this tag, mechanisms are not by side-effect, so they'll
729595b296d0Smrg      # only be used when explicitly requested
729695b296d0Smrg      if test "x$enable_dependency_tracking" = xyes; then
729795b296d0Smrg	continue
729895b296d0Smrg      else
729995b296d0Smrg	break
730095b296d0Smrg      fi
730195b296d0Smrg      ;;
730295b296d0Smrg    none) break ;;
730395b296d0Smrg    esac
730495b296d0Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
730595b296d0Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
730695b296d0Smrg    # handle `-M -o', and we need to detect this.
730795b296d0Smrg    if depmode=$depmode \
730895b296d0Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
730995b296d0Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
731095b296d0Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
731195b296d0Smrg         >/dev/null 2>conftest.err &&
731295b296d0Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
731395b296d0Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
731495b296d0Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
731595b296d0Smrg      # icc doesn't choke on unknown options, it will just issue warnings
731695b296d0Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
731795b296d0Smrg      # that says an option was ignored or not supported.
731895b296d0Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
731995b296d0Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
732095b296d0Smrg      # The diagnosis changed in icc 8.0:
732195b296d0Smrg      #   icc: Command line remark: option '-MP' not supported
732295b296d0Smrg      if (grep 'ignoring option' conftest.err ||
732395b296d0Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
732495b296d0Smrg        am_cv_$1_dependencies_compiler_type=$depmode
732595b296d0Smrg        break
732695b296d0Smrg      fi
732795b296d0Smrg    fi
732895b296d0Smrg  done
732995b296d0Smrg
733095b296d0Smrg  cd ..
733195b296d0Smrg  rm -rf conftest.dir
733295b296d0Smrgelse
733395b296d0Smrg  am_cv_$1_dependencies_compiler_type=none
733495b296d0Smrgfi
733595b296d0Smrg])
733695b296d0SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
733795b296d0SmrgAM_CONDITIONAL([am__fastdep$1], [
733895b296d0Smrg  test "x$enable_dependency_tracking" != xno \
733995b296d0Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
734095b296d0Smrg])
734195b296d0Smrg
734295b296d0Smrg
734395b296d0Smrg# AM_SET_DEPDIR
734495b296d0Smrg# -------------
734595b296d0Smrg# Choose a directory name for dependency files.
734695b296d0Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
734795b296d0SmrgAC_DEFUN([AM_SET_DEPDIR],
734895b296d0Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
734995b296d0SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
735095b296d0Smrg])
735195b296d0Smrg
735295b296d0Smrg
735395b296d0Smrg# AM_DEP_TRACK
735495b296d0Smrg# ------------
735595b296d0SmrgAC_DEFUN([AM_DEP_TRACK],
735695b296d0Smrg[AC_ARG_ENABLE(dependency-tracking,
735795b296d0Smrg[  --disable-dependency-tracking  speeds up one-time build
735895b296d0Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
735995b296d0Smrgif test "x$enable_dependency_tracking" != xno; then
736095b296d0Smrg  am_depcomp="$ac_aux_dir/depcomp"
736195b296d0Smrg  AMDEPBACKSLASH='\'
736295b296d0Smrgfi
736395b296d0SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
736495b296d0SmrgAC_SUBST([AMDEPBACKSLASH])
736595b296d0Smrg])
736695b296d0Smrg
736795b296d0Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
736895b296d0Smrg
736995b296d0Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
737095b296d0Smrg# Free Software Foundation, Inc.
737195b296d0Smrg#
737295b296d0Smrg# This file is free software; the Free Software Foundation
737395b296d0Smrg# gives unlimited permission to copy and/or distribute it,
737495b296d0Smrg# with or without modifications, as long as this notice is preserved.
737595b296d0Smrg
737695b296d0Smrg#serial 3
737795b296d0Smrg
737895b296d0Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
737995b296d0Smrg# ------------------------------
738095b296d0SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
738195b296d0Smrg[for mf in $CONFIG_FILES; do
738295b296d0Smrg  # Strip MF so we end up with the name of the file.
738395b296d0Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
738495b296d0Smrg  # Check whether this is an Automake generated Makefile or not.
738595b296d0Smrg  # We used to match only the files named `Makefile.in', but
738695b296d0Smrg  # some people rename them; so instead we look at the file content.
738795b296d0Smrg  # Grep'ing the first line is not enough: some people post-process
738895b296d0Smrg  # each Makefile.in and add a new line on top of each file to say so.
738995b296d0Smrg  # So let's grep whole file.
739095b296d0Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
739195b296d0Smrg    dirpart=`AS_DIRNAME("$mf")`
739295b296d0Smrg  else
739395b296d0Smrg    continue
739495b296d0Smrg  fi
739595b296d0Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
739695b296d0Smrg  # from the Makefile without running `make'.
739795b296d0Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
739895b296d0Smrg  test -z "$DEPDIR" && continue
739995b296d0Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
740095b296d0Smrg  test -z "am__include" && continue
740195b296d0Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
740295b296d0Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
740395b296d0Smrg  U=`sed -n 's/^U = //p' < "$mf"`
740495b296d0Smrg  # Find all dependency output files, they are included files with
740595b296d0Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
740695b296d0Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
740795b296d0Smrg  # expansion.
740895b296d0Smrg  for file in `sed -n "
740995b296d0Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
741095b296d0Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
741195b296d0Smrg    # Make sure the directory exists.
741295b296d0Smrg    test -f "$dirpart/$file" && continue
741395b296d0Smrg    fdir=`AS_DIRNAME(["$file"])`
741495b296d0Smrg    AS_MKDIR_P([$dirpart/$fdir])
741595b296d0Smrg    # echo "creating $dirpart/$file"
741695b296d0Smrg    echo '# dummy' > "$dirpart/$file"
741795b296d0Smrg  done
741895b296d0Smrgdone
741995b296d0Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
742095b296d0Smrg
742195b296d0Smrg
742295b296d0Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
742395b296d0Smrg# -----------------------------
742495b296d0Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
742595b296d0Smrg#
742695b296d0Smrg# This code is only required when automatic dependency tracking
742795b296d0Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
742895b296d0Smrg# need in order to bootstrap the dependency handling code.
742995b296d0SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
743095b296d0Smrg[AC_CONFIG_COMMANDS([depfiles],
743195b296d0Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
743295b296d0Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
743395b296d0Smrg])
743495b296d0Smrg
743595b296d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
743695b296d0Smrg# Free Software Foundation, Inc.
743795b296d0Smrg#
743895b296d0Smrg# This file is free software; the Free Software Foundation
743995b296d0Smrg# gives unlimited permission to copy and/or distribute it,
744095b296d0Smrg# with or without modifications, as long as this notice is preserved.
744195b296d0Smrg
744295b296d0Smrg# serial 8
744395b296d0Smrg
744495b296d0Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
744595b296d0SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
744695b296d0Smrg
744795b296d0Smrg# Do all the work for Automake.                             -*- Autoconf -*-
744895b296d0Smrg
744995b296d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
745095b296d0Smrg# Free Software Foundation, Inc.
745195b296d0Smrg#
745295b296d0Smrg# This file is free software; the Free Software Foundation
745395b296d0Smrg# gives unlimited permission to copy and/or distribute it,
745495b296d0Smrg# with or without modifications, as long as this notice is preserved.
745595b296d0Smrg
745695b296d0Smrg# serial 12
745795b296d0Smrg
745895b296d0Smrg# This macro actually does too much.  Some checks are only needed if
745995b296d0Smrg# your package does certain things.  But this isn't really a big deal.
746095b296d0Smrg
746195b296d0Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
746295b296d0Smrg# AM_INIT_AUTOMAKE([OPTIONS])
746395b296d0Smrg# -----------------------------------------------
746495b296d0Smrg# The call with PACKAGE and VERSION arguments is the old style
746595b296d0Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
746695b296d0Smrg# and VERSION should now be passed to AC_INIT and removed from
746795b296d0Smrg# the call to AM_INIT_AUTOMAKE.
746895b296d0Smrg# We support both call styles for the transition.  After
746995b296d0Smrg# the next Automake release, Autoconf can make the AC_INIT
747095b296d0Smrg# arguments mandatory, and then we can depend on a new Autoconf
747195b296d0Smrg# release and drop the old call support.
747295b296d0SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
747395b296d0Smrg[AC_PREREQ([2.58])dnl
747495b296d0Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
747595b296d0Smrgdnl the ones we care about.
747695b296d0Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
747795b296d0SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
747895b296d0SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
747995b296d0Smrg# test to see if srcdir already configured
748095b296d0Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
748195b296d0Smrg   test -f $srcdir/config.status; then
748295b296d0Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
748395b296d0Smrgfi
748495b296d0Smrg
748595b296d0Smrg# test whether we have cygpath
748695b296d0Smrgif test -z "$CYGPATH_W"; then
748795b296d0Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
748895b296d0Smrg    CYGPATH_W='cygpath -w'
748995b296d0Smrg  else
749095b296d0Smrg    CYGPATH_W=echo
749195b296d0Smrg  fi
749295b296d0Smrgfi
749395b296d0SmrgAC_SUBST([CYGPATH_W])
749495b296d0Smrg
749595b296d0Smrg# Define the identity of the package.
749695b296d0Smrgdnl Distinguish between old-style and new-style calls.
749795b296d0Smrgm4_ifval([$2],
749895b296d0Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
749995b296d0Smrg AC_SUBST([PACKAGE], [$1])dnl
750095b296d0Smrg AC_SUBST([VERSION], [$2])],
750195b296d0Smrg[_AM_SET_OPTIONS([$1])dnl
750295b296d0Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
750395b296d0Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
750495b296d0Smrg
750595b296d0Smrg_AM_IF_OPTION([no-define],,
750695b296d0Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
750795b296d0Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
750895b296d0Smrg
750995b296d0Smrg# Some tools Automake needs.
751095b296d0SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
751195b296d0SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
751295b296d0SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
751395b296d0SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
751495b296d0SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
751595b296d0SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
751695b296d0SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
751795b296d0SmrgAM_PROG_INSTALL_SH
751895b296d0SmrgAM_PROG_INSTALL_STRIP
751995b296d0SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
752095b296d0Smrg# We need awk for the "check" target.  The system "awk" is bad on
752195b296d0Smrg# some platforms.
752295b296d0SmrgAC_REQUIRE([AC_PROG_AWK])dnl
752395b296d0SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
752495b296d0SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
752595b296d0Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
752695b296d0Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
752795b296d0Smrg	      		     [_AM_PROG_TAR([v7])])])
752895b296d0Smrg_AM_IF_OPTION([no-dependencies],,
752995b296d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
753095b296d0Smrg                  [_AM_DEPENDENCIES(CC)],
753195b296d0Smrg                  [define([AC_PROG_CC],
753295b296d0Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
753395b296d0SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
753495b296d0Smrg                  [_AM_DEPENDENCIES(CXX)],
753595b296d0Smrg                  [define([AC_PROG_CXX],
753695b296d0Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
753795b296d0Smrg])
753895b296d0Smrg])
753995b296d0Smrg
754095b296d0Smrg
754195b296d0Smrg# When config.status generates a header, we must update the stamp-h file.
754295b296d0Smrg# This file resides in the same directory as the config header
754395b296d0Smrg# that is generated.  The stamp files are numbered to have different names.
754495b296d0Smrg
754595b296d0Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
754695b296d0Smrg# loop where config.status creates the headers, so we can generate
754795b296d0Smrg# our stamp files there.
754895b296d0SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
754995b296d0Smrg[# Compute $1's index in $config_headers.
755095b296d0Smrg_am_stamp_count=1
755195b296d0Smrgfor _am_header in $config_headers :; do
755295b296d0Smrg  case $_am_header in
755395b296d0Smrg    $1 | $1:* )
755495b296d0Smrg      break ;;
755595b296d0Smrg    * )
755695b296d0Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
755795b296d0Smrg  esac
755895b296d0Smrgdone
755995b296d0Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
756095b296d0Smrg
756195b296d0Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
756295b296d0Smrg#
756395b296d0Smrg# This file is free software; the Free Software Foundation
756495b296d0Smrg# gives unlimited permission to copy and/or distribute it,
756595b296d0Smrg# with or without modifications, as long as this notice is preserved.
756695b296d0Smrg
756795b296d0Smrg# AM_PROG_INSTALL_SH
756895b296d0Smrg# ------------------
756995b296d0Smrg# Define $install_sh.
757095b296d0SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
757195b296d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
757295b296d0Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
757395b296d0SmrgAC_SUBST(install_sh)])
757495b296d0Smrg
757595b296d0Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
757695b296d0Smrg#
757795b296d0Smrg# This file is free software; the Free Software Foundation
757895b296d0Smrg# gives unlimited permission to copy and/or distribute it,
757995b296d0Smrg# with or without modifications, as long as this notice is preserved.
758095b296d0Smrg
758195b296d0Smrg# serial 2
758295b296d0Smrg
758395b296d0Smrg# Check whether the underlying file-system supports filenames
758495b296d0Smrg# with a leading dot.  For instance MS-DOS doesn't.
758595b296d0SmrgAC_DEFUN([AM_SET_LEADING_DOT],
758695b296d0Smrg[rm -rf .tst 2>/dev/null
758795b296d0Smrgmkdir .tst 2>/dev/null
758895b296d0Smrgif test -d .tst; then
758995b296d0Smrg  am__leading_dot=.
759095b296d0Smrgelse
759195b296d0Smrg  am__leading_dot=_
759295b296d0Smrgfi
759395b296d0Smrgrmdir .tst 2>/dev/null
759495b296d0SmrgAC_SUBST([am__leading_dot])])
759595b296d0Smrg
759695b296d0Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
759795b296d0Smrg# From Jim Meyering
759895b296d0Smrg
759995b296d0Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
760095b296d0Smrg# Free Software Foundation, Inc.
760195b296d0Smrg#
760295b296d0Smrg# This file is free software; the Free Software Foundation
760395b296d0Smrg# gives unlimited permission to copy and/or distribute it,
760495b296d0Smrg# with or without modifications, as long as this notice is preserved.
760595b296d0Smrg
760695b296d0Smrg# serial 4
760795b296d0Smrg
760895b296d0SmrgAC_DEFUN([AM_MAINTAINER_MODE],
760995b296d0Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
761095b296d0Smrg  dnl maintainer-mode is disabled by default
761195b296d0Smrg  AC_ARG_ENABLE(maintainer-mode,
761295b296d0Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
761395b296d0Smrg			  (and sometimes confusing) to the casual installer],
761495b296d0Smrg      USE_MAINTAINER_MODE=$enableval,
761595b296d0Smrg      USE_MAINTAINER_MODE=no)
761695b296d0Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
761795b296d0Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
761895b296d0Smrg  MAINT=$MAINTAINER_MODE_TRUE
761995b296d0Smrg  AC_SUBST(MAINT)dnl
762095b296d0Smrg]
762195b296d0Smrg)
762295b296d0Smrg
762395b296d0SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
762495b296d0Smrg
762595b296d0Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
762695b296d0Smrg
762795b296d0Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
762895b296d0Smrg#
762995b296d0Smrg# This file is free software; the Free Software Foundation
763095b296d0Smrg# gives unlimited permission to copy and/or distribute it,
763195b296d0Smrg# with or without modifications, as long as this notice is preserved.
763295b296d0Smrg
763395b296d0Smrg# serial 3
763495b296d0Smrg
763595b296d0Smrg# AM_MAKE_INCLUDE()
763695b296d0Smrg# -----------------
763795b296d0Smrg# Check to see how make treats includes.
763895b296d0SmrgAC_DEFUN([AM_MAKE_INCLUDE],
763995b296d0Smrg[am_make=${MAKE-make}
764095b296d0Smrgcat > confinc << 'END'
764195b296d0Smrgam__doit:
764295b296d0Smrg	@echo done
764395b296d0Smrg.PHONY: am__doit
764495b296d0SmrgEND
764595b296d0Smrg# If we don't find an include directive, just comment out the code.
764695b296d0SmrgAC_MSG_CHECKING([for style of include used by $am_make])
764795b296d0Smrgam__include="#"
764895b296d0Smrgam__quote=
764995b296d0Smrg_am_result=none
765095b296d0Smrg# First try GNU make style include.
765195b296d0Smrgecho "include confinc" > confmf
765295b296d0Smrg# We grep out `Entering directory' and `Leaving directory'
765395b296d0Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
765495b296d0Smrg# In particular we don't look at `^make:' because GNU make might
765595b296d0Smrg# be invoked under some other name (usually "gmake"), in which
765695b296d0Smrg# case it prints its new name instead of `make'.
765795b296d0Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
765895b296d0Smrg   am__include=include
765995b296d0Smrg   am__quote=
766095b296d0Smrg   _am_result=GNU
766195b296d0Smrgfi
766295b296d0Smrg# Now try BSD make style include.
766395b296d0Smrgif test "$am__include" = "#"; then
766495b296d0Smrg   echo '.include "confinc"' > confmf
766595b296d0Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
766695b296d0Smrg      am__include=.include
766795b296d0Smrg      am__quote="\""
766895b296d0Smrg      _am_result=BSD
766995b296d0Smrg   fi
767095b296d0Smrgfi
767195b296d0SmrgAC_SUBST([am__include])
767295b296d0SmrgAC_SUBST([am__quote])
767395b296d0SmrgAC_MSG_RESULT([$_am_result])
767495b296d0Smrgrm -f confinc confmf
767595b296d0Smrg])
767695b296d0Smrg
767795b296d0Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
767895b296d0Smrg
767995b296d0Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
768095b296d0Smrg# Free Software Foundation, Inc.
768195b296d0Smrg#
768295b296d0Smrg# This file is free software; the Free Software Foundation
768395b296d0Smrg# gives unlimited permission to copy and/or distribute it,
768495b296d0Smrg# with or without modifications, as long as this notice is preserved.
768595b296d0Smrg
768695b296d0Smrg# serial 4
768795b296d0Smrg
768895b296d0Smrg# AM_MISSING_PROG(NAME, PROGRAM)
768995b296d0Smrg# ------------------------------
769095b296d0SmrgAC_DEFUN([AM_MISSING_PROG],
769195b296d0Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
769295b296d0Smrg$1=${$1-"${am_missing_run}$2"}
769395b296d0SmrgAC_SUBST($1)])
769495b296d0Smrg
769595b296d0Smrg
769695b296d0Smrg# AM_MISSING_HAS_RUN
769795b296d0Smrg# ------------------
769895b296d0Smrg# Define MISSING if not defined so far and test if it supports --run.
769995b296d0Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
770095b296d0SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
770195b296d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
770295b296d0Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
770395b296d0Smrg# Use eval to expand $SHELL
770495b296d0Smrgif eval "$MISSING --run true"; then
770595b296d0Smrg  am_missing_run="$MISSING --run "
770695b296d0Smrgelse
770795b296d0Smrg  am_missing_run=
770895b296d0Smrg  AC_MSG_WARN([`missing' script is too old or missing])
770995b296d0Smrgfi
771095b296d0Smrg])
771195b296d0Smrg
771295b296d0Smrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
771395b296d0Smrg#
771495b296d0Smrg# This file is free software; the Free Software Foundation
771595b296d0Smrg# gives unlimited permission to copy and/or distribute it,
771695b296d0Smrg# with or without modifications, as long as this notice is preserved.
771795b296d0Smrg
771895b296d0Smrg# AM_PROG_MKDIR_P
771995b296d0Smrg# ---------------
772095b296d0Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
772195b296d0Smrg#
772295b296d0Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
772395b296d0Smrg# created by `make install' are always world readable, even if the
772495b296d0Smrg# installer happens to have an overly restrictive umask (e.g. 077).
772595b296d0Smrg# This was a mistake.  There are at least two reasons why we must not
772695b296d0Smrg# use `-m 0755':
772795b296d0Smrg#   - it causes special bits like SGID to be ignored,
772895b296d0Smrg#   - it may be too restrictive (some setups expect 775 directories).
772995b296d0Smrg#
773095b296d0Smrg# Do not use -m 0755 and let people choose whatever they expect by
773195b296d0Smrg# setting umask.
773295b296d0Smrg#
773395b296d0Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
773495b296d0Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
773595b296d0Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
773695b296d0Smrg# concurrently, both version can detect that a/ is missing, but only
773795b296d0Smrg# one can create it and the other will error out.  Consequently we
773895b296d0Smrg# restrict ourselves to GNU make (using the --version option ensures
773995b296d0Smrg# this.)
774095b296d0SmrgAC_DEFUN([AM_PROG_MKDIR_P],
774195b296d0Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
774295b296d0Smrg  # We used to keeping the `.' as first argument, in order to
774395b296d0Smrg  # allow $(mkdir_p) to be used without argument.  As in
774495b296d0Smrg  #   $(mkdir_p) $(somedir)
774595b296d0Smrg  # where $(somedir) is conditionally defined.  However this is wrong
774695b296d0Smrg  # for two reasons:
774795b296d0Smrg  #  1. if the package is installed by a user who cannot write `.'
774895b296d0Smrg  #     make install will fail,
774995b296d0Smrg  #  2. the above comment should most certainly read
775095b296d0Smrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
775195b296d0Smrg  #     so it does not work when $(somedir) is undefined and
775295b296d0Smrg  #     $(DESTDIR) is not.
775395b296d0Smrg  #  To support the latter case, we have to write
775495b296d0Smrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
775595b296d0Smrg  #  so the `.' trick is pointless.
775695b296d0Smrg  mkdir_p='mkdir -p --'
775795b296d0Smrgelse
775895b296d0Smrg  # On NextStep and OpenStep, the `mkdir' command does not
775995b296d0Smrg  # recognize any option.  It will interpret all options as
776095b296d0Smrg  # directories to create, and then abort because `.' already
776195b296d0Smrg  # exists.
776295b296d0Smrg  for d in ./-p ./--version;
776395b296d0Smrg  do
776495b296d0Smrg    test -d $d && rmdir $d
776595b296d0Smrg  done
776695b296d0Smrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
776795b296d0Smrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
776895b296d0Smrg    mkdir_p='$(mkinstalldirs)'
776995b296d0Smrg  else
777095b296d0Smrg    mkdir_p='$(install_sh) -d'
777195b296d0Smrg  fi
777295b296d0Smrgfi
777395b296d0SmrgAC_SUBST([mkdir_p])])
777495b296d0Smrg
777595b296d0Smrg# Helper functions for option handling.                     -*- Autoconf -*-
777695b296d0Smrg
777795b296d0Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
777895b296d0Smrg#
777995b296d0Smrg# This file is free software; the Free Software Foundation
778095b296d0Smrg# gives unlimited permission to copy and/or distribute it,
778195b296d0Smrg# with or without modifications, as long as this notice is preserved.
778295b296d0Smrg
778395b296d0Smrg# serial 3
778495b296d0Smrg
778595b296d0Smrg# _AM_MANGLE_OPTION(NAME)
778695b296d0Smrg# -----------------------
778795b296d0SmrgAC_DEFUN([_AM_MANGLE_OPTION],
778895b296d0Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
778995b296d0Smrg
779095b296d0Smrg# _AM_SET_OPTION(NAME)
779195b296d0Smrg# ------------------------------
779295b296d0Smrg# Set option NAME.  Presently that only means defining a flag for this option.
779395b296d0SmrgAC_DEFUN([_AM_SET_OPTION],
779495b296d0Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
779595b296d0Smrg
779695b296d0Smrg# _AM_SET_OPTIONS(OPTIONS)
779795b296d0Smrg# ----------------------------------
779895b296d0Smrg# OPTIONS is a space-separated list of Automake options.
779995b296d0SmrgAC_DEFUN([_AM_SET_OPTIONS],
780095b296d0Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
780195b296d0Smrg
780295b296d0Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
780395b296d0Smrg# -------------------------------------------
780495b296d0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
780595b296d0SmrgAC_DEFUN([_AM_IF_OPTION],
780695b296d0Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
780795b296d0Smrg
780895b296d0Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
780995b296d0Smrg
781095b296d0Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
781195b296d0Smrg# Free Software Foundation, Inc.
781295b296d0Smrg#
781395b296d0Smrg# This file is free software; the Free Software Foundation
781495b296d0Smrg# gives unlimited permission to copy and/or distribute it,
781595b296d0Smrg# with or without modifications, as long as this notice is preserved.
781695b296d0Smrg
781795b296d0Smrg# serial 4
781895b296d0Smrg
781995b296d0Smrg# AM_SANITY_CHECK
782095b296d0Smrg# ---------------
782195b296d0SmrgAC_DEFUN([AM_SANITY_CHECK],
782295b296d0Smrg[AC_MSG_CHECKING([whether build environment is sane])
782395b296d0Smrg# Just in case
782495b296d0Smrgsleep 1
782595b296d0Smrgecho timestamp > conftest.file
782695b296d0Smrg# Do `set' in a subshell so we don't clobber the current shell's
782795b296d0Smrg# arguments.  Must try -L first in case configure is actually a
782895b296d0Smrg# symlink; some systems play weird games with the mod time of symlinks
782995b296d0Smrg# (eg FreeBSD returns the mod time of the symlink's containing
783095b296d0Smrg# directory).
783195b296d0Smrgif (
783295b296d0Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
783395b296d0Smrg   if test "$[*]" = "X"; then
783495b296d0Smrg      # -L didn't work.
783595b296d0Smrg      set X `ls -t $srcdir/configure conftest.file`
783695b296d0Smrg   fi
783795b296d0Smrg   rm -f conftest.file
783895b296d0Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
783995b296d0Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
784095b296d0Smrg
784195b296d0Smrg      # If neither matched, then we have a broken ls.  This can happen
784295b296d0Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
784395b296d0Smrg      # broken ls alias from the environment.  This has actually
784495b296d0Smrg      # happened.  Such a system could not be considered "sane".
784595b296d0Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
784695b296d0Smrgalias in your environment])
784795b296d0Smrg   fi
784895b296d0Smrg
784995b296d0Smrg   test "$[2]" = conftest.file
785095b296d0Smrg   )
785195b296d0Smrgthen
785295b296d0Smrg   # Ok.
785395b296d0Smrg   :
785495b296d0Smrgelse
785595b296d0Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
785695b296d0SmrgCheck your system clock])
785795b296d0Smrgfi
785895b296d0SmrgAC_MSG_RESULT(yes)])
785995b296d0Smrg
786095b296d0Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
786195b296d0Smrg#
786295b296d0Smrg# This file is free software; the Free Software Foundation
786395b296d0Smrg# gives unlimited permission to copy and/or distribute it,
786495b296d0Smrg# with or without modifications, as long as this notice is preserved.
786595b296d0Smrg
786695b296d0Smrg# AM_PROG_INSTALL_STRIP
786795b296d0Smrg# ---------------------
786895b296d0Smrg# One issue with vendor `install' (even GNU) is that you can't
786995b296d0Smrg# specify the program used to strip binaries.  This is especially
787095b296d0Smrg# annoying in cross-compiling environments, where the build's strip
787195b296d0Smrg# is unlikely to handle the host's binaries.
787295b296d0Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
787395b296d0Smrg# always use install-sh in `make install-strip', and initialize
787495b296d0Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
787595b296d0SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
787695b296d0Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
787795b296d0Smrg# Installed binaries are usually stripped using `strip' when the user
787895b296d0Smrg# run `make install-strip'.  However `strip' might not be the right
787995b296d0Smrg# tool to use in cross-compilation environments, therefore Automake
788095b296d0Smrg# will honor the `STRIP' environment variable to overrule this program.
788195b296d0Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
788295b296d0Smrgif test "$cross_compiling" != no; then
788395b296d0Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
788495b296d0Smrgfi
788595b296d0SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
788695b296d0SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
788795b296d0Smrg
788895b296d0Smrg# Check how to create a tarball.                            -*- Autoconf -*-
788995b296d0Smrg
789095b296d0Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
789195b296d0Smrg#
789295b296d0Smrg# This file is free software; the Free Software Foundation
789395b296d0Smrg# gives unlimited permission to copy and/or distribute it,
789495b296d0Smrg# with or without modifications, as long as this notice is preserved.
789595b296d0Smrg
789695b296d0Smrg# serial 2
789795b296d0Smrg
789895b296d0Smrg# _AM_PROG_TAR(FORMAT)
789995b296d0Smrg# --------------------
790095b296d0Smrg# Check how to create a tarball in format FORMAT.
790195b296d0Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
790295b296d0Smrg#
790395b296d0Smrg# Substitute a variable $(am__tar) that is a command
790495b296d0Smrg# writing to stdout a FORMAT-tarball containing the directory
790595b296d0Smrg# $tardir.
790695b296d0Smrg#     tardir=directory && $(am__tar) > result.tar
790795b296d0Smrg#
790895b296d0Smrg# Substitute a variable $(am__untar) that extract such
790995b296d0Smrg# a tarball read from stdin.
791095b296d0Smrg#     $(am__untar) < result.tar
791195b296d0SmrgAC_DEFUN([_AM_PROG_TAR],
791295b296d0Smrg[# Always define AMTAR for backward compatibility.
791395b296d0SmrgAM_MISSING_PROG([AMTAR], [tar])
791495b296d0Smrgm4_if([$1], [v7],
791595b296d0Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
791695b296d0Smrg     [m4_case([$1], [ustar],, [pax],,
791795b296d0Smrg              [m4_fatal([Unknown tar format])])
791895b296d0SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
791995b296d0Smrg# Loop over all known methods to create a tar archive until one works.
792095b296d0Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
792195b296d0Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
792295b296d0Smrg# Do not fold the above two line into one, because Tru64 sh and
792395b296d0Smrg# Solaris sh will not grok spaces in the rhs of `-'.
792495b296d0Smrgfor _am_tool in $_am_tools
792595b296d0Smrgdo
792695b296d0Smrg  case $_am_tool in
792795b296d0Smrg  gnutar)
792895b296d0Smrg    for _am_tar in tar gnutar gtar;
792995b296d0Smrg    do
793095b296d0Smrg      AM_RUN_LOG([$_am_tar --version]) && break
793195b296d0Smrg    done
793295b296d0Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
793395b296d0Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
793495b296d0Smrg    am__untar="$_am_tar -xf -"
793595b296d0Smrg    ;;
793695b296d0Smrg  plaintar)
793795b296d0Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
793895b296d0Smrg    # ustar tarball either.
793995b296d0Smrg    (tar --version) >/dev/null 2>&1 && continue
794095b296d0Smrg    am__tar='tar chf - "$$tardir"'
794195b296d0Smrg    am__tar_='tar chf - "$tardir"'
794295b296d0Smrg    am__untar='tar xf -'
794395b296d0Smrg    ;;
794495b296d0Smrg  pax)
794595b296d0Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
794695b296d0Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
794795b296d0Smrg    am__untar='pax -r'
794895b296d0Smrg    ;;
794995b296d0Smrg  cpio)
795095b296d0Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
795195b296d0Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
795295b296d0Smrg    am__untar='cpio -i -H $1 -d'
795395b296d0Smrg    ;;
795495b296d0Smrg  none)
795595b296d0Smrg    am__tar=false
795695b296d0Smrg    am__tar_=false
795795b296d0Smrg    am__untar=false
795895b296d0Smrg    ;;
795995b296d0Smrg  esac
796095b296d0Smrg
796195b296d0Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
796295b296d0Smrg  # and am__untar set.
796395b296d0Smrg  test -n "${am_cv_prog_tar_$1}" && break
796495b296d0Smrg
796595b296d0Smrg  # tar/untar a dummy directory, and stop if the command works
796695b296d0Smrg  rm -rf conftest.dir
796795b296d0Smrg  mkdir conftest.dir
796895b296d0Smrg  echo GrepMe > conftest.dir/file
796995b296d0Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
797095b296d0Smrg  rm -rf conftest.dir
797195b296d0Smrg  if test -s conftest.tar; then
797295b296d0Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
797395b296d0Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
797495b296d0Smrg  fi
797595b296d0Smrgdone
797695b296d0Smrgrm -rf conftest.dir
797795b296d0Smrg
797895b296d0SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
797995b296d0SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
798095b296d0SmrgAC_SUBST([am__tar])
798195b296d0SmrgAC_SUBST([am__untar])
798295b296d0Smrg]) # _AM_PROG_TAR
798395b296d0Smrg
7984